Loading kernel: RAMDISK: incomplete write (10651 != 32768)

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

Others
Self built kernel and u-boot using Fenix 1.2.2 with Khadas VIM1S default u-boot settings and kernel configuration

Self built image with Fenix built kernel, Fenix built u-boot and my own boot.ini

Boot fails:

    2.139310@1]  RAMDISK: gzip image found at block 0
[    2.243116@1]  RAMDISK: incomplete write (10651 != 32768)
[    2.243166@1]  write error

boot.ini:

KHADAS-UBOOT-CONFIG
board_name="VIM1S"

label="VOLUMIO"
uboot_script="boot.ini"
kernel_filename="Image"
uinitrd_filename="uInitrd"
dtb_dir="dtb/amlogic"

## ENV FILES READ SEQUENCE
uboot_env_ini="env.txt"
uboot_env_sys="env.system.txt"
uboot_env_user="env.user.txt"
envfiles="$uboot_env_ini $uboot_env_user $uboot_env_sys"

uuidconfig="${uboot_env_sys}"
vsquash="/volumio_current.sqsh"

console="both"

kernel_addr_r="0x01080000"
fdt_addr_r="0x01000000"
ramdisk_addr_r="0x10000000"
scriptaddr="0x00010000"
## fixup dtb path
dtb_filename="dtb/$fdtfile"
##

## Boot support for USB, SD and eMMC devices, order:
## 0 - USB, highest priority
## 1 - SD card, higher priority
## 2 - eMMC
## With Volumio, each device will only hold boot files in the first (FAT32) partition

DEVTYPES="usb mmc"
DEVNUMS="0 1 2"
for dev_type in $DEVTYPES; do
	echo "[i] Trying $dev_type..."
	if test "$dev_type" = "usb" ; then
        usb start
    fi
	for dev_num in $DEVNUMS; do

		LOADER="fatload $dev_type $dev_num"
		echo "[i] Scanning $dev_type $dev_num..."

	## IMPORT CONFIGS BY envfile ORDER
		for envfile in $envfiles; do
		if $LOADER $scriptaddr $envfile; then
			echo "[i] Import $envfile"
			env import -t $scriptaddr $filesize
		fi
		done
		if $LOADER $ramdisk_addr_r $uinitrd_filename; then
			if $LOADER $kernel_addr_r $kernel_filename; then
				if $LOADER $fdt_addr_r $dtb_filename; then
			volumioargs="imgpart=$imgpart imgfile=${vsquash} bootpart=${bootpart} datapart=${datapart} bootconfig=${uuidconfig} hwdevice=${hwver}"


					if test "${console}" = "serial"; then
						consoleargs="console=ttyS0,921600N8"
					fi
					if test "${console}" = "display" || test "${console}" = "both"; then
						consoleargs="console=ttyS0,921600N8 console=tty0";
					fi
					consoleargs="${consoleargs} no_console_suspend consoleblank=0"

					# lookup ethernet mac
					test "$mac" = "" && mac=$eth_mac

					bootargs="${volumioargs} ${consoleargs} ${hdmiargs} ${panelargs} fsck.repair=yes net.ifnames=0 ddr_size=${ddr_size} wol_enable=${wol_enable} mac=${mac} fan=${fan_mode} hwver=${hwver} coherent_pool=${dma_size}"

					sleep 1
					echo "[i] Booting..."
					booti $kernel_addr_r $ramdisk_addr_r $fdt_addr_r
				fi
			fi
		fi
	done
done

Post a console log of your issue below:

....
....
card in
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.ini
3291 bytes read in 2 ms (1.6 MiB/s)
Starting VOLUMIO boot.ini...
[i] DTB    dtb/amlogic/kvim1s.dtb
[i] KERNEL Image
[i] INITRD uInitrd
[i] ENV    
[i] Probing devices...
[i] Trying usb...
[i] Scanning usb 0...
[i] Final DTB dtb/amlogic/kvim1s.dtb
[i] Scanning usb 1...
[i] Final DTB dtb/amlogic/kvim1s.dtb
[i] Scanning usb 2...
[i] Final DTB dtb/amlogic/kvim1s.dtb
[i] Trying mmc...
[i] Scanning mmc 0...
2325 bytes read in 2 ms (1.1 MiB/s)
[i] Import env.txt
1612 bytes read in 1 ms (1.5 MiB/s)
[i] Import env.system.txt
[i] Final DTB dtb/amlogic/kvim1s.dtb
7816836 bytes read in 334 ms (22.3 MiB/s)
25819144 bytes read in 1102 ms (22.3 MiB/s)
86852 bytes read in 9 ms (9.2 MiB/s)
UUID=cad89e0b-839c-4623-8722-b6613d869974
/volumio_current.sqsh
UUID=AFC3-E923
UUID=55f3c346-25c9-4e9a-a293-0479c7103a5f
env.system.txt

[i] Mainline bootargs: 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=${boot_source} otg_device=1 logo=osd0,loaded,0x0030
[i] Booting...
libfdt fdt_getprop(): FDT_ERR_NOTFOUND
## Loading init Ramdisk from Legacy Image at 10000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    7816772 Bytes = 7.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Loading Ramdisk to 78ea0000, end 79614644 ... OK
libfdt fdt_getprop(): FDT_ERR_NOTFOUND
   Loading Device Tree to 000000001ffe7000, end 000000001ffff343 ... OK

