Boot loop on Fenix built image

Which system do you use? Android, Ubuntu, OOWOW or others?

Vim1s and Ubuntu 22.04

Which version of system do you use? Khadas official images, self built images, or others?

Self built Fenix Ubuntu 22.04. Build on an x86_64 Ubuntu 22.04 virtual machine (KVM).

Please describe your issue below:

The image enters in a boot loop when written on the eMMC (via ooWow) or simply fails when written on SD (using xzcat ... | dd of=...) and then switches to the eMMC backup. The failure seems due to

Cannot open root device "UUID=6370bb59-2b85-47ea-af40-32017addedc6" or unknown-block(0,0): error -6

See the log below. I do not understand why? I checked the boot and root partitions in the image and they are very similar (mostly identical) to those of the official image. Could it be that the Fenix generated kernel does not recognize the root=UUID=... syntax ?

Post a console log of your issue below:

[  105.786933@1]  IRQ 58: no longer affine to CPU1
[  105.962971@0]  reboot: Power down
tlpm_mmu_enable done.
S4 DDR suspend times : 1
DDR suspend...
DDR suspend time: 37us
resume addr:f700806c!
S4:BL:25dcde;ID:8099951DC3912608;FEAT:30F:1FFF0000:B002F:1;POC:CF;RCY:0;OVD:0;DFU:0;SD:0;RD-0:0;CHK:0;SCS:0;
chip_family_id:0x37
ops_bining:72d20400
efuse volate:770get efuse index value:1
Configure no pdvf to adjust vddee voltage

....

Starting kernel ...

