Kernel Panic after Modifying UBOOT SD for LS1028ARDB

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

Kernel Panic after Modifying UBOOT SD for LS1028ARDB

467 Views
joy_t
Contributor II

Hello,

I've encountered a Kernel Panic error after modifying the UBOOT config and re-flashing an SD card for the LS1028ARDB. Here are the steps I took:

1. In Linux, modified ls1028ardb_tfa_defconfig and re-built the image with flex-builder:

flex-builder -c firmware -m ls1028ardb -b sd
flex-builder -i mkfw -m ls1043ardb -b sd

2. In Windows, combined the partition table with the new firmware image:

copy /b sd_pt_4k.img + firmware_ls1028ardb_sdboot.img firmware_ls1028ardb_sdboot_4k.img

3. Used DD for Windows to flash the image to an SD card

4. Put the SD card in the LS1028ARDB and ran the following after interrupting autoboot:

run_sdbootcmd

This is the boot output I'm seeing in the serial console:

U-Boot 2021.04-dirty (Dec 20 2024 - 10:47:12 -0800)

SoC:  LS1028AE Rev1.0 (0x870b0010)
Clock Configuration:
       CPU0(A72):1500 MHz  CPU1(A72):1500 MHz
       Bus:      400  MHz  DDR:      1600 MT/s
Reset Configuration Word (RCW):
       00000000: 3c004010 00000030 00000000 00000000
       00000010: 00000000 018f0000 0030c000 00000000
       00000020: 020031a0 00002580 00000000 00003296
       00000030: 00000000 00000010 00000000 00000000
       00000040: 00000000 00000000 00000000 00000000
       00000050: 00000000 00000000 00000000 00000000
       00000060: 00000000 00000000 200e705a 00000000
       00000070: bb580000 00000000
Model: NXP Layerscape 1028a RDB Board
Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD
FPGA: v8 (RDB)
SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz
DRAM:  3.9 GiB
DDR    3.9 GiB (DDR4, 32-bit, CL=11, ECC on)
Using SERDES1 Protocol: 47960 (0xbb58)
PCIe1: pcie@3400000 Root Complex: no link
PCIe2: pcie@3500000 Root Complex: no link
WDT:   Started with servicing (60s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:
Warning: enetc-0 (eth0) using random MAC address - 12:6e:5e:4a:b1:98
eth0: enetc-0
Warning: enetc-2 (eth1) using random MAC address - 86:b2:7c:cf:b1:3a
, eth1: enetc-2, eth2: swp0, eth3: swp1, eth4: swp2, eth5: swp3
Hit any key to stop autoboot:  0
...
...
...
[    9.928843] No filesystem could mount root, tried:
[    9.928846]  ext3
[    9.933746]  ext4
[    9.935669]  ext2
[    9.937596]  squashfs
[    9.939519]  vfat
[    9.941802]  fuseblk
[    9.943727]  btrfs
[    9.945916]
[    9.949417] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[    9.957709] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.10.35 #1
[    9.963732] Hardware name: LS1028A RDB Board (DT)
[    9.968448] Call trace:
[    9.970904]  dump_backtrace+0x0/0x1a8
[    9.974574]  show_stack+0x18/0x68
[    9.977895]  dump_stack+0xd0/0x12c
[    9.981304]  panic+0x16c/0x334
[    9.984365]  mount_block_root+0x234/0x250
[    9.988382]  mount_root+0x10c/0x144
[    9.991876]  prepare_namespace+0x130/0x170
[    9.995980]  kernel_init_freeable+0x210/0x23c
[   10.000347]  kernel_init+0x14/0x118
[   10.003842]  ret_from_fork+0x10/0x34
[   10.007425] SMP: stopping secondary CPUs
[   10.011363] Kernel Offset: 0x210213a80000 from 0xffff800010000000
[   10.017473] PHYS_OFFSET: 0xffffd99400000000
[   10.021664] CPU features: 0x0240022,21806008
[   10.025942] Memory Limit: none
[   10.029004] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) ]---

This is my bootargs:

bootargs=console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32@60 cma=256M ip=192.168.3.201::192.168.3.1:255.255.255.0::eth0:none

Could I get some guidance towards resolving this?

Thank you!

Tags (2)
0 Kudos
Reply
5 Replies

362 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please reformat the SD card to like a brand-new one to try the commands below:

tftp $load_addr firmware_ls1028ardb_sdboot.img
mmc dev 0;mmc write $load_addr 8 1fff8
qixis_reset sd

If get error, please program the default to check if the error is related  to the changed the configuration.

wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_sdboot.img

379 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please follow the page 92 boot from the SD card.

To program LSDK composite firmware image to FlexSPI NOR flash on LS1028ARDB

Boot from the SD card, stop in the U-boot.

Get the IP address to enable the TFTP.

Download the firmware (from NXP website) to the Linux host machine.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_xspiboot.img

And put the firmware_ls1028ardb_xspiboot.img into the server tftp path.

On the LS1026ARDB(stop in the u-boot)

3. Under U-Boot, download the firmware to the reference board using one of the following options:

• Load firmware from the TFTP server

=> tftp $load_addr firmware_ls1028ardb_xspiboot.img

