Changes between Version 25 and Version 26 of newport/bootloader


Ignore:
Timestamp:
06/19/2020 03:02:15 PM (4 years ago)
Author:
Tim Harvey
Comment:

replace use of mkits.sh script and use 'mkimage -f auto' introduced in u-boot-tools 2016.05

Legend:

Unmodified
Added
Removed
Modified
  • newport/bootloader

    v25 v26  
    229229 * introduced to resolve limitations with original single-image formats and follow-on multi-image format supported by UBoot bootm (boot memory)
    230230 * uses power of the Device-Tree-Compiler (DTC)
    231  * FIT .itb files can be created with mkimage by passing in a .its file which in device-tree notation describes the images
     231 * FIT .itb files can be created with mkimage
    232232 * U-Boot supports FIT with several commands:
    233233  - {{{source <addr>:<name>}}} # source a script by name from FIT image in memory
     
    238238
    239239Example:
    240  * kernel.its with a single compressed kernel for ARM64 (used by Newport)
    241 {{{#!bash
    242 /dts-v1/;
    243 / {
    244         description = "Simple image with single Linux kernel";
    245         #address-cells = <1>;
    246         images {
    247                 kernel@1 {
    248                         description = "ThunderX kernel";
    249                         data = /incbin/("./Image.gz");
    250                         type = "kernel";
    251                         arch = "arm64";
    252                         os = "linux";
    253                         compression = "gzip";
    254                         load = <0x40080000>;
    255                         entry = <0x40080000>;
    256                         hash@1 {
    257                                 algo = "sha256";
    258                         };
    259                 };
    260         };
    261 
    262         configurations {
    263                 default = "conf@1";
    264                 conf@1 {
    265                         description = "Boot Linux kernel";
    266                         kernel = "kernel@1";
    267                 };
    268         };
    269 };
    270 }}}
    271  * create image:
     240 * create FIT image comprised of compressed kernel image:
    272241{{{#!bash
    273242cp arch/arm64/boot/Image .
    274243gzip Image
    275 mkimage -f kernel.its /tftpboot/kernel.itb
     244mkimage -f auto -A arm64 -O linux -T kernel -C gzip -n "Kernel" \
     245 -a 20080000 -e 20080000 -d Image.gz kernel.itb
    276246}}}
    277247 * boot the default configuration from U-Boot. For example if your using an ext4 fs on the first MMC device, 2nd partition use:
    278248{{{#!bash
    279249tftpboot $loadaddr kernel.itb && setenv bootargs 'console=ttyAMA0,115200n8 earlycon=pl011,0x87e028000000 coherent_poll=64M root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw' && bootm $loadaddr - $fdtcontroladdr
    280 }}}
    281 
    282 Note that the Newport BSP does these steps in its 'ubuntu-image' make target uses the [https://github.com/Gateworks/bsp-newport/blob/master/mkits.sh newport/mkits.sh] script to create an its file then uses this to kernel a kernel.itb. You can follow along with the [https://github.com/Gateworks/bsp-newport/blob/master/Makefile] and do these by hand in your Newport BSP directory:
    283 {{{#!bash
    284 # create kernel.itb with compressed kernel image
    285 tar xvf linux-newport.tar.xz ./boot/Image --strip-components=2
    286 mv Image vmlinux
    287 gzip -f vmlinux
    288 ./newport/mkits.sh -o kernel.its -k vmlinux.gz -C gzip -v "Ubuntu"
    289 mkimage -f kernel.its kernel.itb
    290250}}}
    291251