uboot time: 9822218 us
boot 64bit kernel
[    0.000000@0]  Booting Linux on physical CPU 0x0000000000 [0x411fd040]
[    0.000000@0]  Linux version 5.4.180 (root@khadas-vim1s-ubuntu22) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #1.5 SMP PREEMPT Wed May 31 20:43:35 UTC 2023
[    0.000000@0]  Machine model: Khadas VIM1S
[    0.000000@0]  	08400000 - 08500000,     1024 KB, ramoops@0x07400000
[    0.000000@0]  	05000000 - 08400000,    53248 KB, linux,secmon
[    0.000000@0]  	7f800000 - 80000000,     8192 KB, linux,meson-fb
[    0.000000@0]  	70c00000 - 78c00000,   131072 KB, linux,ion-dev
[    0.000000@0]  	60c00000 - 70c00000,   262144 KB, linux,ion-fb
[    0.000000@0]  invalid size property in 'linux,ppmgr' node.
[    0.000000@0]  	45c00000 - 60c00000,   442368 KB, linux,codec_mm_cma
[    0.000000@0]  	7e400000 - 7f800000,    20480 KB, linux,vdin1_cma
[    0.000000@0]  node linux,demod_cma compatible matching fail
[    0.000000@0]  cma: Reserved 8 MiB at 0x000000007dc00000
[    0.000000@0]  psci: SMC Calling Convention v1.1
[    0.000000@0]  percpu: Embedded 44 pages/cpu s141912 r8192 d30120 u180224
[    0.000000@0]  Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000@0]  Kernel command line: root=UUID=6370bb59-2b85-47ea-af40-32017addedc6 rootflags=data=writeback rw rootfstype=ext4 console=ttyS0,921600 console=tty0 no_console_suspend fsck.repair=yes net.ifnames=0 khadas_board=VIM1S boot_source=sd otg_device=1 logo=osd0,loaded,0x00300000 vout=720p60hz,enable panel_type=lcd_1 hdmitx=,rgb,8bit hdmimode=720p60hz hdmichecksum= dolby_vision_on=0 hdr_policy=0 hdr_priority= frac_rate_policy=1 hdmi_read_edid= cvbsmode=576cvbs osd_reverse=0 video_reverse=0 irq_check_en=0 jtag=disable disable_ir=0 meson-gx-mmc.caps2_quirks=mmc-hs400 reboot_mode=cold_boot androidboot.serialno=01000029b0 mac=c8:63:14:72:71:37 androidboot.mac=c8:63:14:72:71:37 androidboot.wificountrycode=US partition_type=generic  androidboot.selinux=enforcing androidboot.firstboot=1 androidboot.bootloader=01.01.230531.203707 androidboot.hardware=amlogic androidboot.rpmb_state=0x0
[    0.000000@0]  Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000@0]  Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000@0]  mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000@0]  Memory: 1094728K/2097152K available (14718K kernel code, 1708K rwdata, 4004K rodata, 5504K init, 854K bss, 76728K reserved, 925696K cma-reserved)
[    0.000000@0]  SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000@0]  ftrace: allocating 46928 entries in 184 pages
[    0.000000@0]  rcu: Preemptible hierarchical RCU implementation.
[    0.000000@0]  rcu: 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000@0]  rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000@0]  	Tasks RCU enabled.
[    0.000000@0]  rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000@0]  rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000@0]  NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000@0]  GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000@0]  freertos: rtos_reserved device node find error
[    0.000000@0]  irq_meson_gpio: 82 to 12 gpio interrupt mux initialized
[    0.000000@0]  rcu: 	Offload RCU callbacks from CPUs: (none).
[    0.000000@0]  random: get_random_bytes called from start_kernel+0x3f4/0x564 with crng_init=0
[    0.000000@0]  arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000@0]  clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004@0]  sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000409@0]  Console: colour dummy device 80x25
[    0.000851@0]  printk: console [tty0] enabled
[    0.000888@0]  Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000910@0]  pid_max: default: 32768 minimum: 301
[    0.001342@0]  thread_stack_cache_init, vmap:ffffff807b046e80, bitmap:ffffff807b05f000, cache page:7b200
[    0.001368@0]  thread_stack_cache_init, allocation vm area:ffffff807b046ec0, addr:ffffffc020000000, size:20001000
[    0.001400@0]  cpu 0, vmap_stack:[ffffff807d6fe000-ffffff807d701ff0]
[    0.001413@0]  cpu 0, irq_stack: [ffffff807d703000-ffffff807d706ff0]
[    0.001425@0]  cpu 1, vmap_stack:[ffffff807d72a000-ffffff807d72dff0]
[    0.001437@0]  cpu 1, irq_stack: [ffffff807d72f000-ffffff807d732ff0]
[    0.001449@0]  cpu 2, vmap_stack:[ffffff807d756000-ffffff807d759ff0]
[    0.001460@0]  cpu 2, irq_stack: [ffffff807d75b000-ffffff807d75eff0]
[    0.001472@0]  cpu 3, vmap_stack:[ffffff807d782000-ffffff807d785ff0]
[    0.001484@0]  cpu 3, irq_stack: [ffffff807d787000-ffffff807d78aff0]
[    0.001560@0]  LSM: Security Framework initializing
[    0.001596@0]  SELinux:  Initializing.
[    0.001708@0]  Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.001732@0]  Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.003184@0]  ASID allocator initialised with 32768 entries
[    0.003287@0]  rcu: Hierarchical SRCU implementation.
[    0.027973@0]  secmon: can't fine clear_range
[    0.029020@0]  smp: Bringing up secondary CPUs ...
[    0.031061@0]  smp: Brought up 1 node, 4 CPUs
[    0.031082@0]  SMP: Total of 4 processors activated.
[    0.031095@0]  CPU features: detected: 32-bit EL0 Support
[    0.031107@0]  CPU features: detected: CRC32 instructions
[    0.032958@0]  CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.032981@0]  CPU: All CPU(s) started at EL2
[    0.033009@0]  alternatives: patching kernel code
[    0.033406@0]  CPU3: update max cpu_capacity 1024
[    0.034254@0]  devtmpfs: initialized
[    0.037703@1]  CPU1: update max cpu_capacity 1024
[    0.050095@0]  Registered cp15_barrier emulation handler
[    0.050123@0]  Registered setend emulation handler
[    0.050396@0]  clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.050438@0]  futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.050664@0]  pinctrl core: initialized pinctrl subsystem
[    0.051548@0]  NET: Registered protocol family 16
[    0.053579@0]  DMA: preallocated 256 KiB pool for atomic allocations
[    0.053621@0]  audit: initializing netlink subsys (disabled)
[    0.053780@3]  audit: type=2000 audit(0.052:1): state=initialized audit_enabled=0 res=1
[    0.054289@0]  cpuidle: using governor menu
[    0.055501@0]  hw-breakpoint: found 6 breakpoint and 2 watchpoint registers.
[    0.057098@0]  pstore: Registered ramoops as persistent store backend
[    0.057126@0]  ramoops: ramoops_io_en:0 1 old:0x0 ftrace_size:0x80000
[    0.057143@0]  ramoops_io_dump=0, buffer=ffffffc011b06000 ftrace_old_log=0000000000000000, size=0, reboot_mode=cold_boot
[    0.092690@0]  async_long_initcall = 1
[    0.095275@1]  cryptd: max_cpu_qlen set to 1000
[    0.099154@0]  regulator-sdcard GPIO handle specifies active low - ignored
[    0.100274@0]  SCSI subsystem initialized
[    0.100446@0]  usbcore: registered new interface driver usbfs
[    0.100497@0]  usbcore: registered new interface driver hub
[    0.100549@0]  usbcore: registered new device driver usb
[    0.100611@0]  mc: Linux media interface: v0.10
[    0.100710@0]  videodev: Linux video capture interface: v2.00
[    0.100805@0]  pps_core: LinuxPPS API ver. 1 registered
[    0.100820@0]  pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.100858@0]  PTP clock support registered
[    0.101470@1]  secmon: reserve_mem_size:0x3300000
[    0.101499@1]  secmon secmon: assigned reserved memory node linux,secmon
[    0.104887@1]  cpu_version: chip version = 37:B - 3:4
[    0.105287@1]  Advanced Linux Sound Architecture Driver Initialized.
[    0.105853@1]  Bluetooth: bt_init: Core ver 2.22
[    0.105897@1]  NET: Registered protocol family 31
[    0.108001@0]  clocksource: Switched to clocksource arch_sys_counter
[    0.206382@0]  VFS: Disk quotas dquot_6.6.0
[    0.206466@0]  VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.213266@0]  thermal_sys: Registered thermal governor 'power_allocator'
[    0.213802@0]  Total Memory:[80000000]
[    0.213838@0]  ramdump_probe, storage device:data
[    0.213851@0]  NO valid ramdump args:0 0
[    0.214218@0]  NET: Registered protocol family 2
[    0.214363@0]  IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.215464@0]  tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.215532@0]  TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.215687@0]  TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    0.215871@0]  TCP: Hash tables configured (established 16384 bind 16384)
[    0.216068@0]  UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.216126@0]  UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.216273@0]  NET: Registered protocol family 1
[    0.216748@0]  NET: Registered protocol family 44
[    0.217862@0]  PCI: CLS 0 bytes, default 64
[    0.218146@0]  aml_wifi aml_wifi: [wifi_dev_probe] use double channel
[    0.218272@0]  Wifi: bcmdhd_init_wlan_mem: [dhd] STATIC-MSG) bcmdhd_init_wlan_mem : 101.10.361.10 (wlan=r892223-20210623-1)
[    0.221144@0]  Wifi: bcmdhd_init_wlan_mem: [dhd] STATIC-MSG) bcmdhd_init_wlan_mem : prealloc ok: 8162304(7971K)
[    0.328343@1]  Trying to unpack rootfs image as initramfs...
[    0.719129@0]  rootfs image is not initramfs (read error); looks like an initrd
[    0.740537@0]  Freeing initrd memory: 9964K
[    0.742101@2]  hw perfevents: no interrupt-affinity property for /arm_pmu, guessing.
[    0.742364@2]  hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.742973@2]  kvm [1]: IPA Size Limit: 40 bits
[    0.743530@2]  kvm [1]: Hyp mode initialized successfully
[    0.747395@2]  Initialise system trusted keyrings
[    0.747575@2]  workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.756613@2]  squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.756783@2]  ntfs3: Max link count 4000
[    0.757118@2]  fuse: init (API version 7.31)
[    0.796053@3]  NET: Registered protocol family 38
[    0.796089@3]  Key type asymmetric registered
[    0.796103@3]  Asymmetric key parser 'x509' registered
[    0.796158@3]  Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    0.796276@3]  io scheduler mq-deadline registered
[    0.796292@3]  io scheduler kyber registered
[    0.796470@3]  io scheduler bfq registered
[    0.798482@3]  vddcpu0: supplied by regulator-dummy
[    0.799679@3]  gpiomem-aml fe004000.gpiomem: Initialised: Registers at 0xfe004000
[    0.799978@0]  cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.807288@3]  brd: module loaded
[    0.816728@1]  loop: module loaded
[    0.819433@2]  tun: Universal TUN/TAP device driver, 1.6
[    0.819903@2]  meson8b-dwmac fdc00000.ethernet: IRQ eth_wake_irq not found
[    0.819926@2]  meson8b-dwmac fdc00000.ethernet: IRQ eth_lpi not found
[    0.820074@2]  meson8b-dwmac fdc00000.ethernet: PTP uses main clock
[    0.820095@2]  meson8b-dwmac fdc00000.ethernet: no reset control found
[    0.820464@3]  meson8b-dwmac fdc00000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    0.820489@3]  meson8b-dwmac fdc00000.ethernet: 	DWMAC1000
[    0.820507@3]  meson8b-dwmac fdc00000.ethernet: DMA HW capability register supported
[    0.820526@3]  meson8b-dwmac fdc00000.ethernet: RX Checksum Offload Engine supported
[    0.820544@3]  meson8b-dwmac fdc00000.ethernet: COE Type 2
[    0.820559@3]  meson8b-dwmac fdc00000.ethernet: TX Checksum insertion supported
[    0.820577@3]  meson8b-dwmac fdc00000.ethernet: Wake-Up On Lan supported
[    0.820617@3]  meson8b-dwmac fdc00000.ethernet: Normal descriptors
[    0.820634@3]  meson8b-dwmac fdc00000.ethernet: Ring mode enabled
[    0.820650@3]  meson8b-dwmac fdc00000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.821255@3]  aml_cust_setting
[    0.821276@3]  meson8b-dwmac fdc00000.ethernet: Unable to get resource(407)
[    0.821291@3]  no mac_wol
[    0.821302@3]  no keep-alive
[    0.821312@3]  use default internal_phy as 0
[    0.821324@3]  set default cali_val as 0
[    0.821738@3]  PPP generic driver version 2.4.2
[    0.821920@3]  PPP BSD Compression module registered
[    0.821937@3]  PPP Deflate Compression module registered
[    0.821972@3]  PPP MPPE Compression module registered
[    0.821987@3]  NET: Registered protocol family 24
[    0.822016@3]  PPTP driver version 0.8.5
[    0.822736@3]  ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.822753@3]  ehci-pci: EHCI PCI platform driver
[    0.823189@3]  usbcore: registered new interface driver cdc_acm
[    0.823204@3]  cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.823258@3]  usbcore: registered new interface driver usb-storage
[    0.823903@3]  mousedev: PS/2 mouse device common for all mice
[    0.823961@3]  usbcore: registered new interface driver xpad
[    0.824043@3]  usbcore: registered new interface driver usb_acecad
[    0.824083@3]  usbcore: registered new interface driver aiptek
[    0.824127@3]  usbcore: registered new interface driver gtco
[    0.824166@3]  usbcore: registered new interface driver hanwang
[    0.824203@3]  usbcore: registered new interface driver kbtab
[    0.824343@3]  sensor_register_slave:kxtj3,id=0
[    0.824375@3]  i2c /dev entries driver
[    0.827346@3]  rtc-hym8563 1-0051: registered as rtc0
[    0.827756@3]  rtc-hym8563 1-0051: setting system clock to 2023-06-01T06:40:56 UTC (1685601656)
[    0.828997@3]  usbcore: registered new interface driver uvcvideo
[    0.829016@3]  USB Video Class driver (1.1.1)
[    0.829029@3]  Driver for 1-wire Dallas network protocol.
[    0.829415@3]  device-mapper: uevent: version 1.0.3
[    0.829751@3]  device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[    0.830278@3]  Bluetooth: hci_uart_init: HCI UART driver ver 2.3
[    0.830297@3]  Bluetooth: hci_uart_register_proto: HCI UART protocol H4 registered
[    0.831512@3]  meson-gx-mmc fe08c000.mmc: Force HS400
[    0.856941@2]  meson-gx-mmc fe08c000.mmc: host probe success!
[    0.858417@2]  meson-gx-mmc fe08a000.sd: Got CD GPIO
[    0.859515@2]  meson-gx-mmc fe08a000.sd: Missing clock clkin2
[    0.887286@3]  meson-gx-mmc fe08a000.sd: card IN
[    0.887316@3]  meson-gx-mmc fe08a000.sd:  SDCARD insert
[    0.887393@3]  meson-gx-mmc fe08a000.sd: host probe success!
[    0.888053@3]  meson-gx-mmc fe088000.sdio: Missing clock clkin2
[    0.910949@0]  meson-gx-mmc fe088000.sdio: host probe success!
[    0.912376@0]  hidraw: raw HID events driver (C) Jiri Kosina
[    0.914871@0]  usbcore: registered new interface driver usbhid
[    0.914895@0]  usbhid: USB HID core driver
[    0.916083@0]  ashmem: initialized
[    0.917182@0]  unifykey: fail to obtain phy addr of shared mem
[    0.918423@0]  meson_mhu_fifo fe006000.mhu: no get mbox wrrd -22
[    0.918483@0]  meson_mhu_fifo fe006000.mhu: no payload, only use fifo
[    0.918521@0]  meson_mhu_fifo fe006000.mhu: set mbox irqmax default value -22
[    0.919899@0]  gxbb_pm: enter meson_pm_probe!
[    0.919944@0]  pm-meson fe010288.pm: Vad enable not detected ~~~
[    0.919962@0]  pm-meson fe010288.pm: Not found item name in dts.The default item will be used!
[    0.919981@0]  pm-meson fe010288.pm: Does not match the item type, use the default [init] function.
[    0.920065@0]  pm-meson fe010288.pm: Read dmc_asr addr fail
[    0.920084@0]  pm-meson fe010288.pm: IRQ pm_wakeup not found
[    0.920099@0]  pm-meson fe010288.pm: Failed to get pm_wakeup interrupt source:-6
[    0.920116@0]  gxbb_pm: meson_pm_probe done
[    0.920290@0]  page_trace_module_init, create slabtrace failed
[    0.922157@0]  meson_uart fe07a000.serial: ==uart0 reg addr = (____ptrval____)
[    0.922220@0]  fe07a000.serial: ttyS0 at MMIO 0xfe07a000 (irq = 24, base_baud = 1500000) is a meson_uart
[    0.932042@2]  meson-gx-mmc fe08c000.mmc: set src rate to:1179648000
[    0.932445@0]  printk: console [ttyS0] enabled
[    0.933405@2]  Data 1 aligned delay is 0
[    0.934864@0]  meson_uart fe078000.serial: ==uart1 reg addr = (____ptrval____)
[    0.935193@2]  mmc0: clk 196608000 div 6 tuning start
[    0.936696@0]  fe078000.serial: ttyS1 at MMIO 0xfe078000 (irq = 43, base_baud = 1500000) is a meson_uart
[    0.952280@3]  Data 1 aligned delay is 0
[    0.953308@0]  amlogic rfkill init
[    0.953513@3]  mmc1: clk 199999997 div 5 tuning start
[    1.012925@0]  random: fast init done
[    1.108502@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.108917@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.108967@0]  [off_def_power]: pid: 1 comm: swapper/0
[    1.109415@3]  step:4, delay1:0x104104, delay2:0x4000000
[    1.111060@2]  mmc0: adj_win: < 0 1 2 5 >
[    1.111213@2]  mmc0: adj_win: < 0 1 2 5 >
[    1.111711@2]  step:4, delay1:0x4104104, delay2:0x4004104
[    1.122684@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.122714@3]  step:8, delay1:0x208208, delay2:0x8000000
[    1.125752@2]  mmc0: adj_win: < 0 1 2 5 >
[    1.125780@2]  step:8, delay1:0x8208208, delay2:0x8008208
[    1.134862@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.134889@3]  step:12, delay1:0x30c30c, delay2:0xc000000
[    1.140095@2]  mmc0: adj_win: < 0 1 2 3 5 >
[    1.140122@2]  step:12, delay1:0xc30c30c, delay2:0xc00c30c
[    1.147085@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.147113@3]  step:16, delay1:0x410410, delay2:0x10000000
[    1.154035@2]  mmc0: adj_win: < 0 1 2 3 >
[    1.154063@2]  tuning-c:1, tuning-s:4
[    1.154300@2]  step:0, delay1:0x0, delay2:0x0
[    1.154844@2]  mmc0: clk= 0x10000206, adj = 0x12000, dly1 = 0, dly2 = 0
[    1.157015@2]  aml_sd_emmc_clktest [529] clktest : 11262, delay_cell: 58, count: 43
[    1.157287@2]  [set_emmc_nwr_clks], delay1: 0x0, delay2: 0x0
[    1.157980@3]  mmc1: adj_win: < 1 2 3 >
[    1.158466@3]  tuning-c:2, tuning-s:4
[    1.158921@3]  step:4, delay1:0x104104, delay2:0x4000000
[    1.159583@3]  mmc1: clk= 0x10000205, adj = 0x22000, dly1 = 104104, dly2 = 4000000
[    1.160545@3]  mmc1: new ultra high speed SDR104 SDHC card at address 5048
[    1.161380@3]  mmc1: clock 199999997, 4-bit-bus-width
[    1.161380@3]   
[    1.162513@3]  mmcblk1: mmc1:5048 SD16G 14.5 GiB 
[    1.166046@3]   mmcblk1: p1 p2
[    1.167113@3]  Enter aml_emmc_partition_ops
[    1.213629@2]  scan time distance: 55638291 ns
[    1.213659@2]  cmd-best-c:40, cmd-best-size:31
[    1.308151@2]  ds_sht: 20, window:33, intf3:0x414008, clock:0x100a0003
[    1.308157@2]  adjust:0x0
[    1.308747@2]  mmc0: new HS400 MMC card at address 0001
[    1.309259@2]  mmc0: clock 196608000, 8-bit-bus-width
[    1.309259@2]   
[    1.310288@2]  mmcblk0: mmc0:0001 AJTD4R 14.6 GiB 
[    1.311653@2]  mmcblk0boot0: mmc0:0001 AJTD4R partition 1 4.00 MiB
[    1.312455@2]  mmcblk0boot1: mmc0:0001 AJTD4R partition 2 4.00 MiB
[    1.312767@2]  mmcblk0rpmb: mmc0:0001 AJTD4R partition 3 4.00 MiB, chardev (239:0)
[    1.315354@2]   mmcblk0: p1 p2
[    1.315913@2]  Enter aml_emmc_partition_ops
[    1.424020@1]  aml_wifi aml_wifi: [usb_power_control] Set BT power down
[    1.424170@1]  [on_def_power]: pid: 1 comm: swapper/0
[    1.424814@1]  aml_wifi aml_wifi: [usb_power_control] Set BT power on !
[    1.633082@0]  meson-gx-mmc fe088000.sdio: 52 [0xc00], TIMEOUT[0x2800]
[    1.634331@0]  meson-gx-mmc fe088000.sdio: 52 [0x80000c08], TIMEOUT[0x2800]
[    1.640019@0]  meson-gx-mmc fe088000.sdio: 8 [0x1aa], TIMEOUT[0x2800]
[    1.675490@1]  mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.678368@1]  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.681251@1]  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.686446@1]  mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.692793@1]  mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[    1.889375@1]  r: b_s = 0, b_sz = 1f, f: b_s = 1f, b_sz = 21
[    1.889408@1]  the final result: sel = 1, rx = 2f
[    1.892355@1]  mmc2: new ultra high speed SDR104 SDIO card at address 0001
[    1.892526@0]  mmc2: clock 199999997, 4-bit-bus-width
[    1.892526@0]   
[    1.892918@0]  [sdio_reinit] finish
[    1.893819@0]  aml_wifi aml_wifi: [usb_power_control] Set BT power on !
[    1.895040@0]  input: input_btrcu as /devices/platform/aml_bt/input/input0
[    1.896841@0]  amlogic-new-usb2-v2 fe03a000.usb2phy: USB2 phy probe:phy_mem:0xfe03a000, iomap phy_base:0xffffffc011d79000
[    1.897855@0]  amlogic-new-usb3-v2 fe03a080.usb3phy: This phy has no usb port
[    1.898420@0]  amlogic-new-usb3-v2 fe03a080.usb3phy: This is normal phy
[    1.899450@0]  amlogic-new-usb3-v2 fe03a080.usb3phy: USB3 phy probe:phy_mem:0xfe03a080, iomap phy_base:0xffffffc011d87080
[    1.901211@0]  socdata fe010000.soc_info: socdata_devno:1fa00000
[    1.902548@0]  netem: version 1.3
[    1.902581@0]  u32 classifier
[    1.902647@0]      input device check on
[    1.903134@0]      Actions configured
[    1.904583@0]  xt_time: kernel timezone is -0000
[    1.904623@0]  IPVS: Registered protocols (TCP, UDP)
[    1.905193@0]  IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[    1.906180@0]  IPVS: ipvs loaded.
[    1.906448@0]  IPVS: [rr] scheduler registered.
[    1.907119@0]  gre: GRE over IPv4 demultiplexor driver
[    1.907649@0]  IPv4 over IPsec tunneling driver
[    1.908924@0]  Initializing XFRM netlink socket
[    1.908969@0]  IPsec XFRM device driver
[    1.909790@0]  NET: Registered protocol family 10
[    1.911171@0]  Segment Routing with IPv6
[    1.911343@0]  mip6: Mobile IPv6
[    1.912576@0]  NET: Registered protocol family 17
[    1.912632@0]  NET: Registered protocol family 15
[    1.913175@0]  Bridge firewalling registered
[    1.913746@0]  Bluetooth: rfcomm_init_ttys: RFCOMM TTY layer initialized
[    1.914436@0]  Bluetooth: rfcomm_init_sockets: RFCOMM socket layer initialized
[    1.915358@0]  Bluetooth: rfcomm_init: RFCOMM ver 1.11
[    1.915976@0]  Bluetooth: bnep_init: BNEP (Ethernet Emulation) ver 1.3
[    1.916808@0]  Bluetooth: bnep_init: BNEP filters: protocol multicast
[    1.917587@0]  Bluetooth: bnep_sock_init: BNEP socket layer initialized
[    1.918407@0]  Bluetooth: hidp_init: HIDP (Human Interface Emulation) ver 1.2
[    1.919297@0]  Bluetooth: hidp_init_sockets: HIDP socket layer initialized
[    1.920180@0]  l2tp_core: L2TP core driver, V2.0
[    1.920729@0]  l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    1.921353@0]  8021q: 802.1Q VLAN Support v1.8
[    1.922308@0]  NET: Registered protocol family 40
[    1.923963@0]  registered taskstats version 1
[    1.924011@0]  Loading compiled-in X.509 certificates
[    1.925140@1]  Key type ._fscrypt registered
[    1.925169@1]  Key type .fscrypt registered
[    1.925506@1]  Key type fscrypt-provisioning registered
[    1.926620@1]  pstore: Using crash dump compression: deflate
[    1.954445@3]  meson ts init
[    1.954499@3]  tsensor id: 0
[    1.954562@3]  tsensor rtemp :110000
[    1.954936@3]  trim info = 86008037
[    1.972029@3]  [r1p1_tsensor_read (efault)]valid cnt is 0, tvalue:0
[    1.992415@0]  meson_cdev probe
[    1.992446@0]  meson_cdev index: 0
[    1.992713@0]  cpucore_cooling_register, max_cpu_core_num:4
[    1.993315@0]  meson_cdev index: 1
[    1.993663@0]  meson_cdev probe done
[    1.994596@0]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000003f
[    1.995016@0]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000003f
[    1.996134@0]  crg fde00000.crg: Unsupported mode 0
[    1.996533@0]  crg fde00000.crg: IRQ host not found
[    1.997137@0]  crg fde00000.crg: IRQ crg_usb3 not found
[    1.998206@0]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000003f
[    1.998698@0]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000003f
[    1.999815@0]  xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.000352@0]  xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    2.001406@0]  xhci-hcd xhci-hcd.0.auto: hcc params 0x08000f81 hci version 0x110 quirks 0x0000040020010010
[    2.002548@0]  xhci-hcd xhci-hcd.0.auto: irq 26, io mem 0xfde00000
[    2.003604@0]  usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    2.004355@0]  usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.005273@0]  usb usb1: Product: xHCI Host Controller
[    2.005912@0]  usb usb1: Manufacturer: Linux 5.4.180 xhci-hcd
[    2.006626@0]  usb usb1: SerialNumber: xhci-hcd.0.auto
[    2.007846@0]  hub 1-0:1.0: USB hub found
[    2.007899@0]  hub 1-0:1.0: 2 ports detected
[    2.008704@0]  xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.009019@0]  xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    2.010004@0]  xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    2.010922@0]  usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.012012@0]  usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[    2.012944@0]  usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.013874@0]  usb usb2: Product: xHCI Host Controller
[    2.014513@0]  usb usb2: Manufacturer: Linux 5.4.180 xhci-hcd
[    2.015228@0]  usb usb2: SerialNumber: xhci-hcd.0.auto
[    2.016264@0]  hub 2-0:1.0: USB hub found
[    2.016389@0]  hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    2.017331@0]  usb usb2: Unsupported the hub
[    2.018949@0]  dwc_otg: usb0: type: 2 speed: 0, 
[    2.018954@0]  config: 0, dma: 0, id: 0, 
[    2.018983@0]  phy: fe03a000, ctrl: 0
[    2.020049@0]  dwc_otg: Core Release: 3.30a
[    2.020315@0]  dwc_otg: Setting default values for core params
[    2.021048@0]  dwc_otg: curmode: 0, host_only: 0
[    2.033756@0]  dwc_otg: Using Buffer DMA mode
[    2.033786@0]  dwc_otg: OTG VER PARAM: 1, OTG VER FLAG: 1
[    2.034283@0]  dwc_otg: Working on port type = SLAVE
[    2.034902@0]  dwc_otg: Dedicated Tx FIFOs mode
[    2.035931@0]  cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.038790@0]  cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.039088@0]  platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.040077@0]  cfg80211: failed to load regulatory.db
[    2.040827@1]  ALSA device list:
[    2.041091@1]    No soundcards found.
[    2.041792@1]  RAMDISK: gzip image found at block 0
[    2.264087@0]  usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    2.412497@0]  usb 1-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[    2.412883@0]  usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.413803@0]  usb 1-1: Product: USB 2.0 Hub
[    2.415464@0]  hub 1-1:1.0: USB hub found
[    2.415615@0]  hub 1-1:1.0: 4 ports detected
[    2.443365@1]  RAMDISK: EOF while reading compressed data
[    2.443382@1]  uncompression error
[    2.444728@1]  VFS: Cannot open root device "UUID=6370bb59-2b85-47ea-af40-32017addedc6" or unknown-block(0,0): error -6
[    2.445393@1]  Please append a correct "root=" boot option; here are the available partitions:
[    2.446475@1]  0100           65536 ram0 
[    2.446479@1]   (driver?)
[    2.447293@1]  0101           65536 ram1 
[    2.447297@1]   (driver?)
[    2.452215@2]  0102           65536 ram2 
[    2.452225@2]   (driver?)
[    2.452377@2]  0103           65536 ram3 
[    2.452381@2]   (driver?)
[    2.453201@2]  0104           65536 ram4 
[    2.453205@2]   (driver?)
[    2.454024@2]  0105           65536 ram5 
[    2.454028@2]   (driver?)
[    2.454847@2]  0106           65536 ram6 
[    2.454851@2]   (driver?)
[    2.455670@2]  0107           65536 ram7 
[    2.455675@2]   (driver?)
[    2.456501@2]  0108           65536 ram8 
[    2.456508@2]   (driver?)
[    2.457319@2]  0109           65536 ram9 
[    2.457324@2]   (driver?)
[    2.458141@2]  010a           65536 ram10 
[    2.458146@2]   (driver?)
[    2.458975@2]  010b           65536 ram11 
[    2.458980@2]   (driver?)
[    2.459808@2]  010c           65536 ram12 
[    2.459813@2]   (driver?)
[    2.460647@2]  010d           65536 ram13 
[    2.460654@2]   (driver?)
[    2.461478@2]  010e           65536 ram14 
[    2.461482@2]   (driver?)
[    2.462312@2]  010f           65536 ram15 
[    2.462316@2]   (driver?)
[    2.463163@2]  b300        15159296 mmcblk1 
[    2.463168@2]   driver: mmcblk
[    2.464076@2]    b301          245760 mmcblk1p1 ab0f0000-01
[    2.464083@2]  
[    2.464966@2]    b302         2297856 mmcblk1p2 ab0f0000-02
[    2.464970@2]  
[    2.465879@2]  b320        15267840 mmcblk0 
[    2.465884@2]   driver: mmcblk
[    2.466786@2]    b321          245760 mmcblk0p1 14620000-01
[    2.466790@2]  
[    2.467695@2]    b322        14853008 mmcblk0p2 14620000-02
[    2.467700@2]  
[    2.468615@2]  Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.469669@2]  CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.4.180 #1.5
[    2.470464@2]  Hardware name: Khadas VIM1S (DT)
[    2.471028@2]  Call trace:
[    2.471377@2]  [ffffffc020003be0+  96][<ffffffc010091e00>] dump_backtrace+0x0/0x110
[    2.472322@2]  [ffffffc020003c40+  32][<ffffffc010092348>] show_stack+0x28/0x34
[    2.473232@2]  [ffffffc020003c60+  64][<ffffffc010ec3a80>] dump_stack+0xc4/0xec
[    2.474142@2]  [ffffffc020003ca0+ 208][<ffffffc010eaabf4>] panic+0x154/0x340
[    2.475021@2]  [ffffffc020003d70+ 128][<ffffffc0112e196c>] mount_block_root+0x234/0x2d4
[    2.476017@2]  [ffffffc020003df0+  32][<ffffffc0112e1bd8>] mount_root+0x88/0x94
[    2.476926@2]  [ffffffc020003e10+  48][<ffffffc0112e1d50>] prepare_namespace+0x16c/0x1b4
[    2.477934@2]  [ffffffc020003e40+  96][<ffffffc0112e1490>] kernel_init_freeable+0x29c/0x2b8
[    2.478973@2]  [ffffffc020003ea0+   0][<ffffffc010ec3d24>] kernel_init+0x1c/0x118
[    2.479905@2]  [0000000000000000+   0][<ffffffc010087bb4>] ret_from_fork+0x10/0x18
[    2.480851@2]  SMP: stopping secondary CPUs
[    2.481370@2]  Kernel Offset: disabled
[    2.481829@2]  CPU features: 0x00010002,20002000
[    2.482402@2]  Memory Limit: none
[    2.490575@2]  Rebooting in 5 seconds..

