Tool/software: Linux
Hi,
I'd like to know if for c66ak2h is possible boot with a multifile containing monitor+kernel+ramdisk+fdt+fpga+etc...
I have created this its file:
/*
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
*/
/dts-v1/;
/ {
description = "Various kernels, ramdisks and FDT blobs";
#address-cells = <1>;
images {
/*
uboot {
description = "U-Boot";
type = "standalone";
arch = "arm";
compression = "none";
load = <0x0C000000>;
};
atf {
description = "ARM Trusted Firmware";
type = "firmware";
arch = "arm";
compression = "none";
load = <0x18000>;
entry = <0x18000>;
};
*/
firmware@1 {
description = "Boot monitor";
data = /incbin/("./board-support/boot-monitor-4.0+gitAUTOINC+e1f885ab6d/skern-k2hk");
type = "firmware";
arch = "arm";
compression = "none";
load = <0x0c5f0000>;
entry = <0x0c5f0000>;
hash@1 {
algo = "md5";
};
hash@2 {
algo = "sha1";
};
};
/*
firmware@1 {
description = "Boot monitor2";
data = /incbin/("./board-support/boot-monitor-4.0+gitAUTOINC+e1f885ab6d/soc/k2hk/s-kernel.out");
type = "firmware";
arch = "arm";
compression = "none";
load = <0x0c5f0000>;
entry = <0x0c5f0000>;
hash@1 {
algo = "md5";
};
hash@2 {
algo = "sha1";
};
};
firmware@2 {
description = "Boot monitor3";
data = /incbin/("./board-support/boot-monitor-4.0+gitAUTOINC+e1f885ab6d/soc/k2hk/nonsec.out");
type = "firmware";
arch = "arm";
compression = "none";
load = <0x0c5f0000>;
entry = <0x0c5f0000>;
hash@1 {
algo = "md5";
};
hash@2 {
algo = "sha1";
};
};
*/
kernel@1 {
description = "Board Kernel";
data = /incbin/("./board-support/linux-rt-4.14.40+gitAUTOINC+d5443cbd3b-gd5443cbd3b/arch/arm/boot/zImage");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x80000000>;
entry = <0x80000000>;
hash@1 {
algo = "md5";
};
hash@2 {
algo = "sha1";
};
};
/*
kernel@2 {
description = "Kernel 2.4.25";
data = /incbin/("./2.4.25Image");
type = "kernel";
arch = "arm";
os = "linux";
compression = "gzip";
load = <00000000>;
entry = <00000000>;
hash@1 {
algo = "md5";
};
};
ramdisk@1 {
description = "Linux ramdisk";
data = /incbin/("./ramdisk");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "gzip";
load = <0x???00000>;
entry = <0x???00000>;
hash@1 {
algo = "sha1";
};
};
initrd {
description = "Linux initrd";
type = "ramdisk";
compression = "none";
load = <0x??00000>;
arch = "arm";
};
*/
fdt@1 {
description = "Board fdt";
data = /incbin/("./board-support/linux-rt-4.14.40+gitAUTOINC+d5443cbd3b-gd5443cbd3b/arch/arm/boot/dts/keystone-k2hk-evm.dtb");
type = "flat_dt";
load = <0x87000000>;
arch = "arm";
compression = "none";
hash@1 {
algo = "crc32";
};
/*
fpga@1 {
description = "FPGA";
data = /incbin/("/tftpboot/download.bit");
type = "fpga";
arch = "arm";
compression = "none";
load = <0x90000000>;
hash@1 {
algo = "md5";
};
*/
};
};
configurations {
default = "config@1";
config@1{
description ="Board conf1";
/*loadables = "uboot", "atf", "kernel", "initrd";*/
loadables = "firmware@1", "kernel@1", "fdt@1";
kernel = "kernel@1";
firmware = "firmware@1";
/*ramdisk = "ramdisk@1";*/
fdt = "fdt@1";
/*fpga = "fpga@1";*/
};
};
};
The output file is:
@@@@@@@@@@@@@@@@@@@@@@@ Multi @@@@@@@@@@@@@@@@@@@@@@@@
Warning (unit_address_vs_reg): Node /images/firmware@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/firmware@1/hash@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/firmware@1/hash@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/kernel@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/kernel@1/hash@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/kernel@1/hash@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/fdt@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /images/fdt@1/hash@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /configurations/config@1 has a unit name, but no reg property
FIT description: Various kernels, ramdisks and FDT blobs
Created: Fri Feb 15 13:49:07 2019
Image 0 (firmware@1)
Description: Boot monitor
Created: Fri Feb 15 13:49:07 2019
Type: Firmware
Compression: uncompressed
Data Size: 32768 Bytes = 32.00 KiB = 0.03 MiB
Architecture: ARM
Load Address: 0x0c5f0000
Hash algo: md5
Hash value: 00b5d2d6da793f96d5bc392d14382e05
Hash algo: sha1
Hash value: 29bdfafd03f3075ead0cd69382e22e22bbc46e00
Image 1 (kernel@1)
Description: Board Kernel
Created: Fri Feb 15 13:49:07 2019
Type: Kernel Image
Compression: uncompressed
Data Size: 3850752 Bytes = 3760.50 KiB = 3.67 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80000000
Entry Point: 0x80000000
Hash algo: md5
Hash value: 1ca6cff3788a8eb9561469d34c468ef2
Hash algo: sha1
Hash value: a75ccc5e86990e863e9d7388f87550e2c4af2b3d
Image 2 (fdt@1)
Description: Board fdt
Created: Fri Feb 15 13:49:07 2019
Type: Flat Device Tree
Compression: uncompressed
Data Size: 39118 Bytes = 38.20 KiB = 0.04 MiB
Architecture: ARM
Load Address: 0x87000000
Hash algo: crc32
Hash value: dea8228d
Default Configuration: 'config@1'
Configuration 0 (config@1)
Description: Board conf1
Kernel: kernel@1
FDT: fdt@1
Loadables: firmware@1
kernel@1
fdt@1
The image is created and downloaded on board, but I can't find any command to use to run before the firmware (boot monitor) and then Linux.
Is it possible have a u-boot script to load monitor (and others parts)? and the command to do in u-boot shell to start thet script?
The Uboot version is:
U-Boot 2018.01-gc02be9e (Feb 14 2019 - 17:43:37 +0100)
env default -f -a
setenv ipaddr 192.168.99.23
setenv serverip 192.168.99.24
setenv nfs_root 192.168.99.24
setenv boot net
setenv tftp_root /tftpboot
setenv nfs_root /export..../targetNFS
setenv fdtaddr 0x87000000
setenv addr_mon 0x0c5f0000
setenv loadaddr 0x88000000
setenv get_kern_net tftpboot \${loadaddr} \${tftp_root}/\${name_kern}
run get_kern_net
setenv name_kern Board_multi.itb
boot
I have tried the following boot commands:
bootm ${addr_mon}
bootm ${loadaddr} - ${fdtaddr}
And that the command is not supported (I suppose):
bootm {addr_mon}:firmware@1#config@1
=> run get_kern_net
netcp@2000000 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 44
*** Unhandled DHCP Option in OFFER/ACK: 44
DHCP client bound to address 192.168.99.23 (355 ms)
Using netcp@2000000 device
TFTP from server 192.168.99.24; our IP address is 192.168.99.23
Filename '/tftpboot/Board_multi.itb'.
Load address: 0x88000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
########
3 MiB/s
done
Bytes transferred = 3924714 (3be2ea hex)
=> bootm 0x80000000:kernel@1#config@1
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>
=> bootm 0x88000000:kernel@1
## Loading kernel from FIT Image at 88000000 ...
Trying 'kernel@1' kernel subimage
Description: DRSP Kernel
Created: 2019-02-15 12:49:07 UTC
Type: Kernel Image
Compression: uncompressed
Data Start: 0x880081f0
Data Size: 3850752 Bytes = 3.7 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80000000
Entry Point: 0x80000000
Hash algo: md5
Hash value: 1ca6cff3788a8eb9561469d34c468ef2
Hash algo: sha1
Hash value: a75ccc5e86990e863e9d7388f87550e2c4af2b3d
Verifying Hash Integrity ... md5+ sha1+ OK
Loading Kernel Image ... OK
Starting kernel ...
Nothing else.
Best regards,
Dario