linux-sunxi / meta-sunxi

Official sunxi OpenEmbedded layer for Allwinner-based boards.
MIT License
140 stars 172 forks source link

support nanopi -r1 and r2s #340

Closed devendranaga closed 2 years ago

devendranaga commented 2 years ago

current yocto layer dont support nanopi r1 and r2s. would love to have yocto support for these boards also.

nandra commented 2 years ago

@madmax440 if mainline kernel + u-boot have support for those boards adding it would be pretty straightforward See https://github.com/linux-sunxi/meta-sunxi/tree/master/conf/machine for inspiration pls.

devendranaga commented 2 years ago

@nandra , i could boot openwrt. If there is yocto layer support for nanopi r1, i am happy to test and verify !

nandra commented 2 years ago

@madmax440 ok let me check

nandra commented 2 years ago

@madmax440 pls try to build and boot: mbe-nanopi-r1 branch. Thanks.

devendranaga commented 2 years ago

@nandra , i have used mbe-nanopi-r1, but seems like it fails at the dtb build.

meta-sunxi:

git branch 
  master
* mbe-nanopi-r1

bitbake command is:

MACHINE=nanopi-r1 bitbake core-image-minimal

bblayers.conf

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /data/nanopi/poky/meta \
  /data/nanopi/poky/meta-poky \
  /data/nanopi/poky/meta-yocto-bsp \
  /data/nanopi/poky/meta-sunxi \
  "