Ok I did find a possible explanation when I compare initrd.img from the official vim1s Ubuntu release and my Fenix generated one. Indeed diff -qr initrd_emmc initrd_sd gives me

Files initrd_emmc/bin/udevadm and initrd_sd/bin/udevadm differ
Files initrd_emmc/etc/ld.so.cache and initrd_sd/etc/ld.so.cache differ
Files initrd_emmc/lib/aarch64-linux-gnu/libcrypto.so.3 and initrd_sd/lib/aarch64-linux-gnu/libcrypto.so.3 differ
Only in initrd_emmc/lib/aarch64-linux-gnu: libmount.so.1
Only in initrd_emmc/lib/aarch64-linux-gnu: libmount.so.1.1.0
Files initrd_emmc/lib/aarch64-linux-gnu/libudev.so.1 and initrd_sd/lib/aarch64-linux-gnu/libudev.so.1 differ
Files initrd_emmc/lib/aarch64-linux-gnu/libudev.so.1.7.2 and initrd_sd/lib/aarch64-linux-gnu/libudev.so.1.7.2 differ
Files initrd_emmc/lib/modules/5.4.180/modules.builtin and initrd_sd/lib/modules/5.4.180/modules.builtin differ
Files initrd_emmc/lib/modules/5.4.180/modules.builtin.bin and initrd_sd/lib/modules/5.4.180/modules.builtin.bin differ
Files initrd_emmc/lib/modules/5.4.180/modules.order and initrd_sd/lib/modules/5.4.180/modules.order differ
Files initrd_emmc/lib/systemd/systemd-udevd and initrd_sd/lib/systemd/systemd-udevd differ
Files initrd_emmc/lib/udev/ata_id and initrd_sd/lib/udev/ata_id differ
Files initrd_emmc/lib/udev/rules.d/50-udev-default.rules and initrd_sd/lib/udev/rules.d/50-udev-default.rules differ
Files initrd_emmc/lib/udev/scsi_id and initrd_sd/lib/udev/scsi_id differ
Only in initrd_emmc/sbin: e2fsck
Only in initrd_emmc/sbin: fsck
Only in initrd_emmc/sbin: fsck.ext4
Only in initrd_emmc/sbin: logsave
Files initrd_emmc/usr/bin/udevadm and initrd_sd/usr/bin/udevadm differ
Files initrd_emmc/usr/lib/aarch64-linux-gnu/libcrypto.so.3 and initrd_sd/usr/lib/aarch64-linux-gnu/libcrypto.so.3 differ
Only in initrd_emmc/usr/lib/aarch64-linux-gnu: libmount.so.1
Only in initrd_emmc/usr/lib/aarch64-linux-gnu: libmount.so.1.1.0
Files initrd_emmc/usr/lib/aarch64-linux-gnu/libudev.so.1 and initrd_sd/usr/lib/aarch64-linux-gnu/libudev.so.1 differ
Files initrd_emmc/usr/lib/aarch64-linux-gnu/libudev.so.1.7.2 and initrd_sd/usr/lib/aarch64-linux-gnu/libudev.so.1.7.2 differ
Files initrd_emmc/usr/lib/modules/5.4.180/modules.builtin and initrd_sd/usr/lib/modules/5.4.180/modules.builtin differ
Files initrd_emmc/usr/lib/modules/5.4.180/modules.builtin.bin and initrd_sd/usr/lib/modules/5.4.180/modules.builtin.bin differ
Files initrd_emmc/usr/lib/modules/5.4.180/modules.order and initrd_sd/usr/lib/modules/5.4.180/modules.order differ
Files initrd_emmc/usr/lib/systemd/systemd-udevd and initrd_sd/usr/lib/systemd/systemd-udevd differ
Files initrd_emmc/usr/lib/udev/ata_id and initrd_sd/usr/lib/udev/ata_id differ
Files initrd_emmc/usr/lib/udev/rules.d/50-udev-default.rules and initrd_sd/usr/lib/udev/rules.d/50-udev-default.rules differ
Files initrd_emmc/usr/lib/udev/scsi_id and initrd_sd/usr/lib/udev/scsi_id differ
Only in initrd_emmc/usr/sbin: e2fsck
Only in initrd_emmc/usr/sbin: fsck
Only in initrd_emmc/usr/sbin: fsck.ext4
Only in initrd_emmc/usr/sbin: logsave

