您尚未登录。

楼主 # 2022-04-20 10:33:55

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

挂载nfs失败。

启动信息如下:

U-Boot 2021.04 (Apr 18 2022 - 10:08:05 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 53C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
[*]-Video Link 0 (480 x 272)
        [0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
flash target is MMC:1
Net:   eth1: ethernet@20b4000 [PRIME]Get shared mii bus on ethernet@2188000
, eth0: ethernet@2188000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
9402352 bytes read in 210 ms (42.7 MiB/s)
Failed to load 'imx6ull-14x14-emmc-c.dtb'
Kernel image @ 0x80800000 [ 0x000000 - 0x8f77f0 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300bfff
Modify /soc/bus@2200000/epdc@228c000 disabled

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.15.5 (any@Any-Desktop) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.1 20220111, GNU ld (GNU Toolchain2
[    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: Freescale i.MX6 ULL 14x14 EVK Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x96000000, size 160 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s17036 r8192 d23924 u49152
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=tty1 console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/buildroot,proto=tcp rw ip=192.168.1.108:192.168.1.104:1c
[    0.000000] Unknown kernel command line parameters "nit=/linuxrc", will be passed to user space.
[    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: 334712K/524288K available (12288K kernel code, 1339K rwdata, 4284K rodata, 1024K init, 429K bss, 25736K reserved, 163840K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000]  Trampoline 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=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x484/0x650 with crng_init=0
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000053] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.002944] Console: colour dummy device 80x30
[    0.004362] printk: console [tty1] enabled
[    0.004469] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.004570] pid_max: default: 32768 minimum: 301
[    0.004945] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.005044] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.006958] CPU: Testing write buffer coherency: ok
[    0.007556] CPU0: update cpu_capacity 1024
[    0.007643] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.009236] Setting up static identity map for 0x80100000 - 0x80100060
[    0.009617] rcu: Hierarchical SRCU implementation.
[    0.010743] smp: Bringing up secondary CPUs ...
[    0.010821] smp: Brought up 1 node, 1 CPU
[    0.010885] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.010951] CPU: All CPU(s) started in SVC mode.
[    0.011940] devtmpfs: initialized
[    0.028425] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.029084] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.029208] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.041751] pinctrl core: initialized pinctrl subsystem
[    0.044434] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.062235] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.065270] thermal_sys: Registered thermal governor 'step_wise'
[    0.065670] cpuidle: using governor menu
[    0.066140] CPU identified as i.MX6ULL, silicon rev 1.1
[    0.095830] vdd3p0: supplied by regulator-dummy
[    0.096927] cpu: supplied by regulator-dummy
[    0.098464] vddsoc: supplied by regulator-dummy
[    0.134617] No ATAGs?
[    0.134807] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.134895] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.137893] imx6ul-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[    0.138874] imx6ul-pinctrl 2290000.iomuxc-snvs: no groups defined in /soc/bus@2200000/iomuxc-snvs@2290000
[    0.139033] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
[    0.142116] imx mu driver is registered.
[    0.143215] imx rpmsg driver is registered.
[    0.179684] Kprobes globally optimized
[    0.220467] vgaarb: loaded
[    0.222686] SCSI subsystem initialized
[    0.223885] usbcore: registered new interface driver usbfs
[    0.224093] usbcore: registered new interface driver hub
[    0.224259] usbcore: registered new device driver usb
[    0.227986] i2c i2c-0: IMX I2C adapter registered
[    0.231239] i2c 1-003c: Fixing up cyclic dependency with 21c4000.csi
[    0.232058] i2c i2c-1: IMX I2C adapter registered
[    0.233329] mc: Linux media interface: v0.10
[    0.233498] videodev: Linux video capture interface: v2.00
[    0.233817] pps_core: LinuxPPS API ver. 1 registered
[    0.233882] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.233995] PTP clock support registered
[    0.237237] MIPI CSI2 driver module loaded
[    0.237442] Advanced Linux Sound Architecture Driver Initialized.
[    0.239357] Bluetooth: Core ver 2.22
[    0.239544] NET: Registered PF_BLUETOOTH protocol family
[    0.239611] Bluetooth: HCI device and connection manager initialized
[    0.239692] Bluetooth: HCI socket layer initialized
[    0.239750] Bluetooth: L2CAP socket layer initialized
[    0.239837] Bluetooth: SCO socket layer initialized
[    0.241116] clocksource: Switched to clocksource mxc_timer1
[    0.241611] VFS: Disk quotas dquot_6.6.0
[    0.241835] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.263128] NET: Registered PF_INET protocol family
[    0.263548] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.265580] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.265750] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.265930] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.266138] TCP: Hash tables configured (established 4096 bind 4096)
[    0.266386] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.266509] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.266949] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.268403] RPC: Registered named UNIX socket transport module.
[    0.268505] RPC: Registered udp transport module.
[    0.268554] RPC: Registered tcp transport module.
[    0.268602] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.270882] PCI: CLS 0 bytes, default 64
[    0.272121] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.276673] Bus freq driver module loaded
[    0.279013] Initialise system trusted keyrings
[    0.280220] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.295922] NFS: Registering the id_resolver key type
[    0.296079] Key type id_resolver registered
[    0.296129] Key type id_legacy registered
[    0.296401] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.296476] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.296616] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.297910] fuse: init (API version 7.34)
[    0.534985] Key type asymmetric registered
[    0.535081] Asymmetric key parser 'x509' registered
[    0.535309] io scheduler mq-deadline registered
[    0.535378] io scheduler kyber registered
[    0.545686] pwm-backlight backlight-display: supply power not found, using dummy regulator
[    0.556714] mxsfb 21c8000.lcdif: supply lcd not found, using dummy regulator
[    0.667885] sii902x bound to mxs-lcdif from 21c8000.lcdif
[    0.671999] Console: switching to colour frame buffer device 60x34
[    0.770208] mxsfb 21c8000.lcdif: initialized
[    0.780215] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    0.782284] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[    0.789942] mxs-dma 1804000.dma-apbh: initialized
[    0.799757] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 28, base_baud = 5000000) is a IMX
[    1.635681] printk: console [ttymxc0] enabled
[    1.644453] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 74, base_baud = 5000000) is a IMX
[    1.659479] imx sema4 driver is registered.
[    1.701980] brd: module loaded
[    1.722962] loop: module loaded
[    1.730362] imx ahci driver is registered.
[    1.737874] SPI driver mtd_dataflash has no spi_device_id for atmel,at45
[    1.748127] SPI driver mtd_dataflash has no spi_device_id for atmel,dataflash
[    1.764593] spi-nor spi4.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    1.778674] gpio-505 (eth0-phy): hogged as output/high
[    1.785986] gpio-506 (eth1-phy): hogged as output/high
[    1.797212] libphy: Fixed MDIO Bus: probed
[    1.804603] CAN device driver interface
[    1.814891] pps pps0: new PPS source ptp0
[    1.825622] libphy: fec_enet_mii_bus: probed
[    1.836775] fec 20b4000.ethernet eth0: registered PHC device 0
[    1.849461] pps pps1: new PPS source ptp1
[    1.860785] fec 2188000.ethernet eth1: registered PHC device 1
[    1.872154] usbcore: registered new interface driver r8152
[    1.881058] usbcore: registered new interface driver lan78xx
[    1.890383] usbcore: registered new interface driver asix
[    1.897825] usbcore: registered new interface driver ax88179_178a
[    1.907526] usbcore: registered new interface driver cdc_ether
[    1.916958] usbcore: registered new interface driver smsc95xx
[    1.926357] usbcore: registered new interface driver net1080
[    1.935598] usbcore: registered new interface driver cdc_subset
[    1.945222] usbcore: registered new interface driver zaurus
[    1.954588] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.965943] usbcore: registered new interface driver cdc_ncm
[    1.975529] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.985938] ehci-pci: EHCI PCI platform driver
[    1.992700] usbcore: registered new interface driver usb-storage
[    2.010263] input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    2.029702] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[    2.040023] SPI driver ads7846 has no spi_device_id for ti,ads7843
[    2.050247] SPI driver ads7846 has no spi_device_id for ti,ads7845
[    2.060400] SPI driver ads7846 has no spi_device_id for ti,ads7873
[    2.073605] input: iMX6UL Touchscreen Controller as /devices/platform/soc/2000000.bus/2040000.tsc/input/input1
[    2.094750] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    2.104979] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T01:25:42 UTC (5142)
[    2.118678] i2c_dev: i2c /dev entries driver
[    2.128971] pxp-v4l2 pxp_v4l2: initialized
[    2.142285] Bluetooth: HCI UART driver ver 2.3
[    2.148727] Bluetooth: HCI UART protocol H4 registered
[    2.155893] Bluetooth: HCI UART protocol BCSP registered
[    2.163246] Bluetooth: HCI UART protocol LL registered
[    2.170293] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.180129] Bluetooth: HCI UART protocol Marvell registered
[    2.189316] usbcore: registered new interface driver btusb
[    2.200559] sdhci: Secure Digital Host Controller Interface driver
[    2.210308] sdhci: Copyright(c) Pierre Ossman
[    2.216453] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.229024] sdhci-esdhc-imx 2190000.mmc: Got CD GPIO
[    2.250710] usbcore: registered new interface driver usbhid
[    2.260994] usbhid: USB HID core driver
[    2.269177] mma8452 0-001e: supply vdd not found, using dummy regulator
[    2.279452] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA
[    2.290719] mma8452 0-001e: supply vddio not found, using dummy regulator
[    2.302485] mmc0: SDHCI controller on 2190000.mmc [2190000.mmc] using ADMA
[    2.319182] random: fast init done
[    2.341710] wm8960 1-001a: Failed to issue reset
[    2.353407] rpmsg-codec-wm8960 1-001a: Failed to issue reset
[    2.384449] NET: Registered PF_LLC protocol family
[    2.392764] NET: Registered PF_INET6 protocol family
[    2.403527] Segment Routing with IPv6
[    2.409486] In-situ OAM (IOAM) with IPv6
[    2.415678] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.426936] mmc1: new HS200 MMC card at address 0001
[    2.435162] NET: Registered PF_PACKET protocol family
[    2.443822] mmcblk1: mmc1:0001 8GTF4R 7.28 GiB 
[    2.450456] can: controller area network core
[    2.460538] NET: Registered PF_CAN protocol family
[    2.467369]  mmcblk1: p1 p2
[    2.473730] mmcblk1boot0: mmc1:0001 8GTF4R 4.00 MiB 
[    2.480707] can: raw protocol
[    2.485542] can: broadcast manager protocol
[    2.494777] mmcblk1boot1: mmc1:0001 8GTF4R 4.00 MiB 
[    2.501669] can: netlink gateway - max_hops=1
[    2.511527] Bluetooth: RFCOMM TTY layer initialized
[    2.518115] Bluetooth: RFCOMM socket layer initialized
[    2.525142] mmcblk1rpmb: mmc1:0001 8GTF4R 512 KiB, chardev (244:0)
[    2.534791] Bluetooth: RFCOMM ver 1.11
[    2.540203] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.547178] Bluetooth: BNEP filters: protocol multicast
[    2.554116] Bluetooth: BNEP socket layer initialized
[    2.560640] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.569626] Bluetooth: HIDP socket layer initialized
[    2.576668] lib80211: common routines for IEEE802.11 drivers
[    2.585676] Key type dns_resolver registered
[    2.624967] Registering SWP/SWPB emulation handler
[    2.632830] Loading compiled-in X.509 certificates
[    2.676206] imx_usb 2184000.usb: No over current polarity defined
[    2.862289] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.870644] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    2.911404] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    2.919008] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    2.930684] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.941658] usb usb1: Product: EHCI Host Controller
[    2.950239] usb usb1: Manufacturer: Linux 5.15.5 ehci_hcd
[    2.958432] usb usb1: SerialNumber: ci_hdrc.1
[    2.964697] hub 1-0:1.0: USB hub found
[    2.969434] hub 1-0:1.0: 1 port detected
[    2.977343] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    3.074176] Micrel KSZ8081 or KSZ8091 20b4000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=20b4000.ethernet-1:01, irq=POLL)
[    6.251925] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    6.267076] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    6.291198] IP-Config: Complete:
[    6.295794]      device=eth0, hwaddr=76:7d:33:a8:f0:e7, ipaddr=192.168.1.108, mask=255.255.255.0, gw=192.168.1.1
[    6.308784]      host=192.168.1.108, domain=, nis-domain=(none)
[    6.317813]      bootserver=192.168.1.104, rootserver=192.168.1.104, rootpath=
[    6.318896] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.342003] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.350597] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    6.361383] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    6.371494] ALSA device list:
[    6.375441]   No soundcards found.
[   36.971281] VSD_3V3: disabling
[   36.978063] can-3v3: disabling
[   64.531642] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[   64.548522] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[   69.611695] cfg80211: failed to load regulatory.db
[  102.276977] VFS: Unable to mount root fs via NFS.
[  102.283757] devtmpfs: mounted
[  102.290889] Freeing unused kernel image (initmem) memory: 1024K
[  102.322667] Run /sbin/init as init process
[  102.331012] Run /etc/init as init process
[  102.339413] Run /bin/init as init process
[  102.348983] Run /bin/sh as init process
[  102.354050] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[  102.370612] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