Starting kernel ...

uboot time: 9802405 us
boot 64bit kernel
[    0.000000@0]  Booting Linux on physical CPU 0x0000000000 [0x411fd040]
[    0.000000@0]  Linux version 5.4.180 (gkkpch@UBUNTUOS) (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.2
[    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]  node linux,ion-fb compatible matching fail
[    0.000000@0]  invalid size property in 'linux,ppmgr' node.
[    0.000000@0]        55c00000 - 70c00000,   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 43 pages/cpu s137816 r8192 d30120 u176128
[    0.000000@0]  Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000@0]  Kernel command line: 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=${boot_source} otg_device=1 logo=o0
[    0.000000@0]  init_wol_state, wol_enable=0
[    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: 1360048K/2097152K available (14334K kernel code, 1662K rwdata, 3828K rodata, 5312K init, 841K bss, 73552K reserved, 663552K cma-reserved)
[    0.000000@0]  SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000@0]  ftrace: allocating 45747 entries in 179 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.000436@0]  Console: colour dummy device 80x25
[    0.000880@0]  printk: console [tty0] enabled
[    0.000913@0]  Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000936@0]  pid_max: default: 32768 minimum: 301
[    0.001189@0]  thread_stack_cache_init, vmap:ffffff807b069ec0, bitmap:ffffff807b11a000, cache page:7b200
[    0.001214@0]  thread_stack_cache_init, allocation vm area:ffffff807b069f00, addr:ffffffc020000000, size:20001000
[    0.001239@0]  cpu 0, vmap_stack:[ffffff807d701000-ffffff807d704ff0]
[    0.001252@0]  cpu 0, irq_stack: [ffffff807d706000-ffffff807d709ff0]
[    0.001264@0]  cpu 1, vmap_stack:[ffffff807d72c000-ffffff807d72fff0]
[    0.001276@0]  cpu 1, irq_stack: [ffffff807d731000-ffffff807d734ff0]
[    0.001289@0]  cpu 2, vmap_stack:[ffffff807d757000-ffffff807d75aff0]
[    0.001301@0]  cpu 2, irq_stack: [ffffff807d75c000-ffffff807d75fff0]
[    0.001313@0]  cpu 3, vmap_stack:[ffffff807d782000-ffffff807d785ff0]
[    0.001325@0]  cpu 3, irq_stack: [ffffff807d787000-ffffff807d78aff0]
[    0.001399@0]  LSM: Security Framework initializing
[    0.001441@0]  SELinux:  Initializing.
[    0.001541@0]  Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.001567@0]  Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.003004@0]  ASID allocator initialised with 32768 entries
[    0.003103@0]  rcu: Hierarchical SRCU implementation.
[    0.020994@0]  secmon: can't fine clear_range
[    0.022032@0]  smp: Bringing up secondary CPUs ...
[    0.024132@0]  smp: Brought up 1 node, 4 CPUs
[    0.024154@0]  SMP: Total of 4 processors activated.
[    0.024167@0]  CPU features: detected: 32-bit EL0 Support
[    0.024180@0]  CPU features: detected: CRC32 instructions
[    0.025763@0]  CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.025784@0]  CPU: All CPU(s) started at EL2
[    0.025812@0]  alternatives: patching kernel code
[    0.026141@0]  CPU3: update max cpu_capacity 1024
[    0.027012@0]  devtmpfs: initialized
[    0.028052@3]  CPU3: update max cpu_capacity 1024
[    0.043219@0]  Registered cp15_barrier emulation handler
[    0.043250@0]  Registered setend emulation handler
[    0.043523@0]  clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.043566@0]  futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.043789@0]  pinctrl core: initialized pinctrl subsystem
[    0.044707@0]  NET: Registered protocol family 16
[    0.046653@0]  DMA: preallocated 256 KiB pool for atomic allocations
[    0.046688@0]  audit: initializing netlink subsys (disabled)
[    0.046869@3]  audit: type=2000 audit(0.044:1): state=initialized audit_enabled=0 res=1
[    0.047386@0]  cpuidle: using governor menu
[    0.048568@0]  hw-breakpoint: found 6 breakpoint and 2 watchpoint registers.
[    0.050177@0]  pstore: Registered ramoops as persistent store backend
[    0.050205@0]  ramoops: ramoops_io_en:0 1 old:0x0 ftrace_size:0x80000
[    0.050222@0]  ramoops_io_dump=0, buffer=ffffffc011a37000 ftrace_old_log=0000000000000000, size=0, reboot_mode=cold_boot
[    0.086399@0]  async_long_initcall = 1
[    0.088209@1]  cryptd: max_cpu_qlen set to 1000
[    0.092027@1]  regulator-sdcard GPIO handle specifies active low - ignored
[    0.093197@1]  SCSI subsystem initialized
[    0.093380@1]  usbcore: registered new interface driver usbfs
[    0.093436@1]  usbcore: registered new interface driver hub
[    0.093486@1]  usbcore: registered new device driver usb
[    0.093539@1]  videodev: Linux video capture interface: v2.00
[    0.093617@1]  pps_core: LinuxPPS API ver. 1 registered
[    0.093632@1]  pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.093665@1]  PTP clock support registered
[    0.094395@1]  secmon: reserve_mem_size:0x3300000
[    0.094425@1]  secmon secmon: assigned reserved memory node linux,secmon
[    0.102694@1]  cpu_version: chip version = 37:B - 3:4
[    0.103163@1]  Advanced Linux Sound Architecture Driver Initialized.
[    0.103722@1]  Bluetooth: Core ver 2.22
[    0.103765@1]  NET: Registered protocol family 31
[    0.105840@3]  clocksource: Switched to clocksource arch_sys_counter
[    0.201310@3]  VFS: Disk quotas dquot_6.6.0
[    0.201397@3]  VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.208407@3]  thermal_sys: Registered thermal governor 'power_allocator'
[    0.208942@3]  Total Memory:[80000000]
[    0.208977@3]  ramdump_probe, storage device:data
[    0.208990@3]  NO valid ramdump args:0 0
[    0.209361@3]  NET: Registered protocol family 2
[    0.209512@3]  IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.210665@3]  tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.210734@3]  TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.210891@3]  TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    0.211073@3]  TCP: Hash tables configured (established 16384 bind 16384)
[    0.211200@3]  UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.211258@3]  UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.211403@3]  NET: Registered protocol family 1
[    0.211922@3]  NET: Registered protocol family 44
[    0.213089@3]  PCI: CLS 0 bytes, default 64
[    0.213379@3]  aml_wifi aml_wifi: [wifi_dev_probe] use double channel
[    0.213497@3]  Wifi: bcmdhd_init_wlan_mem: [dhd] STATIC-MSG) bcmdhd_init_wlan_mem : 101.10.361.10 (wlan=r892223-20210623-1)
[    0.216356@3]  Wifi: bcmdhd_init_wlan_mem: [dhd] STATIC-MSG) bcmdhd_init_wlan_mem : prealloc ok: 8162304(7971K)
[    0.322199@0]  Trying to unpack rootfs image as initramfs...
[    0.604725@1]  rootfs image is not initramfs (junk within compressed archive); looks like an initrd
[    0.621373@1]  Freeing initrd memory: 7632K
[    0.622930@2]  hw perfevents: no interrupt-affinity property for /arm_pmu, guessing.
[    0.623193@2]  hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.627516@2]  Initialise system trusted keyrings
[    0.627697@2]  workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.637213@2]  squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.637391@2]  ntfs3: Max link count 4000
[    0.637734@2]  fuse: init (API version 7.31)
[    0.677513@2]  NET: Registered protocol family 38
[    0.677553@2]  Key type asymmetric registered
[    0.677568@2]  Asymmetric key parser 'x509' registered
[    0.677620@2]  Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.677759@2]  io scheduler mq-deadline registered
[    0.677775@2]  io scheduler kyber registered
[    0.677973@2]  io scheduler bfq registered
[    0.680092@2]  vddcpu0: supplied by regulator-dummy
[    0.681373@2]  gpiomem-aml fe004000.gpiomem: Initialised: Registers at 0xfe004000
[    0.681681@0]  cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.689086@2]  brd: module loaded
[    0.698627@2]  loop: module loaded
[    0.701450@3]  tun: Universal TUN/TAP device driver, 1.6
[    0.701956@3]  meson8b-dwmac fdc00000.ethernet: IRQ eth_wake_irq not found
[    0.701981@3]  meson8b-dwmac fdc00000.ethernet: IRQ eth_lpi not found
[    0.702066@3]  meson8b-dwmac fdc00000.ethernet: PTP uses main clock
[    0.702087@3]  meson8b-dwmac fdc00000.ethernet: no reset control found
[    0.702455@0]  meson8b-dwmac fdc00000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    0.702481@0]  meson8b-dwmac fdc00000.ethernet:      DWMAC1000
[    0.702499@0]  meson8b-dwmac fdc00000.ethernet: DMA HW capability register supported
[    0.702518@0]  meson8b-dwmac fdc00000.ethernet: RX Checksum Offload Engine supported
[    0.702537@0]  meson8b-dwmac fdc00000.ethernet: COE Type 2
[    0.702551@0]  meson8b-dwmac fdc00000.ethernet: TX Checksum insertion supported
[    0.702569@0]  meson8b-dwmac fdc00000.ethernet: Wake-Up On Lan supported
[    0.702619@0]  meson8b-dwmac fdc00000.ethernet: Normal descriptors
[    0.702636@0]  meson8b-dwmac fdc00000.ethernet: Ring mode enabled
[    0.702653@0]  meson8b-dwmac fdc00000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.703275@0]  aml_cust_setting
[    0.703294@0]  meson8b-dwmac fdc00000.ethernet: Unable to get resource(373)
[    0.703310@0]  no mac_wol
[    0.703321@0]  no keep-alive
[    0.703332@0]  use default internal_phy as 0
[    0.703345@0]  set default cali_val as 0
[    0.703777@0]  PPP generic driver version 2.4.2
[    0.703978@0]  PPP BSD Compression module registered
[    0.703995@0]  PPP Deflate Compression module registered
[    0.704028@0]  PPP MPPE Compression module registered
[    0.704043@0]  NET: Registered protocol family 24
[    0.704074@0]  PPTP driver version 0.8.5
[    0.704418@0]  usbcore: registered new interface driver r8152
[    0.704465@0]  usbcore: registered new interface driver asix
[    0.704526@0]  usbcore: registered new interface driver ax88179_178a
[    0.704573@0]  usbcore: registered new interface driver cdc_ether
[    0.704603@0]  GobiNet: Quectel_Linux&Android_GobiNet_Driver_V1.6.1
[    0.704648@0]  usbcore: registered new interface driver GobiNet
[    0.705110@0]  ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.705128@0]  ehci-pci: EHCI PCI platform driver
[    0.705634@0]  usbcore: registered new interface driver cdc_acm
[    0.705651@0]  cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.705710@0]  usbcore: registered new interface driver usb-storage
[    0.706433@0]  mousedev: PS/2 mouse device common for all mice
[    0.706490@0]  usbcore: registered new interface driver xpad
[    0.706541@0]  usbcore: registered new interface driver usb_acecad
[    0.706588@0]  usbcore: registered new interface driver aiptek
[    0.706628@0]  usbcore: registered new interface driver gtco
[    0.706667@0]  usbcore: registered new interface driver hanwang
[    0.706706@0]  usbcore: registered new interface driver kbtab
[    0.706848@0]  sensor_register_slave:kxtj3,id=0
[    0.706880@0]  i2c /dev entries driver
[    0.707641@0]  rtc-hym8563 1-0051: could not init device, -11
[    0.707681@0]  rtc-hym8563: probe of 1-0051 failed with error -11
[    0.708453@0]  usbcore: registered new interface driver uvcvideo
[    0.708471@0]  USB Video Class driver (1.1.1)
[    0.708484@0]  Driver for 1-wire Dallas network protocol.
[    0.708861@0]  device-mapper: uevent: version 1.0.3
[    0.709196@0]  device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[    0.709762@1]  Bluetooth: HCI UART driver ver 2.3
[    0.709781@1]  Bluetooth: HCI UART protocol H4 registered
[    0.737812@2]  meson-gx-mmc fe08c000.mmc: host probe success!
[    0.739282@2]  meson-gx-mmc fe08a000.sd: Got CD GPIO
[    0.740363@2]  meson-gx-mmc fe08a000.sd: Missing clock clkin2
[    0.767909@3]  meson-gx-mmc fe08a000.sd: card IN
[    0.767939@3]  meson-gx-mmc fe08a000.sd:  SDCARD insert
[    0.768020@3]  meson-gx-mmc fe08a000.sd: host probe success!
[    0.768635@3]  meson-gx-mmc fe088000.sdio: Missing clock clkin2
[    0.794379@0]  meson-gx-mmc fe088000.sdio: host probe success!
[    0.795571@0]  hidraw: raw HID events driver (C) Jiri Kosina
[    0.798136@0]  usbcore: registered new interface driver usbhid
[    0.798159@0]  usbhid: USB HID core driver
[    0.798598@0]  ashmem: initialized
[    0.799707@0]  unifykey: fail to obtain phy addr of shared mem
[    0.801094@0]  meson_mhu_fifo fe006000.mhu: no get mbox wrrd -22
[    0.801152@0]  meson_mhu_fifo fe006000.mhu: no payload, only use fifo
[    0.801190@0]  meson_mhu_fifo fe006000.mhu: set mbox irqmax default value -22
[    0.802461@0]  gxbb_pm: enter meson_pm_probe!
[    0.802506@0]  pm-meson fe010288.pm: Vad enable not detected ~~~
[    0.802524@0]  pm-meson fe010288.pm: Not found item name in dts.The default item will be used!
[    0.802544@0]  pm-meson fe010288.pm: Does not match the item type, use the default [init] function.
[    0.802604@0]  pm-meson fe010288.pm: Read dmc_asr addr fail
[    0.802623@0]  pm-meson fe010288.pm: IRQ pm_wakeup not found
[    0.802639@0]  pm-meson fe010288.pm: Failed to get pm_wakeup interrupt source:-6
[    0.802656@0]  gxbb_pm: meson_pm_probe done
[    0.802946@0]  page_trace_module_init, create slabtrace failed
[    0.804235@0]  meson_uart fe07a000.serial: ==uart0 reg addr = (____ptrval____)
[    0.804304@0]  fe07a000.serial: ttyS0 at MMIO 0xfe07a000 (irq = 24, base_baud = 1500000) is a meson_uart
[    0.812467@2]  meson-gx-mmc fe08c000.mmc: set src rate to:1152000000
[    0.812810@0]  printk: console [ttyS0] enabled
[    0.813895@2]  Data 1 aligned delay is 0
[    0.815435@0]  meson_uart fe078000.serial: ==uart1 reg addr = (____ptrval____)
[    0.815697@2]  mmc0: clk 192000000 div 6 tuning start
[    0.816875@0]  fe078000.serial: ttyS1 at MMIO 0xfe078000 (irq = 43, base_baud = 1500000) is a meson_uart
[    0.832924@3]  Data 1 aligned delay is 0
[    0.834539@0]  amlogic rfkill init
[    0.834937@3]  mmc1: clk 199999997 div 5 tuning start
[    0.908555@0]  random: fast init done
[    0.991510@3]  mmc1: adj_win: < 0 1 2 3 >
[    0.991733@2]  [off_def_power]: pid: 1 comm: swapper/0
[    0.991847@3]  mmc1: adj_win: < 0 1 2 3 >
[    0.992985@3]  step:4, delay1:0x104104, delay2:0x4000000
[    1.009909@2]  mmc0: adj_win: < 0 1 2 5 >
[    1.009938@2]  mmc0: adj_win: < 0 1 2 5 >
[    1.010221@2]  step:4, delay1:0x4104104, delay2:0x4004104
[    1.063521@3]  mmc1: adj_win: < 0 1 2 3 >
[    1.063550@3]  step:8, delay1:0x208208, delay2:0x8000000
[    1.069362@3]  mmc1: adj_win: < 1 2 3 4 >
[    1.069390@3]  tuning-c:2, tuning-s:4
[    1.069628@3]  step:4, delay1:0x104104, delay2:0x4000000
[    1.070302@3]  mmc1: clk= 0x10000205, adj = 0x22000, dly1 = 104104, dly2 = 4000000
[    1.071242@3]  mmc1: new ultra high speed SDR104 SDHC card at address aaaa
[    1.072086@3]  mmc1: clock 199999997, 4-bit-bus-width
[    1.072086@3]   
[    1.073072@3]  mmcblk1: mmc1:aaaa SC16G 14.8 GiB 
[    1.074995@2]  mmc0: adj_win: < 0 1 2 3 5 >
[    1.075026@2]  step:8, delay1:0x8208208, delay2:0x8008208
[    1.077553@3]   mmcblk1: p1 p2 p3
[    1.078262@3]  Enter aml_emmc_partition_ops
[    1.088743@2]  mmc0: adj_win: < 0 1 2 3 >
[    1.088774@2]  tuning-c:1, tuning-s:4
[    1.089012@2]  step:0, delay1:0x0, delay2:0x0
[    1.089555@2]  mmc0: clk= 0x10000206, adj = 0x12000, dly1 = 0, dly2 = 0
[    1.090539@2]  mmc0: new HS200 MMC card at address 0001
[    1.091026@2]  mmc0: clock 192000000, 8-bit-bus-width
[    1.091026@2]   
[    1.091971@2]  mmcblk0: mmc0:0001 AJTD4R 14.6 GiB 
[    1.093317@2]  mmcblk0boot0: mmc0:0001 AJTD4R partition 1 4.00 MiB
[    1.094114@2]  mmcblk0boot1: mmc0:0001 AJTD4R partition 2 4.00 MiB
[    1.094434@2]  mmcblk0rpmb: mmc0:0001 AJTD4R partition 3 4.00 MiB, chardev (240:0)
[    1.097281@2]  Enter aml_emmc_partition_ops
[    1.097751@2]  magic error: 
[    1.097774@2]  [mmc_read_partition_tbl]: partition verified error
[    1.098272@2]  [mmc_read_partition_tbl] mmc read partition ERROR!
[    1.305859@3]  aml_wifi aml_wifi: [usb_power_control] Set BT power down
[    1.306010@3]  [on_def_power]: pid: 1 comm: swapper/0
[    1.306652@3]  aml_wifi aml_wifi: [usb_power_control] Set BT power on !
[    1.514920@0]  meson-gx-mmc fe088000.sdio: 52 [0xc00], TIMEOUT[0x2800]
[    1.516169@0]  meson-gx-mmc fe088000.sdio: 52 [0x80000c08], TIMEOUT[0x2800]
[    1.521864@0]  meson-gx-mmc fe088000.sdio: 8 [0x1aa], TIMEOUT[0x2800]
[    1.557363@3]  mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.560248@3]  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.563133@3]  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.568333@3]  mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.574696@3]  mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[    2.012164@3]  r: b_s = 0, b_sz = 22, f: b_s = 1c, b_sz = 24
[    2.012196@3]  the final result: sel = 1, rx = 2e
[    2.015177@3]  mmc2: new ultra high speed SDR104 SDIO card at address 0001
[    2.015348@2]  mmc2: clock 199999997, 4-bit-bus-width
[    2.015348@2]   
[    2.015809@2]  [sdio_reinit] finish
[    2.016641@2]  aml_wifi aml_wifi: [usb_power_control] Set BT power on !
[    2.017879@2]  input: input_btrcu as /devices/platform/aml_bt/input/input0
[    2.019722@2]  amlogic-new-usb2-v2 fe03a000.usb2phy: USB2 phy probe:phy_mem:0xfe03a000, iomap phy_base:0xffffffc011cab000
[    2.020638@2]  amlogic-new-usb3-v2 fe03a080.usb3phy: This phy has no usb port
[    2.021300@2]  amlogic-new-usb3-v2 fe03a080.usb3phy: This is normal phy
[    2.022391@2]  amlogic-new-usb3-v2 fe03a080.usb3phy: USB3 phy probe:phy_mem:0xfe03a080, iomap phy_base:0xffffffc011cb9080
[    2.023999@2]  socdata fe010000.soc_info: socdata_devno:1fb00000
[    2.026142@2]  netem: version 1.3
[    2.026176@2]  u32 classifier
[    2.026242@2]      input device check on
[    2.026730@2]      Actions configured
[    2.028098@2]  xt_time: kernel timezone is -0000
[    2.028135@2]  IPVS: Registered protocols (TCP, UDP)
[    2.028705@2]  IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[    2.029700@2]  IPVS: ipvs loaded.
[    2.029983@2]  IPVS: [rr] scheduler registered.
[    2.030632@2]  gre: GRE over IPv4 demultiplexor driver
[    2.031162@2]  IPv4 over IPsec tunneling driver
[    2.032453@2]  Initializing XFRM netlink socket
[    2.032502@2]  IPsec XFRM device driver
[    2.033346@2]  NET: Registered protocol family 10
[    2.034691@2]  Segment Routing with IPv6
[    2.034869@2]  mip6: Mobile IPv6
[    2.036075@2]  NET: Registered protocol family 17
[    2.036124@2]  NET: Registered protocol family 15
[    2.036672@2]  Bridge firewalling registered
[    2.037391@2]  Bluetooth: RFCOMM TTY layer initialized
[    2.037735@2]  Bluetooth: RFCOMM socket layer initialized
[    2.038454@2]  Bluetooth: RFCOMM ver 1.11
[    2.038908@2]  Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.039593@2]  Bluetooth: BNEP filters: protocol multicast
[    2.040280@2]  Bluetooth: BNEP socket layer initialized
[    2.040926@2]  Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.041698@2]  Bluetooth: HIDP socket layer initialized
[    2.042396@2]  l2tp_core: L2TP core driver, V2.0
[    2.042925@2]  l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    2.043548@2]  8021q: 802.1Q VLAN Support v1.8
[    2.045774@2]  registered taskstats version 1
[    2.045804@2]  Loading compiled-in X.509 certificates
[    2.046986@2]  Key type ._fscrypt registered
[    2.047015@2]  Key type .fscrypt registered
[    2.047352@2]  Key type fscrypt-provisioning registered
[    2.048458@2]  pstore: Using crash dump compression: deflate
[    2.075640@0]  meson ts init
[    2.075695@0]  tsensor id: 0
[    2.075758@0]  tsensor rtemp :110000
[    2.076133@0]  trim info = 86000051
[    2.076784@0]  r1p1_tsensor_read  valid cnt is 0, tvalue:0
[    2.090167@1]  meson_cdev probe
[    2.090199@1]  meson_cdev index: 0
[    2.090443@1]  cpucore_cooling_register, max_cpu_core_num:4
[    2.091058@1]  meson_cdev index: 1
[    2.091414@1]  meson_cdev probe done
[    2.092337@1]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000007f
[    2.092767@1]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000007f
[    2.093886@1]  crg fde00000.crg: Unsupported mode 0
[    2.094285@1]  crg fde00000.crg: IRQ host not found
[    2.094889@1]  crg fde00000.crg: IRQ crg_usb3 not found
[    2.095943@1]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000007f
[    2.096450@1]  amlogic-new-usb2-v2 fe03a000.usb2phy: phy trim value= 0x0000007f
[    2.097567@1]  xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.098114@1]  xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    2.099158@1]  xhci-hcd xhci-hcd.0.auto: hcc params 0x08000f81 hci version 0x110 quirks 0x0000040020010010
[    2.100309@1]  xhci-hcd xhci-hcd.0.auto: irq 26, io mem 0xfde00000
[    2.101360@1]  usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    2.102106@1]  usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.103024@1]  usb usb1: Product: xHCI Host Controller
[    2.103663@1]  usb usb1: Manufacturer: Linux 5.4.180 xhci-hcd
[    2.104378@1]  usb usb1: SerialNumber: xhci-hcd.0.auto
[    2.105887@1]  hub 1-0:1.0: USB hub found
[    2.105942@1]  hub 1-0:1.0: 2 ports detected
[    2.106625@1]  xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.106956@1]  xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    2.107941@1]  xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    2.108835@1]  usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.109944@1]  usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[    2.110881@1]  usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.111812@1]  usb usb2: Product: xHCI Host Controller
[    2.112450@1]  usb usb2: Manufacturer: Linux 5.4.180 xhci-hcd
[    2.113165@1]  usb usb2: SerialNumber: xhci-hcd.0.auto
[    2.114199@1]  hub 2-0:1.0: USB hub found
[    2.114325@1]  hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    2.115282@1]  usb usb2: Unsupported the hub
[    2.117160@2]  dwc_otg: usb0: type: 2 speed: 0, 
[    2.117165@2]  config: 0, dma: 0, id: 0, 
[    2.117196@2]  phy: fe03a000, ctrl: 0
[    2.118336@2]  dwc_otg: Core Release: 3.30a
[    2.118529@2]  dwc_otg: Setting default values for core params
[    2.119262@2]  dwc_otg: curmode: 0, host_only: 0
[    2.131967@2]  dwc_otg: Using Buffer DMA mode
[    2.131996@2]  dwc_otg: OTG VER PARAM: 1, OTG VER FLAG: 1
[    2.132493@2]  dwc_otg: Working on port type = SLAVE
[    2.133112@2]  dwc_otg: Dedicated Tx FIFOs mode
[    2.134130@2]  cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.136328@2]  cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.136638@2]  platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.137597@2]  cfg80211: failed to load regulatory.db
[    2.138434@1]  ALSA device list:
[    2.138626@1]    No soundcards found.
[    2.139310@1]  RAMDISK: gzip image found at block 0
[    2.243116@1]  RAMDISK: incomplete write (10651 != 32768)
[    2.243166@1]  write error
[    2.244280@1]  VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    2.244562@1]  Please append a correct "root=" boot option; here are the available partitions:
[    2.245643@1]  0100            8192 ram0 
[    2.245647@1]   (driver?)
[    2.246463@1]  0101            8192 ram1 
[    2.246467@1]   (driver?)
[    2.247285@1]  0102            8192 ram2 
[    2.247289@1]   (driver?)
[    2.248108@1]  0103            8192 ram3 
[    2.248112@1]   (driver?)
[    2.248932@1]  0104            8192 ram4 
[    2.248935@1]   (driver?)
[    2.249755@1]  0105            8192 ram5 
[    2.249759@1]   (driver?)
[    2.250610@1]  0106            8192 ram6 
[    2.250614@1]   (driver?)
[    2.253944@3]  0107            8192 ram7 
[    2.253956@3]   (driver?)
[    2.254110@3]  0108            8192 ram8 
[    2.254114@3]   (driver?)
[    2.254934@3]  0109            8192 ram9 
[    2.254938@3]   (driver?)
[    2.255757@3]  010a            8192 ram10 
[    2.255761@3]   (driver?)
[    2.256591@3]  010b            8192 ram11 
[    2.256595@3]   (driver?)
[    2.257425@3]  010c            8192 ram12 
[    2.257429@3]   (driver?)
[    2.258267@3]  010d            8192 ram13 
[    2.258274@3]   (driver?)
[    2.259095@3]  010e            8192 ram14 
[    2.259099@3]   (driver?)
[    2.259929@3]  010f            8192 ram15 
[    2.259934@3]   (driver?)
[    2.260779@3]  b300        15558144 mmcblk1 