In particular libmount and fsck.ext4 are missing from the initrd.img generated by Fenix which could indeed prevent the kernel from mounting the root partition.

The question is why does the Fenix script ommits these tools from the initrd.imd it does generate.

Additionally, a built using docker has exactly the same issue about the missing libmount

But the docker Fenix generated image actually boots w/o libmountso I do not know what is the reason of the failure of VM Fenix generated image.

Hello @larchey

Does it boot well with Docker built image?

Hello @numbqq,

Thanks for your question.

Yes indeed it boots well with the Docker built image. So I have made some comparisons between:

[fail] a Ubuntu Jammy based built image
[success1] a Docker based built image

Appart from the different initrd.img and Image files, the two boot partitions have the same structure, with expected differences in files:

diff -qr boot_fail/ boot_success1/
Files boot_fail/config-5.4.180 and boot_success1/config-5.4.180 differ
Files boot_fail/Image and boot_success1/Image differ
Files boot_fail/initrd.img and boot_success1/initrd.img differ
Files boot_fail/initrd.img-5.4.180 and boot_success1/initrd.img-5.4.180 differ
Files boot_fail/System.map-5.4.180 and boot_success1/System.map-5.4.180 differ
Files boot_fail/uEnv.txt and boot_success1/uEnv.txt differ
Files boot_fail/vmlinuz-5.4.180 and boot_success1/vmlinuz-5.4.180 differ