4. Program the firmware to FlexSPI NOR flash.

=> sf probe 0:0

=> sf erase 0 +$filesize && sf write $load_addr 0 $filesize

5. Reset and boot the board from FlexSPI NOR flash. The system will automatically boot up TinyDistro (log in using root/root) or LSDK distro (log in using root/root or user/user) available on the removable storage device.

=> qixis_reset

Don't use the load mmc 0:2…, it's loading firmware image from partition on mass storage device (SD, USB, or SATA), now you have loaded the firmware from the tftp.

 

Please first flash the firmware into the NOR and then change the SD card firmware, because if you could not boot the boards, it only way to flash it is using the CodeWarrior TAP. So it would be a convenient way to make sure you could boot from nor(default SW setting) instead of using CodeWarrior TAP.

If further discussion is needed, please feel free to let me know.

Thanks

376 Views
joy_t
Contributor II

Hi,

Thank you. The firmware_ls1028ardb_xspiboot image fixed my FlexSPI NOR flash boot.

However, I'm back to the "kernel panic" error when programming my custom firmware image to SD on the LS1028ARDB. I'm following pages 93-95 to load my image with these commands:

 

tftp $load_addr firmware_ls1028ardb_sdboot.img
mmc dev 0;mmc write $load_addr 8 1fff8
qixis_reset sd

 

This is the output after reset:

 

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@2140000.blk...
Scanning disk esdhc@2150000.blk...
** Unrecognized filesystem type **
Found 6 disks
No EFI system partition
ERROR: invalid device tree
Scanning mmc 0:2...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
ERROR: invalid device tree
Scanning mmc 0:3...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
ERROR: invalid device tree
Scanning mmc 0:4...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
ERROR: invalid device tree
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
starting USB...
Bus usb3@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb3@3110000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb3@3100000 for devices... 1 USB Device(s) found
scanning bus usb3@3110000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
...
Retry time exceeded; starting again
BOOTP broadcast 1
...
Retry time exceeded; starting again
Trying load from SD ...
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 27
OEM: 5048
Name: SD64G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 58 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
...
[    8.916299] No filesystem could mount root, tried:
[    8.916302]  ext3
[    8.921201]  ext4
[    8.923125]  ext2
[    8.925053]  squashfs
[    8.926977]  vfat
[    8.929260]  fuseblk
[    8.931184]  btrfs
[    8.933373]
[    8.936875] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[    8.945167] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.35 #1
[    8.951190] Hardware name: LS1028A RDB Board (DT)
[    8.955905] Call trace:
[    8.958360]  dump_backtrace+0x0/0x1a8
[    8.962030]  show_stack+0x18/0x68
[    8.965351]  dump_stack+0xd0/0x12c
[    8.968759]  panic+0x16c/0x334
[    8.971820]  mount_block_root+0x234/0x250
[    8.975837]  mount_root+0x10c/0x144
[    8.979332]  prepare_namespace+0x130/0x170
[    8.983436]  kernel_init_freeable+0x210/0x23c
[    8.987804]  kernel_init+0x14/0x118
[    8.991298]  ret_from_fork+0x10/0x34
[    8.994882] SMP: stopping secondary CPUs
[    8.998818] Kernel Offset: 0x2c9e6b080000 from 0xffff800010000000
[    9.004927] PHYS_OFFSET: 0xffff956dc0000000
[    9.009118] CPU features: 0x0240022,21806008
[    9.013396] Memory Limit: none
[    9.016459] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) ]---

 

The board eventually just boots to TinyLinux from FlexSPI NOR flash after failing the SD boot with the "kernel panic" message.

The custom image was made using the following two flex-builder commands after modifying the uboot config (ls1028ardb_tfa_defconfig):

 

flex-builder -c atf -m ls1028ardb -b sd
flex-builder -i mkfw -m ls1028ardb -b sd

 

 Am I missing a step with the flex-builder before the image is ready to be programmed?

0 Kudos
Reply

430 Views
June_Lu
NXP TechSupport
NXP TechSupport

If you have generated the firmware with the new u-boot.

Please follow the LSDK21.08, page 93 to flash the firmware.

To program LSDK composite firmware image to SD/eMMC on LS1028ARDB

Thanks

0 Kudos
Reply

389 Views
joy_t
Contributor II

Hi,

I've been following pages 92+ to program firmware images to SD/flash, and I've run into two issues.

(1) I tried to program a firmware image from SD to FlexSPI NOR flash, but now the board is stuck in a reset state with a blank serial terminal. When I change the DIP switches to SD boot mode, it boots with a flashed SD normally, but with the DIP switches in their default state, the board gets stuck. How can I recover this?

(2) With the DIP switches in SD boot mode, I'm also trying to program a firmware image from tftp server to SD, but I'm running into the following message. (The firmware image was created via flex-builder like I mentioned in my previous post.)

=> tftp $load_addr firmware_ls1028ardb_sdboot.img
...
=> load mmc 0:2 $load_addr firmware_ls1028ardb_sdboot.img
** Unable to read file firmware_ls1028ardb_sdboot.img **

 Any guidance would be great, thank you.

0 Kudos
Reply