- 14 Jul, 2013 29 commits
-
-
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>
-
Marek Vasut authored
Move the function lower in mxssb.c so there is no longer need for forward declaration of sb_load_file(). Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Move the loading of a file associated with a LOAD instruction into sb_tag_to_command, since this is where the LOAD instruction is filled. This will allow us to keep the handling of LOAD instruction in one place. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The command stream now only contains the filename as it should. The IVTs are currently handled via little hack, but this will change once there is a proper file parser. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The image tree will be free'd in main(), so there is no need to worry about freeing it here. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The cmd allocation in sb_tag_to_command() is no longer needed. It was needed temporarily for compatibility reasons during the transition, but this is resolved now. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The TAG instruction is wholy filled later and the LOAD instruction fields need to be updated after a file was loaded. Thus, clean up bogus assignments into fields of these instructions. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The sb_load_binary() call is now redundant, since the files are now loaded while preparing the SB image header. Reduce this to a stub function that fills the sb instruction stream. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Pull the SB command blocks from the image tree. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Pull out the section header information from the SB image tree. This allows us to remove some ad-hoc calls. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The section offset computation has to be done after the SB image header is filled in. Moreover, the TAG command can be filled in only afterwards as well, since it's almost exact copy of the section header. Implement a function that fixes up the section headers and TAG commands. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Pass the sb_image_ctx context into the cryptographic functions instead of passing the standalone cryptographic structures. This makes the code a little cleaner. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Swap the malloc upwards as it can now no longer depends on SB header crypto init which filled the SB header with additional data. Now the SB header crypto operation and malloc of the image are truly separate entities. This also groups the SB header crypto operation together nicely. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Calculate the size of the section block while reading it. This value can be later reused when calculating the placement of the final image blocks. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
This patch loads a file associated with a LOAD command and puts it correctly into the tree-like structure representing the SB image. Note that the loading operation is now done twice, but this will be fixed shortly. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Rework the mechanism behind generating the SB image header generation. This also puts down the groundwork for further rework of the mechanism for contructing the image. The basic idea here is to parse the whole image, construct a tree-like structure in RAM that represents the image and operate with it throughout the whole life-cycle of the program. Right now, this only serves the purpose of filling the SB image header, but this will change in subsequent patches. NOTE that this patch introduces a lot of FIXMEs, since this is a huge rework of the whole tool. This patch revealed a lot of weak spots too. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
There is only one SB image header, so make it part of the image context instead of having separate variable for this purpose. Moreover, it's now possible to constify the SB header template. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The program uses many variables throughout it's operation, implement a program context structure to hold these variables. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Do not abuse the start of image directly as the CBC-MAC IV, but create separate overlaid field for this purpose. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Implement a function that allocates space for an instructions and fills in the fields on a per-command basis. Note that some commands are still not implemented. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Certain fields of the SB header are only available since v1.1 of the SB file format, document that. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
This patch adds all possible command flags that can be used with the SB file format. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Add details about the fields for all the commands, moreover align the names of the fields with the documentation where it was not confusing. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Fill in the full table of SB command tags as they are listed in the SB image specification. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The SB image format specification calls the command identifier a tag, so align the source this way. Also rename the commands so they match the SB format specification. Signed-off-by:
Marek Vasut <marex@denx.de>
-
- 05 Jun, 2013 3 commits
-
-
Marek Vasut authored
This will allow GCC to lint the sources even more. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
The type must be unsigned int, otherwise gcc -Wextra produces a warning. Signed-off-by:
Marek Vasut <marex@denx.de>
-
According to http://webpages.charter.net/ppluzhnikov/linker.html , the order of the libraries linked with the resulting executable on the linker command line does matter and can cause linker to be unable to resolve symbols if incorrect. Signed-off-by:
Markus Hubig <mhubig@imko.de>
-
- 08 May, 2013 3 commits
-
-
Marek Vasut authored
Add support for i.MX23 u-boot.sb generation. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Parse command line options so the input files from which u-boot.sb is generated can be configured at runtime using these options. Signed-off-by:
Marek Vasut <marex@denx.de>
-
Marek Vasut authored
Add missing return value check for sb_load_binary() call. Signed-off-by:
Marek Vasut <marex@denx.de>
-
- 13 Dec, 2012 1 commit
-
-
Marek Vasut authored
Add MX28 u-boot.sb SB image generator. Tested on DENX M28EVK by generating u-boot.sb and then loading it via mxsldr. Signed-off-by:
Marek Vasut <marex@denx.de>
-