I did check for the */uEnv.txt difference but this is only the UUID of the root partition that differs, also to be expected.

Then I did check for differences in the */initrd.img files. After unpacking both initrd.img files into directories, there are differences:

diff -qr initrd_fail/ initrd_success1/
Files initrd_fail/lib/aarch64-linux-gnu/libcrypto.so.3 and initrd_success1/lib/aarch64-linux-gnu/libcrypto.so.3 differ
Files initrd_fail/lib/modules/5.4.180/modules.order and initrd_success1/lib/modules/5.4.180/modules.order differ
Files initrd_fail/usr/lib/aarch64-linux-gnu/libcrypto.so.3 and initrd_success1/usr/lib/aarch64-linux-gnu/libcrypto.so.3 differ
Files initrd_fail/usr/lib/modules/5.4.180/modules.order and initrd_success1/usr/lib/modules/5.4.180/modules.order differ

The only meaningfull difference IMHO is libcrypto.so.3 but I do not see why this would prevent the kernel from mounting the root partition. The module.order contains some differences because I did add some modules related to VIRTIO (KVM based virtualization) in the fail image. Doubt this matters.

However, I am going to check the Ubuntu build process with an unmodified kernel to see if it changes anything but I pretty much doubt it.

Thanks again for your interest.

Best,

