OrangePi zero 是使用 全志 H2+ SOC的。
基本上算是嵌入式小白吧,想摸清楚构建一个可用的系统的流程。
OrangePi 的官方资料比较少,经过搜索,发现 NanoPi duo 板子也是用 H2+,于是采用了 Nanopi 修改的内核源码和u-boot。根文件系统使用 buildroot 构建。
git clone https://github.com/friendlyarm/linux.git -b sunxi-4.14.y --depth 1
git clone https://github.com/friendlyarm/u-boot.git -b sunxi-v2017.x --depth 1
git clone git://git.buildroot.net/buildroot -b 2019.02.x
因为SD卡烧写要插拔特别麻烦,所以思路是先搞定 u-boot 以太网,然后烧写一次 u-boot,后面通过 tftp 进行加载 zImage 和 dtb 文件。
跌跌撞撞把 以太网搞定,顺利通过 修改 bootargs, bootcmd 从 PC 下载 zImage , dtb, 并通过 nfs 让内核挂载 rootfs 到 PC 的 nfs目录,成启动到 busybox bash。
于是就要把 根文件系统烧写到sd卡进一步验证,sd 第一个分区放置 zImage,boot.scr, opz.dtb;第二个分区,解压 rootfs.tar.
解压命令为:
sudo mount /dev/sdc2 /mnt
sudo tar xvf rootfs.tar -C /mnt
boot.cmd
setenv bootargs console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk2p2 earlyprintk rw init=/sbin/init
load mmc 0:1 0x41000000 zImage
load mmc 0:1 0x41800000 opz.dtb
bootz 0x41000000 - 0x41800000
问题表现就是,同一个 rootfs.tar, 作为 nfs 挂载时,是成功启动的,但是烧写到sd卡上,就不成功。 挂载上了,但是卡住了.
日志
U-Boot SPL 2017.11-g85a7997-dirty (Nov 14 2019 - 09:02:51)
DRAM: 512 MiB(408MHz)
CPU Freq: 408MHz
memory test: 1
Pattern 55aa Writing...Reading...OK
Trying to boot from MMC1
Boot device: sd
U-Boot 2017.11-g85a7997-dirty (Nov 14 2019 - 09:02:51 +0000) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Zero
DRAM: 512 MiB
CPU Freq: 1008MHz
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: phy interface0
eth0: ethernet@1c30000
BOARD: nanopi-duo
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading boot.scr
283 bytes read in 20 ms (13.7 KiB/s)
## Executing script at 43100000
reading zImage
5879144 bytes read in 363 ms (15.4 MiB/s)
reading opz.dtb
28715 bytes read in 31 ms (904.3 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 49ff5000, end 49fff02a ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.111-gffba271 (root@ae18fc6cecf4) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #2 SMP Wed Nov 13 07:13:16 UTC 2019
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[ 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: Xunlong Orange Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000005bc00000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] percpu: Embedded 17 pages/cpu @dff59000 s37068 r8192 d24372 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk2p2 earlyprintk rw init=/sbin/init
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 436068K/524288K available (10240K kernel code, 390K rwdata, 2072K rodata, 2048K init, 303K bss, 22684K reserved, 65536K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0c00000 (12256 kB)
[ 0.000000] .init : 0xc1000000 - 0xc1200000 (2048 kB)
[ 0.000000] .data : 0xc1200000 - 0xc12619d8 ( 391 kB)
[ 0.000000] .bss : 0xc126a89c - 0xc12b6600 ( 304 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 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] 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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000199] Console: colour dummy device 80x30
[ 0.000567] console [tty0] enabled
[ 0.000602] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=120000)
[ 0.000629] pid_max: default: 32768 minimum: 301
[ 0.000799] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000821] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001567] CPU: Testing write buffer coherency: ok
[ 0.002032] CPU0: update cpu_capacity 1024
[ 0.002055] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002434] Setting up static identity map for 0x40200000 - 0x40200060
[ 0.002569] Hierarchical SRCU implementation.
[ 0.003161] smp: Bringing up secondary CPUs ...
[ 0.013920] CPU1: update cpu_capacity 1024
[ 0.013926] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.024758] CPU2: update cpu_capacity 1024
[ 0.024764] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.035508] CPU3: update cpu_capacity 1024
[ 0.035514] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.035599] smp: Brought up 1 node, 4 CPUs
[ 0.035679] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[ 0.035693] CPU: All CPU(s) started in HYP mode.
[ 0.035703] CPU: Virtualization extensions available.
[ 0.036429] devtmpfs: initialized
[ 0.042150] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.042704] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.042986] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[ 0.043025] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.045631] xor: measuring software checksum speed
[ 0.095369] arm4regs : 1261.600 MB/sec
[ 0.145421] 8regs : 768.800 MB/sec
[ 0.195481] 32regs : 807.200 MB/sec
[ 0.245532] neon : 1284.000 MB/sec
[ 0.245545] xor: using function: neon (1284.000 MB/sec)
[ 0.245574] pinctrl core: initialized pinctrl subsystem
[ 0.246585] NET: Registered protocol family 16
[ 0.248173] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.248996] cpuidle: using governor ladder
[ 0.249050] cpuidle: using governor menu
[ 0.249388] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.249412] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.265240] SCSI subsystem initialized
[ 0.265762] usbcore: registered new interface driver usbfs
[ 0.265821] usbcore: registered new interface driver hub
[ 0.265921] usbcore: registered new device driver usb
[ 0.266070] media: Linux media interface: v0.10
[ 0.266121] Linux video capture interface: v2.00
[ 0.266257] pps_core: LinuxPPS API ver. 1 registered
[ 0.266271] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.266302] PTP clock support registered
[ 0.266604] Advanced Linux Sound Architecture Driver Initialized.
[ 0.268116] clocksource: Switched to clocksource arch_sys_counter
[ 0.268305] VFS: Disk quotas dquot_6.6.0
[ 0.268385] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.268553] FS-Cache: Loaded
[ 0.275832] NET: Registered protocol family 2
[ 0.276501] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.276572] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.276642] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.276764] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.276815] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.277031] NET: Registered protocol family 1
[ 0.277524] RPC: Registered named UNIX socket transport module.
[ 0.277550] RPC: Registered udp transport module.
[ 0.277562] RPC: Registered tcp transport module.
[ 0.277573] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.278049] kvm [1]: 8-bit VMID
[ 0.278759] kvm [1]: vgic interrupt IRQ16
[ 0.278863] kvm [1]: Hyp mode initialized successfully
[ 0.281446] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.286106] zbud: loaded
[ 0.287740] FS-Cache: Netfs 'nfs' registered for caching
[ 0.288343] NFS: Registering the id_resolver key type
[ 0.288393] Key type id_resolver registered
[ 0.288406] Key type id_legacy registered
[ 0.288426] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.288450] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.289411] fuse init (API version 7.26)
[ 0.294834] async_tx: api initialized (async)
[ 0.294977] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.295150] io scheduler noop registered (default)
[ 0.295170] io scheduler deadline registered
[ 0.295363] io scheduler cfq registered
[ 0.295379] io scheduler mq-deadline registered
[ 0.295530] io scheduler bfq registered
[ 0.296127] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO, pinctrl may not init
[ 0.299668] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.301164] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 0.306111] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.307946] console [ttyS0] disabled
[ 0.328227] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 1.080978] console [ttyS0] enabled
[ 1.094177] loop: module loaded
[ 1.113726] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[ 1.120138] osst :I: Tape driver with OnStream support version 0.99.4
[ 1.120138] osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
[ 1.133490] SCSI Media Changer driver v0.25
[ 1.138474] libphy: Fixed MDIO Bus: probed
[ 1.142581] tun: Universal TUN/TAP device driver, 1.6
[ 1.147868] CAN device driver interface
[ 1.152190] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 1.158018] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.163743] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 1.169751] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000)
[ 1.179293] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.184968] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.192200] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.197870] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.205105] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.210078] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.217464] libphy: stmmac: probed
[ 1.222443] PPP generic driver version 2.4.2
[ 1.226950] PPP BSD Compression module registered
[ 1.231673] PPP Deflate Compression module registered
[ 1.236761] PPP MPPE Compression module registered
[ 1.241563] NET: Registered protocol family 24
[ 1.246121] usbcore: registered new interface driver qmi_wwan
[ 1.251908] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.258444] ehci-platform: EHCI generic platform driver
[ 1.263918] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.269556] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.277672] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 1.298131] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.304423] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.311231] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.318467] usb usb1: Product: EHCI Host Controller
[ 1.323357] usb usb1: Manufacturer: Linux 4.14.111-gffba271 ehci_hcd
[ 1.329722] usb usb1: SerialNumber: 1c1a000.usb
[ 1.334787] hub 1-0:1.0: USB hub found
[ 1.338592] hub 1-0:1.0: 1 port detected
[ 1.343049] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.349289] ohci-platform: OHCI generic platform driver
[ 1.354713] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.361368] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.369321] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.437289] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 1.444106] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.451344] usb usb2: Product: Generic Platform OHCI controller
[ 1.457275] usb usb2: Manufacturer: Linux 4.14.111-gffba271 ohci_hcd
[ 1.463642] usb usb2: SerialNumber: 1c1a400.usb
[ 1.470978] hub 2-0:1.0: USB hub found
[ 1.474781] hub 2-0:1.0: 1 port detected
[ 1.479273] usbcore: registered new interface driver cdc_acm
[ 1.484959] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.493027] usbcore: registered new interface driver usblp
[ 1.498563] usbcore: registered new interface driver cdc_wdm
[ 1.504278] usbcore: registered new interface driver uas
[ 1.509694] usbcore: registered new interface driver usb-storage
[ 1.515793] usbcore: registered new interface driver usbserial
[ 1.521678] usbcore: registered new interface driver usbserial_generic
[ 1.528242] usbserial: USB Serial support registered for generic
[ 1.534291] usbcore: registered new interface driver option
[ 1.539907] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.547030] usbcore: registered new interface driver qcserial
[ 1.552820] usbserial: USB Serial support registered for Qualcomm USB modem
[ 1.560521] mousedev: PS/2 mouse device common for all mice
[ 1.566554] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.573372] sun6i-rtc 1f00000.rtc: RTC enabled
[ 1.577880] i2c /dev entries driver
[ 1.581661] lirc_dev: IR Remote Control driver registered, major 244
[ 1.588177] IR NEC protocol handler initialized
[ 1.592712] IR RC5(x/sz) protocol handler initialized
[ 1.597777] IR RC6 protocol handler initialized
[ 1.602318] IR JVC protocol handler initialized
[ 1.606857] IR Sony protocol handler initialized
[ 1.611483] IR SANYO protocol handler initialized
[ 1.616196] IR Sharp protocol handler initialized
[ 1.620909] IR MCE Keyboard/mouse protocol handler initialized
[ 1.626748] IR LIRC bridge handler initialized
[ 1.631200] IR XMP protocol handler initialized
[ 1.636491] thermal thermal_zone0: failed to read out thermal zone (-16)
[ 1.643687] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.652005] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[ 1.661998] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 1.703182] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.712183] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.720420] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.726002] usbcore: registered new interface driver usbhid
[ 1.731604] usbhid: USB HID core driver
[ 1.745716] Initializing XFRM netlink socket
[ 1.750624] NET: Registered protocol family 10
[ 1.757459] Segment Routing with IPv6
[ 1.761262] NET: Registered protocol family 17
[ 1.765757] NET: Registered protocol family 15
[ 1.770218] can: controller area network core (rev 20170425 abi 9)
[ 1.770532] mmc2: host does not support reading read-only switch, assuming write-enable
[ 1.776502] NET: Registered protocol family 29
[ 1.786979] mmc2: new high speed SDHC card at address 1234
[ 1.788887] can: raw protocol (rev 20170425)
[ 1.794878] mmcblk2: mmc2:1234 SA04G 3.64 GiB
[ 1.798673] can: broadcast manager protocol (rev 20170425 t)
[ 1.798691] can: netlink gateway (rev 20170425) max_hops=1
[ 1.805118] mmcblk2: p1 p2
[ 1.809264] Key type dns_resolver registered
[ 1.821656] Registering SWP/SWPB emulation handler
[ 1.827825] registered taskstats version 1
[ 1.832629] Key type encrypted registered
[ 1.843810] ehci-platform 1c1b000.usb: EHCI Host Controller
[ 1.849479] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[ 1.857767] ehci-platform 1c1b000.usb: irq 28, io mem 0x01c1b000
[ 1.878130] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[ 1.884439] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.891245] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.898484] usb usb3: Product: EHCI Host Controller
[ 1.903376] usb usb3: Manufacturer: Linux 4.14.111-gffba271 ehci_hcd
[ 1.909739] usb usb3: SerialNumber: 1c1b000.usb
[ 1.914888] hub 3-0:1.0: USB hub found
[ 1.918697] hub 3-0:1.0: 1 port detected
[ 1.923366] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[ 1.930032] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[ 1.938023] ohci-platform 1c1b400.usb: irq 29, io mem 0x01c1b400
[ 2.007286] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.014096] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.021332] usb usb4: Product: Generic Platform OHCI controller
[ 2.027266] usb usb4: Manufacturer: Linux 4.14.111-gffba271 ohci_hcd
[ 2.033631] usb usb4: SerialNumber: 1c1b400.usb
[ 2.039050] hub 4-0:1.0: USB hub found
[ 2.042834] hub 4-0:1.0: 1 port detected
[ 2.047449] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 2.059814] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 2.313141] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 2.320405] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01 00:11:23 UTC (683)
[ 2.328872] vcc3v0: disabling
[ 2.331855] vcc5v0: disabling
[ 2.334475] mmc3: new high speed SDIO card at address 0001
[ 2.334844] ALSA device list:
[ 2.343302] #0: Dummy 1
[ 2.345924] #1: Loopback 1
[ 2.372808] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.381008] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.397010] devtmpfs: mounted
[ 2.402150] Freeing unused kernel memory: 2048K
[ 2.425356] random: fast init done
[ 2.515413] EXT4-fs (mmcblk2p2): re-mounted. Opts: data=ordered
[ 2.695746] random: dd: uninitialized urandom read (512 bytes read)
[ 2.853480] Generic PHY stmmac-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[ 2.865840] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 2.873561] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 2.880507] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 5.978716] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 5.987338] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 162.538232] random: crng init done
离线
编译器环境的话,是借用了 licheepi zero 提供的 docker 环境,gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/
离线
感觉是你勾选了 initramfs, 你的 linux image 里面已经一起打包了一个rootfs ?
[ 2.381008] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.397010] devtmpfs: mounted
[ 2.402150] Freeing unused kernel memory: 2048K
[ 2.425356] random: fast init done
[ 2.515413] EXT4-fs (mmcblk2p2): re-mounted. Opts: data=ordered这里有个再次挂载的提示
谢谢站长回复,initramfs 确实勾选,initramfs 不熟悉,请问是会产生矛盾吗,貌似 initramfs 也是常用的。
我现在重新配置编译,重试再回来反馈。
离线
因为这个问题貌似我以前遇到过,如果bootargs和initramfs冲突,就不能进入shell了。
坐等楼主最新进展
晕哥你好,我重新配置 去掉了 initramfs 支持,问题表现依然相同。
reading zImage
5867768 bytes read in 363 ms (15.4 MiB/s)
reading opz.dtb
28715 bytes read in 31 ms (904.3 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 49ff5000, end 49fff02a ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.111-g25f7b00-dirty (root@aa5d611b3dc0) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #4 SMP Mon Nov 18 04:07:04 UTC 2019
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[ 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: Xunlong Orange Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000005bc00000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] percpu: Embedded 17 pages/cpu @dff59000 s37068 r8192 d24372 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk2p2 earlyprintk rw init=/sbin/init
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 436068K/524288K available (10240K kernel code, 390K rwdata, 2072K rodata, 2048K init, 303K bss, 22684K reserved, 65536K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0c00000 (12256 kB)
[ 0.000000] .init : 0xc1000000 - 0xc1200000 (2048 kB)
[ 0.000000] .data : 0xc1200000 - 0xc1261998 ( 391 kB)
[ 0.000000] .bss : 0xc126a89c - 0xc12b65c0 ( 304 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 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] 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.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000200] Console: colour dummy device 80x30
[ 0.000570] console [tty0] enabled
[ 0.000605] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=120000)
[ 0.000631] pid_max: default: 32768 minimum: 301
[ 0.000801] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000824] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001564] CPU: Testing write buffer coherency: ok
[ 0.002023] CPU0: update cpu_capacity 1024
[ 0.002046] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002426] Setting up static identity map for 0x40200000 - 0x40200060
[ 0.002562] Hierarchical SRCU implementation.
[ 0.003137] smp: Bringing up secondary CPUs ...
[ 0.013894] CPU1: update cpu_capacity 1024
[ 0.013901] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.024733] CPU2: update cpu_capacity 1024
[ 0.024738] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.035476] CPU3: update cpu_capacity 1024
[ 0.035482] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.035568] smp: Brought up 1 node, 4 CPUs
[ 0.035648] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[ 0.035662] CPU: All CPU(s) started in HYP mode.
[ 0.035673] CPU: Virtualization extensions available.
[ 0.036394] devtmpfs: initialized
[ 0.042109] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.042677] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.042968] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[ 0.043005] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.045627] xor: measuring software checksum speed
[ 0.095338] arm4regs : 1261.600 MB/sec
[ 0.145393] 8regs : 768.800 MB/sec
[ 0.195456] 32regs : 807.200 MB/sec
[ 0.245512] neon : 1284.800 MB/sec
[ 0.245526] xor: using function: neon (1284.800 MB/sec)
[ 0.245553] pinctrl core: initialized pinctrl subsystem
[ 0.246557] NET: Registered protocol family 16
[ 0.248152] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.248985] cpuidle: using governor ladder
[ 0.249041] cpuidle: using governor menu
[ 0.249389] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.249412] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.265306] SCSI subsystem initialized
[ 0.265814] usbcore: registered new interface driver usbfs
[ 0.265872] usbcore: registered new interface driver hub
[ 0.265973] usbcore: registered new device driver usb
[ 0.266112] media: Linux media interface: v0.10
[ 0.266161] Linux video capture interface: v2.00
[ 0.266299] pps_core: LinuxPPS API ver. 1 registered
[ 0.266313] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.266344] PTP clock support registered
[ 0.266647] Advanced Linux Sound Architecture Driver Initialized.
[ 0.268170] clocksource: Switched to clocksource arch_sys_counter
[ 0.268358] VFS: Disk quotas dquot_6.6.0
[ 0.268437] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.268609] FS-Cache: Loaded
[ 0.275865] NET: Registered protocol family 2
[ 0.276529] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.276598] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.276668] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.276783] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.276834] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.277051] NET: Registered protocol family 1
[ 0.277545] RPC: Registered named UNIX socket transport module.
[ 0.277571] RPC: Registered udp transport module.
[ 0.277582] RPC: Registered tcp transport module.
[ 0.277594] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.277928] kvm [1]: 8-bit VMID
[ 0.278645] kvm [1]: vgic interrupt IRQ16
[ 0.278758] kvm [1]: Hyp mode initialized successfully
[ 0.281406] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.286067] zbud: loaded
[ 0.287698] FS-Cache: Netfs 'nfs' registered for caching
[ 0.288308] NFS: Registering the id_resolver key type
[ 0.288360] Key type id_resolver registered
[ 0.288372] Key type id_legacy registered
[ 0.288394] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.288418] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.289382] fuse init (API version 7.26)
[ 0.294769] async_tx: api initialized (async)
[ 0.294909] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.295091] io scheduler noop registered (default)
[ 0.295110] io scheduler deadline registered
[ 0.295301] io scheduler cfq registered
[ 0.295319] io scheduler mq-deadline registered
[ 0.295471] io scheduler bfq registered
[ 0.296072] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO, pinctrl may not init
[ 0.299561] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.301051] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 0.305997] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.307845] console [ttyS0] disabled
[ 0.328100] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 1.081449] console [ttyS0] enabled
[ 1.094600] loop: module loaded
[ 1.114193] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[ 1.120613] osst :I: Tape driver with OnStream support version 0.99.4
[ 1.120613] osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
[ 1.133978] SCSI Media Changer driver v0.25
[ 1.138940] libphy: Fixed MDIO Bus: probed
[ 1.143044] tun: Universal TUN/TAP device driver, 1.6
[ 1.148350] CAN device driver interface
[ 1.152648] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 1.158485] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.164209] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 1.170205] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000)
[ 1.179742] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.185417] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.192650] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.198313] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.205545] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.210521] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.217903] libphy: stmmac: probed
[ 1.222871] PPP generic driver version 2.4.2
[ 1.227375] PPP BSD Compression module registered
[ 1.232098] PPP Deflate Compression module registered
[ 1.237186] PPP MPPE Compression module registered
[ 1.241988] NET: Registered protocol family 24
[ 1.246550] usbcore: registered new interface driver qmi_wwan
[ 1.252332] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.258869] ehci-platform: EHCI generic platform driver
[ 1.264344] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.269977] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.278100] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 1.298185] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.304476] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.311285] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.318522] usb usb1: Product: EHCI Host Controller
[ 1.323412] usb usb1: Manufacturer: Linux 4.14.111-g25f7b00-dirty ehci_hcd
[ 1.330296] usb usb1: SerialNumber: 1c1a000.usb
[ 1.335379] hub 1-0:1.0: USB hub found
[ 1.339182] hub 1-0:1.0: 1 port detected
[ 1.343650] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.349885] ohci-platform: OHCI generic platform driver
[ 1.355305] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.361957] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.369915] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.437344] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 1.444155] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.451397] usb usb2: Product: Generic Platform OHCI controller
[ 1.457333] usb usb2: Manufacturer: Linux 4.14.111-g25f7b00-dirty ohci_hcd
[ 1.464221] usb usb2: SerialNumber: 1c1a400.usb
[ 1.471555] hub 2-0:1.0: USB hub found
[ 1.475355] hub 2-0:1.0: 1 port detected
[ 1.479838] usbcore: registered new interface driver cdc_acm
[ 1.485523] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.493588] usbcore: registered new interface driver usblp
[ 1.499124] usbcore: registered new interface driver cdc_wdm
[ 1.504839] usbcore: registered new interface driver uas
[ 1.510249] usbcore: registered new interface driver usb-storage
[ 1.516351] usbcore: registered new interface driver usbserial
[ 1.522233] usbcore: registered new interface driver usbserial_generic
[ 1.528800] usbserial: USB Serial support registered for generic
[ 1.534848] usbcore: registered new interface driver option
[ 1.540466] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.547583] usbcore: registered new interface driver qcserial
[ 1.553377] usbserial: USB Serial support registered for Qualcomm USB modem
[ 1.561072] mousedev: PS/2 mouse device common for all mice
[ 1.567101] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.573918] sun6i-rtc 1f00000.rtc: RTC enabled
[ 1.578492] i2c /dev entries driver
[ 1.582199] lirc_dev: IR Remote Control driver registered, major 244
[ 1.588702] IR NEC protocol handler initialized
[ 1.593255] IR RC5(x/sz) protocol handler initialized
[ 1.598316] IR RC6 protocol handler initialized
[ 1.602846] IR JVC protocol handler initialized
[ 1.607384] IR Sony protocol handler initialized
[ 1.612010] IR SANYO protocol handler initialized
[ 1.616722] IR Sharp protocol handler initialized
[ 1.621436] IR MCE Keyboard/mouse protocol handler initialized
[ 1.627276] IR LIRC bridge handler initialized
[ 1.631728] IR XMP protocol handler initialized
[ 1.637009] thermal thermal_zone0: failed to read out thermal zone (-16)
[ 1.644210] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.652516] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[ 1.662512] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 1.703236] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.712251] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.720488] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.726068] usbcore: registered new interface driver usbhid
[ 1.731668] usbhid: USB HID core driver
[ 1.745770] Initializing XFRM netlink socket
[ 1.750674] NET: Registered protocol family 10
[ 1.757509] Segment Routing with IPv6
[ 1.761316] NET: Registered protocol family 17
[ 1.765811] NET: Registered protocol family 15
[ 1.770271] can: controller area network core (rev 20170425 abi 9)
[ 1.770591] mmc2: host does not support reading read-only switch, assuming write-enable
[ 1.776552] NET: Registered protocol family 29
[ 1.787028] mmc2: new high speed SDHC card at address 1234
[ 1.788940] can: raw protocol (rev 20170425)
[ 1.794939] mmcblk2: mmc2:1234 SA04G 3.64 GiB
[ 1.798725] can: broadcast manager protocol (rev 20170425 t)
[ 1.798740] can: netlink gateway (rev 20170425) max_hops=1
[ 1.799148] Key type dns_resolver registered
[ 1.805201] mmcblk2: p1 p2
[ 1.809125] Registering SWP/SWPB emulation handler
[ 1.827628] registered taskstats version 1
[ 1.832452] Key type encrypted registered
[ 1.843658] ehci-platform 1c1b000.usb: EHCI Host Controller
[ 1.849323] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[ 1.857596] ehci-platform 1c1b000.usb: irq 28, io mem 0x01c1b000
[ 1.878184] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[ 1.884488] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.891293] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.898532] usb usb3: Product: EHCI Host Controller
[ 1.903421] usb usb3: Manufacturer: Linux 4.14.111-g25f7b00-dirty ehci_hcd
[ 1.910305] usb usb3: SerialNumber: 1c1b000.usb
[ 1.915423] hub 3-0:1.0: USB hub found
[ 1.919239] hub 3-0:1.0: 1 port detected
[ 1.923912] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[ 1.930575] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[ 1.938574] ohci-platform 1c1b400.usb: irq 29, io mem 0x01c1b400
[ 2.007345] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 2.014159] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.021394] usb usb4: Product: Generic Platform OHCI controller
[ 2.027327] usb usb4: Manufacturer: Linux 4.14.111-g25f7b00-dirty ohci_hcd
[ 2.034214] usb usb4: SerialNumber: 1c1b400.usb
[ 2.039874] hub 4-0:1.0: USB hub found
[ 2.043677] hub 4-0:1.0: 1 port detected
[ 2.048311] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 2.060634] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 2.313195] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 2.320445] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01 01:09:22 UTC (4162)
[ 2.329008] vcc3v0: disabling
[ 2.331992] vcc5v0: disabling
[ 2.334526] mmc3: new high speed SDIO card at address 0001
[ 2.334983] ALSA device list:
[ 2.343439] #0: Dummy 1
[ 2.346061] #1: Loopback 1
[ 2.372850] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.381058] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.397095] devtmpfs: mounted
[ 2.402227] Freeing unused kernel memory: 2048K
[ 2.417772] random: fast init done
[ 2.514604] EXT4-fs (mmcblk2p2): re-mounted. Opts: data=ordered
[ 2.699354] random: dd: uninitialized urandom read (512 bytes read)
[ 2.856943] Generic PHY stmmac-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[ 2.869264] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 2.877018] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 2.883992] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 5.978771] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 5.987394] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 170.258282] random: crng init done
离线
console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk2p2 earlyprintk rw init=/sbin/init
去掉这个console=tty0试一试.
!谢谢晕哥的指点。
把 consolo=tty0 去掉之后,确实可以成功登录了。
也就是说原来是因为 控制台跑偏了导致没有回显了。
嵌入式确实有太多的东西需要学习,包括这行 bootargs, 也是好几个参数一知半解,是从其他项目抄过来的,还请晕哥再指导一下 console 的用法。
之后我有时间的话会把我这次折腾汇总到这里。
离线
有没有试下7楼的修改?
有的,可以成功登录,太粗心了,乱拷贝拼凑错了
离线
解决了就好, 同时也感谢楼主分享经验!
请问有没有H2 u-boot 启用 ethernet 的相关步奏?
使能 u-boot 以太网 ethernet :我经历以下步骤
1. u-boot 驱动支持
Device Drivers > Network device support
打勾: Allwinner Sun8i Ethernet MAC support
2. u-boot dts 选择
Device Tree Control-> sun8i-h2-plus-orangepi-zero
注意不需要后缀。 文件在 u-boot 源码目录 arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
3. 验证
日志:
U-Boot 2017.11-g85a7997-dirty (Nov 14 2019 - 09:02:51 +0000) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Zero
DRAM: 512 MiB
CPU Freq: 1008MHz
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
In: serial
Out: serial
Err: serial
Net: phy interface0
eth0: ethernet@1c30000
最后两行包含 ethernet 的信息。
dhcp 命令自动分配获取ip地址
ping 命令可以测试网络是否通
源码我上面有提到,用到是 nanopi 的源码,但是板子是 orangepi 的,所以要选对 Device Tree Control-> 对应板子的设备树名字
离线
第一次在whycan 发帖,我觉得晕哥真的很热心,也比较感慨于qq群这种交流方式不适合技术讨论,大部分时候无法把重点放在技术问题解决上。
抱着试一下的心态没想到收获挺多。
谢谢提供这么好的平台!
离线
记录的 OrangePi zero 系统构建过程记录在新帖子:
OrangePi zero 最小软件系统构建过程记录 : https://whycan.cn/t_3253.html#p27995
离线