.....

NOTE: a simplified extlinux.conf works, so perhaps one of my boot.ini load addresses wrong?

LABEL Default
  LINUX /Image
  INITRD /uInitrd
  FDTDIR /dtb
  APPEND ${bootargs} ${boot_user_args}

timeout 5
default Default

uEnv.txt:

boot_user_args="imgpart=UUID=50ada006-e7b4-4f73-babf-121a8357bcfe bootpart=UUID=97ED-DABD datapart=UUID=6ecce967-8535-4f2a-9802-834ae99115c0 console=ttyS0,921600N8 console=tty0

Hello @gkkpch

So you want to use boot.ini to boot the system, right ? We will check on our side and get back to you later.

I checed your script you still use uInitrd, but we use the raw initrd.img so you need to change the script, please check the new script here:

KHADAS-UBOOT-CONFIG
board_name="VIM1S"

label="VOLUMIO"
uboot_script="boot.ini"
kernel_filename="Image"
initrd_filename="initrd.img"
dtb_dir="dtb/amlogic"

## ENV FILES READ SEQUENCE
uboot_env_ini="env.txt"
uboot_env_sys="env.system.txt"
uboot_env_user="env.user.txt"
envfiles="$uboot_env_ini $uboot_env_user $uboot_env_sys"

uuidconfig="${uboot_env_sys}"
vsquash="/volumio_current.sqsh"

