Tôi đã hỏi một câu hỏi ở đây Có bắt buộc phải có một hệ thống tập tin không
Một trong những ý kiến là:
Làm thế nào một hệ thống không có hệ thống tệp sẽ hoạt động trên linux vì ngay cả máy in hoặc thẻ ethernet cũng được coi là một tệp? Mục tiêu của bạn ở đây là gì? ... Kiwy ngày 24 tháng 2 lúc 14:18
Bây giờ đây là một thông điệp tường trình khi khởi động linux mà không có hệ thống tệp (được treo ở cuối):
[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:
Tôi đang khởi động từ flash.
Bây giờ từ nhật ký, rất rõ ràng rằng nhiều trình điều khiển đã được tải ngay cả khi tải hệ thống tệp không thành công (vì tôi cố tình không đưa hệ thống tệp rootfs.jffs2 vào flash).
Bây giờ hãy tham khảo bình luận ở trên, nếu mọi thứ đều là tệp trong linux, làm thế nào để trình điều khiển được tải thành công? Bạn có thể thấy USB, GPIO, SD mọi thứ đang đến trước khi nó yêu cầu hệ thống tệp (và không thành công).
Vậy là đúng về mặt kỹ thuật để nói rằng
linux PHẢI có một hệ thống tập tin
Một số nền tảng Những gì tôi đang cố gắng đạt được là để linux chạy trên một hệ thống mà ứng dụng điều khiển sẽ chạy. Ứng dụng chỉ cần thu thập một số dữ liệu và gửi nó đến một số nô lệ. Không có câu hỏi về việc lưu trữ dữ liệu TẠI TẤT CẢ. Vì vậy, muốn hoàn toàn thoát khỏi hệ thống tập tin. Theo hiểu biết của tôi, hệ thống tệp là cần thiết để lưu trữ dữ liệu và vì tôi sẽ không lưu trữ bất kỳ dữ liệu nào, vậy tại sao có hệ thống tệp và tăng mức sử dụng tài nguyên?
Cập nhật
Mặc dù tôi đã đề cập đến vấn đề này trong nền , nhưng để cụ thể việc gửi dữ liệu sẽ diễn ra bằng USB hoặc Ethernet, do đó, việc có các trình điều khiển tương ứng là điều tự nhiên.
initrd?