- 16 Jul, 2013 4 commits
-
-
Marek Vasut authored
The command stream is now in a configuration file, the target_cpu field is no longer used. Remove it. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The section count can be calculated while parsing the configuration file. Do it and then use it when filling the SB image header. Moreover, the bootable section and possible multiple bootable sections collision can also be much better identified while parsing the configuration file. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Rework the command parser. The command parsing can happen when reading the configuration file already, there is no need to read the configuration file in and parse only the result. The parser is now executed directly on each line that is read by from the configuration file instead and builds the image tree right away. Moreover, the parser is now implemented in much cleaner way and the command and section generation is cleanly separated. Finally, the memory usage of the tool went down by 20% . Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The IVT flag is completely useless now, especially since we treat the IVT as yet another data payload rather than something special. Signed-off-by:
Marek Vasut <marex@denx.de>
-
- 14 Jul, 2013 36 commits
-
-
Marek Vasut authored
Add the newly allocated section into the section list very early, so that in case of a failure during command parsing, the section can be properly deallocated with all the other sections. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Report proper error messages when the command parsing function fails. Also report line number at which the error happened. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Move the line tokenization fully into the sb_tag_to_command(). Moreover, improve error return and reporting from this function. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Save the number at which line the command was. This will help when reporting errors from the parser. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Use -EINVAL instead of -1 in the error messages. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
In case the parser comes across another section, it should return into the section loop instead of treating it as an unknown instruction. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The BOOTABLE flag was set by default during development. This is not correct, implement a proper BOOTABLE flag for each section and make this configurable from the command file. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The comma shall not be at the end of enum according to GCC. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Remove these useless #define'd values. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Check if the configuration file contains the LAST option of TAG command and if so, set up the LAST flag in the SB file. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Properly set the HAB flag to a #define'd value instead of a hardcoded value. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Add example configuration files for loading U-Boot and it's SPL on both MX23 and MX28. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Load the instructions that shall be inserted into the SB image from file. There is now an easy parser and the built-in instruction tables are gone. WARNING: This breaks the command line interface! Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
When loading the command table, it is much more beneficial to load it as a linked list, especially since we will be soon loading the table from a file. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The static IVT tables are no longer used, remove them. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The command file parsing should be in a separate function and should be called right before the image is being produced. Move the parsing into separate function from set_cpu(). Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Implement simple parser that reads command from text input. This allows us to get rid of the built-in tables and replace them with built-in blocks of text. In the long run, they are easily replacable by file input. Note that in order to preserve all functionality, the table containing instructions need to be hand-patched, therefore there is some copying happening in set_cpu(). Moreover, set_cpu() is now called a little later to ensure the filenames of spl and u-boot are already read. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The verbose boot flag should be part of the image context, make it so. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Use enum of list of CPU types to improve the typing of the variable. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The CPU model should be part of the image context, make it so. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Write the output file directly instead of creating a block in memory and then writing this whole block into a file. This saves some memory and is a bit easier. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
So far, we only support one section, but once we have proper parser we will be able to support multiple sections. Prepare for this by implementing the section generation in the image tree correctly. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
In case the memory allocation fails in the command parser, there will might remain some allocated memory upon return. Fix this. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
No functional change in the code, just reorder the functions so they are not in such a state of chaos. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The variable was initialized and reinitialized twice as a remnant of the rework, initialize it only once. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
There is no need to pass the IV explicitly as another argument, the function can pull this information from the image context. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Update the checksum of the command right after we have all necessary information filled in it instead of doing it late in the function that encrypts the command. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Split the code that encrypts portions of the image and the code that assembles the resulting image in memory. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
We need to store image digest in image context to let it traverse between the image creation function and image write function. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Store image dictionary in image context, as this is where it should be according to the documentation. We also need it here to let it traverse between the image creation function and image write function. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
This patch pulls out the function calls that dump the final image at the end of function that creates the image. This will now allow easy separation of them into self-standing function. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The encryption of command data corrupted the contents of the structure. To prevent that, store the encrypted command data in a separate entry in the command context structure. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
This instruction does nothing and is easy to implement. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
When loading the IVT, make a local copy of it instead of pointing directly onto the static structure. This makes it easier to operate with the file buffers associated with LOAD command in mostly uniform manner. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The TAG command has to be encrypted using IV from the header, so reinit the AES with the IV for each section. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
This patch fixes the generation of section header block for multiple sections. Before this patch, only one section was always generated, which was incorrect. Signed-off-by:
Marek Vasut <marex@denx.de>
-