linux kernel without file system
Hello list,
I need to design a very small embedded system that must only control one ethernet port and two serial lines and must fit in a very small flash memory. So I thought about replacing the call to /etc/init by my application program and removing all the file-system part of linux.
Is that doable ?
Is there a 'standard' way of doing that ?
The first problem I see is accessing my serial lines. How could I do that without using open("/dev/ttySx"), which requires a file system ?
Is there a way to access devices that does not require a file-system ?
Thanks for reading this far
Philippe
Quoted 1 line
Is there a way to access devices that does not require a file-system ?
No: but you can run with just your own programs and bits needed loaded off an initial ramdisk or a romfs image. A better place to ask and learn is probably the "busybox" list as most people doing this stuff use busybox for their tools
* Alan Cox <[email protected]> wrote:
Hi,
Quoted 4 lines
Quoted 1 line
Is there a way to access devices that does not require a file-system ?
No: but you can run with just your own programs and bits needed loaded off an initial ramdisk or a romfs image.
Well, it (IMHO) depends on what you call a filesystem. If you're talking about something that stores files (= byte streams with some assigned name) on some medium, you *could* come around this (in theory, no idea if it really makes sense): put everything you need into one big static executable, let the bootloader load it before the kernel is started (just like initrd ?) and hack up the kernel to get that damn thing started.
BUT: it you're talking about the VFS stuff - it's a fundamental building block of the OS, required in many many places (from socket operations to kernel runtime config, ...) - if you *really* want an OS w/o VFS, you better look at certain embedded-specific OS'es ;-P
BTW: I'd really like to see much more things handled through the filesystem (eg. networking API through some /net filesystem, like on Plan9 ;-p) and let the dozens of syscalls, nelink socket, etc, etc die out.
cu
Signature · 8 lines
--------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ ---------------------------------------------------------------------