yick 发表于 2018-8-13 14:18:49

移植4.1内核时遇到devtmpfs: error mounting -2这样的问...

本帖最后由 yick 于 2018-8-13 15:45 编辑

具体是这样的,用的是飞凌的开发板:
芯片 iMX6UL,
NAND flash 256M
DDR 256M
设备树 imx6ul-14x14-evk-gpmi-7.dtb

原有的u-boot+zImage+logo+dtbs+rootfs是没问题的,但是内核是3.14的。

现在我想用4.1的内核来替换3.14的内核,
设备树没有变(因为开发板本身没变),
uboot没有变,
logo文件没有变,
文件系统没有变,
然后在4.1内核中编译yaffs2文件系统,然后通过 mfgtools工具烧录进去。
然后重新上电启动出现: devtmpfs: error mounting -2 这个错误。(在网上搜了好多资料,解决不了)

详细打印信息如下:
U-Boot 2015.04-g3989e3c (Dec 14 2017 - 19:04:37)
                                                
CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature 39 C                  
Reset cause: POR      
Board: MX6UL 14x14 EVK
I2C:   ready         
DRAM:256 MiB
NAND:256 MiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment
                                                
Display: TFT70AB (800x480)
Video: 800x480x24         
               
NAND read: device 0 offset 0x400000, size 0x80000
524288 bytes read: OK                           
                     
NAND read: device 0 offset 0x400000, size 0x80000
524288 bytes read: OK                           
display bmp cfb_console.c
In:    serial            
Out:   serial
Err:   serial
Net:   FEC0
Error: FEC0 address not set.
                           
Normal Boot
Hit any key to stop autoboot:0
nand boot..........            
                  
NAND read: device 0 offset 0xa00000, size 0x800000
8388608 bytes read: OK                           
                     
NAND read: device 0 offset 0x700000, size 0x40000
262144 bytes read: OK                           
Kernel image @ 0x80800000 [ 0x000000 - 0x55e8f8 ]
## Flattened Device Tree blob at 83000000      
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300c7c5
                                                      
