我在这里问了一个问题是否必须要有文件系统
评论之一是:
没有文件系统的系统如何在Linux上工作,即使打印机或以太网卡也被视为文件?您的目标是什么?... Kiwy 2月24日14:18
现在,这是在启动不带文件系统的Linux时的日志消息(该文件系统最后挂起了):
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014] U-Boot 2013.07 (Apr 08 2014 - 14:27:03)
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014] Memory: ECC disabled
[Tue Apr 08 20:07:18.298 2014] DRAM: 1 GiB
[Tue Apr 08 20:07:18.308 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Tue Apr 08 20:07:18.341 2014] *** Warning - bad CRC, using default environment
[Tue Apr 08 20:07:18.341 2014]
[Tue Apr 08 20:07:18.341 2014] In: serial
[Tue Apr 08 20:07:18.341 2014] Out: serial
[Tue Apr 08 20:07:18.341 2014] Err: serial
[Tue Apr 08 20:07:18.341 2014] U-BOOT for Xilinx-ZC702-14.7
[Tue Apr 08 20:07:18.341 2014]
[Tue Apr 08 20:07:18.341 2014]
[Tue Apr 08 20:07:18.341 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Tue Apr 08 20:07:18.697 2014] Linux
[Tue Apr 08 20:07:18.697 2014] Load Address: 0x00008000
[Tue Apr 08 20:07:18.697 2014] Entry Point: 0x00008000
[Tue Apr 08 20:07:18.697 2014] Verifying Hash Integrity ... OK
[Tue Apr 08 20:07:18.697 2014] ## Loading fdt from FIT Image at 01000000 ...
[Tue Apr 08 20:07:18.697 2014] Using 'conf@1' configuration
[Tue Apr 08 20:07:18.697 2014] Trying 'fdt@1' fdt subimage
[Tue Apr 08 20:07:18.697 2014] Description: Flattened Device Tree blob
[Tue Apr 08 20:07:18.697 2014] Type: Flat Device Tree
[Tue Apr 08 20:07:18.697 2014] Compression: uncompressed
[Tue Apr 08 20:07:18.697 2014] Data Start: 0x0111d344
[Tue Apr 08 20:07:18.697 2014] Data Size: 11179 Bytes = 10.9 KiB
[Tue Apr 08 20:07:18.697 2014] Architecture: ARM
[Tue Apr 08 20:07:18.697 2014] Hash algo: crc32
[Tue Apr 08 20:07:18.697 2014] Hash value: a7a92b47
[Tue Apr 08 20:07:18.697 2014] Hash algo: sha1sha1+ OK
[Tue Apr 08 20:07:18.702 2014] Booting using the fdt blob at 0x111d344
[Tue Apr 08 20:07:18.702 2014] UncomprOK
[Tue Apr 08 20:07:18.702 2014] Loading Device Tree to 07ffa000, end 07fffbaa ... OK
[Tue Apr 08 20:07:18.702 2014]
[Tue Apr 08 20:07:18.702 2014] Starting kernel ...
[Tue Apr 08 20:07:18.702 2014]
[Tue Apr 08 20:07:19.453 2014] u @c0a7b000 s5568 r8192 d14912 u32768
[Tue Apr 08 20:07:19.453 2014] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
[Tue Apr 08 20:07:19.453 2014] Kernel command line: root=mtd:jffs2 rw rootfstype=jffs2 console=ttyPS0,115200
[Tue Apr 08 20:07:19.453 2014] PID hash table entries: 4096 (order: 2, 16384 bytes)
[Tue Apr 08 20:07:19.453 2014] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[Tue Apr 08 20:07:19.453 2014] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[Tue Apr 08 20:07:19.453 2014] __ex_table already sorted, skipping sort
[Tue Apr 08 20:07:19.453 2014] Memory: 1024MB = 1024MB total
[Tue Apr 08 20:07:19.453 2014] Memory: 1036960k/1036960k available, 11616k reserved, 270339 16
[Tue Apr 08 20:07:19.625 2014] I reach build/linux/kernel/xlnx-3.8/source/net/socket.c:
[Tue Apr 08 20:07:19.625 2014] DMA: preallocated 256 KiB pool for atomic coherent allocations
[Tue Apr 08 20:07:19.625 2014] xgpiops e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xf004e000
[Tue Apr 08 20:07:19.625 2014] GPIO IRQ not connected
[Tue Apr 08 20:07:19.625 2014] XGpio: /amba@0/gpio@41220000: registered, base is 255
[Tue Apr 08 20:07:19.625 2014] GPIO IRQ not connected
[Tue Apr 08 20:07:19.625 2014] XGpio: /amba@0/gpio@41200000: registered, base is 251
[Tue Apr 08 20:07:19.625 2014] usbcore: registered new interface driver usbfs
[Tue Apr 08 20:07:19.625 2014] usbcore: registered new interface driver hub
[Tue Apr 08 20:07:19.625 2014] usbcore: registered new device driver usb
[Tue Apr 08 20:07:19.625 2014] Switching to clocksoutyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartps
[Tue Apr 08 20:07:19.629 2014] console [ttyPSxusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[Tue Apr 08 20:07:19.670 2014] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[Tue Apr 08 20:07:19.675 2014] hub 1-0:1.0: USB hub found
[Tue Apr 08 20:07:19.675 2014] hub 1-0:1.0: 1 port detected
[Tue Apr 08 20:07:19.681 2014] xi2cps e0004000.ps7-i2c: 400 kHz mmio e0004000 irq 57
[Tue Apr 08 20:07:19.686 2014] xadcps f8007100.ps7-xadc: enabled: yes reference: external
[Tue Apr 08 20:07:19.709 2014] xwdtps f8005000.ps7-wdt: Xilinx Watchdog Timer at f00ea000 with timeout 10s
[Tue Apr 08 20:07:19.709 2014] sdhci: Secure Digital Host Controller Interface driver
[Tue Apr 08 20:07:19.709 2014] sdhci: Copyright(c) Pierre Ossman
[Tue Apr 08 20:07:19.709 2014] sdhci-pltfm: SDHCI platform and OF driver helper
[Tue Apr 08 20:07:19.729 2014] usbcore: registered new interface driver usbhid
[Tue Apr 08 20:07:19.729 2014] usbhid: USB HID core driver
[Tue Apr 08 20:07:19.729 2014] I am at build/linux/kernel/xlnx-3.8/source/drivers/hid/usbhid/hid-core.c
[Tue Apr 08 20:07:19.729 2014] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[Tue Apr 08 20:07:19.781 2014] MTD: MTD device with name "jffs2" not found.
[Tue Apr 08 20:07:19.781 2014] List of all partitions:
[Tue Apr 08 20:07:19.781 2014] No filesystem could mount root, tried: jffs2
[Tue Apr 08 20:07:19.781 2014] Kernel panic - not syncing: VFS: Unable to mount root fs on mtd:jffs2
[Tue Apr 08 20:07:19.781 2014] CPU1: stopping
[Tue Apr 08 20:07:19.781 2014] Backtrace:
[Tue Apr 08 20:07:19.781 2014] Function entered at [<c0011094>] from [<c01c6408>]
[Tue Apr 08 20:07:19.781 2014] r6:c0246418 r5:00000000 r4:00000001 r3:60000193
[Tue Apr 08 20:07:19.781 2014] Function entered at [<c01c63f0>] from [<c0011fbc>]
[Tue Apr 08 20:07:19.781 2014] Function entered at [<c0011f78>] from [<c0012270>]
[Tue Apr 08 20:07:19.781 2014] r4:c0247ef4 r3:c0011f78
[Tue Apr 08 20:07:19.781 2014] Function entered at [<c001220c>] from [<c00084e4>]
[Tue Apr 08 20:07:19.781 2014] r5:ef07bf68 r4:f8f00100
[Tue Apr 08 20:07:19.824 2014] Function entered at [<c0008484>] from [<c000da00>]
[Tue Apr 08 20:07:19.824 2014] Exception stack(0xef07bf68 to 0xef07bfb0)
[Tue Apr 08 20:07:19.824 2014] bf60: c0a838d0 00000000 00000003 00000000 ef07a000 c01cd528
[Tue Apr 08 20:07:19.824 2014] bf80: ef07a000 c025c418 0000406a 413fc090 00000000 ef07bfbc ef07bfc0 ef07bfb0
[Tue Apr 08 20:07:19.824 2014] bfa0: c000e94c c000e950 60000113 ffffffff
[Tue Apr 08 20:07:19.824 2014] r6:ffffffff r5:60000113 r4:c000e950 r3:c000e94c
[Tue Apr 08 20:07:19.824 2014] Function entered at [<c000e924>] from [<c000eacc>]
[Tue Apr 08 20:07:19.824 2014] Function entered at [<c000ea40>] from [<c01c4208>]
[Tue Apr 08 20:07:19.824 2014] r5:00000001 r4:c024cf68
[Tue Apr 08 20:07:19.824 2014] Function entered at [<c01c4118>] from [<001c37c8>]
[Tue Apr 08 20:07:19.844 2014] r6:10c03c7d r5:00000015 r4:2f06406a r3:c01c37b0
[Tue Apr 08 20:07:19.844 2014] MTD: MTD device with name "jffs2" not found.
[Tue Apr 08 20:07:19.844 2014] List of all partitions:
[Tue Apr 08 20:07:19.844 2014] No filesystem could mount root, tried: jffs2
[Tue Apr 08 20:07:19.844 2014] Kernel panic - not syncing: VFS: Unable to mount root fs on mtd:
我正在从闪存启动。
现在从日志中可以很清楚地看到,即使文件系统加载失败,许多驱动程序也已经加载(因为我故意没有将文件系统rootfs.jffs2放入flash)。
现在参考上面的注释,如果所有内容都在linux中,那么如何成功加载驱动程序?您可以看到USB,GPIO,SD在请求文件系统之前一切都已经来了(失败了)。
所以说技术上正确吗
linux必须有一个文件系统
我想要达到的一些背景是让Linux在将运行控制应用程序的系统上运行。该应用程序仅捕获一些数据并将其发送给一些从属设备。完全没有存储数据的问题。所以想彻底摆脱文件系统。根据我的理解,存储数据需要文件系统,并且由于我不会存储任何数据,所以为什么要使用文件系统并增加资源使用率?
更新资料
尽管我在后台提到了这一点,但是具体来说,数据的发送将使用USB或以太网进行,因此具有相应的驱动程序是很自然的。
initrd
?