|   CC      arch/arm/boot/compressed/fdt_ro.o
|   CC      arch/arm/boot/compressed/fdt_wip.o
|   CC      arch/arm/boot/compressed/fdt.o
|   CC      arch/arm/boot/compressed/atags_to_fdt.o
|   SHIPPED arch/arm/boot/compressed/lib1funcs.S
|   SHIPPED arch/arm/boot/compressed/ashldi3.S
|   SHIPPED arch/arm/boot/compressed/bswapsdi2.S
|   AS      arch/arm/boot/compressed/hyp-stub.o
|   AS      arch/arm/boot/compressed/lib1funcs.o
|   AS      arch/arm/boot/compressed/ashldi3.o
|   AS      arch/arm/boot/compressed/bswapsdi2.o
|   AS      arch/arm/boot/compressed/piggy.o
|   LD      arch/arm/boot/compressed/vmlinux
|   OBJCOPY arch/arm/boot/zImage
|   Kernel: arch/arm/boot/zImage is ready
|   UIMAGE  arch/arm/boot/uImage
| Image Name:   Linux-5.10.2
| Created:      Mon Dec 21 12:30:08 2020
| Image Type:   ARM Linux Kernel Image (uncompressed)
| Data Size:    4755144 Bytes = 4643.70 KiB = 4.53 MiB
| Load Address: 40008000
| Entry Point:  40008000
|   Kernel: arch/arm/boot/uImage is ready
| NOTE: make -j 4 HOSTCC=gcc  -isystem/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -L/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/data/nanopi/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc  -E HOSTCXX=g++  -isystem/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -L/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/data/nanopi/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 sun8i-h3-nanopi-r1.dtb CC=arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0=/usr/src/debug/linux-mainline/5.10.2-r0                      -fdebug-prefix-map=/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0=/usr/src/debug/linux-mainline/5.10.2-r0                      -fdebug-prefix-map=/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot=                      -fdebug-prefix-map=/data/nanopi/poky/build/tmp/work/nanopi_r1-poky-linux-gnueabi/linux-mainline/5.10.2-r0/recipe-sysroot-native=  -fdebug-prefix-map=/data/nanopi/poky/build/tmp/work-shared/nanopi-r1/kernel-source=/usr/src/kernel   LD=arm-poky-linux-gnueabi-ld.bfd   LOADADDR=0x40008000
|   SYNC    include/config/auto.conf.cmd
|   GEN     Makefile
| make[2]: *** No rule to make target 'arch/arm/boot/dts/sun8i-h3-nanopi-r1.dtb'.  Stop.
| make[1]: *** [/data/nanopi/poky/build/tmp/work-shared/nanopi-r1/kernel-source/Makefile:1338: sun8i-h3-nanopi-r1.dtb] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| make: *** [/data/nanopi/poky/build/tmp/work-shared/nanopi-r1/kernel-source/Makefile:185: __sub-make] Error 2
ERROR: Task (/data/nanopi/poky/meta-sunxi/recipes-kernel/linux/linux-mainline_5.10.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1927 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /data/nanopi/poky/meta-sunxi/recipes-kernel/linux/linux-mainline_5.10.2.bb:do_compile
Summary: There were 3 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
```bash
nandra commented 2 years ago

Pls pull form same branch and retry. I've fixed it. Thanks.

devendranaga commented 2 years ago

@nandra Thanks I pulled and built it. Build is ok now. Good progress. Seems the boot stuck at /dev/mmcblk0p2. Any idea why?

U-Boot SPL 2021.07-g840658b (Jul 05 2021 - 15:11:28 +0000)
DRAM: 512 MiB
Trying to boot from MMC1

U-Boot 2021.07-g840658b (Jul 05 2021 - 15:11:28 +0000) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: FriendlyARM NanoPi R1
DRAM:  512 MiB
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select! : -110
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7

Error: ethernet@1c30000 address not set.
No ethernet found.

starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1d000: USB EHCI 1.00
Bus usb@1c1d400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1d000 for devices... 1 USB Device(s) found
scanning bus usb@1c1d400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
714 bytes read in 2 ms (348.6 KiB/s)
## Executing script at 43100000
23711 bytes read in 4 ms (5.7 MiB/s)
Failed to load 'zImage'
Failed to load 'boot/zImage'
4755208 bytes read in 338 ms (13.4 MiB/s)
zimage: Bad magic!
## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   Linux-5.10.2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4755144 Bytes = 4.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
   Loading Kernel Image
   Loading Device Tree to 49ff7000, end 49fffc9e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.2 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Mon Dec 21 12:30:08 UTC 2020
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: FriendlyARM NanoPi R1
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s31884 r8192 d21364 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait panic=10
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508084K/524288K available (7168K kernel code, 818K rwdata, 1536K rodata, 1024K init, 281K bss, 16204K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x320/0x4d4 with crng_init=0
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000013] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000038] Switching to timer-based delay loop, resolution 41ns
[    0.000373] Console: colour dummy device 80x30
[    0.001210] printk: console [tty1] enabled
[    0.001294] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001362] pid_max: default: 32768 minimum: 301
[    0.001626] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001686] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002980] CPU: Testing write buffer coherency: ok
[    0.003505] /cpus/cpu@0 missing clock-frequency property
[    0.003575] /cpus/cpu@1 missing clock-frequency property
[    0.003629] /cpus/cpu@2 missing clock-frequency property
[    0.003684] /cpus/cpu@3 missing clock-frequency property
[    0.003723] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004755] Setting up static identity map for 0x40100000 - 0x40100060
[    0.005018] rcu: Hierarchical SRCU implementation.
[    0.005914] smp: Bringing up secondary CPUs ...
[    0.017196] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.028604] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.039917] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.040115] smp: Brought up 1 node, 4 CPUs
[    0.040235] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.040268] CPU: All CPU(s) started in HYP mode.
[    0.040294] CPU: Virtualization extensions available.
[    0.041212] devtmpfs: initialized
[    0.051349] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.052040] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.052120] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.052557] pinctrl core: initialized pinctrl subsystem
[    0.054196] NET: Registered protocol family 16
[    0.054728] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.056460] thermal_sys: Registered thermal governor 'step_wise'
[    0.057333] cpuidle: using governor menu
[    0.057675] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.057724] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.097141] cryptd: max_cpu_qlen set to 1000
[    0.101456] SCSI subsystem initialized
[    0.102237] usbcore: registered new interface driver usbfs
[    0.102360] usbcore: registered new interface driver hub
[    0.102502] usbcore: registered new device driver usb
[    0.102707] pps_core: LinuxPPS API ver. 1 registered
[    0.102743] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.102814] PTP clock support registered
[    0.104621] clocksource: Switched to clocksource arch_sys_counter
[    0.119473] NET: Registered protocol family 2
[    0.120737] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.120838] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.120954] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.121104] TCP: Hash tables configured (established 4096 bind 4096)
[    0.121306] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.121393] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.121733] NET: Registered protocol family 1
[    0.122779] RPC: Registered named UNIX socket transport module.
[    0.122836] RPC: Registered udp transport module.
[    0.122868] RPC: Registered tcp transport module.
[    0.122898] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.124870] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.128270] Initialise system trusted keyrings
[    0.128591] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.140716] NFS: Registering the id_resolver key type
[    0.140832] Key type id_resolver registered
[    0.140866] Key type id_legacy registered
[    0.141361] Key type asymmetric registered
[    0.141408] Asymmetric key parser 'x509' registered
[    0.141508] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.141555] io scheduler mq-deadline registered
[    0.141587] io scheduler kyber registered
[    0.142949] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.150574] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.153639] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    0.252736] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.256321] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    0.257718] printk: console [ttyS0] disabled
[    0.278094] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 48, base_baud = 1500000) is a U6_16550A
[    0.943447] printk: console [ttyS0] enabled
[    0.948721] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[    0.978617] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 49, base_baud = 1500000) is a U6_16550A
[    1.009737] 1c28c00.serial: ttyS2 at MMIO 0x1c28c00 (irq = 50, base_baud = 1500000) is a U6_16550A
[    1.022943] libphy: Fixed MDIO Bus: probed
[    1.028494] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pd not found, using dummy regulator
[    1.037259] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[    1.043647] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[    1.049817] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.056616] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.063177] ehci-platform: EHCI generic platform driver
[    1.069378] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.075622] ohci-platform: OHCI generic platform driver
[    1.081794] usbcore: registered new interface driver usb-storage
[    1.090012] sun6i-rtc 1f00000.rtc: registered as rtc0
[    1.095226] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:00:08 UTC (8)
[    1.103174] sun6i-rtc 1f00000.rtc: RTC enabled
[    1.108213] i2c /dev entries driver
[    1.112978] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.121615] sun8i-h3-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[    1.131782] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.133053] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[    1.133062] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.141578] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.158472] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.159049] ledtrig-cpu: registered to indicate activity on CPUs
[    1.173036] usbcore: registered new interface driver usbhid
[    1.178686] usbhid: USB HID core driver
[    1.182566] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.184079] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.184088] NET: Registered protocol family 10
[    1.184436] sunxi-mmc 1c11000.mmc: initialized, max. request size: 16384 KB
[    1.185717] Segment Routing with IPv6
[    1.185842] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.186971] NET: Registered protocol family 17
[    1.187115] Key type dns_resolver registered
[    1.187232] Registering SWP/SWPB emulation handler
[    1.189871] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.191021] registered taskstats version 1
[    1.191043] Loading compiled-in X.509 certificates
[    1.192060] sun8i-h3-pinctrl 1c20800.pinctrl: supply vcc-pd not found, using dummy regulator
[    1.196177] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[    1.201253] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.206733] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[    1.213206] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.216566] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.224260] mmc0: queuing unknown CIS tuple 0x81 (9 bytes)
[    1.230575] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.275598] random: fast init done
[    1.299168] mmc1: new high speed SDXC card at address 0001
[    1.305994] mmcblk1: mmc1:0001 EC2QT 59.6 GiB 
[    1.313968]  mmcblk1: p1 p2
[    1.345080] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 50006 (expect 58000)
[    1.346988] mmc0: new high speed SDIO card at address 0001
[    1.354473] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.367268] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.374523] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.379543] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.386376] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.392059] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.397783] dwmac-sun8i 1c30000.ethernet: device MAC address 1a:20:82:98:f1:52
[    1.405959] libphy: stmmac: probed
[    1.411517] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.418532] libphy: mdio_mux: probed
[    1.422175] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.428589] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.436855] libphy: mdio_mux: probed
[    1.440511] dwmac-sun8i 1c30000.ethernet: Switch mux to external PHY
[    1.449332] ehci-platform 1c1b000.usb: EHCI Host Controller
[    1.455056] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 1
[    1.463088] ehci-platform 1c1b000.usb: irq 37, io mem 0x01c1b000
[    1.494668] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[    1.502206] hub 1-0:1.0: USB hub found
[    1.506125] hub 1-0:1.0: 1 port detected
[    1.511681] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.517366] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.525372] ehci-platform 1c1c000.usb: irq 39, io mem 0x01c1c000
[    1.554638] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.561975] hub 2-0:1.0: USB hub found
[    1.565880] hub 2-0:1.0: 1 port detected
[    1.571328] ehci-platform 1c1d000.usb: EHCI Host Controller
[    1.577035] ehci-platform 1c1d000.usb: new USB bus registered, assigned bus number 3
[    1.585060] ehci-platform 1c1d000.usb: irq 41, io mem 0x01c1d000
[    1.614796] ehci-platform 1c1d000.usb: USB 2.0 started, EHCI 1.00
[    1.622079] hub 3-0:1.0: USB hub found
[    1.625999] hub 3-0:1.0: 1 port detected
[    1.631417] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[    1.638154] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[    1.646087] ohci-platform 1c1b400.usb: irq 38, io mem 0x01c1b400
[    1.719834] hub 4-0:1.0: USB hub found
[    1.723682] hub 4-0:1.0: 1 port detected
[    1.729586] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    1.736355] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 5
[    1.744263] ohci-platform 1c1c400.usb: irq 40, io mem 0x01c1c400
[    1.819832] hub 5-0:1.0: USB hub found
[    1.823687] hub 5-0:1.0: 1 port detected
[    1.829234] ohci-platform 1c1d400.usb: Generic Platform OHCI controller
[    1.835978] ohci-platform 1c1d400.usb: new USB bus registered, assigned bus number 6
[    1.843880] ohci-platform 1c1d400.usb: irq 42, io mem 0x01c1d400
[    1.874645] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    1.919875] hub 6-0:1.0: USB hub found
[    1.923732] hub 6-0:1.0: 1 port detected
[    1.944383] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 480000 KHz, changing to: 648000 KHz
[    1.956523] Waiting for root device /dev/mmcblk0p2...

CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.8 | VT102 | Online 0:1 | ttyUSB0                                                                                      
devendranaga commented 2 years ago

@nandra after i use a new SD card, the system boots.

There is still another problem. The nanopi-r1 contains two ethernets. However all i see is one ethernet in ifconfig.

Can we fix that too?

root@nanopi-r1:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 86:94:B6:6D:A8:BE  
          inet addr:192.168.1.100  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:46 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
nandra commented 2 years ago

@madmax440 unfortunately in mainline kernel is support for only on interface so I cannot help much here. Does openwrt support both? Thanks.

devendranaga commented 2 years ago

@nandra Yes openwrt has dual ethernet support. Please see below from the console.

root@OpenWrt:~# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r17648+1-16e83a7491
 -----------------------------------------------------
root@OpenWrt:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 96:05:F4:4A:7B:0B  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::9405:f4ff:fe4a:7b0b/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:480 errors:0 dropped:0 overruns:0 frame:0
          TX packets:444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:449224 (438.6 KiB)  TX bytes:83538 (81.5 KiB)
          Interrupt:36 

eth1      Link encap:Ethernet  HWaddr A6:E9:20:18:EB:52  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:634 (634.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:424 errors:0 dropped:0 overruns:0 frame:0
          TX packets:424 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:36364 (35.5 KiB)  TX bytes:36364 (35.5 KiB)

root@OpenWrt:~# 

Thanks for your support and time so far. Wish there is a yocto port.

nandra commented 2 years ago

OK I don't have capacity atm to work on it so please feel free to post patch. I'm closing the issue. Thanks.