Starting kernel ...
                  
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.15 (root@Ding) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #2 SMP PREEMPT Fri Aug 10 20:14:33 CST 2018
[    0.000000] CPU: ARMv7 Processor revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
[    0.000000] cma: Reserved 64 MiB at 0x8c000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 12 pages/cpu @8bdb1000 s16768 r8192 d24192 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.Total pages: 65024
[    0.000000] Kernel command line: console=ttymxc0,115200 cma=64M root=/dev/mtdblock5 rootfstype=yaffs2,calibrate=y
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 183512K/262144K available (6957K kernel code, 319K rwdata, 2364K rodata, 404K init, 424K bss, 13096K 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 : 0x90800000 - 0xff000000   (1768 MB)
[    0.000000]   lowmem: 0x80000000 - 0x90000000   ( 256 MB)
[    0.000000]   pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]   modules : 0x7f000000 - 0x7fe00000   (14 MB)
[    0.000000]       .text : 0x80008000 - 0x80922a30   (9323 kB)
[    0.000000]       .init : 0x80923000 - 0x80988000   ( 404 kB)
[    0.000000]       .data : 0x80988000 - 0x809d7e80   ( 320 kB)
[    0.000000]      .bss : 0x809da000 - 0x80a44368   ( 425 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]Additional per-CPU info printed with stalls.
[    0.000000]RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at arch/arm/mach-imx/gpc.c:608 imx_gpc_check_dt+0x4c/0x84()
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.15 #2
[    0.000000] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[    0.000000] [<80016b64>] (unwind_backtrace) from [<80012878>] (show_stack+0x10/0x14)
[    0.000000] [<80012878>] (show_stack) from [<8069511c>] (dump_stack+0x74/0xd0)
[    0.000000] [<8069511c>] (dump_stack) from [<80038e54>] (warn_slowpath_common+0x78/0xb0)
[    0.000000] [<80038e54>] (warn_slowpath_common) from [<80038ea8>] (warn_slowpath_null+0x1c/0x24)
[    0.000000] [<80038ea8>] (warn_slowpath_null) from [<809310ec>] (imx_gpc_check_dt+0x4c/0x84)
[    0.000000] [<809310ec>] (imx_gpc_check_dt) from [<80944624>] (imx6ul_init_irq+0x8/0x18)
[    0.000000] [<80944624>] (imx6ul_init_irq) from [<80926368>] (init_IRQ+0x28/0x80)
[    0.000000] [<80926368>] (init_IRQ) from [<80923aa8>] (start_kernel+0x21c/0x3b0)
[    0.000000] [<80923aa8>] (start_kernel) from [<8000807c>] (0x8000807c)
[    0.000000] ---[ end trace cb88537fdc8fa200 ]---
[    0.000000] Outdated DT detected, suspend/resume will NOT work
[    0.000000] mxc_clocksource_init 24000000
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000055] clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.002800] Console: colour dummy device 80x30
[    0.002841] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.002876] pid_max: default: 32768 minimum: 301
[    0.003097] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003124] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.004488] CPU: Testing write buffer coherency: ok
[    0.004988] /cpus/cpu@0 missing clock-frequency property
[    0.005031] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005138] Setting up static identity map for 0x80008280 - 0x800082f0
[    0.041232] Brought up 1 CPUs
[    0.041268] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.041288] CPU: All CPU(s) started in SVC mode.
[    0.042375] devtmpfs: initialized
[    0.060255] device-tree: Duplicate name in lcdif@021c8000, renamed to "display#1"
[    0.065649] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.066522] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.072084] pinctrl core: initialized pinctrl subsystem
[    0.074835] NET: Registered protocol family 16
[    0.093211] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.120904] cpuidle: using governor ladder
[    0.150971] cpuidle: using governor menu
[    0.199763] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.199801] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.204369] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.259258] mxs-dma 1804000.dma-apbh: initialized
[    0.265115] SCSI subsystem initialized
[    0.266509] usbcore: registered new interface driver usbfs
[    0.266698] usbcore: registered new interface driver hub
[    0.266922] usbcore: registered new device driver usb
[    0.270517] i2c i2c-0: IMX I2C adapter registered
[    0.270563] i2c i2c-0: can't use DMA
[    0.272203] i2c i2c-1: IMX I2C adapter registered
[    0.272247] i2c i2c-1: can't use DMA
[    0.272556] Linux video capture interface: v2.00
[    0.272765] pps_core: LinuxPPS API ver. 1 registered
[    0.272786] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.272864] PTP clock support registered
[    0.275797] Advanced Linux Sound Architecture Driver Initialized.
[    0.280005] Switched to clocksource mxc_timer1
[    0.306744] NET: Registered protocol family 2
[    0.308346] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.308443] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.308536] TCP: Hash tables configured (established 2048 bind 2048)
[    0.308675] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.308737] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.309140] NET: Registered protocol family 1
[    0.309865] RPC: Registered named UNIX socket transport module.
[    0.309898] RPC: Registered udp transport module.
[    0.309916] RPC: Registered tcp transport module.
[    0.309934] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.313434] imx rpmsg driver is registered.
[    0.315686] Bus freq driver module loaded
[    0.317895] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.335498] VFS: Disk quotas dquot_6.6.0
[    0.335992] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.341960] NFS: Registering the id_resolver key type
[    0.342063] Key type id_resolver registered
[    0.342084] Key type id_legacy registered
[    0.342304] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.344206] fuse init (API version 7.23)
[    0.349059] io scheduler noop registered
[    0.349103] io scheduler deadline registered
[    0.349220] io scheduler cfq registered (default)
[    0.350669] imx-weim 21b8000.weim: Driver registered.
[    0.357245] backlight supply power not found, using dummy regulator
[    0.362492] 21c8000.lcdif supply lcd not found, using dummy regulator
[    0.471662] mxsfb 21c8000.lcdif: failed to find mxc display driver
[    0.490463] Console: switching to colour frame buffer device 100x30
[    0.504982] mxsfb 21c8000.lcdif: initialized
[    0.512362] imx-sdma 20ec000.sdma: no event needs to be remapped
[    0.512582] imx-sdma 20ec000.sdma: loaded firmware 3.3
[    0.520332] imx-sdma 20ec000.sdma: initialized
[    0.522715] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 18, base_baud = 5000000) is a IMX
[    1.268610] console enabled
[    1.274319] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 232, base_baud = 5000000) is a IMX
[    1.284562] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 233, base_baud = 5000000) is a IMX
[    1.296247] imx sema4 driver is registered.
[    1.300766] Initialized drm 1.1.0 20060810
[    1.306654] Initialized vivante 1.0.0 20120216 on minor 0
[    1.339597] brd: module loaded
[    1.356305] loop: module loaded
[    1.376686] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    1.383148] nand: Micron MT29F2G08ABAEAWP
[    1.387197] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.395691] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[    1.402791] Scanning device for bad blocks
[    1.597331] 6 ofpart partitions found on MTD device gpmi-nand
[    1.603171] Creating 6 MTD partitions on "gpmi-nand":
[    1.608265] 0x000000000000-0x000000400000 : "boot"
[    1.615787] 0x000000400000-0x000000600000 : "logo"
[    1.623299] 0x000000600000-0x000000700000 : "ENV"
[    1.630597] 0x000000700000-0x000000a00000 : "DTB"
[    1.637845] 0x000000a00000-0x000001200000 : "kernel"
[    1.645466] 0x000001200000-0x000010000000 : "rootfs"
[    1.653605] gpmi-nand 1806000.gpmi-nand: driver registered.
[    1.662896] 20b4000.ethernet supply phy not found, using dummy regulator
[    1.671087] pps pps0: new PPS source ptp0
[    1.676616] fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[    1.686744] fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 3a:6a:02:19:ba:91
[    1.698171] libphy: fec_enet_mii_bus: probed
[    1.706464] fec 20b4000.ethernet eth0: registered PHC device 0
[    1.714259] 2188000.ethernet supply phy not found, using dummy regulator
[    1.722397] pps pps1: new PPS source ptp1
[    1.727982] fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[    1.738319] fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 26:e8:33:c8:76:da
[    1.751241] fec 2188000.ethernet eth1: registered PHC device 1
[    1.758978] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.765787] ehci-mxc: Freescale On-Chip EHCI Host driver
[    1.771734] usbcore: registered new interface driver usb-storage
[    1.780936] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    1.797233] 2184200.usb supply vbus not found, using dummy regulator
[    1.807718] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    1.812789] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    1.840147] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    1.847947] hub 1-0:1.0: USB hub found
[    1.852027] hub 1-0:1.0: 1 port detected
[    1.858395] Mass Storage Function, version: 2009/09/11
[    1.863783] LUN: removable file: (no medium)
[    1.868141] no file given for LUN0
[    1.871752] g_mass_storage ci_hdrc.0: failed to start g_mass_storage: -22
[    1.879199] mousedev: PS/2 mouse device common for all mice
[    1.888279] input: iMX6UL TouchScreen Controller as /devices/platform/soc/2100000.aips-bus/2040000.tsc/input/input0
[    1.902304] snvs_rtc 20cc034.snvs-rtc-lp: snvs rtc: you use old dts file, please update it
[    1.911974] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
[    1.920738] i2c /dev entries driver
[    1.926992] IR NEC protocol handler initialized
[    1.931687] IR RC5(x/sz) protocol handler initialized
[    1.936786] IR RC6 protocol handler initialized
[    1.941408] IR JVC protocol handler initialized
[    1.945979] IR Sony protocol handler initialized
[    1.950931] IR SANYO protocol handler initialized
[    1.955685] IR Sharp protocol handler initialized
[    1.960495] IR MCE Keyboard/mouse protocol handler initialized
[    1.966369] IR XMP protocol handler initialized
[    1.974155] pxp-v4l2 pxp_v4l2: initialized
[    1.981380] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    1.988155] sdhci: Secure Digital Host Controller Interface driver
[    1.994475] sdhci: Copyright(c) Pierre Ossman
[    1.998887] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.007103] /soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
[    2.016573] sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
[    2.071147] mmc0: SDHCI controller on 2190000.usdhc using ADMA
[    2.096064] usbcore: registered new interface driver usbhid
[    2.103871] usbhid: USB HID core driver
[    2.137227] NET: Registered protocol family 10
[    2.144623] sit: IPv6 over IPv4 tunneling driver
[    2.153499] NET: Registered protocol family 17
[    2.158255] Key type dns_resolver registered
[    2.163247] Failed to disable 696MHz OPP
[    2.170135] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    2.180731] Registering SWP/SWPB emulation handler
[    2.224390] snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)
[    2.255705] vref-3v3: disabling
[    2.258901] usb_otg1_vbus: disabling
[    2.262603] can-3v3: disabling
[    2.266009] ALSA device list:
[    2.268997]   No soundcards found.
[    2.276660] yaffs: dev is 32505861 name is "mtdblock5" ro
[    2.287458] yaffs: passed flags ""
[    2.326374] hub 1-1:1.0: USB hub found
[    2.332036] hub 1-1:1.0: 4 ports detected
[    2.395719] random: nonblocking pool is initialized
[    2.620055] usb 1-1.4: new high-speed USB device number 3 using ci_hdrc
[    9.097586] VFS: Mounted root (yaffs2 filesystem) readonly on device 31:5.
[    9.104587] devtmpfs: error mounting -2
[    9.109299] Freeing unused kernel memory: 404K (80923000 - 80988000)
[    9.115838] Kernel panic - not syncing: No working init found.Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    9.128991] ---[ end Kernel panic - not syncing: No working init found.Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.


后续添加
uboot下打印的环境信息:
=> pri
baudrate=115200
bootcmd=if test ${bootdev} = sd1; then echo update firmware.........;run update_from_sd;else echo nand boot..........;run nandargs;run bootnand; fi;
bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
bootdelay=3                                                               
bootdev=mmc2
bootnand=nand read ${loadaddr} 0xa00000 0x800000;nand read ${fdt_addr} ${nand_addr} 0x40000;bootz ${loadaddr} - ${fdt_addr};
calibrate=y   
console=ttymxc0
ethact=FEC0   
ethprime=FEC
fdt_addr=0x83000000
fdt_file=imx6ul-14x14-evk-gpmi-7.dtb
fdt_filebak=imx6ul-14x14-evk.dtb   
fdt_high=0xffffffff            
initrd_addr=0x83800000
initrd_high=0xffffffff
loadaddr=0x80800000   
logoflag=70      
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" clk_ignore_unused
nand_addr=0x700000   
nandargs=setenv bootargs console=ttymxc0,115200 cma=64M root=/dev/mtdblock5 rootfstype=yaffs2,calibrate=${calibrate}
panel=TFT70AB
splashimage=0x83800000
update_from_sd=run update_nand;
update_nand=mmc rescan;fatload mmc 0 ${loadaddr} /bin/zImage; fatload mmc 0 ${initrd_addr} /bin/ramdisk.img.u; fatload mmc 0 ${fdt_addr} /bin/${fdt_file}; set bootargs console=${console},${baudrate} cma=64M rdinit=/linuxrc; bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
                                                   
Environment size: 1397/131068 bytes
=>                                 

jameszxj 发表于 2018-8-13 14:37:19

内核选项CONFIG_DEVTMPFS使能了没有?
感觉是内核有些选项没选上
我用过4.4.xx和4.14.xx内核都没问题

浮华一生 发表于 2018-8-13 14:37:38

内核配置问题吧, 是不是选了 tmpfs 系统?

kevinstar888 发表于 2018-8-13 14:38:55

猜测:
实际问题是mtdblock5 这个分区你的权限是 RO不是RW
导致root (yaffs2 filesystem) readonly。

yick 发表于 2018-8-13 14:55:51

jameszxj 发表于 2018-8-13 14:37
内核选项CONFIG_DEVTMPFS使能了没有?
感觉是内核有些选项没选上
我用过4.4.xx和4.14.xx内核都没问题 ...

好像是使能的,下面就是

abutter 发表于 2018-8-13 14:56:54

根本不是 devtmpfs 的问题,最前面似乎是 dtb 有问题,最后一个是 rootfs 没有指明。

yick 发表于 2018-8-13 14:57:23

浮华一生 发表于 2018-8-13 14:37
内核配置问题吧, 是不是选了 tmpfs 系统?

内核配置挺多的,我也不太清楚。

yick 发表于 2018-8-13 15:01:06

浮华一生 发表于 2018-8-13 14:37
内核配置问题吧, 是不是选了 tmpfs 系统?

我刚才对比了一下,原来3.14的内核也有的。这个地方,两个内核配置一样。

yick 发表于 2018-8-13 15:03:19

kevinstar888 发表于 2018-8-13 14:38
猜测:
实际问题是mtdblock5 这个分区你的权限是 RO不是RW
导致root (yaffs2 filesystem) readonly。


关于文件系统权限问题,我在uboot环境下面,重新设过,不管是RO ,还是RW,都不行,结果是一样的。

yick 发表于 2018-8-13 15:09:42

abutter 发表于 2018-8-13 14:56
根本不是 devtmpfs 的问题,最前面似乎是 dtb 有问题,最后一个是 rootfs 没有指明。 ...

你是指这个么:[    0.000000] Outdated DT detected, suspend/resume will NOT work

我没有改过设备树,首先设备树不是描述硬件信息的吗,我没有换硬件,那么久不需要改设备树了。
可是内核怎样读取设备树我就不知道了。

kevinstar888 发表于 2018-8-13 15:10:23

yick 发表于 2018-8-13 15:03
关于文件系统权限问题,我在uboot环境下面,重新设过,不管是RO ,还是RW,都不行,结果是一样的。 ...

这个分区大小是128K的整数倍吗,貌似不是整数倍,是不能被擦除的,也会被认为是RO权限

dr2001 发表于 2018-8-13 15:13:13

本帖最后由 dr2001 于 2018-8-13 15:17 编辑

1 做完文件系统之后,尝试mount一下,看能否正确mount上root fs。
2 需要在root fs上建立对应的基本目录,没有目录的话,kernel没办法(auto)mount的。
3 devtmpfs如果选择了auto mount,那么不需要自己再mount了,当然,此时如果自己的脚本再跑一遍也没关系。

这个不是root fs权限的问题,root是RO的照样可以mount一堆其它的东西,那只是一个挂载点。

文件系统大体需要这些基本目录:
/{bin,dev,etc,home,lib,mnt}
/{proc,sbin,sys}
/var/{tmp,run}
/usr/{bin,lib,sbin}
/root
/tmp


如果启动busybox的init以及busybox的基本应用,需要mount这些系统路径
mount -t proc   none /proc
mount -t sysfs    none /sys
mount -t devtmpfs none /dev


正常启动的话,考虑mount这些:
mount -t proc   none /proc
mount -t sysfs    none /sys
mount -t devtmpfs none /dev
mount -t tmpfs    none /tmp

mkdir -p /dev/pts
mount -t devpts   none /dev/pts

mkdir -p /dev/shm
mount -t tmpfs    none /dev/shm

mount -t tmpfs    none /var/tmp
mount -t tmpfs    none /var/run

yick 发表于 2018-8-13 15:24:31

kevinstar888 发表于 2018-8-13 15:10
这个分区大小是128K的整数倍吗,貌似不是整数倍,是不能被擦除的,也会被认为是RO权限 ...

你说的是这个吗 rootfs
[    1.387197] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.395691] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[    1.402791] Scanning device for bad blocks
[    1.597331] 6 ofpart partitions found on MTD device gpmi-nand
[    1.603171] Creating 6 MTD partitions on "gpmi-nand":
[    1.608265] 0x000000000000-0x000000400000 : "boot"
[    1.615787] 0x000000400000-0x000000600000 : "logo"
[    1.623299] 0x000000600000-0x000000700000 : "ENV"
[    1.630597] 0x000000700000-0x000000a00000 : "DTB"
[    1.637845] 0x000000a00000-0x000001200000 : "kernel"
[    1.645466] 0x000001200000-0x000010000000 : "rootfs"