以上内容太长,截取最后部分:

[    6.350597] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    6.361383] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    6.371494] ALSA device list:
[    6.375441]   No soundcards found.
[   36.971281] VSD_3V3: disabling
[   36.978063] can-3v3: disabling
[   64.531642] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[   64.548522] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[   69.611695] cfg80211: failed to load regulatory.db
[  102.276977] VFS: Unable to mount root fs via NFS.
[  102.283757] devtmpfs: mounted
[  102.290889] Freeing unused kernel image (initmem) memory: 1024K
[  102.322667] Run /sbin/init as init process
[  102.331012] Run /etc/init as init process
[  102.339413] Run /bin/init as init process
[  102.348983] Run /bin/sh as init process
[  102.354050] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[  102.370612] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

PC上/etc/export文件:

/home/any/MPU/imx6ul/nfs/debian *(rw,sync,no_root_squash)
/home/any/MPU/imx6ul/nfs/buildroot *(rw,sync,no_root_squash)

imx6ul的uboot中的env:

baudrate=115200
board_name=EVK
board_rev=14X14
boot_fdt=try
bootargs=console=tty1 console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/buildroot,proto=tcp rw ip=192.168.1.108:192.168.1.104:192.168.1.1:255.255.255.0::ec
bootcmd=fatload mmc 1:1 80800000 zImage; fatload mmc 1:1 83000000 imx6ull-14x14-emmc-c.dtb; bootz 80800000 - 83000000
bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; ;
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
emmc_ack=1
emmc_dev=1
eth0addr=32:34:46:78:9A:DC
eth1=32:34:46:78:9A:DD
eth1addr=76:7d:33:a8:f0:e7
ethact=ethernet@20b4000
ethaddr=ca:38:29:c3:28:30
ethprime=eth1
fastboot_buffer=0x83000000
fastboot_bytes=8a6e
fastboot_dev=mmc1
fdt_addr=0x83000000
fdt_file=undefined
fdt_high=0xffffffff
fdtcontroladdr=9de7a7a0
fileaddr=80800000
filesize=8f77f0
findfdt=if test $fdt_file = undefined; then if test $board_name = ULZ-EVK && test $board_rev = 14X14; then setenv fdt_file imx6ulz-14x14-evk.dtb; fi; if test $board_name = EVK && test $boa;
findtee=if test $tee_file = undefined; then if test $board_name = ULZ-EVK && test $board_rev = 14X14; then setenv tee_file uTee-6ulzevk; fi; if test $board_name = EVK && test $board_rev = ;
gatewayip=192.168.1.1
image=zImage
initrd_addr=0x86800000
initrd_high=0xffffffff
ip_dyn=yes
ipaddr=192.168.1.253
kboot=bootz 
loadaddr=0x80800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused 
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${tee} = yes; then run loadfdt; run loadtee; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = t;
mmccmd=setenv bootcmd run findfdt,run findtee,mmc dev ${mmcdev},mmc dev ${mmcdev}, if mmc rescan, then if run loadbootscript, then run bootscript, else if run loadimage, then run mmcboot, i
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk1p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; ${usb_net_cmd}; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${tee} = yes; ;
netmask=255.255.255.0
nfsargs=setenv bootargs console=tty1 console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/debian rw ip=192.168.1.108:192.168.1.104:192.168.1.1:255.255.255.0:f
script=boot.scr
sd_dev=1
serial#=352571d2677f14a9
serverip=192.168.1.104
splashimage=0x8c000000
tee=no
tee_addr=0x84000000
tee_file=undefined