D.

Following up. Indeed, the vanilla fenix built in a VM works as well.

But even a slight change like make kernel-config to add the VIRTIO drivers before installing to the SD-card will fail because of the kernel no being able to mount the root partition.

Also, trying to update the official build with a fenix built updated kernel will render your system unbootable.

So here is my take on this one, if one wants to install a new kernel on the VIM1S:

  1. first compile a vanilla fenix build and install it.
    – Try it on SD-card, it is quicker than having to flash the EMMC with ooWow.
    – Even if one wants an EMMC install using ooWow, select the SD-USB install type because the misnamed EMMC install type is only for usage with the USB burning tool
  2. to install on SD-card with linux, you can do eg xzcat vim1s-ubuntu-22.04-xxxx.img.xc | dd of=/dev/sdX bs=512 where /dev/sdX is your USB SD-card reader. Check it is the correct device better twice than none if you do not want to overwrite important data elsewhere.
  3. then insert and boot on the SD-card. It takes a while the first boot because the root partition is resized to fit the whole SD-card. SD-cards are slow so expect more than one minute in this first boot. The later ones are much quicker.
  4. then, on the same fenix build engine, change kernel config:
    – make kernel-config
    – make kernel-saveconfig is mandatory because otherwise your updates to the kernel config will be forgotten
    – make kernel-deb to get the 3 .deb packages
  5. upload the 3 .deb kernel packages on the running VIM1S and, install then with dpkg -i ...
  6. Reboot your VIM1S. Notice that soft-reboot seems to select the EMMC over the SD-card.

