How to build ramdisk image for BSP42 S32G399ARDB3

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

How to build ramdisk image for BSP42 S32G399ARDB3

1,375 Views
vishalg
Contributor III

Hi Community Member,

Can anyone please tell me how to build ramdisk image for S32G3-RDB3 board.
Device: S32G399ARDB3
BSP: 42

I want to use this ramdisk image with Linux kernel 6.6.32-rt32 to boot on top of a hypervisor.

Regards,
Vishal

Tags (1)
0 Kudos
Reply
7 Replies

1,204 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @vishalg 

Thanks for your clarification, I could understand your setup.

I suggest not integrated kernel image and ramdisk file together, and firstly to have a test with the ramdiskfile and kernel image you built, which means not using the LinuxVmwithRamDisk.uimage, instead, to boot the Linux like ""bootm $kernel $ramdisk $dtb"", in order to check if the images created could work correctly in a more general method. 

 

BR

Chenyin

 

0 Kudos
Reply

1,238 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @vishalg 

Thanks for your reply

For your first test, seems the uImage file you created is only recognized as a kernel image by the u-boot, the format you used seems not supported by the bootm command in the u-boot, I suggest boot the board via "bootm $kernel $ramdisk $dtb"

For the second test, seems the bootargs is not correctly set for ramdisk, I suggest adding at least "root=/dev/ram rw" in your bootargs for a trial.

 

BR

Chenyin

0 Kudos
Reply

1,334 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @vishalg 

Thanks for the reply.

The DDR size is 4G, I suggest loading your LinuxVmwithRamDisk.uimage to 0x90000000, then it may be loaded correctly, since it includes more useful tools/libs existed in the rootfs.

If you do have requirements that using with smaller size rootfs, try rebuild the Yocto with  "bitbake core-image-minimal", the new ramdiskfile generated is around 15M, which may fit what you need.

I hope it will help.

 

BR

Chenyin

.

0 Kudos
Reply

1,307 Views
vishalg
Contributor III

Hi Chenyin,
Thankyou for your quick reply.
I tried both the suggestion from you , here with the on board results which fails to boot further.
Suggestion 1: I tried loading  LinuxVmwithRamDisk.uimage to 0x90000000.
LinuxVmwithRamDisk.uimage is an image build by integrating the ramdisk image (fsl-image-base-s32g399ardb3-20250317110053.rootfs.cpio.gz.u-boot).

Here with the test output on RDB3 board:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

U-Boot 2022.04+g5a6f62071f+p0 (Sep 06 2024 - 07:11:20 +0000)