Environment size: 4172/8188 bytes

bootargs:

bootargs=console=tty1 console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/buildroot,proto=tcp rw ip=192.168.1.108:192.168.1.104:192.168.1.1:255.255.255.0::eth0:off nit=/linuxrc

bootcmd:

bootcmd=fatload mmc 1:1 80800000 zImage; fatload mmc 1:1 83000000 imx6ull-14x14-emmc-c.dtb; bootz 80800000 - 83000000

离线

#1 2022-04-20 10:39:20

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 挂载nfs失败。

做两个测试:
① 用 flash/eMMC 启动 imx6ul,通过你上面的命令行挂载 nfs,看是否正常。
② 在别的电脑,用上面的命令行挂载 nfs, 看是否正常。





离线

楼主 #2 2022-04-21 17:48:19

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

Re: 挂载nfs失败。

emmc启动板子,运行deiban,安装nfs-common,可以挂载pc上的nfs文件夹。
所以,还是板子上的环境变量设置有问题。
目前bootargs:

setenv bootargs 'console=tty1 console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/debian,proto=tcp rw ip=192.168.1.108:192.168.1.104:127.0.0.1:255.0.0.0::eth0:off init=/linuxrc'

离线

#3 2022-04-21 20:52:18

benlypan
会员
注册时间: 2021-07-08
已发帖子: 49
积分: 133.5