Notice that the vanilla fenix install has SElinux activated and you may want to deactivate it later on.

We will also check on our side.

Hello @larchey

I built an image with VIRTIO enabled and the system boots well.

diff --git a/arch/arm64/configs/kvims_defconfig b/arch/arm64/configs/kvims_defconfig
index d88b6795716a..f9fbae4e8c50 100644
--- a/arch/arm64/configs/kvims_defconfig
+++ b/arch/arm64/configs/kvims_defconfig
@@ -1044,6 +1044,8 @@ CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_AUTOFS4_FS=y
 CONFIG_FUSE_FS=y
+CONFIG_CUSE=m
+CONFIG_VIRTIO_FS=m
 CONFIG_OVERLAY_FS=m
 CONFIG_OVERLAY_FS_INDEX=y
 CONFIG_OVERLAY_FS_XINO_AUTO=y

System boots well:

khadas@Khadas:~$ zcat /proc/config.gz | grep VIRTIO
CONFIG_BLK_MQ_VIRTIO=m
CONFIG_VIRTIO=m
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_FS=m
khadas@Khadas:~$ uname -a
Linux Khadas 5.4.180 #1.5.1 SMP PREEMPT Mon Jun 5 13:54:44 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
khadas@Khadas:~$ 

Actually I needed CONFIG_VIRTIO_VSOCKETS to be able to run KVM virtual machines.
I will try to get you a precise procedure for building the environnement that gives a boot failure. Acutally, I did also notice those messages in the boot log

[    2.041792@1]  RAMDISK: gzip image found at block 0
...
[    2.443365@1]  RAMDISK: EOF while reading compressed data

