LS1012A RDB Bad FIT kernel image format

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1012A RDB Bad FIT kernel image format

Jump to solution
1,490 Views
epoletaev
Contributor III

Hello,

I created firmware image using LSDK with Yocto using following commands:

 

 

 

repo init -u https://github.com/nxp-qoriq/yocto-sdk -b kirkstone -m ls-5.15.71-2.2.0_distro.xml
repo sync
. setup-env -m ls1012ardb
cd ..
DISTRO=fsl-qoriq-distro MACHINE=ls1012ardb source distro-setup-env
bitbake  fsl-image-lite
bitbake qoriq-composite-firmware

 

 

 

Updated Bootloader to support larger NOR flash chip (due to image generated by LSDK exceeds standard flash size).

Then booting up. Bootloader recognizes the flash chip, but unable to load kernel image:

Bad FIT kernel image format! (err=-22)
ERROR: can't get kernel image!
 
Boot log:

 

 

 

U-Boot 2022.04+fsl+g181859317b (Nov 15 2022 - 06:28:05 +0000)

SoC:  LS1012AE Rev2.0 (0x87040020)
Clock Configuration:
       CPU0(A53):1000 MHz
       Bus:      250  MHz  DDR:      1000 MT/s
Reset Configuration Word (RCW):
       00000000: 0800000a 00000000 00000000 00000000
       00000010: 35080000 c000000c 40000000 00001800
       00000020: 00000000 00000000 00000000 00014571
       00000030: 00000000 18c2a120 00000096 00000000
DRAM:  958 MiB
Using SERDES1 Protocol: 13576 (0x3508)
Core:  17 devices, 13 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from SPIFlash... SF: Detected n25q00a with page size 256 Bytes, erase size 64 KiB, total 128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: LS1012A RDB Board
Board: LS1012ARDB Version: RevE, boot from QSPI: bank1
Net:   PFE class pe firmware for Linux
PFE tmu pe firmware for Linux
PFE class pe firmware for u-boot
PFE tmu pe firmware for u-boot

Warning: pfe_eth0 (eth0) using random MAC address - d2:55:81:08:20:1c
eth0: pfe_eth0
Warning: pfe_eth1 (eth1) using random MAC address - 6a:a7:87:70:bb:9a
, eth1: pfe_eth1
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk esdhc@1560000.blk...
Scanning disk esdhc@1580000.blk...
Found 3 disks
No EFI system partition
ERROR: invalid device tree
starting USB...
Bus usb3@2f00000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb3@2f00000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
PCIe1: pcie@3400000 Root Complex: no link
scanning bus for devices...
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst

Device 0: unknown device
pfe_eth0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY pfe_eth0
Speed detected 64
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
Speed detected 64
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
Trying load from qspi..
SF: Detected n25q00a with page size 256 Bytes, erase size 64 KiB, total 128 MiB
device 0 offset 0x1000000, size 0x2800000
SF: 41943040 bytes @ 0x1000000 Read: OK
## Loading kernel from FIT Image at a0000000 ...
Bad FIT kernel image format! (err=-22)
ERROR: can't get kernel image!

 

 

 

 

 

Memory dump:

 

 

 

