| 8137af19 | 14-Dec-2013 |
Scott Wood <scottwood@freescale.com> |
arm64: Add tool to statically apply RELA relocations
ARM64 uses the newer RELA-style relocations rather than the older REL. RELA relocations have an addend in the relocation struct, rather than expe
arm64: Add tool to statically apply RELA relocations
ARM64 uses the newer RELA-style relocations rather than the older REL. RELA relocations have an addend in the relocation struct, rather than expecting the loader to read a value from the location to be updated.
While this is beneficial for ordinary program loading, it's problematic for U-Boot because the location to be updated starts out with zero, rather than a pre-relocation value. Since we need to be able to run C code before relocation, we need a tool to apply the relocations at build time.
In theory this tool is applicable to other newer architectures (mainly 64-bit), but currently the only relocations it supports are for arm64, and it assumes a 64-bit little-endian target. If the latter limitation is ever to be changed, we'll need a way to tell the tool what format the image is in. Eventually this may be replaced by a tool that uses libelf or similar and operates directly on the ELF file. I've written some code for such an approach but libelf does not make it easy to poke addresses by memory address (rather than by section), and I was hesitant to write code to manually parse the program headers and do the update outside of libelf (or to iterate over sections) -- especially since it wouldn't get test coverage on things like binaries with multiple PT_LOAD segments. This should be good enough for now to let the manual relocation stuff be removed from the arm64 patches.
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
show more ...
|
| 0fcac1ab | 26-Dec-2013 |
Rajeshwari Birje <rajeshwari.s@samsung.com> |
SPL: EXYNOS: Prepare for variable size SPL support
When variable size SPL is used, the BL1 expects the SPL to be encapsulated differently: instead of putting the checksum at a fixed offset in the SP
SPL: EXYNOS: Prepare for variable size SPL support
When variable size SPL is used, the BL1 expects the SPL to be encapsulated differently: instead of putting the checksum at a fixed offset in the SPL blob, prepend the blob with a header including the size and the checksum.
The enhancements include - adding a command line option, '--vs' to indicate the need for the variable size encapsulation - padding the fixed size encapsulated blob with 0xff instead of random memory contents - do not silently truncate the input file, report error instead - no need to explicitly closing files/freeing memory, this all happens on exit; removing cleanups it makes code clearer - profuse commenting - modify Makefile to allow enabling the new feature per board
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
show more ...
|
| a804b5ce | 01-Dec-2013 |
Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> |
Add dumpimage, a tool to extract data from U-Boot images
Given a multi-file image created through the mkimage's -d option:
$ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.m
Add dumpimage, a tool to extract data from U-Boot images
Given a multi-file image created through the mkimage's -d option:
$ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \ multi.img
Image Name: x86 Created: Thu Jul 25 10:29:13 2013 Image Type: Intel x86 Linux Multi-File Image (gzip compressed) Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB Load Address: 00000000 Entry Point: 00000000 Contents: Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB
It is possible to perform the innverse operation -- extracting any file from the image -- by using the dumpimage's -i option:
$ dumpimage -i multi.img -p 2 System.map
Although it's feasible to retrieve "data files" from image through scripting, the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole purpose is cumbersome and unreliable -- once you must keep track of file sizes inside the image. Furthermore, extracting data files using "dumpimage" tool is faster than through scripting.
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| f86ed6a8 | 01-Dec-2013 |
Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> |
tools: moved code common to all image tools to a separated module.
In order to avoid duplicating code and keep only one point of modification, the functions, structs and defines useful for "dumpimag
tools: moved code common to all image tools to a separated module.
In order to avoid duplicating code and keep only one point of modification, the functions, structs and defines useful for "dumpimage" were moved from "mkimage" to a common module called "imagetool".
This modification also weakens the coupling between image types (FIT, IMX, MXS, and so on) and image tools (mkimage and dumpimage). Any tool may initialize the "imagetool" through register_image_tool() function, while the image types register themselves within an image tool using the register_image_type() function:
+---------------+ +------| fit_image | +--------------+ +-----------+ | +---------------+ | mkimage |--------> | | <-----+ +--------------+ | | +---------------+ | imagetool | <------------| imximage | +--------------+ | | +---------------+ | dumpimage |--------> | | <-----+ +--------------+ +-----------+ | +---------------+ +------| default_image | +---------------+
register_image_tool() register_image_type()
Also, the struct "mkimage_params" was renamed to "image_tool_params" to make clear its general purpose.
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 2e78e75e | 14-Nov-2013 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
tools: updater: Remove remainders of dead board
tools/updater needs board/MAI/AmigaOneG3SE board for compiling. But AmigaOneG3SE board was already deleted by Commit 953b7e6.
Signed-off-by: Masahiro
tools: updater: Remove remainders of dead board
tools/updater needs board/MAI/AmigaOneG3SE board for compiling. But AmigaOneG3SE board was already deleted by Commit 953b7e6.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| 8426d8b0 | 10-Oct-2013 |
Stephen Warren <swarren@nvidia.com> |
buildman: make board selector argument a regex
A common use-case is to build all boards for a particular SoC. This can be achieved by:
./tools/buildman/buildman -b mainline_dev tegra20
However, wh
buildman: make board selector argument a regex
A common use-case is to build all boards for a particular SoC. This can be achieved by:
./tools/buildman/buildman -b mainline_dev tegra20
However, when the SoC is a member of a family of SoCs, and each SoC has a different name, it would be even more useful to build all boards for every SoC in that family. This currently isn't possible since buildman's board selection command-line arguments are compared to board definitions using pure string equality.
To enable this, compare using a regex match instead. This matches MAKEALL's handling of command-line arguments. This enables:
(all Tegra) ./tools/buildman/buildman -b mainline_dev tegra
(all Tegra) ./tools/buildman/buildman -b mainline_dev '^tegra.*$'
(all Tegra20, Tegra30 boards, but not Tegra114) ./tools/buildman/buildman -b mainline_dev 'tegra[23]'
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| a707b3db | 28-Sep-2013 |
Jagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com> |
buildman: Use env to pick the python from $PATH
python used in buildman doesn't need to be placed in /usr/bin/python, So use env to ensure that the interpreter will pick the python from environment.
buildman: Use env to pick the python from $PATH
python used in buildman doesn't need to be placed in /usr/bin/python, So use env to ensure that the interpreter will pick the python from environment.
Usefull with several versions of python's installed on system.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|