which might give another explanation of the failure for mounting the root partition.

Hello @larchey

Please provide the full modifications you have done your side for me to reproduce this issue.

Hi @numbqq,

Below is an in-length description of the procedure that leads to a boot failure on the impossibility to mount the rootfs, possibly due to initrd/RAMDISK corruption.

The built process runs on a [host] bare-metal machine (2x14 x86_64 cores with HT, 160GiB ECC DDR4) running an up-to date Ubuntu 22.04.2 LTS, hosting a KVM virtual machine running Ubuntu/Jammy.

Hence, the built actually occurs in a [vm] managed using lxc with the below commands. Notice that this virtual machine should have enough disk capacity because the full build is around 17 GiB, so on my test, I did allocate 24GiB disk space for the [vm].

# beware that the devel profile allows for a 24GiB disk and 32 vcpus
[host] lxc launch images:ubuntu/jammy vim1s-khadas-fail-vm --vm --profile devel
[host] lxc exec vim1s-khadas-fail-vm -- bash

The last command gives you root shell on [vm]

# one may need to resize the root partition to fit the whole disk,
# using with fdisk/resize2fs (not described here)
# so check that there is enough space of /
[vm] df -h /root

If the process runs short of disk space, it will abort… So after having checked, we can run the commands described here

[vm] cd /root
[vm] mkdir project
[vm] cd project/
[vm] git clone --depth 1 https://github.com/khadas/fenix
[vm] cd fenix
[vm] source env/setenv.sh
[vm] make info

This is the environment selected, output by the previous make info command:

Version: 1.5.1
Current environment:
===========================================

#KHADAS_BOARD=VIM1S
#VENDOR=Amlogic
#CHIP=S905Y4
#LINUX=5.4
#UBOOT=2019.01
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=jammy
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

===========================================

Then we run the build process

[vm] make

which gives the following partial log

[i] FENIX (scripts/create_image.sh) BUILD: /root/project/fenix/build | DL: /root/project/fenix/downloads | sudo:

BUILD_TYPE                    :   develop
DOWNLOAD_MIRROR               :   default
NO_CCACHE                     :        no
COMPRESS_IMAGE                :       yes
INSTALL_TYPE_RAW              :        no
CLONE_FULL_COMMIT_LOG         :        no
FORCE_BUILD_KERNEL_DEB        :       yes
SKIP_ROOTFS_CACHE_DOWNLOAD    :        no
FORCE_CREATE_ROOTFS_CACHE     :        no
CREATE_ROOTFS_CACHE_ONLY      :        no
NO_APT_CACHER                 :       yes
SKIP_HEADER_DEB               :        no


***********************PARAMETERS************************
Fenix Version:         1.5.1
Khadas Board:          VIM1S
Uboot Version:         2019.01
Uboot Configuration:   kvim1s_defconfig
Uboot Branch:          khadas-vims-v2019.01
Linux Version:         5.4
Linux Configuration:   kvims_defconfig
Linux DTB:             arch/arm64/boot/dts/amlogic/kvim1s.dtb
Linux Branch:          khadas-vims-5.4.y
Distribution:          Ubuntu
Distribution Release:  jammy
Distribution Type:     server
Distribution Arch:     arm64
Install Type:          SD-USB
Final Image:           vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img
Compressed Image:      vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.xz
*********************************************************

.... runs for 70 minutes ...

Info: IMAGE: /root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img  is ready!

Info: Compressing image '/root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img' to '/roo>
[i] xze compress /root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img (2621440000 bytes>
# /usr/bin/xz -T8 --block-size 90M -k -c -F xz --verbose
/root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img (1/1)
  100 %      415.6 MiB / 2500.0 MiB = 0.166    17 MiB/s       2:29
[i] padded to 435773440 from 435769368 + 4072
[i] XZ info
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1      28    415.6 MiB   2500.0 MiB  0.166  CRC64   /root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5>

[i] add meta block

##META_FILE##
FILE: vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.xz
UNPACKED_SIZE: 2621440000
PACKED_SIZE: 435773440
FILE_SIZE: 435777536
##META-FILE##

##KRESCUE_META##
type:xz
label: Ubuntu
match: BOARD=VIM1S
builder: fenix
link: https://dl.khadas.com/Firmware/
desc: Ubuntu 1.5.1 server jammy - fenix generated images https://github.com/khadas/fenix
duration: 60
date: Tue Jun  6 20:11:13 UTC 2023
image: vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img
##KRESCUE-META##
##KRESCUE##END
[i] padded to 4096 from 392 + 3704

Info: COMPRESSED IMAGE:  /root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.xz  is re>
Cleanup...

Done.

Tue Jun  6 20:11:15 UTC 2023
Time elapsed: 73 min 56 sec

Once finished, we leave the [vm] with

[vm] exit

And back on the [host] machine, with a 128GiB USB key plugged into /dev/sdl,

[host] lxc file pull vim1s-khadas-fail-vm/root/project/fenix/build/images/vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.xz .
[host] xzcat vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.xz | dd of=/dev/sdl bs=512
[host] sync
[host] fdisk -l /dev/sdl

We get the proper partition table on /dev/sdl

Disk /dev/sdl: 115.5 GiB, 124017180672 bytes, 242221056 sectors
Disk model: Dell USB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x563d0000

Device     Boot  Start     End Sectors  Size Id Type
/dev/sdl1  *     32768  524287  491520  240M  b W95 FAT32
/dev/sdl2       524288 5119999 4595712  2.2G 83 Linux

We can unplug the USB Key and plug it into the VIM1S

[host] udisksctl power-off -b /dev/sdl
# unplug the USK Key and plug it in the VIM1S
[host] stty -F /dev/ttyUSB0 921600 iutf8
[host] cat /dev/ttyUSB0 | tee vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.boot

Plug in or reboot the VIM1S. The log is transmitted through the serial port, configured with stty above. The boot fails on initrd/RAMDISK issues, then unable to mount root, then waits for 5 secs and reboots, log is stopped there by CTRL-C.

One can check the log file with

[host] less vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.5.1-230606-develop.img.boot

The issue is the same as described in the first post of this thread.

Me and my colleague had this issue as well. I was building using docker_desktop on a 2019 MacBookPro 16,1 model. My colleague only experienced it once and then failed to reproduce the same on his build system. On the other hand, I was facing it most of the time longest streak being 20 affected builds in a row.

We were able to workaround it by switching to using xz for initrd compression (COMPRESS=xz in /etc/initramfs-tools/initramfs.conf)

1 Like