i upgraded mu ls1020a based device from kernel 4.1.35 to 6.1.55 using LLDP extracted kernel and meta tool-chain and used the old device tree source to build new dtb file for new kernel as it is same custom hardware which use NAND flash .after writing new uImage and new device tree to ram using tftpboot i am getting kernel panic issue. I am going to add all the kernel log dts file and u-boot env setup for reference.I build the new kernel using old 4.1 kernel .config file. Attached config file also.
here is the u-boot environment.
=> printenv
active_dtb=0
active_fs=0
active_kernel=0
baudrate=115200
bootargs=root=/dev/mtdblock2 ro rootfstype=jffs2 mtdparts=1550000.quadspi:8m(boot)ro,2m(reserved)ro,6m(platform)
bootcmd=run check_reset_button; if test ${ipl_done} = yes; then run start_kernel; else if usb start; then led cloud off; led sec on; run load_env_from_usb; fi; fi;
bootdelay=0
check_reset_button=if rbstate; then echo Reset button pressed; if usb start; then if fatload usb 0:1 ${ramstart_dtb} ls1021a-twr.dtb; then env default -a; saveenv; echo USB drive attached - Executing IPL
; led all off; led cloud on; led sec on; led door on; run load_env_from_usb; else echo USB drive NOT attached - ignore reset button; fi; fi; fi;
crc_dtb=0x8c000000
crc_dtb_after=0x8c00000c
crc_fs=0x8c000004
crc_fs_after=0x8c000010
crc_kernel=0x8c000008
crc_kernel_after=0x8c000014
dtb_crc_error=false
erase_nand=nand erase.chip
ethact=eTSEC1
ethprime=eTSEC1
fdt_high=0xffffffff
fdtcontroladdr=bff94be0
fileaddr=8f000000
filesize=4ddf
fs_crc_error=false
gen_dtb_crc=crc32 ${ramstart_test_area} ${size_dtb} 0x8c00000c
gen_fs_crc=crc32 ${ramstart_test_area} ${size_fs} 0x8c000010
gen_kernel_crc=crc32 ${ramstart_test_area} ${size_kernel} 0x8c000014
init_dtb_ram=mw.b ${ramstart_dtb} 0xff ${size_dtb}
init_fs_ram=mw.b ${ramstart_fs} 0xff ${size_fs}
init_kernel_ram=mw.b ${ramstart_kernel} 0xff ${size_kernel}
initrd_high=0xffffffff
ipl_done=yes
ipl_done_cmd=echo "Set ipl_done to yes"; setenv ipl_done yes; echo "Saving ipl_done to NVM"; saveenv
kernel_crc_error=false
load_env_from_usb=if fatload usb 0:1 0x82000000 setenv.img; then led cloud on; if imi 0x82000000; then led cloud off; led sec off; led temp on; source 0x82000000; saveenv; run load_nand_from_usb; fi; fi;
load_nand_from_usb=run erase_nand; wd disable; run program_nand
nand_verify_dtb=echo "Verify dtb in nand"; nand.jffs2 read ${ramstart_test_area} ${nandoffset_dtb_a} ${size_dtb}; run gen_dtb_crc; run verify_dtb_crc
nand_verify_fs=echo "Verify fs in nand"; nand.jffs2 read ${ramstart_test_area} ${nandoffset_fs_a} ${size_fs}; run gen_fs_crc; run verify_fs_crc
nand_verify_kernel=echo "Verify kernel in nand"; nand.jffs2 read ${ramstart_test_area} ${nandoffset_kernel_a} ${size_kernel}; run gen_kernel_crc; run verify_kernel_crc
nand_write_dtb=echo "Write device tree blob from RAM to NAND"; nand write.jffs2 ${ramstart_dtb} ${nandoffset_dtb_a} ${size_dtb}
nand_write_fs=echo "Write file system from RAM to NAND"; nand write.jffs2 ${ramstart_fs} ${nandoffset_fs_a} ${size_fs}
nand_write_kernel=echo "Write Linux kernel from RAM to NAND"; nand write.jffs2 ${ramstart_kernel} ${nandoffset_kernel_a} ${size_kernel}
nandoffset_dtb_a=0x900000
nandoffset_dtb_b=0xdf00000
nandoffset_fs_a=0xa00000
nandoffset_fs_b=0xe000000
nandoffset_kernel_a=0
nandoffset_kernel_b=0xd600000
other_dtb_valid=FALSE
other_fs_valid=FALSE
other_kernel_valid=FALSE
program_dtb=echo "program Linux device tree blob"; run init_dtb_ram; if run usb_fatload_dtb; then if run nand_write_dtb; then run nand_verify_dtb; fi; fi
program_fs=echo "program Linux jffs2 file system"; run init_fs_ram; if run usb_fatload_fs; then if run nand_write_fs; then run nand_verify_fs; fi; fi
program_kernel=echo "program Linux kernel"; run init_kernel_ram; if run usb_fatload_kernel; then led cloud off; led sec on; if run nand_write_kernel; then run nand_verify_kernel; fi; fi
program_nand=echo "program nand"; if run program_kernel; then if test ${kernel_crc_error} = false; then if run program_fs; then if test ${fs_crc_error} = false; then if run program_dtb; then if test ${dt
b_crc_error} = false; then run ipl_done_cmd; run usb_stop; run start_kernel; fi; fi; fi; fi; fi; fi
ramstart_dtb=0x8f000000
ramstart_fs=0x88000000
ramstart_kernel=0x83000000
ramstart_test_area=0x8a000000
size_dtb=0x20000
size_fs=0x840000
size_kernel=0x3c0000
start_kernel=nand.jffs2 read ${ramstart_dtb} ${nandoffset_dtb_a} ${size_dtb};nboot ${ramstart_kernel} ${nandoffset_kernel_a};bootm ${ramstart_kernel} - ${ramstart_dtb}
stderr=serial
stdin=serial
stdout=serial
usb_fatload_dtb=echo "fatload Linux device tree blob from USB to RAM"; if fatload usb 0:1 ${ramstart_dtb} ls1021a-twr.dtb; then led cloud off; led sec on; crc32 ${ramstart_dtb} ${size_dtb} 0x8c000000; fi
usb_fatload_fs=echo "fatload jffs2 Linux file system from USB to RAM"; if fatload usb 0:1 ${ramstart_fs} MG4fs.img.jffs2; then led all off; led door on; crc32 ${ramstart_fs} ${size_fs} 0x8c000004; fi
usb_fatload_kernel=echo "fatload Linux kernel from USB to RAM"; if fatload usb 0:1 ${ramstart_kernel} uImage; then led cloud on; crc32 ${ramstart_kernel} ${size_kernel} 0x8c000008; imi ${ramstart_kernel}
; fi
usb_start=echo "starting USB"; usb start
usb_stop=echo "stopping USB"; usb stop
ver=U-Boot 2016.09 IAGLFl (Oct 16 2018 - 16:14:47 -0500)
verify_dtb_crc=if itest *0x8c000000 == *0x8c00000c; then echo "dtb CRC match"; led all on; else echo "dtb CRC failure"; setenv dtb_crc_error true; saveenv; fi
verify_fs_crc=if itest *0x8c000004 == *0x8c000010; then echo "fs CRC match"; led cloud on; else echo "fs CRC failure"; setenv fs_crc_error true; saveenv; fi
verify_kernel_crc=if itest *0x8c000008 == *0x8c000014; then echo "kernel CRC match"; led cloud on; else echo "kernel CRC failure"; setenv kernel_crc_error true; saveenv; fi
Environment size: 5399/8188 bytes
=>
*********************************************************************************************************************
Here is the log from kernel
Starting kernel ...
Booting Linux on physical CPU 0xf00
Linux version 6.1.55+ (jchaudhary@administrator-Latitude-3510) (arm-fsl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0.20220819) #7 SMP Fri May 17 23:41:19 IST 2024
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=70c5387d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: LS1020A MG4
Memory policy: Data cache writealloc
Zone ranges:
DMA [mem 0x0000000080000000-0x00000000bfffffff]
Normal empty
HighMem empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080000000-0x00000000bfffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
psci: probing for conduit method from DT.
psci: PSCIv1.0 detected in firmware.
psci: Using standard PSCI v0.2 function IDs
psci: MIGRATE_INFO_TYPE not supported.
psci: SMC Calling Convention v1.0
percpu: Embedded 11 pages/cpu s16276 r8192 d20588 u45056
Built 1 zonelists, mobility grouping on. Total pages: 260096
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 ro rootfstype=jffs2 mtdparts=1550000.quadspi:8m(boot)ro,2m(reserved)ro,6m(platform)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 1025600K/1048576K available (6144K kernel code, 1114K rwdata, 2848K rodata, 2048K init, 391K bss, 22976K reserved, 0K cma-reserved, 0K highmem)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
GIC: Using split EOI/Deactivate mode
rcu: srcu_init: Setting srcu_struct sizes based on contention.
arch_timer: cp15 timer(s) running at 12.50MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
sched_clock: 56 bits at 13MHz, resolution 80ns, wraps every 4398046511080ns
Switching to timer-based delay loop, resolution 80ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
CPU: Testing write buffer coherency: ok
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
Setting up static identity map for 0x80200000 - 0x80200054
rcu: Hierarchical SRCU implementation.
rcu: Max phase no-delay instances is 1000.
smp: Bringing up secondary CPUs ...
CPU1: update cpu_capacity 1024
CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (50.00 BogoMIPS).
CPU: All CPU(s) started in HYP mode.
CPU: Virtualization extensions available.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
Serial: AMBA PL011 UART driver
platform soc: Fixed dependency cycle(s) with /soc/interrupt-controller@1400000
HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
cryptd: max_cpu_qlen set to 1000
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
imx-i2c 2190000.i2c: can't get pinctrl, bus recovery not supported
imx-i2c 2190000.i2c: using dma0chan16 (tx) and dma0chan17 (rx) for DMA transfers
i2c i2c-0: IMX I2C adapter registered
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
vgaarb: loaded
clocksource: Switched to clocksource arch_sys_counter
NET: Registered PF_INET protocol family
IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
Bus freq driver module loaded
workingset: timestamp_bits=30 max_order=18 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler mq-deadline registered
io scheduler kyber registered
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
printk: console [ttyS0] disabled
21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 39, base_baud = 9375000) is a 16550A_FSL64
printk: console [ttyS0] enabled
21c0600.serial: ttyS1 at MMIO 0x21c0600 (irq = 39, base_baud = 9375000) is a 16550A_FSL64
2970000.serial: ttyLP2 at MMIO 0x2970000 (irq = 40, base_baud = 9375000) is a FSL_LPUART
brd: module loaded
loop: module loaded
ahci-qoriq 3200000.sata: supply ahci not found, using dummy regulator
ahci-qoriq 3200000.sata: supply phy not found, using dummy regulator
ahci-qoriq 3200000.sata: supply target not found, using dummy regulator
ahci-qoriq 3200000.sata: AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl platform mode
ahci-qoriq 3200000.sata: flags: 64bit ncq sntf pm clo only pmp fbs pio slum part ccc
ahci-qoriq 3200000.sata: port 0 is not capable of FBS
scsi host0: ahci-qoriq
ata1: SATA max UDMA/133 mmio [mem 0x03200000-0x0320ffff] port 0x100 irq 41
spi-nor spi0.0: w25q128 (16384 Kbytes)
tun: Universal TUN/TAP device driver, 1.6
fsl-gianfar soc:ethernet@2d10000: enabled errata workarounds, flags: 0x4
fsl-gianfar soc:ethernet@2d10000 eth0: mac: 00:11:22:33:44:55
fsl-gianfar soc:ethernet@2d10000 eth0: Running with NAPI enabled
fsl-gianfar soc:ethernet@2d10000 eth0: RX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d10000 eth0: RX BD ring size for Q[1]: 256
fsl-gianfar soc:ethernet@2d10000 eth0: TX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d10000 eth0: TX BD ring size for Q[1]: 256
fsl-gianfar soc:ethernet@2d50000: enabled errata workarounds, flags: 0x4
fsl-gianfar soc:ethernet@2d50000 eth1: mac: 00:11:22:33:44:56
fsl-gianfar soc:ethernet@2d50000 eth1: Running with NAPI enabled
fsl-gianfar soc:ethernet@2d50000 eth1: RX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d50000 eth1: RX BD ring size for Q[1]: 256
fsl-gianfar soc:ethernet@2d50000 eth1: TX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d50000 eth1: TX BD ring size for Q[1]: 256
fsl-gianfar soc:ethernet@2d90000: enabled errata workarounds, flags: 0x4
fsl-gianfar soc:ethernet@2d90000 eth2: mac: 00:11:22:33:44:57
fsl-gianfar soc:ethernet@2d90000 eth2: Running with NAPI enabled
fsl-gianfar soc:ethernet@2d90000 eth2: RX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d90000 eth2: RX BD ring size for Q[1]: 256
fsl-gianfar soc:ethernet@2d90000 eth2: TX BD ring size for Q[0]: 256
fsl-gianfar soc:ethernet@2d90000 eth2: TX BD ring size for Q[1]: 256
e1000e: Intel(R) PRO/1000 Network Driver
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f66c hci version 0x100 quirks 0x0000000002010810
xhci-hcd xhci-hcd.0.auto: irq 61, io mem 0x03100000
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c_dev: i2c /dev entries driver
pps pps0: new PPS source ptp0
qoriq-cpufreq qoriq-cpufreq: Freescale QorIQ CPU frequency scaling driver
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
xt_time: kernel timezone is -0000
ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
NET: Registered PF_PACKET protocol family
8021q: 802.1Q VLAN Support v1.8
sctp: Hash tables configured (bind 512/512)
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
ALSA device list:
No soundcards found.
ata1: SATA link down (SStatus 0 SControl 300)
MTD: Couldn't look up 'mtdblock2': -2
List of all partitions:
0100 262144 ram0
(driver?)
0101 262144 ram1
(driver?)
0102 262144 ram2
(driver?)
0103 262144 ram3
(driver?)
0104 262144 ram4
(driver?)
0105 262144 ram5
(driver?)
0106 262144 ram6
(driver?)
0107 262144 ram7
(driver?)
1f00 16384 mtdblock0
(driver?)
No filesystem could mount root, tried:
jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.55+ #7
Hardware name: Generic DT based system
unwind_backtrace from show_stack+0xb/0xc
show_stack from dump_stack_lvl+0x2b/0x34
dump_stack_lvl from panic+0x8f/0x200
panic from mount_block_root+0xef/0x150
mount_block_root from prepare_namespace+0xbb/0xf0
prepare_namespace from kernel_init+0xf/0xd0
kernel_init from ret_from_fork+0x11/0x2c
Exception stack(0xc0819fb0 to 0xc0819ff8)
9fa0: 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.1.55+ #7
Hardware name: Generic DT based system
unwind_backtrace from show_stack+0xb/0xc
show_stack from dump_stack_lvl+0x2b/0x34
dump_stack_lvl from do_handle_IPI+0x4d/0xc8
do_handle_IPI from ipi_handler+0xd/0x14
ipi_handler from handle_percpu_devid_irq+0x2b/0x94
handle_percpu_devid_irq from handle_irq_desc+0xf/0x18
handle_irq_desc from gic_handle_irq+0x43/0x50
gic_handle_irq from generic_handle_arch_irq+0x19/0x2c
generic_handle_arch_irq from call_with_stack+0xd/0x10
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
*****Here is dts file*****