console="both"

kernel_addr_r="0x01080000"
fdt_addr_r="0x01000000"
ramdisk_addr_r="0x10000000"
scriptaddr="0x00010000"
## fixup dtb path
dtb_filename="dtb/$fdtfile"
##

## Boot support for USB, SD and eMMC devices, order:
## 0 - USB, highest priority
## 1 - SD card, higher priority
## 2 - eMMC
## With Volumio, each device will only hold boot files in the first (FAT32) partition

DEVTYPES="usb mmc"
DEVNUMS="0 1 2"
for dev_type in $DEVTYPES; do
	echo "[i] Trying $dev_type..."
	if test "$dev_type" = "usb" ; then
        usb start
    fi
	for dev_num in $DEVNUMS; do

		LOADER="load $dev_type $dev_num"
		echo "[i] Scanning $dev_type $dev_num..."

	## IMPORT CONFIGS BY envfile ORDER
		for envfile in $envfiles; do
		if $LOADER $scriptaddr $envfile; then
			echo "[i] Import $envfile"
			env import -t $scriptaddr $filesize
		fi
		done
		if $LOADER $ramdisk_addr_r $initrd_filename; then
			setenv initrd_size $filesize
			if $LOADER $kernel_addr_r $kernel_filename; then
				if $LOADER $fdt_addr_r $dtb_filename; then
			volumioargs="imgpart=$imgpart imgfile=${vsquash} bootpart=${bootpart} datapart=${datapart} bootconfig=${uuidconfig} hwdevice=${hwver}"


					if test "${console}" = "serial"; then
						consoleargs="console=ttyS0,921600N8"
					fi
					if test "${console}" = "display" || test "${console}" = "both"; then
						consoleargs="console=ttyS0,921600N8 console=tty0";
					fi
					consoleargs="${consoleargs} no_console_suspend consoleblank=0"

					# lookup ethernet mac
					test "$mac" = "" && mac=$eth_mac

					bootargs="${volumioargs} ${consoleargs} ${hdmiargs} ${panelargs} fsck.repair=yes net.ifnames=0 ddr_size=${ddr_size} wol_enable=${wol_enable} mac=${mac} fan=${fan_mode} hwver=${hwver} coherent_pool=${dma_size}"

					sleep 1
					echo "[i] Booting..."
					booti $kernel_addr_r $ramdisk_addr_r:$initrd_size $fdt_addr_r
				fi
			fi
		fi
	done