Re: 挂载nfs失败。

内核参数加上 nfsrootdebug=1 可以看到 nfs 挂载过程的日志。另外,试试 nfsroot 加上 v3 参数(nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/debian,v3),这么新的内核版本默认应该是 v4,我这使用 v4 起不来,也没去细究原因。

离线

楼主 #4 2022-04-22 09:04:20

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

Re: 挂载nfs失败。

benlypan 说:

内核参数加上 nfsrootdebug=1 可以看到 nfs 挂载过程的日志。另外,试试 nfsroot 加上 v3 参数(nfsroot=192.168.1.104:/home/any/MPU/imx6ul/nfs/debian,v3),这么新的内核版本默认应该是 v4,我这使用 v4 起不来,也没去细究原因。


加上v3确实有用。感谢。

[    2.823377] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C                                                                                  
[    2.924298] Micrel KSZ8081 or KSZ8091 20b4000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=20b4000.ethernet-1:01, irq=POLL)                                                                    
[    6.091865] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx                                                                                                                  
[    6.111196] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                                                                                                                                    
[    6.141168] IP-Config: Complete:                                                                                                                                                                       
[    6.145741]      device=eth0, hwaddr=32:34:46:78:9a:de, ipaddr=192.168.1.108, mask=255.0.0.0, gw=127.0.0.1                                                                                             
[    6.158286]      host=192.168.1.108, domain=, nis-domain=(none)                                                                                                                                        
[    6.167293]      bootserver=192.168.1.104, rootserver=192.168.1.104, rootpath=                                                                                                                         
[    6.168598] IP-Config: Gateway not on directly connected network                                                                                                                                       
[    6.185589] cfg80211: Loading compiled-in X.509 certificates for regulatory database                                                                                                                   
[    6.199366] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'                                                                                                                                 
[    6.208387] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2                                                                                                         
[    6.219460] ALSA device list:                                                                                                                                                                          
[    6.223511]   No soundcards found.                                                                                                                                                                     
[    6.229203] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db                                                                                                                   
[    6.266015] VFS: Mounted root (nfs filesystem) on device 0:15.                                                                                                                                         
[    6.277839] devtmpfs: mounted                                                                                                                                                                          
[    6.286119] Freeing unused kernel image (initmem) memory: 1024K                                                                                                                                        
[    6.301509] Run /linuxrc as init process                                                                                                                                                               
[    6.308394] Kernel panic - not syncing: Requested init /linuxrc failed (error -2).                                                                                                                     
[    6.318730] ---[ end Kernel panic - not syncing: Requested init /linuxrc failed (error -2). ]---   

