Convert test executables to bootloader images?

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jan 17 07:19:16 UTC 2024


Hello,

the RTEMS 6 build system only produces test executables in ELF format. 
For example, if you want to run the tests using U-Boot, then you have to 
convert the ELF file with the U-Boot mkimage tool to an U-Boot image 
using BSP-specific command line arguments. For other bootloaders you 
have to do other things.

In the old build system this was done by the bsp-post-link hooks:

define bsp-post-link
   $(OBJCOPY) -O binary '$@' '$(basename $@).bin'
   gzip -f -9 '$(basename $@).bin'
   mkimage -A ppc -O linux -T kernel -a 0x4000 -e 0x4000  -name 
'$(notdir $@)' -d '$(basename $@).bin.gz' '$(basename $@).img'
   $(default-bsp-post-link)
endef

One approach would be to let the BSPs optionally provide a script 
(configurable: shell, python, bat) to convert an ELF file to a 
bootloader image. We could add a new waf target to do the conversion for 
all test executables, for example:

./waf bootimages

It would invoke the BSP-provided script for all test executables.

-- 
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list