done

Changes below:

  • use load insterd of fatload, more flexible
  • use initrd.img - initrd_filename="initrd.img"
  • boot raw initrd.img need to append the filesize, so after load initrd.img need to save the initrd.img file size - setenv initrd_size $filesize
  • booti to boot raw initrd.img need to append filesize - booti $kernel_addr_r $ramdisk_addr_r:$initrd_size $fdt_addr_r

Please use the script above to check on your side.

Thanks for the quick response, but unfortunately it does not make any difference.
The result is the same, raw or zipped.

Strange thing is, when I throw together a quick extlinux version, then I have no issues at all with the zipped uInitrd (but I need boot.ini eventually to be flexible with other stuff).

extlinux.conf

LABEL Default
  LINUX /Image
  INITRD /uInitrd
  FDTDIR /dtb
  APPEND ${bootargs} ${volumio_args} 

timeout 5
default Default

uEnv.txt

#############################DO NOT TOUCH THIS OPTION#############################
rootdev=root=PLACEHOLDER
partitiontype=partition_type=PLACEHOLDER
#############################DO NOT TOUCH THIS OPTION#############################
## Add user args here, spilt with space.
## e.g. Add bootargs 'test1=111 test2=222'
## boot_user_args=test1=111 test2=222
volumio_args='bootpart=UUID=1ED3-2658 imgpart=UUID=4640750a-ae82-4bdf-8364-d7eda1b64214 datapart=UUID=e0c01045-4040-46d4-b667-f9ec0185c823 imgfile=/volumio_current.sqsh bootconfig=uEnv.txt'