好象是挂载了,但是没找到/linuxrc文件?

-------------------------------------------

网上搜到的解决办法:

错误现象:busybox做文件系统时,初学者会遇到挂载文件系统错误,Requested init /linuxrc failed (error -2).
解决办法:将busybox编译改为静态编译时,挂载文件系统顺利,这是因为shared方式时,busybox编出来的文件系统不带动态库,或者开发者没有将动态库复制完整,供参考,少走弯路
[ ] Build BusyBox as a static binary (no shared libs) 

但是,我这里是用debootstrip制作的根文件系统啊。

-------------------------------------------------------------------

把bootargs里的init=/linuxrc去掉,可以挂载nfs了。
之前挂载不成功,可能是ip网关设置不正确,我这里是多层路由器,网关不是192.168.1.1。

最近编辑记录 Gentlepig (2022-04-22 11:40:34)

离线

楼主 #5 2022-04-22 09:53:44

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

Re: 挂载nfs失败。

现在又卡debian启动了。
其实一开始挂载成功了,只不过登陆帐号我输入root,总是提示我不正确,连密码都没让我输入。
然后我又去pc上chroot,passwd root冲设了下密码,结果再将这个文件夹复制到nfs目录(用的cp -arf),结果启动debian就一直卡这里。

[  OK  ] Started Discard unused blocks once a week.                                                                                                                                                       
[  OK  ] Started Daily apt upgrade and clean activities.                                                                                                                                                  
[  OK  ] Started Periodic ext4 Online Metadata Check for All Filesystems.                                                                                                                                 
[  OK  ] Reached target Timers.                                                                                                                                                                           
[FAILED] Failed to start xrdp session manager.                                                                                                                                                            
See 'systemctl status xrdp-sesman.service' for details.                                                                                                                                                   
[DEPEND] Dependency failed for xrdp daemon.                                                                                                                                                               
[FAILED] Failed to start System Logging Service.                                                                                                                                                          
See 'systemctl status rsyslog.service' for details.                                                                                                                                                       
[FAILED] Failed to start Remove Stale Online ext4 Metadata Check Snapshots.                                                                                                                               
See 'systemctl status e2scrub_reap.service' for details.                                                                                                                                                  
[  OK  ] Started Permit User Sessions.                                                                                                                                                                    
[FAILED] Failed to start Login Service.                                                                                                                                                                   
See 'systemctl status systemd-logind.service' for details.                                                                                                                                                
[FAILED] Failed to start RealtimeKit Scheduling Policy Service.                                                                                                                                           
See 'systemctl status rtkit-daemon.service' for details. 

