]> git.baikalelectronics.ru Git - uboot.git/commit
arm64: versal-net: Enable remaking ELF from bin
authorMichal Simek <michal.simek@amd.com>
Thu, 19 Jan 2023 09:46:59 +0000 (10:46 +0100)
committerMichal Simek <michal.simek@amd.com>
Fri, 27 Jan 2023 07:41:32 +0000 (08:41 +0100)
commit2d8fe035df62dd230a724187a8f5814b3498d2f6
tree517821656a9b0df4e576a22146aff2742d90c319
parenta1f417ec6140d80f2b6248e5a40e9f1580f902db
arm64: versal-net: Enable remaking ELF from bin

U-Boot is composing u-boot.bin from u-boot-nodtb.bin with appended
dts/dt.dtb. It means U-Boot doesn't have DTB inside. When REMAKE_ELF is
enabled make will also create u-boot.elf which is recreated from
u-boot.bin. Below is build output for mini configuration how ELF is
recreated.

cat arch/arm/dts/versal-net-mini.dtb > dts/dt.dtb
cat u-boot-nodtb.bin dts/dt.dtb > u-boot-dtb.bin
cp dts/dt.dtb u-boot.dtb
cp u-boot-dtb.bin u-boot.bin
aarch64-linux-gnu-objcopy -I binary -B aarch64 -O elf64-littleaarch64
 u-boot.bin u-boot-elf.o
aarch64-linux-gnu-ld.bfd u-boot-elf.o -o u-boot.elf -EL -T u-boot-elf.lds
 --defsym="_start"=0xBBF00000 -Ttext=0xBBF00000

It is useful to have u-boot.elf present because Xilinx XSDB debugger can
load ELF file and user doesn't need to specify loading address for
u-boot.bin.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ca550c5c4bf908e757a49a83fdfab0e7100de45e.1674121617.git.michal.simek@amd.com
configs/xilinx_versal_net_mini_defconfig