您尚未登录。

楼主 #1 2018-10-01 15:24:06

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

V3S overlayfs 问题

http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/SPI_falsh_doc2.html

按照这个文档

最后mount -n -t jffs2 /dev/mtdblock4  /overlay 不成功
mount: mounting /dev/mtdblock4 on /overlay failed: No such file or directory

查看/dev/下没有/mtdblock4

离线

#2 2018-10-01 16:39:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3S overlayfs 问题

先看下kernel 的启动日志,有没有生成 mtd4.





在线

楼主 #3 2018-10-01 17:01:01

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.16-licheepi-zero-with-800x480-lcd+ (root@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #7 SMP Mon Oct 1 15:09:08 +08 2018
[    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: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33920 r8192 d23424 u65536
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,8M(rootfs) -(data) root=31:03 rw rootfstype=squashfs
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53580K/64036K available (6144K kernel code, 218K rwdata, 1472K rodata, 1024K init, 264K bss, 10456K reserved, 0K 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 : 0xc4000000 - 0xff800000   ( 952 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc3e89000   (  62 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a36b00   ( 219 kB)
[    0.000000]        .bss : 0xc0a3db5c - 0xc0a7fe7c   ( 265 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 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, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    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.000017] Switching to timer-based delay loop, resolution 41ns
[    0.000183] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000421] Console: colour dummy device 80x30
[    0.000461] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000475] pid_max: default: 32768 minimum: 301
[    0.000599] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000617] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001203] CPU: Testing write buffer coherency: ok
[    0.001579] /cpus/cpu@0 missing clock-frequency property
[    0.001602] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002022] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002189] Hierarchical SRCU implementation.
[    0.002682] smp: Bringing up secondary CPUs ...
[    0.002701] smp: Brought up 1 node, 1 CPU
[    0.002710] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.002717] CPU: All CPU(s) started in SVC mode.
[    0.003480] devtmpfs: initialized
[    0.006636] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.006932] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.006955] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007123] pinctrl core: initialized pinctrl subsystem
[    0.008011] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[    0.008151] NET: Registered protocol family 16
[    0.008639] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.009778] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.009796] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.023675] SCSI subsystem initialized
[    0.023982] usbcore: registered new interface driver usbfs
[    0.024050] usbcore: registered new interface driver hub
[    0.024145] usbcore: registered new device driver usb
[    0.024395] pps_core: LinuxPPS API ver. 1 registered
[    0.024406] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.024428] PTP clock support registered
[    0.024657] Advanced Linux Sound Architecture Driver Initialized.
[    0.026524] clocksource: Switched to clocksource arch_sys_counter
[    0.037538] NET: Registered protocol family 2
[    0.038125] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.038160] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.038184] TCP: Hash tables configured (established 1024 bind 1024)
[    0.038320] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.038371] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.038589] NET: Registered protocol family 1
[    0.039175] RPC: Registered named UNIX socket transport module.
[    0.039197] RPC: Registered udp transport module.
[    0.039203] RPC: Registered tcp transport module.
[    0.039208] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.041338] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.049411] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.050567] NFS: Registering the id_resolver key type
[    0.050614] Key type id_resolver registered
[    0.050622] Key type id_legacy registered
[    0.050668] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.052292] random: fast init done
[    0.055061] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.055080] io scheduler noop registered
[    0.055087] io scheduler deadline registered
[    0.055278] io scheduler cfq registered (default)
[    0.055288] io scheduler mq-deadline registered
[    0.055295] io scheduler kyber registered
[    0.059814] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.130018] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.133198] console [ttyS0] disabled
[    0.153474] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[    0.751088] console [ttyS0] enabled
[    0.759177] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.764264] spi32766.0: parser cmdlinepart: 4
[    0.768697] 4 cmdlinepart partitions found on MTD device spi32766.0
[    0.774959] Creating 4 MTD partitions on "spi32766.0":
[    0.780118] 0x000000000000-0x000000100000 : "uboot"
[    0.786464] 0x000000100000-0x000000110000 : "dtb"
[    0.792516] 0x000000110000-0x000000510000 : "kernel"
[    0.798869] 0x000000510000-0x000000d10000 : "rootfs"
[    0.805492] libphy: Fixed MDIO Bus: probed
[    0.810233] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.816031] dwmac-sun8i 1c30000.ethernet: No regulator found
[    0.821815] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[    0.828001] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    0.833663] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    0.840911] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    0.846580] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    0.853794] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    0.858764] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    0.865738] libphy: stmmac: probed
[    0.870970] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.877631] ehci-platform: EHCI generic platform driver
[    0.883145] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.888834] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.896809] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.926540] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.933700] hub 1-0:1.0: USB hub found
[    0.937644] hub 1-0:1.0: 1 port detected
[    0.942120] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.948425] ohci-platform: OHCI generic platform driver
[    0.953966] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.960684] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.968618] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    1.041613] hub 2-0:1.0: USB hub found
[    1.045462] hub 2-0:1.0: 1 port detected
[    1.053086] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.062680] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.071621] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.078519] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.083058] i2c /dev entries driver
[    1.088162] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[    1.097662] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.166566] sunxi-mmc 1c0f000.mmc: base:0xc407b000 irq:23
[    1.226554] sunxi-mmc 1c10000.mmc: base:0xc423b000 irq:24
[    1.233034] usbcore: registered new interface driver usbhid
[    1.238689] usbhid: USB HID core driver
[    1.244164] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[    1.252211] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.259733] NET: Registered protocol family 17
[    1.264293] Key type dns_resolver registered
[    1.268844] Registering SWP/SWPB emulation handler
[    1.281373] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000
[    1.292084] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    1.308425] Console: switching to colour frame buffer device 100x30
[    1.320848] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[    1.329488] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.340920] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.346768] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.355874] hub 3-0:1.0: USB hub found
[    1.359874] hub 3-0:1.0: 1 port detected
[    1.364938] using random self ethernet address
[    1.369499] using random host ethernet address
[    1.374962] usb0: HOST MAC ca:95:48:60:77:6f
[    1.379387] usb0: MAC 56:da:be:be:40:3e
[    1.383284] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.390800] g_cdc gadget: g_cdc ready
[    1.397188] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.406845] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:06 UTC (6)
[    1.415018] vcc3v3: disabling
[    1.418058] vcc5v0: disabling
[    1.421026] ALSA device list:
[    1.423989]   #0: V3s Audio Codec
[    1.431353] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.440454] devtmpfs: mounted
[    1.444709] Freeing unused kernel memory: 1024K
[    1.516213] random: crng init done
[    1.546958] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
Starting logging: Jan  1 00:00:06 buildroot syslog.info syslogd started: BusyBox v1.26.2
OK
Jan  1 00:00:06 buildroot user.notice kernel: klogd started: BusyBox v1.26.2 (2018-10-01 14:15:21 +08)
read-only file system detected...done
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Booting Linux on physical CPU 0x0
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000] Linux version 4.13.16-licheepi-zero-with-800x480-lcd+ (root@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #7 SMP Mon Oct 1 15:09:08 +08 2018
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] CPU: div instructions available: patching division code
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Memory policy: Data cache writealloc
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000] On node 0 totalpages: 16009
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000] free_area_init_node: node 0, pgdat c0a35ec0, node_mem_map c3e03000
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000]   Normal zone: 126 pages used for memmap
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000]   Normal zone: 0 pages reserved
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000]   Normal zone: 16009 pages, LIFO batch:3
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33920 r8192 d23424 u65536
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000] pcpu-alloc: s33920 r8192 d23424 u65536 alloc=16*4096
Jan  1 00:00:06 buildroot user.debug kernel: [    0.000000] pcpu-alloc: [0] 0
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,8M(rootfs) -(data) root=31:03 rw rootfstype=squashfs
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Memory: 53580K/64036K available (6144K kernel code, 218K rwdata, 1472K rodata, 1024K init, 264K bss, 10456K reserved, 0K cma-reserved, 0K highmem)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000] Virtual kernel memory layout:
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     vmalloc : 0xc4000000 - 0xff800000   ( 952 MB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     lowmem  : 0xc0000000 - 0xc3e89000   (  62 MB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]       .data : 0xc0a00000 - 0xc0a36b00   ( 219 kB)
Jan  1 00:00:06 buildroot user.notice kernel: [    0.000000]        .bss : 0xc0a3db5c - 0xc0a7fe7c   ( 265 kB)
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Jan  1 00:00:06 buildroot user.info kernel: [    0.000000] Hierarchical RCU implementation.
Jan  1 00:00:06 buildroot user.info kernel: [    Jan  1 00:00:06 buildroot user.info kernel: [    0.000461] CalibJan  1 00:00:06 buildroot user.info kernel: [    0.038125] TCP eStarting network: Jan  1 00:00:07 buildroot user.info kernel: [ Jan  1 00:00:07 buildroot user.info kernel: [    1.097662] sunxiJan  1 00:00:07 buildroot user.notice kernel: [    1.264293] Keyifup: can't open '/var/run/ifstate.new': No such file or directory
FAIL
Jan  1 00:00:07 buildroot daemon.info : starting pid 87, tty '/dev/console': '/sbin/getty -L  console 0 vt100 '

Welcome to Buildroot
buildroot login:

离线

楼主 #4 2018-10-01 17:12:17

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

被大神逗了 少个逗号
spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,8M(rootfs),-(data) root=31:03 rw rootfstype=squashfs

离线

#5 2018-10-01 17:13:44

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3S overlayfs 问题

我刚刚数了一下,你的根文件系统分区在 mtd3吧?


[    0.759177] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.764264] spi32766.0: parser cmdlinepart: 4
[    0.768697] 4 cmdlinepart partitions found on MTD device spi32766.0
[    0.774959] Creating 4 MTD partitions on "spi32766.0":
[    0.780118] 0x000000000000-0x000000100000 : "uboot"
[    0.786464] 0x000000100000-0x000000110000 : "dtb"
[    0.792516] 0x000000110000-0x000000510000 : "kernel"
[    0.798869] 0x000000510000-0x000000d10000 : "rootfs"





在线

#6 2018-10-01 17:16:34

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3S overlayfs 问题

john78 说:

被大神逗了 少个逗号
spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,8M(rootfs),-(data) root=31:03 rw rootfstype=squashfs

还有这种操作哈





在线

楼主 #7 2018-10-01 17:26:21

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

# mount -n -t jffs2 /dev/mtdblock4 /overlay
mount: mounting /dev/mtdblock4 on /overlay failed: No such file or directory


还是不行,已经有/dev/mtdblock4 了

离线

#8 2018-10-01 17:34:31

basicdev
会员
注册时间: 2017-10-02
已发帖子: 159
积分: 159

Re: V3S overlayfs 问题

john78 说:

# mount -n -t jffs2 /dev/mtdblock4 /overlay
mount: mounting /dev/mtdblock4 on /overlay failed: No such file or directory


还是不行,已经有/dev/mtdblock4 了

/overlay 文件夹不存在, mkdir /overlay

离线

楼主 #9 2018-10-01 17:39:52

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

mkdir /overlay
mkdir: can't create directory '/overlay': Read-only file system 

这个只读的文件系统?哪里还有设置?

离线

#10 2018-10-01 17:41:15

basicdev
会员
注册时间: 2017-10-02
已发帖子: 159
积分: 159

Re: V3S overlayfs 问题

john78 说:

mkdir /overlay
mkdir: can't create directory '/overlay': Read-only file system 

这个只读的文件系统?哪里还有设置?

那在创建根文件系统的时候建立文件夹了。

离线

#11 2018-10-01 18:25:46

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3S overlayfs 问题

basicdev 说:
john78 说:

mkdir /overlay
mkdir: can't create directory '/overlay': Read-only file system 

这个只读的文件系统?哪里还有设置?

那在创建根文件系统的时候建立文件夹了。

对,在这个

mksquashfs rootfs rootfs-sq.img

之前执行 mkdir





在线

楼主 #12 2018-10-01 18:57:36

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

mount -n -t overlay overlayfs:/overlay -o lowerdir=/,upperdir=/overlay,workdir=/workdir /mnt

这个workdir又是什么鬼?

离线

#13 2018-10-01 19:19:48

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3S overlayfs 问题

john78 说:

mount -n -t overlay overlayfs:/overlay -o lowerdir=/,upperdir=/overlay,workdir=/workdir /mnt

这个workdir又是什么鬼?

overlay 目前没玩过,找一篇文章你看下: https://blog.csdn.net/luckyapple1028/article/details/78075358

挂载文件系统的基本命令如下:
mount -t overlay overlay -o lowerdir=lower1:lower2:lower3,upperdir=upper,workdir=work merged

其中"lower1:lower2:lower3"表示不同的lower层目录,不同的目录使用":"分隔,层次关系依次为lower1 > lower2 > lower3
(注:多lower层功能支持在Linux-4.0合入,Linux-3.18版本只能指定一个lower dir);
然后upper和work目录分别表示upper层目录和文件系统挂载后用于存放临时和间接文件的工作基目录(work base dir),
最后的merged目录就是最终的挂载点目录。若一切顺利,

在执行以上命令后,overlayfs就成功挂载到merged目录下了。挂载选项支持(即"-o"参数):
1)lowerdir=xxx:指定用户需要挂载的lower层目录(支持多lower,最大支持500层);
2)upperdir=xxx:指定用户需要挂载的upper层目录;
3)workdir=xxx:指定文件系统的工作基础目录,挂载后内容会被清空,且在使用过程中其内容用户不可见;
4)default_permissions:功能未使用;
5)redirect_dir=on/off:开启或关闭redirect directory特性,开启后可支持merged目录和纯lower层目录的rename/renameat系统调用;
6)index=on/off:开启或关闭index特性,开启后可避免hardlink copyup broken问题。