0x10000000 - 0x1200000 = 0xEE00000

(0xEE00000÷128)÷1024 = 1904。
好像是没问题的。

yick 发表于 2018-8-13 15:33:36

dr2001 发表于 2018-8-13 15:13
1 做完文件系统之后,尝试mount一下,看能否正确mount上root fs。
2 需要在root fs上建立对应的基本目录, ...

我用的是原来3.14配套的文件系统,整个过程就改变了内核,其它的都没变。
我把飞凌3.14内核打印日志也贴出来
U-Boot 2015.04-g3989e3c (Dec 14 2017 - 19:04:37)
                                                
CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature 42 C                  
Reset cause: POR      
Board: MX6UL 14x14 EVK
I2C:   ready         
DRAM:256 MiB
NAND:256 MiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment
                                                
Display: TFT70AB (800x480)
Video: 800x480x24         
               
NAND read: device 0 offset 0x400000, size 0x80000
524288 bytes read: OK                           
                     
NAND read: device 0 offset 0x400000, size 0x80000
524288 bytes read: OK                           
display bmp cfb_console.c
In:    serial            
Out:   serial
Err:   serial
Net:   FEC0
Error: FEC0 address not set.
                           
Normal Boot
Hit any key to stop autoboot:0
nand boot..........            
                  
NAND read: device 0 offset 0xa00000, size 0x800000
8388608 bytes read: OK                           
                     
NAND read: device 0 offset 0x700000, size 0x40000
262144 bytes read: OK                           
Kernel image @ 0x80800000 [ 0x000000 - 0x622460 ]
## Flattened Device Tree blob at 83000000      
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300c7c5
                                                      
Starting kernel ...
                  
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.38-6UL_ga (yhh@Ding) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #1 SMP PREEMPT Wed Aug 8 08:26:13 CST 2018
[    0.000000] CPU: ARMv7 Processor revision 5 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
[    0.000000] cma: CMA: reserved 64 MiB at 8c000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 8 pages/cpu @8bdbf000 s8832 r8192 d15744 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.Total pages: 60928
[    0.000000] Kernel command line: console=ttymxc0,115200 cma=64M root=/dev/mtdblock5 rootfstype=yaffs2,calibrate=y
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 165640K/245760K available (7922K kernel code, 481K rwdata, 2788K rodata, 396K init, 433K bss, 80120K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]   vector: 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]   fixmap: 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]   vmalloc : 0x90800000 - 0xff000000   (1768 MB)
[    0.000000]   lowmem: 0x80000000 - 0x90000000   ( 256 MB)
[    0.000000]   pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]   modules : 0x7f000000 - 0x7fe00000   (14 MB)
[    0.000000]       .text : 0x80008000 - 0x80a7dcf8   (10712 kB)
[    0.000000]       .init : 0x80a7e000 - 0x80ae1280   ( 397 kB)
[    0.000000]       .data : 0x80ae2000 - 0x80b5a760   ( 482 kB)
[    0.000000]      .bss : 0x80b5a76c - 0x80bc6cf4   ( 434 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Switching to timer-based delay loop
[    0.000021] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns
[    0.002768] clocksource_of_init: no matching clocksources found
[    0.003135] Console: colour dummy device 80x30
[    0.003183] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.003216] pid_max: default: 32768 minimum: 301
[    0.003606] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003637] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.005174] Initializing cgroup subsys net_cls
[    0.005262] CPU: Testing write buffer coherency: ok
[    0.005759] /cpus/cpu@0 missing clock-frequency property
[    0.005801] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005861] Setting up static identity map for 0x807855f8 - 0x80785650
[    0.040763] Brought up 1 CPUs
[    0.040799] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[    0.040815] CPU: All CPU(s) started in SVC mode.
[    0.042118] devtmpfs: initialized
[    0.052537] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.053316] pinctrl core: initialized pinctrl subsystem
[    0.054257] regulator-dummy: no parameters
[    0.059566] NET: Registered protocol family 16
[    0.076192] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.077798] cpuidle: using governor ladder
[    0.077830] cpuidle: using governor menu
[    0.078198] Use WDOG1 as reset source
[    0.096549] syscon 20c8000.anatop: regmap registered
[    0.097256] vdd3p0: 2625 <--> 3400 mV at 3000 mV
[    0.098129] cpu: 725 <--> 1450 mV at 1150 mV
[    0.098968] vddsoc: 725 <--> 1450 mV at 1175 mV
[    0.104224] syscon 20e4000.iomuxc-gpr: regmap registered
[    0.111011] syscon 21ac000.romcp: regmap registered
[    0.112553] syscon 21bc000.ocotp-ctrl: regmap registered
[    0.119730] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.119761] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.123846] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.126846] 20dc000.gpc supply pu not found, using dummy regulator
[    0.162015] bio: create slab <bio-0> at 0
[    0.168610] mxs-dma 1804000.dma-apbh: initialized
[    0.169570] can-3v3: 3300 mV
[    0.170121] VSD_3V3: 3300 mV
[    0.170913] usb_otg1_vbus: 5000 mV
[    0.171467] vref-3v3: 3300 mV
[    0.172989] gpio_dvfs: 1300 <--> 1400 mV at 1400 mV
[    0.174283] i2c-core: driver using legacy suspend method
[    0.174308] i2c-core: driver using legacy resume method
[    0.175533] SCSI subsystem initialized
[    0.176781] usbcore: registered new interface driver usbfs
[    0.176970] usbcore: registered new interface driver hub
[    0.177303] usbcore: registered new device driver usb
[    0.183089] i2c i2c-0: IMX I2C adapter registered
[    0.185559] i2c i2c-1: IMX I2C adapter registered
[    0.185857] Linux video capture interface: v2.00
[    0.186062] pps_core: LinuxPPS API ver. 1 registered
[    0.186083] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.186145] PTP clock support registered
[    0.188729] MIPI CSI2 driver module loaded
[    0.189288] Advanced Linux Sound Architecture Driver Initialized.
[    0.191260] Bluetooth: Core ver 2.18
[    0.191397] NET: Registered protocol family 31
[    0.191419] Bluetooth: HCI device and connection manager initialized
[    0.191460] Bluetooth: HCI socket layer initialized
[    0.191493] Bluetooth: L2CAP socket layer initialized
[    0.191604] Bluetooth: SCO socket layer initialized
[    0.193592] Switched to clocksource mxc_timer1
[    0.195195] cfg80211: Calling CRDA to update world regulatory domain
[    0.219214] NET: Registered protocol family 2
[    0.221212] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.221306] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.221397] TCP: Hash tables configured (established 2048 bind 2048)
[    0.221515] TCP: reno registered
[    0.221550] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.221611] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.222179] NET: Registered protocol family 1
[    0.222931] RPC: Registered named UNIX socket transport module.
[    0.222962] RPC: Registered udp transport module.
[    0.222979] RPC: Registered tcp transport module.
[    0.222995] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.225882] imx rpmsg driver is registered.
[    0.227498] Bus freq driver module loaded
[    0.229484] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.249116] VFS: Disk quotas dquot_6.5.2
[    0.249815] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.255885] NFS: Registering the id_resolver key type
[    0.255994] Key type id_resolver registered
[    0.256015] Key type id_legacy registered
[    0.256102] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.257964] fuse init (API version 7.22)
[    0.259236] msgmni has been set to 451
[    0.267547] io scheduler noop registered
[    0.267579] io scheduler deadline registered
[    0.268081] io scheduler cfq registered (default)
[    0.269121] imx-weim 21b8000.weim: Driver registered.
[    0.274965] backlight.9 supply power not found, using dummy regulator
[    0.278097] MIPI DSI driver module loaded
[    0.282421] 21c8000.lcdif supply lcd not found, using dummy regulator
[    0.282821] mxsfb 21c8000.lcdif: failed to find mxc display driver
[    0.283757] mxsfb 21c8000.lcdif: initialized
[    0.290944] imx-sdma 20ec000.sdma: no event needs to be remapped
[    0.291153] imx-sdma 20ec000.sdma: loaded firmware 3.1
[    0.299701] imx-sdma 20ec000.sdma: initialized
[    0.301195] Serial: IMX driver
[    0.301843] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58, base_baud = 5000000) is a IMX
[    1.042118] console enabled
[    1.047639] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59, base_baud = 5000000) is a IMX
[    1.057538] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60, base_baud = 5000000) is a IMX
[    1.067183] serial: Freescale lpuart driver
[    1.075406] imx sema4 driver is registered.
[    1.079772] Initialized drm 1.1.0 20060810
[    1.085575] Initialized vivante 1.0.0 20120216 on minor 0
[    1.113177] brd: module loaded
[    1.128056] loop: module loaded
[    1.134913] spi_gpio spi4.15: gpio-miso property not found, switching to no-rx mode
[    1.147150] CAN device driver interface
[    1.154505] flexcan 2090000.can: device registered (reg_base=90968000, irq=142)
[    1.164706] flexcan 2094000.can: device registered (reg_base=90970000, irq=143)
[    1.174275] 20b4000.ethernet supply phy not found, using dummy regulator
[    1.182305] pps pps0: new PPS source ptp0
[    1.186912] fec 20b4000.ethernet (unregistered net_device): Invalid MAC address: 00:00:00:00:00:00
[    1.196106] fec 20b4000.ethernet (unregistered net_device): Using random MAC address: 02:82:48:42:41:90
[    1.206259] libphy: fec_enet_mii_bus: probed
[    1.214403] fec 20b4000.ethernet eth0: registered PHC device 0
[    1.221885] 2188000.ethernet supply phy not found, using dummy regulator
[    1.229998] pps pps1: new PPS source ptp1
[    1.234581] fec 2188000.ethernet (unregistered net_device): Invalid MAC address: 00:00:00:00:00:00
[    1.243787] fec 2188000.ethernet (unregistered net_device): Using random MAC address: fa:35:e9:bc:4f:47
[    1.255253] fec 2188000.ethernet eth1: registered PHC device 1
[    1.262730] PPP generic driver version 2.4.2
[    1.267723] PPP BSD Compression module registered
[    1.272471] PPP Deflate Compression module registered
[    1.277842] usbcore: registered new interface driver asix
[    1.283397] usbcore: registered new interface driver cdc_ether
[    1.289438] usbcore: registered new interface driver cdc_eem
[    1.295386] usbcore: registered new interface driver cdc_ncm
[    1.301080] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.307676] ehci-mxc: Freescale On-Chip EHCI Host driver
[    1.313453] usbcore: registered new interface driver usb-storage
[    1.319869] usbcore: registered new interface driver usbserial
[    1.325930] usbcore: registered new interface driver usbserial_generic
[    1.332591] usbserial: USB Serial support registered for generic
[    1.338791] usbcore: registered new interface driver ftdi_sio
[    1.344709] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.352162] usbcore: registered new interface driver option
[    1.357909] usbserial: USB Serial support registered for GSM modem (1-port)
[    1.365038] usbcore: registered new interface driver pl2303
[    1.370731] usbserial: USB Serial support registered for pl2303
[    1.376872] usbcore: registered new interface driver cdc_xr_usb_serial
[    1.383430] xr_usb_serial_common: Exar USB UART (serial port) driver
[    1.389971] usbcore: registered new interface driver usb_ehset_test
[    1.398597] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    1.413559] 2184200.usb supply vbus not found, using dummy regulator
[    1.423913] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    1.428899] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    1.453690] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    1.461158] hub 1-0:1.0: USB hub found
[    1.465139] hub 1-0:1.0: 1 port detected
[    1.471330] mousedev: PS/2 mouse device common for all mice
[    1.479058] input: 20cc000.snvs-pwrkey as /devices/soc0/soc.0/2000000.aips-bus/20cc000.snvs-pwrkey/input/input0
[    1.489946] snvs_pwrkey 20cc000.snvs-pwrkey: i.MX snvs powerkey probed
[    1.497478] edt_ft5x06 0-0038: touchscreen probe failed
[    1.502776] edt_ft5x06: probe of 0-0038 failed with error -5
[    1.510661] input: iMX6UL TouchScreen Controller as /devices/virtual/input/input2
[    1.520243] <<-GTP-INFO->> GTP driver installing...
[    1.525672] <<-GTP-INFO->> GTP Driver Version: V2.4<2014/11/28>
[    1.531633] <<-GTP-INFO->> GTP Driver Built@19:48:53, Aug7 2018
[    1.537860] <<-GTP-INFO->> GTP I2C Address: 0x14
[    1.543620] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.550523] <<-GTP-ERROR->> GTP i2c test failed time 1.
[    1.574687] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.581588] <<-GTP-ERROR->> GTP i2c test failed time 2.
[    1.604700] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.611599] <<-GTP-ERROR->> GTP i2c test failed time 3.
[    1.634673] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.641570] <<-GTP-ERROR->> GTP i2c test failed time 4.
[    1.664884] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.671785] <<-GTP-ERROR->> GTP i2c test failed time 5.
[    1.693626] <<-GTP-ERROR->> I2C read failed.
[    1.698076] <<-GTP-INFO->> GTP Driver Version: V2.4<2014/11/28>
[    1.704074] <<-GTP-INFO->> GTP Driver Built@19:48:53, Aug7 2018
[    1.710194] <<-GTP-INFO->> GTP I2C Address: 0x5d
[    1.715879] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.722818] <<-GTP-ERROR->> GTP i2c test failed time 1.
[    1.744724] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.751627] <<-GTP-ERROR->> GTP i2c test failed time 2.
[    1.774622] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.781521] <<-GTP-ERROR->> GTP i2c test failed time 3.
[    1.786907] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    1.804658] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.811559] <<-GTP-ERROR->> GTP i2c test failed time 4.
[    1.834675] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -5!
[    1.841574] <<-GTP-ERROR->> GTP i2c test failed time 5.
[    1.863614] <<-GTP-ERROR->> I2C read failed.
[    1.868315] i2c-core: driver using legacy suspend method
[    1.874661] i2c-core: driver using legacy resume method
[    1.884554] rtc-rx8010 0-0032: Frequency stop was detected, probably due to a supply voltage drop
[    1.893469] rtc-rx8010 0-0032: Update timer was detected
[    1.899801] rtc-rx8010 0-0032: bad conditions detected, resetting date
[    1.911333] rtc-rx8010 0-0032: rtc core: registered rx8010 as rtc0
[    1.919346] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc1
[    1.928121] i2c /dev entries driver
[    1.932930] IR NEC protocol handler initialized
[    1.937591] IR RC5(x) protocol handler initialized
[    1.942410] IR RC6 protocol handler initialized
[    1.947106] IR JVC protocol handler initialized
[    1.951825] IR Sony protocol handler initialized
[    1.956630] IR RC5 (streamzap) protocol handler initialized
[    1.963353] IR SANYO protocol handler initialized
[    1.968743] hub 1-1:1.0: USB hub found
[    1.972643] IR MCE Keyboard/mouse protocol handler initialized
[    1.978648] hub 1-1:1.0: 4 ports detected
[    1.987176] pxp-v4l2 pxp_v4l2.10: initialized
[    1.992010] usbcore: registered new interface driver uvcvideo
[    1.997974] USB Video Class driver (1.1.1)
[    2.004064] i2c-core: driver using legacy suspend method
[    2.010320] i2c-core: driver using legacy resume method
[    2.017616] imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
[    2.026251] Bluetooth: HCI UART driver ver 2.2
[    2.030763] Bluetooth: HCI H4 protocol initialized
[    2.035628] Bluetooth: HCI BCSP protocol initialized
[    2.040616] Bluetooth: HCIATH3K protocol initialized
[    2.045949] usbcore: registered new interface driver bcm203x
[    2.051825] usbcore: registered new interface driver btusb
[    2.057621] usbcore: registered new interface driver ath3k
[    2.063314] usbcore: registered new interface driver rtk_btusb
[    2.069815] sdhci: Secure Digital Host Controller Interface driver
[    2.076080] sdhci: Copyright(c) Pierre Ossman
[    2.080463] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.089706] mmc0: no vqmmc regulator found
[    2.133670] mmc0: SDHCI controller on 2190000.usdhc using ADMA
[    2.188520] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    2.195001] nand: Micron MT29F2G08ABAEAWP
[    2.199043] nand: 256MiB, SLC, page size: 2048, OOB size: 64
[    2.205477] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[    2.212486] Scanning device for bad blocks
[    2.523134] 6 ofpart partitions found on MTD device gpmi-nand
[    2.528960] Creating 6 MTD partitions on "gpmi-nand":
[    2.534081] 0x000000000000-0x000000400000 : "boot"
[    2.541587] 0x000000400000-0x000000600000 : "logo"
[    2.549052] 0x000000600000-0x000000700000 : "ENV"
[    2.556423] 0x000000700000-0x000000a00000 : "DTB"
[    2.563966] 0x000000a00000-0x000001200000 : "kernel"
[    2.571615] 0x000001200000-0x000010000000 : "rootfs"
[    2.579639] gpmi-nand 1806000.gpmi-nand: driver registered.
[    2.589705] usbcore: registered new interface driver usbhid
[    2.595412] usbhid: USB HID core driver
[    2.612824] fsl-asrc 2034000.asrc: driver registered
[    2.627249] snd-soc-dummy snd-soc-dummy: ASoC: Failed to create platform debugfs directory
[    2.636736] imx-wm8960 sound.14: wm8960-hifi <-> 202c000.sai mapping ok
[    2.645034] imx-wm8960 sound.14: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    2.652493] imx-wm8960 sound.14: wm8960-hifi <-> 202c000.sai mapping ok
[    2.669988] NET: Registered protocol family 26
[    2.674590] Netfilter messages via NETLINK v0.30.
[    2.679373] nfnl_acct: registering with nfnetlink.
[    2.684363] nf_conntrack version 0.5.0 (3612 buckets, 14448 max)
[    2.691625] ctnetlink v0.93: registering with nfnetlink.
[    2.697375] nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>
[    2.704012] nf_tables_compat: (c) 2012 Pablo Neira Ayuso <pablo@netfilter.org>
[    2.711734] xt_time: kernel timezone is -0000
[    2.716870] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.722643] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
[    2.729227] arp_tables: (C) 2002 David S. Miller
[    2.734181] TCP: cubic registered
[    2.738805] NET: Registered protocol family 10
[    2.745596] sit: IPv6 over IPv4 tunneling driver
[    2.751811] NET: Registered protocol family 17
[    2.756521] can: controller area network core (rev 20120528 abi 9)
[    2.762901] NET: Registered protocol family 29
[    2.767560] can: raw protocol (rev 20120528)
[    2.771863] can: broadcast manager protocol (rev 20120528 t)
[    2.777673] can: netlink gateway (rev 20130117) max_hops=1
[    2.783885] Bluetooth: RFCOMM TTY layer initialized
[    2.788843] Bluetooth: RFCOMM socket layer initialized
[    2.794220] Bluetooth: RFCOMM ver 1.11
[    2.798024] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.803361] Bluetooth: BNEP filters: protocol multicast
[    2.808688] Bluetooth: BNEP socket layer initialized
[    2.813719] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.819689] Bluetooth: HIDP socket layer initialized
[    2.824830] 8021q: 802.1Q VLAN Support v1.8
[    2.829187] Key type dns_resolver registered
[    2.835138] cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
[    2.857809] gpio_dvfs: disabling
[    2.861085] vref-3v3: disabling
[    2.864372] usb_otg1_vbus: disabling
[    2.867975] VSD_3V3: disabling
[    2.871051] can-3v3: disabling
[    2.874697] regulator-dummy: disabling
[    2.878949] imx mcc test is registered.
[    2.884825] rtc-rx8010 0-0032: setting system clock to 1970-01-01 00:00:00 UTC (0)
[    2.911266] ALSA device list:
[    2.914366]   #0: wm8960-audio
[    2.918378] yaffs: dev is 32505861 name is "mtdblock5" ro
[    2.923997] yaffs: passed flags ""
[    3.001622] random: nonblocking pool is initialized
[    3.158019] VFS: Mounted root (yaffs2 filesystem) readonly on device 31:5.
[    3.165535] devtmpfs: mounted
[    3.169358] Freeing unused kernel memory: 396K (80a7e000 - 80ae1000)
Mounting /proc and /sys
Starting the hotplug events dispatcher udevd
Synthesizing initial hotplug even[    3.569806] udevd (99): /proc/99/oom_adj is deprecated, please use /proc/99/oom_score_adj instead.
ts
Setting the hostname to freescale
Running depmod
depmod: can't change directory to '3.14.38-6UL_ga': No such file or directory
Mounting filesystems
Starting inetd:
Starting syslogd and klogd
[    8.120883] flexcan 2090000.can can0: writing ctrl=0x0e312085
[    8.147435] flexcan 2094000.can can1: writing ctrl=0x0e312085
Reconfiguring network interfaces... ifdown: interface lo not configured
ifdown: interface eth0 not configured
ifdown: interface eth1 not configured
[    8.354451] fec 20b4000.ethernet eth0: Freescale FEC PHY driver (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)
[    8.404265] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.564849] fec 2188000.ethernet eth1: Freescale FEC PHY driver (mii_bus:phy_addr=20b4000.ethernet:02, irq=-1)
[    8.604320] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
RTNETLINK answers: File exists
done.
alsactl: parse:1655: Unable to open file '/data0/imx6_linux/alsa/tmp/share/alsa/init/00main': No such file or directory
alsactl: set_control:1267: failed to obtain info for control #55 (No such file or directory)
[    8.837538] Trying to free nonexistent resource <0000000087b00000-0000000087c76fff>

