BPI-W2 Kernel 5.9.0-rc5-next

Things are getting more clear, after digging through tons of docs I managed to boot up the self compiled mainline Linux, needed to hack around some stuff but at least it finally loads and boots.

The Kernel craps out because I didn’t preloaded any valid intird in uboot, but this is easily mitigated. Initialization of this board is quite complicated (at least from my perspective)

@bpi: Where can I get some real RTD1295/96 pdf documentation on device initialisation, especially parts of tee/audio firmware, audio/gpu blobs, if any?

More info soon. Anyone any tips?

0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.9.0-rc5-next-20200915-BPI-W2-Kernel (root@rearm) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #4 SMP PREEMPT Sat Oct 10 18:48:07 UTC 2020
[    0.000000] Machine model: Realtek_RTD1296
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000098007800 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
[    0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 4096 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 262144 pages, LIFO batch:63
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 262144 pages, LIFO batch:63
[    0.000000] Unsupported enable-method: rtk-spin-table
[    0.000000] Unsupported enable-method: rtk-spin-table
[    0.000000] Unsupported enable-method: rtk-spin-table
[    0.000000] Unsupported enable-method: rtk-spin-table
[    0.000000] percpu: Embedded 30 pages/cpu s85208 r8192 d29480 u122880
[    0.000000] pcpu-alloc: s85208 r8192 d29480 u122880 alloc=30*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: earlycon=uart8250,mmio32,0x98007800 fbcon=map:0 console=ttyS0,115200 loglevel=7 root=/dev/mmcblk1p2 rw debug memblock-debug console=ttyS0,115200 earlycon=uwart8250,mmio32,0x98007800 fbcon=0
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x3bfff000-0x3ffff000] (64MB)
[    0.000000] Memory: 1551008K/2097152K available (17724K kernel code, 2420K rwdata, 4648K rodata, 5696K init, 681K bss, 513376K reserved, 32768K cma-reserved)
[    0.000000] ftrace: allocating 54942 entries in 215 pages
[    0.000000] ftrace: allocated 215 pages with 6 groups
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] rcu:     RCU priority boosting: priority 1 delay 500 ms.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] rcu:     Offload RCU callbacks from CPUs: (none).
[    0.000000] random: get_random_bytes called from start_kernel+0x610/0x834 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 27.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x63a1e71a3, max_idle_ns: 440795203123 ns
[    0.000005] sched_clock: 56 bits at 27MHz, resolution 37ns, wraps every 4398046511093ns
[    0.009603] Console: colour dummy device 80x25
[    0.014637] Calibrating delay loop (skipped), value calculated using timer frequency.. 54.00 BogoMIPS (lpj=108000)
[    0.026302] pid_max: default: 32768 minimum: 301
[    0.031663] LSM: Security Framework initializing
[    0.036909] SELinux:  Initializing.
[    0.040949] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.049291] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.060048] rcu: Hierarchical SRCU implementation.
[    0.066862] EFI services will not be available.
[    0.072134] smp: Bringing up secondary CPUs ...
[    0.077266] smp: Brought up 1 node, 1 CPU
[    0.081786] SMP: Total of 1 processors activated.
[    0.087092] CPU features: detected: 32-bit EL0 Support
[    0.092885] CPU features: detected: CRC32 instructions
[    0.098722] CPU: All CPU(s) started at EL2
[    0.103352] alternatives: patching kernel code
[    0.109791] devtmpfs: initialized
[    0.123961] Registered cp15_barrier emulation handler
[    0.129684] Registered setend emulation handler
[    0.135619] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.146860] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.155905] xor: measuring software checksum speed
[    0.201465]    8regs     :  1531.000 MB/sec
[    0.246275]    32regs    :  1811.000 MB/sec
[    0.291086]    arm64_neon:  1336.000 MB/sec
[    0.295826] xor: using function: 32regs (1811.000 MB/sec)
[    0.302052] pinctrl core: initialized pinctrl subsystem
[    0.309625] DMI not present or invalid.
[    0.315521] NET: Registered protocol family 16
[    0.323045] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.331099] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.340171] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.349185] audit: initializing netlink subsys (disabled)
[    0.356509] thermal_sys: Registered thermal governor 'fair_share'
[    0.356518] thermal_sys: Registered thermal governor 'bang_bang'
[    0.364425] audit: type=2000 audit(0.264:1): state=initialized audit_enabled=0 res=1
[    0.382910] thermal_sys: Registered thermal governor 'step_wise'
[    0.382917] thermal_sys: Registered thermal governor 'user_space'
[    0.389765] thermal_sys: Registered thermal governor 'power_allocator'
[    0.397611] cpuidle: using governor ladder
[    0.410314] cpuidle: using governor menu
[    0.415227] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.423310] ASID allocator initialised with 65536 entries
[    0.485529] OF: /pcie2@9803B000: could not get #phy-cells for /efuse@98017000/etn_phy@1B9
[    0.647626] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.655291] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.663181] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.670770] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    0.680943] cryptd: max_cpu_qlen set to 1000
[    0.758584] raid6: neonx8   gen()  1398 MB/s
[    0.831582] raid6: neonx8   xor()  1027 MB/s
[    0.904569] raid6: neonx4   gen()  1432 MB/s
[    0.977536] raid6: neonx4   xor()  1009 MB/s
[    1.050546] raid6: neonx2   gen()  1342 MB/s
[    1.123494] raid6: neonx2   xor()   926 MB/s
[    1.196504] raid6: neonx1   gen()  1157 MB/s
[    1.269461] raid6: neonx1   xor()   791 MB/s
[    1.342420] raid6: int64x8  gen()   958 MB/s
[    1.415383] raid6: int64x8  xor()   514 MB/s
[    1.488365] raid6: int64x4  gen()  1066 MB/s
[    1.561304] raid6: int64x4  xor()   545 MB/s
[    1.634285] raid6: int64x2  gen()   932 MB/s
[    1.707249] raid6: int64x2  xor()   499 MB/s
[    1.780232] raid6: int64x1  gen()   688 MB/s
[    1.853193] raid6: int64x1  xor()   344 MB/s
[    1.858005] raid6: using algorithm neonx4 gen() 1432 MB/s
[    1.864087] raid6: .... xor() 1009 MB/s, rmw enabled
[    1.869680] raid6: using neon recovery algorithm
[    1.876309] ACPI: Interpreter disabled.
[    1.882699] iommu: Default domain type: Translated 
[    1.889442] vgaarb: loaded
[    1.894069] SCSI subsystem initialized
[    1.900105] libata version 3.00 loaded.
[    1.905730] usbcore: registered new interface driver usbfs
[    1.913062] usbcore: registered new interface driver hub
[    1.919731] usbcore: registered new device driver usb
[    1.926270] mc: Linux media interface: v0.10
[    1.932213] videodev: Linux video capture interface: v2.00
[    1.942827] Advanced Linux Sound Architecture Driver Initialized.
[    1.952053] Bluetooth: Core ver 2.22
[    1.956779] NET: Registered protocol family 31
[    1.962224] Bluetooth: HCI device and connection manager initialized
[    1.969451] Bluetooth: HCI socket layer initialized
[    1.975015] Bluetooth: L2CAP socket layer initialized
[    1.980775] Bluetooth: SCO socket layer initialized
[    1.987490] clocksource: Switched to clocksource arch_sys_counter
[    3.360368] VFS: Disk quotas dquot_6.6.0
[    3.364875] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    3.373577] pnp: PnP ACPI: disabled
[    3.408305] NET: Registered protocol family 2
[    3.414015] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    3.424227] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    3.433313] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    3.441854] TCP: Hash tables configured (established 16384 bind 16384)
[    3.449328] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    3.456969] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    3.465264] NET: Registered protocol family 1
[    3.470696] RPC: Registered named UNIX socket transport module.
[    3.477407] RPC: Registered udp transport module.
[    3.482712] RPC: Registered tcp transport module.
[    3.488015] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.495930] PCI: CLS 0 bytes, default 64
[    3.501334] Trying to unpack rootfs image as initramfs...
[    3.507745] rootfs image is not initramfs (invalid magic at start of compressed archive); looks like an initrd
[    3.531973] Freeing initrd memory: 4096K
[    3.537438] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    3.555335] Initialise system trusted keyrings
[    3.563085] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    3.571869] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.578877] NFS: Registering the id_resolver key type
[    3.584724] Key type id_resolver registered
[    3.589494] Key type id_legacy registered
[    3.594096] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.602346] Key type cifs.idmap registered
[    3.607285] fuse: init (API version 7.31)
[    3.668016] async_tx: api initialized (async)
[    3.672978] Key type asymmetric registered
[    3.677627] Asymmetric key parser 'x509' registered
[    3.683256] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    3.691869] io scheduler mq-deadline registered
[    3.697027] io scheduler kyber registered
[    3.701630] io scheduler bfq registered
[    3.914612] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.954702] brd: module loaded
[    3.972844] loop: module loaded
[    3.977572] zram: Added device: zram0
[    3.982766] usbcore: registered new interface driver rtsx_usb
[    3.994991] libphy: Fixed MDIO Bus: probed
[    4.002730] tun: Universal TUN/TAP device driver, 1.6
[    4.008768] PPP generic driver version 2.4.2
[    4.014045] PPP BSD Compression module registered
[    4.019900] PPP Deflate Compression module registered
[    4.025661] PPP MPPE Compression module registered
[    4.031248] usbcore: registered new interface driver r8152
[    4.037769] usbcore: registered new interface driver asix
[    4.044169] usbcore: registered new interface driver ax88179_178a
[    4.051311] usbcore: registered new interface driver cdc_ether
[    4.058214] usbcore: registered new interface driver cdc_eem
[    4.064897] usbcore: registered new interface driver net1080
[    4.071634] usbcore: registered new interface driver cdc_subset
[    4.078594] usbcore: registered new interface driver zaurus
[    4.085193] usbcore: registered new interface driver cdc_ncm
[    4.094010] mousedev: PS/2 mouse device common for all mice
[    4.102100] usbcore: registered new interface driver xpad
[    4.110364] i2c /dev entries driver
[    4.116926] IR NEC protocol handler initialized
[    4.122427] IR RC5(x/sz) protocol handler initialized
[    4.128232] IR RC6 protocol handler initialized
[    4.133460] IR JVC protocol handler initialized
[    4.138597] IR Sony protocol handler initialized
[    4.143831] IR SANYO protocol handler initialized
[    4.149143] IR Sharp protocol handler initialized
[    4.154446] IR MCE Keyboard/mouse protocol handler initialized
[    4.161019] IR XMP protocol handler initialized
[    4.166574] usbcore: registered new interface driver uvcvideo
[    4.173312] USB Video Class driver (1.1.1)
[    4.184040] device-mapper: uevent: version 1.0.3
[    4.189942] device-mapper: ioctl: 4.42.0-ioctl (2020-02-27) initialised: [email protected]
[    4.199929] usbcore: registered new interface driver bcm203x
[    4.208750] sdhci: Secure Digital Host Controller Interface driver
[    4.217007] sdhci: Copyright(c) Pierre Ossman
[    4.223037] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.230070] ledtrig-cpu: registered to indicate activity on CPUs
[    4.237924] hid: raw HID events driver (C) Jiri Kosina
[    4.272069] usbcore: registered new interface driver usbhid
[    4.280940] usbhid: USB HID core driver
[    4.285927] ashmem: initialized
[    4.291312] usbcore: registered new interface driver snd-usb-audio
[    4.300444] u32 classifier
[    4.304241]     input device check on
[    4.308406]     Actions configured
[    4.313077] xt_time: kernel timezone is -0000
[    4.318389] IPVS: Registered protocols (TCP, UDP)
[    4.323774] IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[    4.332196] IPVS: ipvs loaded.
[    4.335739] IPVS: [rr] scheduler registered.
[    4.340905] Initializing XFRM netlink socket
[    4.345882] NET: Registered protocol family 10
[    4.351723] Segment Routing with IPv6
[    4.355973] mip6: Mobile IPv6
[    4.359460] NET: Registered protocol family 17
[    4.364521] NET: Registered protocol family 15
[    4.369653] Bluetooth: RFCOMM TTY layer initialized
[    4.375273] Bluetooth: RFCOMM socket layer initialized
[    4.381129] Bluetooth: RFCOMM ver 1.11
[    4.385406] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.391396] Bluetooth: BNEP filters: protocol multicast
[    4.397293] Bluetooth: BNEP socket layer initialized
[    4.402890] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    4.409606] Bluetooth: HIDP socket layer initialized
[    4.415291] Key type dns_resolver registered
[    4.420705] registered taskstats version 1
[    4.425464] Loading compiled-in X.509 certificates
[    4.431114] Key type ._fscrypt registered
[    4.435689] Key type .fscrypt registered
[    4.440152] Key type fscrypt-provisioning registered
[    4.446495] Btrfs loaded, crc32c=crc32c-generic
[    4.453114] psci_checker: Missing PSCI operations, aborting tests
[    4.460487] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    4.471203] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    4.478868] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    4.488810] ALSA device list:
[    4.492190]   No soundcards found.
[    4.496060] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    4.504837] Warning: unable to open an initial console.
[    4.510774] md: Waiting for all devices to be available before autodetect
[    4.518873] md: If you don't use raid, use raid=noautodetect
[    4.525294] md: Autodetecting RAID arrays.
[    4.529940] md: autorun ...
[    4.533113] md: ... autorun DONE.
[    4.537088] RAMDISK: Couldn't find valid RAM disk image starting at 0.
[    4.544641] VFS: Cannot open root device "mmcblk1p2" or unknown-block(0,0): error -6
[    4.557425] Please append a correct "root=" boot option; here are the available partitions:
[    4.566880] 0100            4096 ram0 
[    4.566886]  (driver?)
[    4.573836] 0101            4096 ram1 
[    4.573842]  (driver?)
[    4.580729] 0102            4096 ram2 
[    4.580735]  (driver?)
[    4.587619] 0103            4096 ram3 
[    4.587625]  (driver?)
[    4.594498] 0104            4096 ram4 
[    4.594504]  (driver?)
[    4.601387] 0105            4096 ram5 
[    4.601392]  (driver?)
[    4.608275] 0106            4096 ram6 
[    4.608281]  (driver?)
[    4.615154] 0107            4096 ram7 
[    4.615160]  (driver?)
[    4.622043] 0108            4096 ram8 
[    4.622048]  (driver?)
[    4.628932] 0109            4096 ram9 
[    4.628937]  (driver?)
[    4.635822] 010a            4096 ram10 
[    4.635827]  (driver?)
[    4.642798] 010b            4096 ram11 
[    4.642803]  (driver?)
[    4.649784] 010c            4096 ram12 
[    4.649790]  (driver?)
[    4.656771] 010d            4096 ram13 
[    4.656776]  (driver?)
[    4.663758] 010e            4096 ram14 
[    4.663763]  (driver?)
[    4.670734] 010f            4096 ram15 
[    4.670740]  (driver?)
[    4.677730] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    4.687033] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc5-next-20200915-BPI-W2-Kernel #4
[    4.696721] Hardware name: Realtek_RTD1296 (DT)
[    4.701814] Call trace:
[    4.704569]  dump_backtrace+0x0/0x1dc
[    4.708688]  show_stack+0x24/0x30
[    4.712417]  dump_stack+0xcc/0x108
[    4.716241]  panic+0x178/0x344
[    4.719676]  mount_block_root+0x2c4/0x358
[    4.724185]  mount_root+0x7c/0x8c
[    4.727913]  prepare_namespace+0x140/0x180
[    4.732520]  kernel_init_freeable+0x230/0x25c
[    4.737422]  kernel_init+0x20/0x124
[    4.741345]  ret_from_fork+0x10/0x18
[    4.745367] Kernel Offset: disabled
[    4.749288] CPU features: 0x0040002,20002004
[    4.754086] Memory Limit: none
[    4.757523] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

It seems like rtk-emmc driver not loaded

I have ported emmc driver to 5.9.0, check my github repo: https://github.com/jjm2473/rtd1295-next

Could you please share your hacks/fixes/changes as a patchset ? Did you manage to try with the current 5.16 branch?

Source is here. But this source is lack for many drivers.

1 Like

Hi, could you please shed some light on how you got your custom kernel to boot ? I am struggeling to get my custom kernel started. After fatloading/tftp-ing the dtb, kernel and initrd, the “go all” at least starts but no further output compared to ootb-kernel.

TIA -Markus

were you able to get the 2nd network port working? what config file are you using?