有时候提示a start job is running for xxx.

-----------------------------------------------------------

将nfs目录删除,重新复制debian目录过来,然后chmod、chown给予目录权限,可以登陆了。

最近编辑记录 Gentlepig (2022-04-22 10:02:34)

离线

楼主 #6 2022-04-22 11:03:23

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

Re: 挂载nfs失败。

在nfs启动后,将打包好的跟文件系统解压到/dev/mmcblk1p2上,然后从emmc启动。bootcmd和bootargs按默认的来,结果仍是报错。感觉好像还是和Init=/linuxrc有关,但是不知道环境变量里是那里设置了。

[    2.717234] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db                                                                                                                   
[    2.725855] EXT4-fs (mmcblk1p2): mounting ext3 file system using the ext4 subsystem                                                                                                                    
[    2.753646] EXT4-fs (mmcblk1p2): recovery complete                                                                                                                                                     
[    2.758709] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.                                                                                            
[    2.768729] VFS: Mounted root (ext3 filesystem) on device 179:2.                                                                                                                                       
[    2.775432] devtmpfs: error mounting -2                                                                                                                                                                
[    2.781136] Freeing unused kernel image (initmem) memory: 1024K                                                                                                                                        
[    2.787477] Run /sbin/init as init process                                                                                                                                                             
[    2.791903] Run /etc/init as init process                                                                                                                                                              
[    2.796133] Run /bin/init as init process                                                                                                                                                              
[    2.800580] Run /bin/sh as init process                                                                                                                                                                
[    2.804589] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.                                         
[    2.818786] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---                           

按说,我板子上emmc是ext4分区,PC上建立debian跟文件系统的ubuntu也是ext4格式。

----------------------------

是解压的问题,解压出来竟然还多了个外层目录,将所有文件移出来就好了。

目前有个碍眼的地方:

EXT4-fs (mmcblk1p2): mounting ext3 file system using the ext4 subsystem

-------------------------------------------
bootargs里加上rootfstype=ext4就可以了。
注意uboot默认命令的话,mmcargs会重写bootargs,所以在mmcargs里加上也可以。

最近编辑记录 Gentlepig (2022-04-22 11:59:52)

离线

楼主 #7 2022-04-22 13:57:43

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,380
积分: 1345.5

Re: 挂载nfs失败。

debian11没有ifconfig和udhcpc,但是有ip命令,执行ip addr后自动分配地址。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn