Changes between Version 25 and Version 26 of newport/bootloader
- Timestamp:
- 06/19/2020 03:02:15 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
newport/bootloader
v25 v26 229 229 * introduced to resolve limitations with original single-image formats and follow-on multi-image format supported by UBoot bootm (boot memory) 230 230 * 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 images231 * FIT .itb files can be created with mkimage 232 232 * U-Boot supports FIT with several commands: 233 233 - {{{source <addr>:<name>}}} # source a script by name from FIT image in memory … … 238 238 239 239 Example: 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: 272 241 {{{#!bash 273 242 cp arch/arm64/boot/Image . 274 243 gzip Image 275 mkimage -f kernel.its /tftpboot/kernel.itb 244 mkimage -f auto -A arm64 -O linux -T kernel -C gzip -n "Kernel" \ 245 -a 20080000 -e 20080000 -d Image.gz kernel.itb 276 246 }}} 277 247 * boot the default configuration from U-Boot. For example if your using an ext4 fs on the first MMC device, 2nd partition use: 278 248 {{{#!bash 279 249 tftpboot $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 {{{#!bash284 # create kernel.itb with compressed kernel image285 tar xvf linux-newport.tar.xz ./boot/Image --strip-components=2286 mv Image vmlinux287 gzip -f vmlinux288 ./newport/mkits.sh -o kernel.its -k vmlinux.gz -C gzip -v "Ubuntu"289 mkimage -f kernel.its kernel.itb290 250 }}} 291 251