SoC: NXP S32G399A rev. 1.0
CPU: ARM Cortex-A53 r0p4 @ max 1300 MHz
Model: NXP S32G399A-RDB3
DRAM: 3.5 GiB
Core: 306 devices, 25 uclasses, devicetree: board
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
s32cc_serdes_phy serdes@40480000: Using mode 0 for SerDes subsystem
pci_s32cc pcie@40400000: Configuring as RootComplex
pci_s32cc pcie@40400000: Failed to get link up
In: serial@401c8000
Out: serial@401c8000
Err: serial@401c8000
Board revision: RDB3 Revision E
PCIe: BusDevFun VendorId DeviceId Device Class Sub-Class
__________________________________________________________________________
pcie@40400000 RootComplex
| `-- 01:00.00 0x1957 0x4300 Bridge device 0x04
Net:
Warning: ethernet@4033c000 (eth0) using random MAC address - a6:61:3e:2c:fe:af
eth0: ethernet@4033c000
Found PFE version 0x0101 (S32G3)
PFEng firmware file 'mmc@0:1:s32g_pfe_class.fw' loading failed: -2

Found PFE version 0x0101 (S32G3)
PFEng firmware file 'mmc@0:1:s32g_pfe_class.fw' loading failed: -2

Found PFE version 0x0101 (S32G3)
PFEng firmware file 'mmc@0:1:s32g_pfe_class.fw' loading failed: -2

Hit any key to stop autoboot: 0
=>
=>
=> fatload mmc 0:1 0x85000000 s32g399a-rdb3.dtb
60416 bytes read in 7 ms (8.2 MiB/s)
=> ext4load mmc 0:2 0x90000000 /home/root/LinuxVmwithRamDisk.uimage
154534148 bytes read in 6414 ms (23 MiB/s)
=> bootm 0x90000000 - 0x85000000
## Booting kernel from Legacy Image at 90000000 ...
Image Name: L4 Image #15
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 154534084 Bytes = 147.4 MiB
Load Address: 81200000
Entry Point: 81200000
Verifying Checksum ... OK
## Flattened Device Tree blob at 85000000
Booting using the fdt blob at 0x85000000
Loading Kernel Image
uncompressed: uncompress error -28
Must RESET board to recover
bootm - boot application image from memory

Usage:
bootm [addr [arg ...]]
- boot application image stored in memory
passing arguments 'arg ...'; when booting a Linux kernel,
'arg' can be the address of an initrd image
When booting a Linux kernel which requires a flat device-tree
a third argument is required which is the address of the
device-tree blob. To boot that kernel without an initrd image,
use a '-' for the second argument. If you do not pass a third
a bd_info struct will be passed instead

Sub-commands to do part of the bootm sequence. The sub-commands must be
issued in the order below (it's ok to not issue all sub-commands):
start [addr [arg ...]]
loados - load OS image
ramdisk - relocate initrd, set env initrd_start/initrd_end
fdt - relocate flat device tree
cmdline - OS specific command line processing/setup
bdt - OS specific bd_info processing
prep - OS specific prep before relocation or go
go - start OS
=>

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Suggestion 2: I tied the smaller RAM disk image generated from "bitbake core-image-minimal" (Imgae Output -core-image-minimal-s32g399ardb3-20250325052917.rootfs.cpio.gz.u-boot)

It gives kernel panic "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"as below board logs:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MOE: Starting: rom/ned rom/linux-vm.cfg
MOE: loading 'rom/ned'
Ned says: Hi World!
Ned: loading file: 'rom/linux-vm.cfg'
Console Server
cons>
Created vcon channel: switch [420010]
cons>
switch | Max number of buffers in virtqueue: 256

Created vcon channel: vm1 [421010]
cons>
Created vcon channel: mon1 [422010]
cons>

vm1 | VMM[main]: Hello out there.

Created vcon channel: vm2 [423010]
cons>
Created vcon channel: mon2 [424010]
cons>

vm2 | VMM[main]: Hello out there.
switch | Registering dataspace from 0x90200000 with 131072 KiB, offset 0x0
switch | PORT[0x14d70]: DMA guest [90200000-981fffff] local [1200000-91fffff] offset 0
switch | register client: host IRQ: 420010 config DS: 41d000
vm1 | VMM[ram]: Cleaning caches for device tree [9fff000-9fff9ac] ([981ff000])
vm1 | VMM: Hello clock source for vCPU 0
switch | Registering dataspace from 0x98200000 with 131072 KiB, offset 0x0
vm1 | VMM: Hello clock source for vCPU 1
switch | PORT[0x14e80]: DMA guest [98200000-a01fffff] local [9200000-111fffff] offset 0
switch | register client: host IRQ: 420010 config DS: 41e000
vm1 | VMM: Hello clock source for vCPU 2
vm2 | VMM[ram]: Cleaning caches for device tree [9fff000-9fff9ac] ([a01ff000])
vm1 | VMM: Hello clock source for vCPU 3
vm2 | VMM: Hello clock source for vCPU 0
vm2 | VMM: Hello clock source for vCPU 1
vm1 | VMM: Starting Cpu0 @ 0x90200000 in 64Bit mode (handler @ 109c61c, stack: 801ffc10, task: 41e000, mpidr: 80000000 (orig: 80000000)
vm2 | VMM: Hello clock source for vCPU 2
vm1 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm2 | VMM: Hello clock source for vCPU 3
vm2 | VMM: Starting Cpu0 @ 0x98200000 in 64Bit mode (handler @ 109c61c, stack: 801ffc10, task: 41e000, mpidr: 80000000 (orig: 80000000)
vm2 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm1 | VMM: Starting Cpu1 @ 0x90eb2338 in 64Bit mode (handler @ 109c61c, stack: 430f30, task: 41e000, mpidr: 80000001 (orig: 80000000)
vm1 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm1 | VMM: Starting Cpu2 @ 0x90eb2338 in 64Bit mode (handler @ 109c61c, stack: 82ff30, task: 41e000, mpidr: 80000002 (orig: 80000000)
vm1 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm1 | VMM: Starting Cpu3 @ 0x90eb2338 in 64Bit mode (handler @ 109c61c, stack: c2ff30, task: 41e000, mpidr: 80000003 (orig: 80000000)
vm1 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm1 | [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
vm1 | [ 0.000000] Linux version 6.6.32-rt32-g49d9f8bb25e0 (gvt1kor@BANI-C-007L8) (aarch64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #2 SMP PREEMPT Fri Mar 21 16:38:57 IST 2025

vm1 | [ 0.000000] Zone ranges:
vm1 | [ 0.000000] DMA [mem 0x0000000090200000-0x00000000981fffff]
vm2 | VMM: Starting Cpu1 @ 0x98eb2338 in 64Bit mode (handler @ 109c61c, stack: 430f30, task: 41e000, mpidr: 80000001 (orig: 80000000)
vm2 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm2 | VMM: Starting Cpu2 @ 0x98eb2338 in 64Bit mode (handler @ 109c61c, stack: 82ff30, task: 41e000, mpidr: 80000002 (orig: 80000000)
vm2 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm2 | VMM: Starting Cpu3 @ 0x98eb2338 in 64Bit mode (handler @ 109c61c, stack: c2ff30, task: 41e000, mpidr: 80000003 (orig: 80000000)
vm2 | VMM: FATAL: ffffffc08002160c: mrs r0, S3_1_C11_C0_2 (hsr=62346c01)
vm1 | [ 0.000000] DMA32 empty
vm1 | [ 0.000000] Normal empty
vm1 | [ 0.000000] Movable zone start for each node
vm2 | [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
vm1 | [ 0.000000] Early memory node ranges
vm1 | [ 0.000000] node 0: [mem 0x0000000090200000-0x00000000981fffff]
vm1 | [ 0.000000] Initmem setup node 0 [mem 0x0000000090200000-0x00000000981fffff]
vm2 | [ 0.000000] Linux version 6.6.32-rt32-g49d9f8bb25e0 (gvt1kor@BANI-C-007L8) (aarch64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #2 SMP PREEMPT Fri Mar 21 16:38:57 IST 2025
vm1 | [ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges

vm2 | [ 0.000000] Zone ranges:
vm1 | [ 0.000000] On node 0, zone DMA: 32256 pages in unavailable ranges
vm2 | [ 0.000000] DMA [mem 0x0000000098200000-0x00000000a01fffff]
vm1 | [ 0.000000] cma: Failed to reserve 256 MiB on node -1
vm2 | [ 0.000000] DMA32 empty
vm2 | [ 0.000000] Normal empty
vm1 | [ 0.000000] psci: probing for conduit method from DT.
vm2 | [ 0.000000] Movable zone start for each node
vm1 | [ 0.000000] psci: PSCIv1.0 detected in firmware.
vm2 | [ 0.000000] Early memory node ranges
vm1 | [ 0.000000] psci: Using standard PSCI v0.2 function IDs
vm2 | [ 0.000000] node 0: [mem 0x0000000098200000-0x00000000a01fffff]
vm1 | [ 0.000000] psci: Trusted OS migration not required
vm1 | [ 0.000000] psci: SMC Calling Convention v1.0
vm2 | [ 0.000000] Initmem setup node 0 [mem 0x0000000098200000-0x00000000a01fffff]
vm1 | [ 0.000000] percpu: Embedded 20 pages/cpu s44840 r8192 d28888 u81920
vm2 | [ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
vm1 | [ 0.000000] Detected VIPT I-cache on CPU0
vm2 | [ 0.000000] On node 0, zone DMA: 32256 pages in unavailable ranges
vm1 | [ 0.000000] CPU features: detected: GIC system register CPU interface
vm2 | [ 0.000000] cma: Failed to reserve 256 MiB on node -1
vm1 | [ 0.000000] CPU features: detected: ARM erratum 845719
vm2 | [ 0.000000] psci: probing for conduit method from DT.
vm2 | [ 0.000000] psci: PSCIv1.0 detected in firmware.
vm1 | [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, 1530923, or 1530924
vm2 | [ 0.000000] psci: Using standard PSCI v0.2 function IDs
vm1 | [ 0.000000] alternatives: applying boot alternatives
vm2 | [ 0.000000] psci: Trusted OS migration not required
vm2 | [ 0.000000] psci: SMC Calling Convention v1.0
vm1 | [ 0.000000] Kernel command line: console=ttyAMA0 earlyprintk=1 rdinit=/init ip=192.168.1.1:::255.255.255.0:server:eth0
vm2 | [ 0.000000] percpu: Embedded 20 pages/cpu s44840 r8192 d28888 u81920
vm2 | [ 0.000000] Detected VIPT I-cache on CPU0
vm1 | [ 0.000000] Unknown kernel command line parameters "earlyprintk=1", will be passed to user space.
vm2 | [ 0.000000] CPU features: detected: GIC system register CPU interface
vm1 | [ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
vm2 | [ 0.000000] CPU features: detected: ARM erratum 845719
vm1 | [ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
vm2 | [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, 1530923, or 1530924
vm1 | [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32256
vm2 | [ 0.000000] alternatives: applying boot alternatives
vm1 | [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
vm1 | [ 0.000000] software IO TLB: area num 4.
vm2 | [ 0.000000] Kernel command line: console=ttyAMA0 earlyprintk=1 rdinit=/init ip=192.168.1.2:::255.255.255.0:server:eth0
vm1 | [ 0.000000] software IO TLB: mapped [mem 0x0000000092e00000-0x0000000096e00000] (64MB)
vm2 | [ 0.000000] Unknown kernel command line parameters "earlyprintk=1", will be passed to user space.
vm2 | [ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
vm1 | [ 0.000000] Memory: 29500K/131072K available (9792K kernel code, 662K rwdata, 3112K rodata, 1920K init, 226K bss, 101572K reserved, 0K cma-reserved)
vm2 | [ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
vm1 | [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
vm2 | [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32256
vm1 | [ 0.000000] rcu: Preemptible hierarchical RCU implementation.
vm1 | [ 0.000000] rcu: RCU event tracing is enabled.
vm2 | [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
vm2 | [ 0.000000] software IO TLB: area num 4.
vm1 | [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
vm1 | [ 0.000000] Trampoline variant of Tasks RCU enabled.
vm2 | [ 0.000000] software IO TLB: mapped [mem 0x000000009ae00000-0x000000009ee00000] (64MB)
vm1 | [ 0.000000] Tracing variant of Tasks RCU enabled.
vm1 | [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
vm2 | [ 0.000000] Memory: 29500K/131072K available (9792K kernel code, 662K rwdata, 3112K rodata, 1920K init, 226K bss, 101572K reserved, 0K cma-reserved)
vm1 | [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
vm2 | [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
vm1 | [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
vm2 | [ 0.000000] rcu: Preemptible hierarchical RCU implementation.
vm1 | [ 0.000000] GICv3: 988 SPIs implemented
vm2 | [ 0.000000] rcu: RCU event tracing is enabled.
vm1 | [ 0.000000] GICv3: 0 Extended SPIs implemented
vm1 | [ 0.000000] Root IRQ handler: gic_handle_irq
vm2 | [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
vm1 | [ 0.000000] GICv3: GICv3 features: 16 PPIs
vm2 | [ 0.000000] Trampoline variant of Tasks RCU enabled.
vm2 | [ 0.000000] Tracing variant of Tasks RCU enabled.
vm1 | [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000000050000
vm1 | [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
vm2 | [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
vm1 | [ 0.000000] arch_timer: cp15 timer(s) running at 5.00MHz (virt).
vm2 | [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
vm2 | [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
vm2 | [ 0.000000] GICv3: 988 SPIs implemented
vm1 | [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x127350b88, max_idle_ns: 440795202120 ns
vm2 | [ 0.000000] GICv3: 0 Extended SPIs implemented
vm1 | [ 0.000001] sched_clock: 56 bits at 5MHz, resolution 200ns, wraps every 4398046511100ns
vm2 | [ 0.000000] Root IRQ handler: gic_handle_irq
vm1 | [ 0.000161] Console: colour dummy device 80x25
vm2 | [ 0.000000] GICv3: GICv3 features: 16 PPIs
vm2 | [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000000050000
vm1 | [ 0.000190] Calibrating delay loop (skipped), value calculated using timer frequency.. 10.00 BogoMIPS (lpj=20000)
vm2 | [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
vm1 | [ 0.000201] pid_max: default: 32768 minimum: 301
vm2 | [ 0.000000] arch_timer: cp15 timer(s) running at 5.00MHz (virt).
vm1 | [ 0.000296] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
vm1 | [ 0.000306] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
vm2 | [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x127350b88, max_idle_ns: 440795202120 ns
vm1 | [ 0.001012] cacheinfo: Unable to detect cache hierarchy for CPU 0
vm2 | [ 0.000000] sched_clock: 56 bits at 5MHz, resolution 200ns, wraps every 4398046511100ns
vm1 | [ 0.001846] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
vm2 | [ 0.000165] Console: colour dummy device 80x25
vm1 | [ 0.001937] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
vm2 | [ 0.000196] Calibrating delay loop (skipped), value calculated using timer frequency.. 10.00 BogoMIPS (lpj=20000)
vm1 | [ 0.002128] rcu: Hierarchical SRCU implementation.
vm2 | [ 0.000207] pid_max: default: 32768 minimum: 301
vm1 | [ 0.002132] rcu: Max phase no-delay instances is 1000.
vm1 | [ 0.002571] smp: Bringing up secondary CPUs ...
vm2 | [ 0.000304] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
vm1 | [ 0.016501] Detected VIPT I-cache on CPU1
vm2 | [ 0.000313] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
vm1 | [ 0.016561] GICv3: CPU1: found redistributor 1 region 0:0x0000000000070000
vm2 | [ 0.001036] cacheinfo: Unable to detect cache hierarchy for CPU 0
vm1 | [ 0.016662] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
vm2 | [ 0.001877] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
vm1 | [ 0.038083] Detected VIPT I-cache on CPU2
vm1 | [ 0.038126] GICv3: CPU2: found redistributor 2 region 0:0x0000000000090000
vm2 | [ 0.001961] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
vm2 | [ 0.002157] rcu: Hierarchical SRCU implementation.
vm1 | [ 0.038210] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
vm2 | [ 0.002160] rcu: Max phase no-delay instances is 1000.
vm1 | [ 0.059603] Detected VIPT I-cache on CPU3
vm2 | [ 0.002610] smp: Bringing up secondary CPUs ...
vm1 | [ 0.059649] GICv3: CPU3: found redistributor 3 region 0:0x00000000000b0000
vm2 | [ 0.016679] Detected VIPT I-cache on CPU1
vm1 | [ 0.059732] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
vm2 | [ 0.016739] GICv3: CPU1: found redistributor 1 region 0:0x0000000000070000
vm1 | [ 0.067390] smp: Brought up 1 node, 4 CPUs
vm2 | [ 0.016844] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
vm1 | [ 0.067397] SMP: Total of 4 processors activated.
vm2 | [ 0.038280] Detected VIPT I-cache on CPU2
vm1 | [ 0.067401] CPU features: detected: 32-bit EL0 Support
vm2 | [ 0.038324] GICv3: CPU2: found redistributor 2 region 0:0x0000000000090000
vm1 | [ 0.067403] CPU features: detected: 32-bit EL1 Support
vm1 | [ 0.067408] CPU features: detected: CRC32 instructions
vm2 | [ 0.038407] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
vm1 | [ 0.067494] CPU: All CPU(s) started at EL1
vm2 | [ 0.059835] Detected VIPT I-cache on CPU3
vm1 | [ 0.067507] alternatives: applying system-wide alternatives
vm2 | [ 0.059885] GICv3: CPU3: found redistributor 3 region 0:0x00000000000b0000
vm1 | [ 0.068940] devtmpfs: initialized
vm2 | [ 0.059967] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
vm1 | [ 0.069946] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
vm2 | [ 0.067622] smp: Brought up 1 node, 4 CPUs
vm2 | [ 0.067629] SMP: Total of 4 processors activated.
vm1 | [ 0.069961] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
vm2 | [ 0.067633] CPU features: detected: 32-bit EL0 Support
vm1 | [ 0.070085] pinctrl core: initialized pinctrl subsystem
vm2 | [ 0.067636] CPU features: detected: 32-bit EL1 Support
vm1 | [ 0.070780] NET: Registered PF_NETLINK/PF_ROUTE protocol family
vm2 | [ 0.067641] CPU features: detected: CRC32 instructions
vm2 | [ 0.067728] CPU: All CPU(s) started at EL1
vm1 | [ 0.071235] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
vm2 | [ 0.067741] alternatives: applying system-wide alternatives
vm1 | [ 0.071275] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
vm2 | [ 0.073982] devtmpfs: initialized
vm1 | [ 0.071310] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
vm2 | [ 0.075001] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
vm1 | [ 0.071637] thermal_sys: Registered thermal governor 'step_wise'
vm2 | [ 0.075016] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
vm1 | [ 0.071723] hw-breakpoint: found 1 breakpoint and 1 watchpoint registers.
vm2 | [ 0.075144] pinctrl core: initialized pinctrl subsystem
vm1 | [ 0.071899] ASID allocator initialised with 65536 entries
vm2 | [ 0.075843] NET: Registered PF_NETLINK/PF_ROUTE protocol family
vm1 | [ 0.072012] Serial: AMBA PL011 UART driver
vm1 | [ 0.072055] scmi_core: SCMI protocol bus registered
vm2 | [ 0.076307] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
vm2 | [ 0.076344] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
vm1 | [ 0.072785] 12000.pl011_uart: ttyAMA0 at MMIO 0x12000 (irq = 13, base_baud = 0) is a PL011 rev3
vm1 | [ 0.072828] printk: legacy console [ttyAMA0] enabled
vm2 | [ 0.076379] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
vm1 | [ 1.696561] Modules: 28784 pages in range for non-PLT usage
vm2 | [ 0.076686] thermal_sys: Registered thermal governor 'step_wise'
vm1 | [ 1.696576] Modules: 520304 pages in range for PLT usage
vm2 | [ 0.076772] hw-breakpoint: found 1 breakpoint and 1 watchpoint registers.
vm1 | [ 1.715291] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
vm2 | [ 0.076925] ASID allocator initialised with 65536 entries
vm2 | [ 0.077032] Serial: AMBA PL011 UART driver
vm1 | [ 1.741033] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
vm2 | [ 0.077075] scmi_core: SCMI protocol bus registered
vm1 | [ 1.764009] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
vm2 | [ 0.077829] 12000.pl011_uart: ttyAMA0 at MMIO 0x12000 (irq = 13, base_baud = 0) is a PL011 rev3
vm1 | [ 1.780003] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
vm2 | [ 0.077872] printk: legacy console [ttyAMA0] enabled
vm1 | [ 1.800365] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
vm2 | [ 1.667857] Modules: 28784 pages in range for non-PLT usage
vm1 | [ 1.817431] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
vm2 | [ 1.667871] Modules: 520304 pages in range for PLT usage
vm1 | [ 1.834847] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
vm2 | [ 1.685428] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
vm1 | [ 1.851292] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
vm2 | [ 1.711459] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
vm1 | [ 1.878557] SCSI subsystem initialized
vm1 | [ 1.887571] usbcore: registered new interface driver usbfs
vm2 | [ 1.730046] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
vm1 | [ 1.894087] usbcore: registered new interface driver hub
vm2 | [ 1.752556] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
vm1 | [ 1.911076] usbcore: registered new device driver usb
vm2 | [ 1.769502] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
vm1 | [ 1.927420] pps_core: LinuxPPS API ver. 1 registered
vm2 | [ 1.785830] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
vm1 | [ 1.943874] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
vm2 | [ 1.802383] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
vm1 | [ 1.960319] PTP clock support registered
vm1 | [ 1.987492] vgaarb: loaded
vm2 | [ 1.822755] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
vm1 | [ 1.992727] clocksource: Switched to clocksource arch_sys_counter
vm2 | [ 1.852877] SCSI subsystem initialized
vm2 | [ 1.862232] usbcore: registered new interface driver usbfs
vm2 | [ 1.869753] usbcore: registered new interface driver hub
vm2 | [ 1.879114] usbcore: registered new device driver usb
vm2 | [ 1.888270] pps_core: LinuxPPS API ver. 1 registered
vm1 | [ 2.046400] NET: Registered PF_INET protocol family
vm2 | [ 1.897132] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
vm1 | [ 2.054162] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
vm2 | [ 1.912455] PTP clock support registered
vm2 | [ 1.940619] vgaarb: loaded
vm1 | [ 2.073588] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
vm2 | [ 1.945869] clocksource: Switched to clocksource arch_sys_counter
vm1 | [ 2.095864] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
vm1 | [ 2.116971] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
vm1 | [ 2.129372] TCP bind hash table entries: 1024 (order: 3, 32768 bytes, linear)
vm2 | [ 1.992768] NET: Registered PF_INET protocol family
vm1 | [ 2.141581] TCP: Hash tables configured (established 1024 bind 1024)
vm2 | [ 2.002732] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
vm1 | [ 2.159004] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
vm1 | [ 2.177925] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
vm2 | [ 2.019429] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
vm1 | [ 2.187625] NET: Registered PF_UNIX/PF_LOCAL protocol family
vm2 | [ 2.047590] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
vm1 | [ 2.215806] RPC: Registered named UNIX socket transport module.
vm2 | [ 2.066970] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
vm1 | [ 2.226485] RPC: Registered udp transport module.
vm1 | [ 2.244724] RPC: Registered tcp transport module.
vm2 | [ 2.085722] TCP bind hash table entries: 1024 (order: 3, 32768 bytes, linear)
vm1 | [ 2.252035] RPC: Registered tcp-with-tls transport module.
vm2 | [ 2.109700] TCP: Hash tables configured (established 1024 bind 1024)
vm1 | [ 2.268592] RPC: Registered tcp NFSv4.1 backchannel transport module.
vm2 | [ 2.127253] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
vm1 | [ 2.285379] PCI: CLS 0 bytes, default 64
vm2 | [ 2.144951] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
vm1 | [ 2.303167] kvm [1]: HYP mode not available
vm1 | [ 2.309052] Unpacking initramfs...
vm2 | [ 2.168122] NET: Registered PF_UNIX/PF_LOCAL protocol family
vm1 | [ 2.327140] workingset: timestamp_bits=62 max_order=13 bucket_order=0
vm2 | [ 2.197295] RPC: Registered named UNIX socket transport module.
vm1 | [ 2.327707] fuse: init (API version 7.39)
vm2 | [ 2.206651] RPC: Registered udp transport module.
vm1 | [ 2.327878] NET: Registered PF_ALG protocol family
vm2 | [ 2.221136] RPC: Registered tcp transport module.
vm2 | [ 2.235155] RPC: Registered tcp-with-tls transport module.
vm1 | [ 2.327924] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
vm1 | [ 2.327934] io scheduler mq-deadline registered
vm2 | [ 2.242581] RPC: Registered tcp NFSv4.1 backchannel transport module.
vm1 | [ 2.327939] io scheduler kyber registered
vm2 | [ 2.266767] PCI: CLS 0 bytes, default 64
vm1 | [ 2.327951] io scheduler bfq registered
vm2 | [ 2.282119] Unpacking initramfs...
vm1 | [ 2.437143] Initramfs unpacking failed: invalid magic at start of compressed archive
switch | Resetting device
vm2 | [ 2.294248] Initramfs unpacking failed: invalid magic at start of compressed archive
vm1 | [ 2.462934] Freeing initrd memory: 14424K
vm1 | [ 2.484454] vcan: Virtual CAN interface driver
vm2 | [ 2.299535] kvm [1]: HYP mode not available
vm1 | [ 2.487972] slcan: serial line CAN interface driver
vm2 | [ 2.327859] Freeing initrd memory: 14424K
vm1 | [ 2.500839] CAN device driver interface
vm2 | [ 2.365315] workingset: timestamp_bits=62 max_order=14 bucket_order=0
vm1 | [ 2.514908] e100: Intel(R) PRO/100 Network Driver
vm2 | [ 2.387491] fuse: init (API version 7.39)
vm1 | [ 2.530027] e100: Copyright(c) 1999-2006 Intel Corporation
vm2 | [ 2.401561] NET: Registered PF_ALG protocol family
vm1 | [ 2.543291] e1000: Intel(R) PRO/1000 Network Driver
vm2 | [ 2.408867] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
vm1 | [ 2.558056] e1000: Copyright (c) 1999-2006 Intel Corporation.
vm2 | [ 2.416331] io scheduler mq-deadline registered
vm1 | [ 2.575110] e1000e: Intel(R) PRO/1000 Network Driver
vm2 | [ 2.433853] io scheduler kyber registered
vm2 | [ 2.447614] io scheduler bfq registered
vm1 | [ 2.589840] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
vm1 | [ 2.609292] igb: Intel(R) Gigabit Ethernet Network Driver
vm1 | [ 2.617612] igb: Copyright (c) 2007-2014 Intel Corporation.
switch | Resetting device
vm1 | [ 2.633332] usbcore: registered new interface driver uas
vm1 | [ 2.637854] usbcore: registered new interface driver usb-storage
vm1 | [ 2.654234] i2c_dev: i2c /dev entries driver
vm1 | [ 2.654824] sdhci: Secure Digital Host Controller Interface driver
vm1 | [ 2.661417] sdhci: Copyright(c) Pierre Ossman
vm1 | [ 2.670031] sdhci-pltfm: SDHCI platform and OF driver helper
vm1 | [ 2.677017] usbcore: registered new interface driver usbhid
vm1 | [ 2.685045] usbhid: USB HID core driver
vm1 | [ 2.693444] NET: Registered PF_INET6 protocol family
vm1 | [ 2.699985] Segment Routing with IPv6
vm2 | [ 2.558697] vcan: Virtual CAN interface driver
vm1 | [ 2.708392] In-situ OAM (IOAM) with IPv6
vm2 | [ 2.564731] slcan: serial line CAN interface driver
vm2 | [ 2.584126] CAN device driver interface
vm1 | [ 2.720646] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
vm2 | [ 2.590293] e100: Intel(R) PRO/100 Network Driver
vm2 | [ 2.598552] e100: Copyright(c) 1999-2006 Intel Corporation
vm1 | [ 2.740107] NET: Registered PF_PACKET protocol family
vm2 | [ 2.605653] e1000: Intel(R) PRO/1000 Network Driver
vm1 | [ 2.769354] can: controller area network core
vm2 | [ 2.620513] e1000: Copyright (c) 1999-2006 Intel Corporation.
vm2 | [ 2.634098] e1000e: Intel(R) PRO/1000 Network Driver
vm1 | [ 2.776771] NET: Registered PF_CAN protocol family
vm2 | [ 2.642193] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
vm1 | [ 2.798367] can: raw protocol
vm2 | [ 2.656297] igb: Intel(R) Gigabit Ethernet Network Driver
vm1 | [ 2.813444] can: broadcast manager protocol
vm2 | [ 2.669428] igb: Copyright (c) 2007-2014 Intel Corporation.
vm1 | [ 2.826277] can: netlink gateway - max_hops=1
vm1 | [ 2.840735] 8021q: 802.1Q VLAN Support v1.8
vm2 | [ 2.697784] usbcore: registered new interface driver uas
vm2 | [ 2.704536] usbcore: registered new interface driver usb-storage
vm2 | [ 2.720879] i2c_dev: i2c /dev entries driver
vm2 | [ 2.727569] sdhci: Secure Digital Host Controller Interface driver
vm2 | [ 2.736124] sdhci: Copyright(c) Pierre Ossman
vm2 | [ 2.742680] sdhci-pltfm: SDHCI platform and OF driver helper
vm2 | [ 2.750848] usbcore: registered new interface driver usbhid
vm2 | [ 2.758734] usbhid: USB HID core driver
vm2 | [ 2.765216] NET: Registered PF_INET6 protocol family
vm2 | [ 2.773306] Segment Routing with IPv6
vm2 | [ 2.779151] In-situ OAM (IOAM) with IPv6
vm2 | [ 2.785273] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
vm2 | [ 2.793970] NET: Registered PF_PACKET protocol family
vm2 | [ 2.801437] can: controller area network core
vm2 | [ 2.808037] NET: Registered PF_CAN protocol family
vm2 | [ 2.815068] can: raw protocol
vm2 | [ 2.820110] can: broadcast manager protocol
vm2 | [ 2.826478] can: netlink gateway - max_hops=1
vm2 | [ 2.833089] 8021q: 802.1Q VLAN Support v1.8
vm1 | [ 15.129526] clk: Disabling unused clocks
vm1 | [ 15.135764] uart-pl011 12000.pl011_uart: no DMA platform data
vm1 | [ 15.144547] /dev/root: Can't open blockdev
vm1 | [ 15.150925] VFS: Cannot open root device "" or unknown-block(0,0): error -6
vm1 | [ 15.160480] Please append a correct "root=" boot option; here are the available partitions:
vm1 | [ 15.171521] List of all bdev filesystems:
vm1 | [ 15.177770] ext3
vm1 | [ 15.177774] ext4
vm1 | [ 15.181698] ext2
vm1 | [ 15.185650] vfat
vm1 | [ 15.189573] fuseblk
vm1 | [ 15.193526]
vm1 | [ 15.201208] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
vm1 | [ 15.212139] SMP: stopping secondary CPUs
vm1 | [ 15.218298] Kernel Offset: disabled
vm1 | [ 15.228656] CPU features: 0x1,00000008,00020000,1000421b
vm1 | [ 15.236336] Memory Limit: none
vm1 | [ 15.251660] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
vm2 | [ 15.142641] clk: Disabling unused clocks
vm2 | [ 15.149004] uart-pl011 12000.pl011_uart: no DMA platform data
vm2 | [ 15.161224] /dev/root: Can't open blockdev
vm2 | [ 15.167526] VFS: Cannot open root device "" or unknown-block(0,0): error -6
vm2 | [ 15.187528] Please append a correct "root=" boot option; here are the available partitions:
vm2 | [ 15.208540] List of all bdev filesystems:
vm2 | [ 15.214720] ext3
vm2 | [ 15.214725] ext4
vm2 | [ 15.218627] ext2
vm2 | [ 15.232534] vfat
vm2 | [ 15.236437] fuseblk
vm2 | [ 15.240341]
vm2 | [ 15.257965] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
vm2 | [ 15.279527] SMP: stopping secondary CPUs
vm2 | [ 15.285615] Kernel Offset: disabled
vm2 | [ 15.301527] CPU features: 0x1,00000008,00020000,1000421b
vm2 | [ 15.309122] Memory Limit: none
vm2 | [ 15.324530] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Regards,
Vishal

0 Kudos
Reply

1,353 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @vishalg 

Thanks for the post.

I suggest referencing the BSP42 UM to prepare the Yocto BSP environment, and then use fsl-image-auto to build the BSP,  When you have done the build of Yocto BSP, under your build_s32g399ardb3/tmp/deploy/images/s32g399ardb3, there would be kernel image, dtb file and ramdiskfile(fsl-image-auto-s32g399ardb3.cpio.gz.u-boot) existed.

Then you may use the kernel image, dtb file and the ramdisk rootfs to boot the board.

 

BR

Chenyin

0 Kudos
Reply

1,215 Views
vishalg
Contributor III

Hi Cheyin,
Thankyou  for the reply.
I have used BSP42 UM to prepare the Yocto BSP environment, and then use fsl-image-auto to build the BSP Image bootable to SD card(fsl-image-base-s32g399ardb3-20250317110053.rootfs.sdcard).

My setup : Flashed the SD card bootable image fsl-image-base-s32g399ardb3.rootfs.sdcard and booted the RDB3 board, stopping it at u-boot to load my custom build image (LinuxVmwithRamDisk.uimage) which has hypervisor with Linux kernel and ramdisk-image as explained in my previous post.
Hope this gives you clarity on my test setup. 
So with this use case when i try to boot the ramdisk image generated out of yocto and integrated, while booting it fails as explained in my previous setup, with you both suggestion output posted above.

Any input on how to proceed with the resolution will be helpful.

Regards,
Vishal

 

 

0 Kudos
Reply

1,346 Views
vishalg
Contributor III
Hi Chenyin,
Thankyou for the quick response.
I tried fsl-image-auto-s32g399ardb3.cpio.gz.u-boot which dose not work for me since the size of ramdisk image is 140 Mb which is very big.
And i see that the extension of ramdisk image is (*.u-boot i.e not compressed & Note: This file fsl-image-auto-s32g399ardb3.cpio.gz.u-boot is a softlink to the actual generated file fsl-image-base-s32g399ardb3-20250317110053.rootfs.cpio.gz.u-boot).
When i try to run this image on top of a hypervisor it dose not load on the the RAM memory which is shown as below.
Total Image size goes to 150Mb after integration.
----------------------------------------------------------------------------------------------------
Hit any key to stop autoboot: 0
=>
=>
=> fatload mmc 0:1 0x90000000 s32g399a-rdb3.dtb
60416 bytes read in 7 ms (8.2 MiB/s)
=> ext4load mmc 0:2 0x81200000 /home/root/LinuxVmwithRamDisk.uimage
** Reading file would overwrite reserved memory **
Failed to load '/home/root/LinuxVmwithRamDisk.uimage'
=>
----------------------------------------------------------------------------------------------------

When i further debugged i saw the generated image pointed by you is an uncompressed image as below :
----------------------------------------------------------------------------------------------------
$ file fsl-image-base-s32g399ardb3-20250317110053.rootfs.cpio.gz.u-boot
fsl-image-base-s32g399ardb3-20250317110053.rootfs.cpio.gz.u-boot: u-boot legacy uImage, fsl-image-base-s32g399ardb3-2025\037\213\010, Linux/ARM 64-bit, RAMDisk Image (Not compressed), 146435344 bytes, Tue Apr 5 23:00:00 2011, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0x22D80843, Data CRC: 0x1A9C9750
----------------------------------------------------------------------------------------------------
I need a ramdisk image which should be of 15Mb to 18Mb in size and can be loaded to RAM of S32G3RBD3 Board .

Can you please suggest how to build a custom image for s32g3rdb3 board whose size should be 15Mb to 18Mb so that it fits in the load address boot range.
Regards,
Vishal
0 Kudos
Reply