Hello @gkkpch

We will check next week.

Thanks,
well, at least I can go ahead developing with the extlinux.conf method for the time being.
Not ideal, but when boot.ini works then there are no big changes before I can continue from there.

Hello @gkkpch

I checked on my side with image vim1s-ubuntu-22.04-server-linux-5.4-fenix-1.2-221018 and boot.ini below, it works well.

root@Khadas:~# cat /boot/boot.ini 
KHADAS-UBOOT-CONFIG
board_name="VIM1S"

label="VOLUMIO"
uboot_script="boot.ini"
kernel_filename="Image"
initrd_filename="initrd.img"
dtb_dir="dtb/amlogic"

## ENV FILES READ SEQUENCE
uboot_env_ini="env.txt"
uboot_env_sys="env.system.txt"
uboot_env_user="env.user.txt"
uboot_env_user_2="uEnv.txt"
envfiles="$uboot_env_ini $uboot_env_user $uboot_env_sys $uboot_env_user_2"

uuidconfig="${uboot_env_sys}"
vsquash="/volumio_current.sqsh"

console="both"

kernel_addr_r="0x01080000"
fdt_addr_r="0x01000000"
ramdisk_addr_r="0x10000000"
scriptaddr="0x00010000"
## fixup dtb path
dtb_filename="dtb/$fdtfile"
##