=> md a0000000
a0000000: edfe0dd0 d0165003 38000000 b4125003  .....P.....8.P..
a0000010: 28000000 11000000 10000000 00000000  ...(............
a0000020: 6c000000 7c125003 00000000 00000000  ...l.P.|........
a0000030: 00000000 00000000 01000000 00000000  ................
a0000040: 03000000 04000000 5c000000 f09e9b4d  ...........\M...
a0000050: 03000000 23000000 00000000 366d7261  .......#....arm6
a0000060: 656b2034 6c656e72 6172202c 7369646d  4 kernel, ramdis
a0000070: 6e61206b 44462064 6c622054 0000626f  k and FDT blob..
a0000080: 03000000 04000000 0c000000 01000000  ................
a0000090: 01000000 67616d69 00007365 01000000  ....images......
a00000a0: 6e72656b 00006c65 03000000 0d000000  kernel..........
a00000b0: 00000000 364d5241 654b2034 6c656e72  ....ARM64 Kernel
a00000c0: 00000000 03000000 69dffd00 1b000000  ...........i....
a00000d0: 08088b1f 64b4b48b 6d490300 00656761  .......d..Image.
a00000e0: 780b7dec ffb5d554 924ce73a 490843c9  .}.xT...:.L..C.I
a00000f0: 99020f20 b6315049 1407928a 80264e6c   ...IP1.....lN&.
=>
a0000100: c4351428 65ef55e2 c6a55092 9f5086b6  (.5..U.e.P....P.
a0000110: 4409325c caffe92d fa58b184 ccad0048  \2.D-.....X.H...
a0000120: 13116e58 024aae65 bd8b6ab6 ada14317  Xn..e.J..j...C..
a0000130: 212665b5 f2ad8960 323c3210 8f3adfff  .e&!`....2<2..:.
a0000140: 509264cc fbdac5b9 b7df277d ece73332  .d.P....}'..23..
a0000150: 6bdad7b3 fb1ebdad a772be75 ac18267c  ...k....u.r.|&..
a0000160: bf81a14f 8fff229d 15ff0ba3 89657e97  O....".......~e.
a0000170: 675bcf8c 88f12d13 50b5ee83 8a2f18b4  ..[g.-.....P../.
a0000180: 370d33a8 cdae539e ef8c9f5d 7c295842  .3.7.S..]...BX)|
a0000190: 85be0717 281cedfd d068b7f7 653fa2ff  .......(..h...?e
a00001a0: 6bbff0b9 e1ed7f96 34b7cae5 189a5f0d  ...k.......4._..
a00001b0: c8858949 f292cd7e 2fcae5e5 48ba476e  I...~....../nG.H
a00001c0: 67ea759e d44c9fd8 f6916591 0180601b  .u.g..L..e...`..
a00001d0: 80601806 60180601 18060180 06018060  ..`....`....`...
a00001e0: 01806018 80601806 60180601 18060180  .`....`....`....
a00001f0: 06018060 01806018 80601806 60180601  `....`....`....`

 

 

 

 

Board info:

 

 

 

=> bdinfo
boot_params = 0x0000000000000000
DRAM bank   = 0x0000000000000000
-> start    = 0x0000000080000000
-> size     = 0x000000003be00000
flashstart  = 0x0000000000000000
flashsize   = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate    = 115200 bps
relocaddr   = 0x00000000b7b3a000
reloc off   = 0x0000000035b3a000
Build       = 64-bit
current eth = pfe_eth1
ethaddr     = 12:07:f8:61:0e:07
IP addr     = 192.168.86.201
fdt_blob    = 0x00000000b7636640
new_fdt     = 0x00000000b7636640
fdt_size    = 0x0000000000001780
lmb_dump_all:
 memory.cnt  = 0x1
 memory[0]      [0x80000000-0xbbdfffff], 0x3be00000 bytes flags: 0
 reserved.cnt  = 0x1
 reserved[0]    [0xb76321d0-0xb7bfffff], 0x005cde30 bytes flags: 0
devicetree  = separate
arch_number = 0x0000000000000000
TLB addr    = 0x00000000b7bf0000
irq_sp      = 0x00000000b7636630
sp start    = 0x00000000b7636630

 

 

 

 

Env variables:

 

 

 

=> pri
arch=arm
baudrate=115200
board=ls1012ardb
board_name=ls1012ardb
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; env exists secureboot && load ${devtype} ${devnum}:${distro_bootpart} ${scripthdraddr} ${prefix}${boot_script_hdr}; env exists secureboot && esbc_validate ${scripthdraddr};source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_pci_enum=pci enum
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_script_hdr=hdr_ls1012ardb_bs.out
boot_scripts=ls1012ardb_boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 usb0 scsi0 dhcp
bootargs=console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000
bootcmd=run distro_bootcmd; run qspi_bootcmd; env exists secureboot && esbc_halt;
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_scsi0=devnum=0; run scsi_boot
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=10
bootfstype=fat
bootm_size=0x10000000
class_elf_firmware=b7943e00
class_elf_size=cf84
console=ttyS0,115200
cpu=armv8
devplist=1
distro_bootcmd=scsi_need_init=; setenv nvme_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=52:28:68:66:ad:91
ethact=pfe_eth1
ethaddr=12:07:f8:61:0e:07
fdt_addr=0x90000000
fdt_addr_r=0x90000000
fdtaddr=b7636640
fdtcontroladdr=b7636640
fdtheader_addr_r=0x80100000
fsl_bootcmd_mcinitcmd_set=y
initrd_high=0xffffffffffffffff
installer=load mmc 0:2 $load_addr /flex_installer_arm64.itb; bootm $load_addr#$board
ipaddr=192.168.86.201
kernel_addr=0x01000000
kernel_addr_r=0x96000000
kernel_size=0x2800000
kernelheader_addr=0x600000
kernelheader_addr_r=0x80200000
kernelheader_size=0x40000
load_addr=0xa0000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x90000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
nvme_boot=run boot_pci_enum; run nvme_init; if nvme dev ${devnum}; then devtype=nvme; run scan_dev_for_boot_part; fi
nvme_init=if ${nvme_need_init}; then setenv nvme_need_init false; nvme scan; fi
qspi_bootcmd=echo Trying load from qspi..;sf probe && sf read $load_addr $kernel_addr $kernel_size; env exists secureboot && sf read $kernelheader_addr_r $kernelheader_addr $kernelheader_size && esbc_validate ${kernelheader_addr_r}; bootm $load_addr#$board
sata_boot=if sata dev ${devnum}; then devtype=sata; run scan_dev_for_boot_part; fi
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80000000
scripthdraddr=0x80080000
scsi_boot=run boot_pci_enum; run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi
serverip=192.168.86.31
soc=fsl-layerscape
stderr=serial
stdin=serial
stdout=serial
tmu_elf_firmware=b7950d90
tmu_elf_size=2d48
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=freescale
verify=no

Environment size: 5316/8188 bytes

 

 

 

 

 

Labels (1)
0 Kudos
1 Solution
1,455 Views
yipingwang
NXP TechSupport
NXP TechSupport

First of all, please add the following line in build_ls1012ardb/conf/local.conf

INIT_MANAGER="none"

Then run the following command.

$ bitbake qoriq-composite-firmware -c cleansstate

$ bitbake qoriq-composite-firmware

Generate the firmware image firmware_ls1012ardb_qspiboot.img about 61M.

After program the firmware image to the target board, go to u-boot prompt, modify u-boot environment as the following.

=> setenv kernel_size 0x3000000
=> saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK

=> run qspi_bootcmd
Trying load from qspi..
SF: Detected s25fs512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
device 0 offset 0x1000000, size 0x3000000
SF: 50331648 bytes @ 0x1000000 Read: OK
## Loading kernel from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'kernel' kernel subimage
Description: ARM64 Kernel
Created: 2011-04-05 23:00:00 UTC
Type: Kernel Image
Compression: gzip compressed
Data Start: 0xa00000d0
Data Size: 16637835 Bytes = 15.9 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x84080000
Entry Point: 0x84080000
Hash algo: crc32
Hash value: 4d89ecb1
## Loading ramdisk from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'initrd' ramdisk subimage
Description: initrd for arm64
Created: 2011-04-05 23:00:00 UTC
Type: RAMDisk Image
Compression: uncompressed
Data Start: 0xa0fde13c
Data Size: 29931419 Bytes = 28.5 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x00000000
Entry Point: 0x00000000
Hash algo: crc32
Hash value: 361a40a9
## Loading fdt from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'fdt-dtb' fdt subimage
Description: nxp-dtb
Created: 2011-04-05 23:00:00 UTC
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0xa2c699ac
Data Size: 12626 Bytes = 12.3 KiB
Architecture: AArch64
Load Address: 0x90000000
Hash algo: crc32
Hash value: 50c4be4c
Loading fdt from 0xa2c699ac to 0x90000000
Booting using the fdt blob at 0x90000000
Uncompressing Kernel Image
Loading Device Tree to 000000008fff9000, end 000000008ffff151 ... OK
NOTICE: RNG: INSTANTIATED
PCIe1: pcie@3400000 Root Complex: x1 gen1
Stopping PFE...

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.15.71+g95448dd0dc9b (oe-user@oe-host) (aarch64-fsl-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38.20220313) #1 SMP PREEMPT Wed Feb 8 03:38:28 UTC 2023
[ 0.000000] Machine model: LS1012A RDB Board
[ 0.000000] earlycon: uart8250 at MMIO 0x00000000021c0500 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled
[ 1.212882] No BMan portals available!
[ 1.217228] No QMan portals available!
[ 1.655428] pe_load_ddr_section: load address(3fb0000) and elf file address(fffffbfffde08958) rcvd
INIT: version 3.01 booting
Starting udev
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Fri Mar 9 12:34:56 UTC 2018
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting random number generator daemon.
Starting Dropbear SSH server: Generating 2048 bit rsa key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDaIuF5npSDZoXPOd/7PgHZA56sYGWBtjv3bxFOiaMCANrrcgHS2AuUpbGa/eupp7GP2S6guYg2mUj68IxDsb27ufIdV+H1tkzNzbxasAF0995q/7euIRfUNFMfRYDtsQFmKADEccoZ3dKSNx8mkrhExEIhLsNDSzaOYVkwRtJtYijd+QIjn03fDp3BUrwm18t7Kr98lhR3PjPY1jBWhyxH/d0oirh834M9sJhGpl/cJStzB0a8zyJV2mmTrTGRHxlcYZOhXzTo9WPTU6ug5HHUuEgwuGUJbIjOZiQgitkjDWQ1Y0ihk5vDXyUTx39ZvnzGPsLlR9ZVRFN9ULFm5H+X root@ls1012ardb
Fingerprint: sha1!! 47:8c:3f:3e:b1:fa:7f:58:df:06:2c:11:e7:81:86:bf:70:74:f9:31
dropbear.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Starting syslogd/klogd: done

QorIQ SDK POC (Proof of Concept) 4.0.4 ls1012ardb ttyS0

ls1012ardb login: root

View solution in original post

7 Replies
141 Views
induraj
Contributor I

Try booting from MMC1 ...
1576 bytes read in 5 ms (307.6 KiB/s)
switch to partitions #0, OK
mmc1 is current device
42510700 bytes read in 129 ms (314.3 MiB/s)
## Loading kernel from FIT Image at a0000000 ...
Bad FIT kernel image format! (err=-22)
ERROR: can't get kernel image!

0 Kudos
139 Views
induraj
Contributor I

while sd card boot i got erro

U-Boot 2021.10 (Feb 14 2024 - 09:27:08 +0000)

CPU: rv64imacu_zba_zbb
Model: LeapFive NB2L DevKits
DRAM: 2 GiB
MMC: sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
Not a LeapFive EEPROM data format - magic error
EEPROM dump: (0x100 bytes)
00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
In: serial
Out: serial
Err: serial
Model: LeapFive NB2L DevKits
no screen connected
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
1576 bytes read in 5 ms (307.6 KiB/s)
switch to partitions #0, OK
mmc1 is current device
42510700 bytes read in 129 ms (314.3 MiB/s)
## Loading kernel from FIT Image at a0000000 ...
Bad FIT kernel image format! (err=-22)
ERROR: can't get kernel image!
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
XIP Invalid Image
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
Booting kernel in
Bad Linux RISCV Image magic!
Tring booting distro ...
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
Failed to load '/uEnv.txt'
## Warning: defaulting to text format
## Error: Environment import failed: errno = 12
Failed to load '/dtbs/leapfive/nb2l-devkits.dtb'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
/dtbs/leapfive: doesn't exist (-2)
** Unable to write file /dtbs/leapfive/nb2l-devkits.dtb **
Retrieving file: /extlinux/extlinux.conf
Failed to load '/extlinux/extlinux.conf'
Error reading config file 

 

 

 

my printenv

 

eapFive # printenv
baudrate=115200
boot2=run bootargs_ext; mmc dev ${devnum}; fatload mmc ${devnum}:${partnum} ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; run chipa_set_lin}
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_devs=mmc nvme
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdti
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_pci_enum=pci enum
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc1
bootargs=earlyprintk console=tty1 console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk1p4
bootargs_ext=if test ${devnum} = 0; then setenv bootargs "earlyprintk console=tty1 console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk0p4"; else setenv bootargs "earlyprintk console=tty1 console=t;
bootcmd=devnum=1; run mmc_boot
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};sete;
bootcmd_distro=run load_distro_uenv; run fdt_loaddtb; run fdt_sizecheck; run set_fdt_distro; sysboot ${bootdev} ${devnum}:${bootpart} fat ${scriptaddr} /${boot_syslinux_conf};
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_sd=devnum=1; run mmc_boot
bootdelay=2
bootdev=mmc
bootdir=/boot
bootenv=uEnv.txt
bootenv_mmc=setenv bootdev mmc;if test ${bootmode} = flash; then for mmc_devnum in ${mmc_devnum_l}; do setenv devnum ${mmc_devnum}; run mmc_test_and_boot;done;fi; if test ${bootmode} = sd; then setenv devnum ${
bootenv_nvme=if test ${bootmode} = flash; then for nvme_devnum in ${nvme_devnum_l}; do setenv devnum ${nvme_devnum};if pci enum; then nvme scan; fi; if nvme dev ${devnum}; then echo Try booting from NVME${devnu
bootenv_sdk=devkits_uEnv.txt
bootfile=/extlinux/extlinux.conf
bootmode=sd
bootpart=3
bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
chip_vision=B
chipa_gmac_set=fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_10 <0x1>;fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_100 <0x1>;fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_10;
chipa_set=if test ${chip_vision} = B; then run chipa_gmac_set;fi;
chipa_set_linux=fdt addr ${fdt_addr_r};run devkits_mem_set;run chipa_set;
chipa_set_uboot=fdt addr ${fdtcontroladdr};run chipa_set;
cma_1g=b000000
cma_2g=20000000
cma_4g=40000000
cma_8g=60000000
cma_ddr1g_set=fdt set ${cma_node} size <0x0 0x${cma_1g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_1g}>;
cma_ddr2g_set=fdt set ${cma_node} size <0x0 0x${cma_2g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_2g}>;
cma_ddr4g_set=fdt set ${cma_node} size <0x0 0x${cma_4g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_4g}>;
cma_ddr8g_set=fdt set ${cma_node} size <0x0 0x${cma_8g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_8g}>;
cma_node=/reserved-memory/linux,cma
cma_resize=if test ${memory_size} -eq 40000000; then run cma_ddr1g_set;elif test ${memory_size} -eq 80000000; then run cma_ddr2g_set;elif test ${memory_size} -eq 100000000; then run cma_ddr4g_set;elif test ${me
cma_start=70000000
cpu_max_vol=1060000
cpu_speed_1250_set=fdt rm /opp-table-0/opp-375000000;fdt rm /opp-table-0/opp-500000000;fdt rm /opp-table-0/opp-750000000;fdt rm /opp-table-0/opp-1500000000;
cpu_speed_1500_set=fdt rm /opp-table-0/opp-312500000;fdt rm /opp-table-0/opp-417000000;fdt rm /opp-table-0/opp-625000000;fdt rm /opp-table-0/opp-1250000000;
cpu_vol_1020_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1020000>;
cpu_vol_1040_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1040000>;
cpu_vol_1060_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1060000>;
cpu_vol_set=if test ${cpu_max_vol} = 1000000; then run cpu_speed_1250_set; else run cpu_speed_1500_set; if test ${cpu_max_vol} = 1060000; then run cpu_vol_1060_set; elif test ${cpu_max_vol} = 1020000; then run
devkits_mem_set=fdt memory ${memory_addr} ${memory_size};run cma_resize;
devnum=1
distro_boot_env=echo Tring booting distro ...;for bootdev_s in ${boot_devs}; do run distro_bootenv_${bootdev_s}; done;
distro_bootcmd=setenv nvme_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
distro_bootenv_mmc=setenv bootdev mmc;if test ${bootmode} = flash; then for mmc_devnum in ${mmc_devnum_l}; do setenv devnum ${mmc_devnum}; run distro_mmc_test_and_boot;done;fi; if test ${bootmode} = sd; then se
distro_bootenv_nvme=if test ${bootmode} = flash; then for nvme_devnum in ${nvme_devnum_l}; do setenv devnum ${nvme_devnum};if pci enum; then nvme scan; fi; if nvme dev ${devnum}; then echo Try booting from NVME
distro_mmc_test_and_boot=if mmc dev ${devnum}; then echo Try booting from MMC${devnum} ...; run bootcmd_distro;fi;
efi_dtb_prefixes=/ /dtb/ /dtb/current/
emmc_devnum=0
eth0addr=6c:cf:39:6c:de:ad
eth1addr=6c:cf:39:7c:ae:5d
ethaddr=6c:cf:39:6c:de:ad
fdt_addr_r=0x46000000
fdt_high=0xffffffffffffffff
fdt_loaddtb=fatload ${bootdev} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile}; fdt addr ${fdt_addr_r};
fdt_sizecheck=fatsize ${bootdev} ${devnum}:${bootpart} /dtbs/${fdtfile};
fdtaddr=0x46000000
fdtcontroladdr=b770ce70
fdtfile=starfive/leapfive.dtb
fdtoverlay_addr_r=0x4f000000
fileaddr=a0000000
filesize=288a96c
fitfile=leapfiveu.fit
initrd_high=0xffffffffffffffff
ipaddr=192.168.120.230
irdaddr=46100000
irdend=4c000000
irdsize=5f00000
kernel_addr_r=0x40200000
kernel_comp_addr_r=0x5a000000
kernel_comp_size=0x4000000
load_distro_uenv=fatload ${bootdev} ${devnum}:${bootpart} ${loadaddr} /${bootenv}; env import ${loadaddr} ${filesize};
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
load_sdk_uenv=fatload ${bootdev} ${devnum}:${bootpart} ${loadaddr} ${bootenv_sdk};env import -t ${loadaddr} ${filesize};
loadaddr=0x60000000
memory_addr=40000000
memory_size=80000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmc_devnum_l=1 0
mmc_test_and_boot=if mmc dev ${devnum}; then echo Try booting from MMC${devnum} ...; setenv sdev_blk mmcblk${devnum}p${rootpart};run load_sdk_uenv; run boot2;fi;
netmask=255.255.255.0
nvme_boot=run boot_pci_enum; run nvme_init; if nvme dev ${devnum}; then devtype=nvme; run scan_dev_for_boot_part; fi
nvme_devnum_l=0 0
nvme_init=if ${nvme_need_init}; then setenv nvme_need_init false; nvme scan; fi
partitions=name=loader1,start=17K,size=1M,type=${type_guid_gpt_loader1};name=loader2,size=4MB,type=${type_guid_gpt_loader2};name=system,size=-,bootable,type=${type_guid_gpt_system};
partnum=3
preboot=run chipa_set_uboot
pxefile_addr_r=0x45900000
ramdisk_addr_r=0x46100000
rootpart=4
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootft
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_boote
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAIe
scan_sf_for_scripts=${devtype} read ${scriptaddr} ${script_offset_f} ${script_size_f}; source ${scriptaddr}; echo SCRIPT FAILED: continuing...
script_offset_f=0x1fff000
script_size_f=0x1000
scriptaddr=0x43900000
sd_devnum=1
sdev_blk=mmcblk1p4
sdk_boot_env=for bootdev_s in ${boot_devs}; do run bootenv_${bootdev_s}; done;
set_fdt_distro=run chipa_set_linux; run cpu_vol_set;fatwrite ${bootdev} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};
setupfdt1=fdt addr ${fdtaddr}; fdt resize;
setupfdt2=fdt set /chosen bootargs "${bootargs}";
setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
sf_boot=if sf probe ${busnum}; then devtype=sf; run scan_sf_for_scripts; fi
type_guid_gpt_loader1=5B193300-FC78-40CD-8002-E86C45580B47
type_guid_gpt_loader2=2E54B353-1271-4842-806F-E436D6AF6985
type_guid_gpt_system=0FC63DAF-8483-4772-8E79-3D69D8477DE4
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
ver=U-Boot 2021.10 (Feb 14 2024 - 09:27:08 +0000)

Environment size: 10945/65532 bytes

 

 

i tried these steps


LeapFive # setenv boot_targets mmc1
LeapFive # setenv bootcmd_mmc1 "devnum=1; run mmc_boot"
LeapFive # saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK
LeapFive # printenv bootcmd
bootcmd=run sdk_boot_env; run distro_boot_env;
LeapFive # printenv boot_targets
boot_targets=mmc1
LeapFive # setenv boot_targets mmc1
LeapFive # setenv bootcmd "devnum=1; run mmc_boot"
LeapFive # saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK

LeapFive # printenv boot_targets
boot_targets=dhcp mmc0
LeapFive # fatls mmc 1:3 /
1576 devkits_uEnv.txt
42510700 leapfiveu.fit
62669 nb2l-devkits-v2-leapfive-nb2l.dtb
26352128 Image
62476 nb2l-devkits.dtb

 

can u give solution for this

Tags (1)
0 Kudos
1,465 Views
epoletaev
Contributor III

I was able to load ITB file via TFTP and boot kernel from it.

So it seems issue is on qoriq-composite-firmware step.

At least I see that kernel size specified in env file is less than actual ITB file size.

0 Kudos
1,456 Views
yipingwang
NXP TechSupport
NXP TechSupport

First of all, please add the following line in build_ls1012ardb/conf/local.conf

INIT_MANAGER="none"

Then run the following command.

$ bitbake qoriq-composite-firmware -c cleansstate

$ bitbake qoriq-composite-firmware

Generate the firmware image firmware_ls1012ardb_qspiboot.img about 61M.

After program the firmware image to the target board, go to u-boot prompt, modify u-boot environment as the following.

=> setenv kernel_size 0x3000000
=> saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK

=> run qspi_bootcmd
Trying load from qspi..
SF: Detected s25fs512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
device 0 offset 0x1000000, size 0x3000000
SF: 50331648 bytes @ 0x1000000 Read: OK
## Loading kernel from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'kernel' kernel subimage
Description: ARM64 Kernel
Created: 2011-04-05 23:00:00 UTC
Type: Kernel Image
Compression: gzip compressed
Data Start: 0xa00000d0
Data Size: 16637835 Bytes = 15.9 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x84080000
Entry Point: 0x84080000
Hash algo: crc32
Hash value: 4d89ecb1
## Loading ramdisk from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'initrd' ramdisk subimage
Description: initrd for arm64
Created: 2011-04-05 23:00:00 UTC
Type: RAMDisk Image
Compression: uncompressed
Data Start: 0xa0fde13c
Data Size: 29931419 Bytes = 28.5 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x00000000
Entry Point: 0x00000000
Hash algo: crc32
Hash value: 361a40a9
## Loading fdt from FIT Image at a0000000 ...
Using 'ls1012ardb' configuration
Trying 'fdt-dtb' fdt subimage
Description: nxp-dtb
Created: 2011-04-05 23:00:00 UTC
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0xa2c699ac
Data Size: 12626 Bytes = 12.3 KiB
Architecture: AArch64
Load Address: 0x90000000
Hash algo: crc32
Hash value: 50c4be4c
Loading fdt from 0xa2c699ac to 0x90000000
Booting using the fdt blob at 0x90000000
Uncompressing Kernel Image
Loading Device Tree to 000000008fff9000, end 000000008ffff151 ... OK
NOTICE: RNG: INSTANTIATED
PCIe1: pcie@3400000 Root Complex: x1 gen1
Stopping PFE...

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.15.71+g95448dd0dc9b (oe-user@oe-host) (aarch64-fsl-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38.20220313) #1 SMP PREEMPT Wed Feb 8 03:38:28 UTC 2023
[ 0.000000] Machine model: LS1012A RDB Board
[ 0.000000] earlycon: uart8250 at MMIO 0x00000000021c0500 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled
[ 1.212882] No BMan portals available!
[ 1.217228] No QMan portals available!
[ 1.655428] pe_load_ddr_section: load address(3fb0000) and elf file address(fffffbfffde08958) rcvd
INIT: version 3.01 booting
Starting udev
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Fri Mar 9 12:34:56 UTC 2018
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting random number generator daemon.
Starting Dropbear SSH server: Generating 2048 bit rsa key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDaIuF5npSDZoXPOd/7PgHZA56sYGWBtjv3bxFOiaMCANrrcgHS2AuUpbGa/eupp7GP2S6guYg2mUj68IxDsb27ufIdV+H1tkzNzbxasAF0995q/7euIRfUNFMfRYDtsQFmKADEccoZ3dKSNx8mkrhExEIhLsNDSzaOYVkwRtJtYijd+QIjn03fDp3BUrwm18t7Kr98lhR3PjPY1jBWhyxH/d0oirh834M9sJhGpl/cJStzB0a8zyJV2mmTrTGRHxlcYZOhXzTo9WPTU6ug5HHUuEgwuGUJbIjOZiQgitkjDWQ1Y0ihk5vDXyUTx39ZvnzGPsLlR9ZVRFN9ULFm5H+X root@ls1012ardb
Fingerprint: sha1!! 47:8c:3f:3e:b1:fa:7f:58:df:06:2c:11:e7:81:86:bf:70:74:f9:31
dropbear.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Starting syslogd/klogd: done

QorIQ SDK POC (Proof of Concept) 4.0.4 ls1012ardb ttyS0

ls1012ardb login: root

1,407 Views
epoletaev
Contributor III

Thanks @yipingwang, that did the job!

Can you explain what INIT_MANAGER="none" part does?

0 Kudos
1,382 Views
yipingwang
NXP TechSupport
NXP TechSupport

Changing the init system manager as "none" to reduce the size of rootfs.

1,480 Views
epoletaev
Contributor III

Firmware file: link

0 Kudos