>I'm looking at using Linux for a new embedded product. By embedded
>I mean that it will be running on a custom designed 386EX board
>with no hard disk no floppy and only 1Mb available for programme
>code. Also I don't have to support video or keyboard entry, just
>6 serial ports and an ethernet driver.
>Is it possible to configure the Linux kernel to around 100Kb or less?
Even if it were - the first Meg RAM is always reserved for the kernel,
you'll have to resort to MS-Dork or some self-written system.
Felix
--------====### legal notice ###====-------------------------------------------
Microsoft Network is prohibited from redistributing this work in any form, in
whole or in part. License to distribute this post is available to Microsoft
for $499. Posting without permission constitutes an agreement to these terms.
--
Did you know the University of Iowa
closed down after someone stole the book?
: >I'm looking at using Linux for a new embedded product. By embedded
: >I mean that it will be running on a custom designed 386EX board
: >with no hard disk no floppy and only 1Mb available for programme
: >code. Also I don't have to support video or keyboard entry, just
: >6 serial ports and an ethernet driver.
: >Is it possible to configure the Linux kernel to around 100Kb or less?
: Even if it were - the first Meg RAM is always reserved for the kernel,
: you'll have to resort to MS-Dork or some self-written system.
: Felix
It will take some hacking to get it to work anyway.
Hacking the kernel to be linked at an addr != 1M is just one of them.
And one of the easiest at that....
100kb is a very hard target I think. I found an old 0.99.xx kernel
yesterday. It was 200kb uncompressed. My current kernel is 360kb
compressed. You'll need a recent kernel as that supports
ethernet that the old ones didn't Moreover networking has become much
more stable, so you don't want a very old kernel. (Networking,
firewalling, accounting, IP forwarding are the main things that your
board is going to be used for right? This is probably restricted
information, so nobody tell anybody about this ok? :-)
Roger.
--
* legal notice: Microsoft Network is prohibited from redistributing this *
* work in any form, in whole or in part without a license. License to *
* distribute this work is available to Microsoft at $499. Transmission *
* without permission constitutes an agreement to these terms. *
*------------------------------------ Modified from Felix von Leitner ---*
** EMail: R.E....@et.tudelft.nl ** Tel +31-15-783643 or +31-15-137459 **
*** <a href="http://einstein.et.tudelft.nl/~wolff/">my own homepage</a> ***
Is it possible to configure the Linux kernel to around 100Kb or less?
What sort of minimum filesystem size would I be looking at? I don't
need logins or anything, if it helps save space.
Cheers,
--
Paul Andrew Pa...@pec.co.nz PEC (NZ) Ltd. CARDAX
(Network Consulting, Embedded, Linux, NT) P.O.Box 308, Marton, New Zealand
WARNING: I cannot be held responsible for the above fax: +64 6 3276724
because my cats have apparently learned to type. phn: +64 6 3278189
Okay so how about if I only have 256Kb RAM mapped under the 1Mb boundary?
I could even have 256Kb of flash mapped under the 1Mb boundary so that
the kernel is permanently there.
What would some of the other kernel hacks required? Just of the top of
your head. I want to use Linux rather than one of the commercial
realtime executives, but I haven't got much support from management.
>
>100kb is a very hard target I think. I found an old 0.99.xx kernel
>yesterday. It was 200kb uncompressed. My current kernel is 360kb
>compressed.
Okay, I could probably live with 256Kb. But you're right, I'll need
a recent one to get ethernet and some stability.
>(Networking,
>firewalling, accounting, IP forwarding are the main things that your
>board is going to be used for right? This is probably restricted
>information, so nobody tell anybody about this ok? :-)
Sorry, you haven't guessed my application. I don't want IP forwarding.
The serial ports are for comms to lower level devices that only talk
serial, and for debugging :-)
But yeah, you're right I'd probably get in trouble if I told you about
my application.
Paul
Cheers,
David
: : >I'm looking at using Linux for a new embedded product. By embedded
: : >I mean that it will be running on a custom designed 386EX board
: : >with no hard disk no floppy and only 1Mb available for programme
: : >code. Also I don't have to support video or keyboard entry, just
: : >6 serial ports and an ethernet driver.
..
: 100kb is a very hard target I think. I found an old 0.99.xx kernel
: yesterday. It was 200kb uncompressed. My current kernel is 360kb
: compressed. You'll need a recent kernel as that supports
: ethernet that the old ones didn't Moreover networking has become much
: more stable, so you don't want a very old kernel. (Networking,
: firewalling, accounting, IP forwarding are the main things that your
: board is going to be used for right? This is probably restricted
: information, so nobody tell anybody about this ok? :-)
I just took a look at SCO Xenix/286. The kernel is 127 kB, and Xenix runs fine
in 1 MB RAM on a 286/12. Of course, you'll only have uucp networking, no
TCP/IP. But, there is a TCP/IP for Xenix available, but I don't know if this
will work with 1 MB RAM. Otoh, Doug Comer's Xinu OS runs on PDP-11's with
64 (actually 56) kB RAM _and_ TCP/IP !
Unfortunately, you won't be able to get SCO/Xenix sources and it's quite
hard to find a Xenix/286 version nowadays (the 386 version required at
least 2 MB RAM, afaik). But shouldn't we be able to do similar things with
Linux ?
Btw, have you thought of using Minix (no flames, plase !)? Version 1.70
is available free of charge from ftp.cs.vu.nl or vespa.unix-ag.uni-siegen.de
complete with sources.
Ah, yes, IGEL (a German company selling terminals) offers a X terminal
running Linux. This system is a 386DX40 with 8 MB RAM, Linux in flash ROMs,
as well as most of the filesystem (compressed ROM filesys). They only reserved
a 64 kB RAM disk for writable files and symlinked these from the ROM filesystem
Amazingly, these terminals run Linux 0.99.13, obviously tweaked to run with
newer TCP/IP code and Xfree (3.1, I think). Maybe we should ask them to
release their code to the public...
regards,
Michael Engel (en...@numerik.fb6.uni-siegen.de)
>Paul Andrew <Pa...@pec.co.nz> writes:
>>I'm looking at using Linux for a new embedded product. By embedded
>>I mean that it will be running on a custom designed 386EX board
>>with no hard disk no floppy and only 1Mb available for programme
>>code. Also I don't have to support video or keyboard entry, just
>>6 serial ports and an ethernet driver.
>>Is it possible to configure the Linux kernel to around 100Kb or less?
>Even if it were - the first Meg RAM is always reserved for the kernel,
>you'll have to resort to MS-Dork or some self-written system.
As if Linux and Mess-Dos were the only OS's in the world.
You could use Minix (ftp.cs.vu.nl:/pub/minix/beta) (1.7.0 takes about
190 kB without networking - if you throw out everything you don't need
and add networking you are probably again at about 200kB. Minix 386vm
is larger but is more economical with the memory it leaves for user
processes). You may want to mess with the scheduler though, since it
currently isn't even remotely useable for real-time work (But maybe
without a file system which can block on sync it is good enough for
your application). Licencing Minix might be a problem. It is free for
educational and research purposes, but not for commercial use.
Another OS to consider is VSTa (ftp.cygnus.com:/pub/embedded/vsta). It
is a true microkernel OS aimed at embedded and SMP systems (though none
of the developers has one yet, so the latter is somewhat theoretical).
Although it has a higher version number than Linux (1.4 was just
released) it is much less mature yet. I am not quite sure about the
status of its networking code, though, but there is a ka9q.tz in the
distribution and somebody was talking about basing a router on it.
And then there are a lot of commercial OSs ...
hp
--
_ | Peter Holzer | Systemadministrator WSR | h...@wsr.ac.at
|_|_) |-------------------------------------------------------
| | | ...and it's finished! It only has to be written.
__/ | -- Karl Lehenbauer
: I'm looking at using Linux for a new embedded product.
If you were just going to try it for grins, I'd say go for it.
: By embedded I mean that it will be running on a custom designed 386EX board
: with no hard disk no floppy and only 1Mb available for programme code.
: Also I don't have to support video or keyboard entry, just 6 serial ports
: and an ethernet driver.
: Is it possible to configure the Linux kernel to around 100Kb or less?
Doubt it.
: What sort of minimum filesystem size would I be looking at? I don't
: need logins or anything, if it helps save space.
Don't get me wrong, I think Linux is great -- I've got 9 Linux machines at
last count. But, I've been doing embedded real time stuff for the past 15
years and I would really recommend you spend a couple thousand on a
real-time kernel that was designed from the ground up to be embedded. You
can get a decent kernel with source and no royalties for three thousand
dollars.
I don't know how much you get paid, but trying to embed Linux will probably
cost your employer _way_ more than the cost of a commercial kernel. If not,
you should get a job making the big bucks at Burger King. The commercial
real-time kernels are easily configured to run in way under 100K.
Sorry to be so negative, but I'd hate to see you spend a lot of time and
money trying to embed Linux only having to give up -- leaving a bad taste
for Linux in your employer's mouth.
--
Grant Edwards | Microsoft isn't the | Yow! I joined scientology at
Rosemount Inc. | answer. Microsoft | a garage sale!!
| is the question, and |
gra...@rosemount.com | the answer is no. |
Have you looked into Minix? Minix runs on an 8086 - Pentium, and
is a fully featured TINY kernel. Check out the newsgroup
comp.os.minix.
Of course, I prefer Linux myself. :-)
Take care,
-- Nick Kralevich
nick...@cory.eecs.berkeley.edu
Thats what Linux/8086 is about (don't bug me all the students have run
off for the summer 8)). Target and the sums suggest a kernel that runs as
small model 8086 is quite feasible using minixfs, a cut down vfs layer
without the fun stuff like the directory cache and the basic v7 type
goodies on top.
Or you could put UZI from Z80. Thats a 28K or so V7 kernel clone.
Alan
--
..-----------,,----------------------------,,----------------------------,,
// Alan Cox // iia...@www.linux.org.uk // GW4PTS@GB7SWN.#45.GBR.EU //
Redistribution of this message via the Microsoft Network is prohibited
<A href="file:/dev/mouse">Click here to disable mouse.</A>
Where can I find out more about Linux/8086? Although I really want
memory protection and a bit more RAM. Many of our goals seem similar.
>Target and the sums suggest a kernel that runs as
>small model 8086 is quite feasible using minixfs, a cut down vfs layer
>without the fun stuff like the directory cache and the basic v7 type
>goodies on top.
Well, removing the directory cache looks like it would save you 15Kb
for a start.
My sums so far suggest that I can have a 130Kb uncompressed kernel
before networking. This is with no floppy support and an RS232 console.
Kind Regards,
Paul
--
Paul_...@pec.co.nz PEC (NZ) Ltd. CARDAX
>Rogier Wolff (wo...@socrates.et.tudelft.nl) wrote:
>: Felix von Leitner (lei...@inf.fu-berlin.de) wrote:
>: : Paul Andrew <Pa...@pec.co.nz> writes:
>
>: : >I'm looking at using Linux for a new embedded product. By embedded
>: : >I mean that it will be running on a custom designed 386EX board
>: : >with no hard disk no floppy and only 1Mb available for programme
>: : >code. Also I don't have to support video or keyboard entry, just
>: : >6 serial ports and an ethernet driver.
I have two Xenix/286 systems to sell with full docs and everything.
$50 + Shipping if anyone is interested.
I really liked Xenix before Linux came along.....
E-mail me if you want details.
- David Summers
>(boy, did we lose a lot of performance... it was running really tight in
>8MB, and we *expanded* from 4MB (that ran Xenix just fine) to this 8MB)
>
But you are 100% correct there :-)
--
Cees de Groot, OpenLink Software <c...@bofh.lake.de>
262ui/2048: ID=4F018825 FP=5653C0DDECE4359D FFDDB8F7A7970789 [Key on servers]
http://www.lake.de/sonst/homepages/s2449/index.html
Don't bother writing your own. Use an embedded real-time OS. There are
many available.
Linux/MS-DOS/OS-2/etc. are not suited for your problem.
>Felix
>
>--------====### legal notice ###====-------------------------------------------
>Microsoft Network is prohibited from redistributing this work in any form, in
>whole or in part. License to distribute this post is available to Microsoft
>for $499. Posting without permission constitutes an agreement to these terms.
>
>> Ah, yes, IGEL (a German company selling terminals) offers a X
>> terminal running Linux. This system is a 386DX40 [...]
>> Amazingly, these terminals run Linux 0.99.13, obviously tweaked
>> to run with newer TCP/IP code and Xfree (3.1, I think). Maybe
>> we should ask them to release their code to the public...
Aren't they required to deliver their product with source code
included, or at least give the source code to anybody who asks them
because of the Linux kernel being under GNU General Public License?
Their tweaked kernel must be a ``derived work''!
So, if you want their source code, just ask them.
Jacob.
>So, if you want their source code, just ask them.
>
Don't they just have to offer to provide source code with their product?
I bet they don't though.
They don't have to give it to anyone off the street surely?
Yes, it surely is.
: >So, if you want their source code, just ask them.
: >
: Don't they just have to offer to provide source code with their product?
: I bet they don't though.
I didn't have a chance to take a look at the manual as we only had a
test version here and nobody knew where that manual was ...
: They don't have to give it to anyone off the street surely?
Hmmm, I admit I'll have to re-read the GPL... I'm not sure about that.
However, I made a very positive experience with HP concerning the GPL.
HP has taken over the Texas Instruments (TI) Unix department about two
or three years ago. With the TI BS1500 Unix servers, gcc-1.37 was bundled
without mentioning the GPL. Well, I gave HP Germany a call and two weeks
later I got a QIC tape and the complete sources on it. I think that's a
fair practice; I didn't have to pay for anything, not even for the tape
itself.
Just my $0.02...
Michael Engel (en...@numerik.fb6.uni-siegen.de)
> Where can I find out more about Linux/8086? Although I really want
> memory protection and a bit more RAM. Many of our goals seem similar.
There's an entry in the Linux Projects Map found in the docs directory
on sunsite & friends.
--
Harald Milz (h...@ix.de) WWW: http://www.ix.de/ix/editors/hm.html
iX Multiuser Multitasking Magazine phone +49 (511) 53 52-377
Helstorfer Str. 7, D-30625 Hannover fax +49 (511) 53 52-361
Opinions stated herein are my own, not necessarily my employer's.