## Boot support for USB, SD and eMMC devices, order:
## 0 - USB, highest priority
## 1 - SD card, higher priority
## 2 - eMMC
## With Volumio, each device will only hold boot files in the first (FAT32) partition

DEVTYPES="usb mmc"
DEVNUMS="0 1 2"
for dev_type in $DEVTYPES; do
        echo "[i] Trying $dev_type..."
        if test "$dev_type" = "usb" ; then
        usb start
    fi
        for dev_num in $DEVNUMS; do

                LOADER="load $dev_type $dev_num"
                echo "[i] Scanning $dev_type $dev_num..."

        ## IMPORT CONFIGS BY envfile ORDER
                for envfile in $envfiles; do
                if $LOADER $scriptaddr $envfile; then
                        echo "[i] Import $envfile"
                        env import -t $scriptaddr $filesize
                fi
                done
                if $LOADER $ramdisk_addr_r $initrd_filename; then
                        setenv initrd_size $filesize
                        if $LOADER $kernel_addr_r $kernel_filename; then
                                if $LOADER $fdt_addr_r $dtb_filename; then
                        volumioargs="imgpart=$imgpart imgfile=${vsquash} bootpart=${bootpart} datapart=${datapart} bootconfig=${uuidconfig} hwdevice=${hwver}"


                                        if test "${console}" = "serial"; then
                                                consoleargs="console=ttyS0,921600N8"
                                        fi
                                        if test "${console}" = "display" || test "${console}" = "both"; then
                                                consoleargs="console=ttyS0,921600N8 console=tty0";
                                        fi
                                        consoleargs="${consoleargs} no_console_suspend consoleblank=0"

                                        # lookup ethernet mac
                                        test "$mac" = "" && mac=$eth_mac

                                        setenv bootargs "$bootargs ${rootdev} ${partitiontype}  ${volumioargs} ${consoleargs} ${hdmiargs} ${panelargs} fsck.repair=yes net.ifnames=0 wol_enable=${wol_enable} mac=${mac} "

                                        sleep 1
                                        echo "[i] Booting..."
                                        booti $kernel_addr_r $ramdisk_addr_r:$initrd_size $fdt_addr_r
                                fi
                        fi
                fi
        done
done

Note: You must pass partition_type=generic to kernel., just load from uEnv.txt -partitiontype.

Changes:

  • load env from uEnv.txt
  • update bootargs

Just go to u-boot command line and type cfgload to boot from boot.ini file.

OK was away busy with other things, but will try this asap. Did progress a lit with the extlinux bypass. Most things working, except an issue with Alsa not initialising properly,investigating.