Copyright (C) 2006-2016 Forlinx Embedded Technology Co., Ltd All Rights Reservedwww.forlinx.com
freescale login: [    9.114052] usb 1-1.4: new high-speed USB device number 3 using ci_hdrc

Copyright (C) 2006-2016 Forlinx Embedded Technology Co., Ltd All Rights Reservedwww.forlinx.com
freescale login:

有freescale login:的表示成功了,4.1内核也是用的这个文件系统。

abutter 发表于 2018-8-13 16:00:13

我用过这个板子,都是重头移植的,boot,内核,dtb 和文件系统。个人觉得,设备树和内核是耦合在一块的,并非跟硬件绑在一块的。

dr2001 发表于 2018-8-13 16:08:03

yick 发表于 2018-8-13 15:33
我用的是原来3.14配套的文件系统,整个过程就改变了内核,其它的都没变。
我把飞凌3.14内核打印日志也贴 ...

Linux Errno:
#define        ENOENT               2        /* No such file or directory */

考虑检查rootfs的目录结构

日日♂夜夜 发表于 2018-8-14 14:44:14

设备树没更新么?
你把3X里面的设备树源文件考到4x里面修改makefile 编译出来放进去

感觉应该是设备数没更新导致nand没有正确启动读取不了文件系统
页: [1]
查看完整版本: 移植4.1内核时遇到devtmpfs: error mounting -2这样的问...