这位博主写的非常详细、专业,值得参考!

这篇也不错: https://wiki.archlinux.org/index.php/Overlay_filesystem





在线

楼主 #14 2018-10-01 21:56:01

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

谢谢,貌似又点明白各个关系了。过两天再试下

离线

楼主 #15 2018-10-03 09:23:47

john78
会员
注册时间: 2018-07-19
已发帖子: 219
积分: 167

Re: V3S overlayfs 问题

还是没有成功,我是这样理解的:
mount -n -t jffs2 /dev/mtdblock4  /overlay   这样 /overlay 挂载成功,可以读写/overlay.创建 /overlay/upper和 /overlay/work 两个目录
mount -n -t overlay overlayfs:overlay -o lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work /mnt
这里
[  135.532462] overlayfs: fs on '/' does not support file handles, falling back to index=off.
[  135.542425] overlayfs: upper fs does not support tmpfile.
[  135.547921] overlayfs: upper fs does not support xattr.
Jan  1 00:02:20 buildroot user.warn kernel: [  135.532462] overlayfs: fs on '/' does not support file handles, falling back to index=off.
# Jan  1 00:02:20 buildroot user.warn kernel: [  135.542425] overlayfs: upper fs does not support tmpfile.
Jan  1 00:02:20 buildroot user.warn kernel: [  135.547921] overlayfs: upper fs does not support xattr.

---------------------------------------------------------------------------------------------------------------------
我哪里理解错了


http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/SPI_falsh_doc2.html 大神的文档只能给大神看?

文档中 “注意需要使用正规mount命令,而不是busybox的mount命令才能挂载”-------------我的姿势不对?

最近编辑记录 john78 (2018-10-03 10:26:13)

离线

#16 2019-02-13 16:20:08

a32425262
会员
注册时间: 2018-05-06
已发帖子: 99
积分: 400

Re: V3S overlayfs 问题

我也是测试好久,发现整不出来

离线

页脚

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

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