Skip to contentSkip to conversation

Linux under 8MB

DISCUSSION Imanpreet Arora 6 participants 6 messages Aug 18, 2005 – Aug 21, 2005

lore
Share & tools
lore
#0 lore raw

Hi all,

For the last couple of days, I have been trying to set
up linux kernel under 8MB. So far I have set up a linux 2.4.31, which just works under 8MB. However, I would be grateful if someone could help with the following queries

a) Is linux2.4 just the right option? What about linux 2.0.x?
Or for that matter even <2.0
b) What are the specific issues that are to be considered
while compiling an old kernel on a newer setup? I ask this because I compiled my current setup on a 2.6.11 machine and while doing "make modules_install", I got errors from depmod[%], complaining about depmod.old. I had to kludge my way through by setting up a link from depmod.old to depmod.

[%] Not to mention that on a FC4 machine, gcc 4,x meowed while compiling the kernel.

TIA,

Signature · 4 lines
Imanpreet Singh Arora
                  If I am given six hours to chop a tree, I will spend
the first four sharpening the knife.
                         -- A.L.
#1 lore raw
Quoted 9 lines · Imanpreet Arora

Hi all,

For the last couple of days, I have been trying to set
up linux kernel under 8MB. So far I have set up a linux 2.4.31, which just works under 8MB. However, I would be grateful if someone could help with the following queries

a) Is linux2.4 just the right option? What about linux 2.0.x?
Or for that matter even <2.0

The more interesting case would ne a recent 2.6 kernel with

General setup
Configure standard kernel features (for small systems)

enabled and appropriate options below this option selected.

Quoted 6 lines

b) What are the specific issues that are to be considered
while compiling an old kernel on a newer setup? I ask this because I compiled my current setup on a 2.6.11 machine and while doing "make modules_install", I got errors from depmod[%], complaining about depmod.old. I had to kludge my way through by setting up a link from depmod.old to depmod.

What userspace do you want to use on the 8MB machine? You need a userspace that supports such an old kernel.

Quoted 2 lines

[%] Not to mention that on a FC4 machine, gcc 4,x meowed while compiling the kernel.

gcc 4.0 is not a working compiler for _any_ kernel below 2.6.12.

Quoted 1 line

TIA,

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
In reply to Imanpreet Arora
Quoted 6 lines · Imanpreet Arora

Hi all,

For the last couple of days, I have been trying to set
up linux kernel under 8MB. So far I have set up a linux 2.4.31, which just works under 8MB. However, I would be grateful if someone could help with the following queries

hi,

what do you mean 8MB? RAM or storage space? what do you intend to acomplish with such project?

I've been working on something simillar. I've been able to create a micro distro which runs from a floppy disk (kernel+initrd.gz+bootloader<=1.44MB) and boots well with as low as 5MB of RAM (tested with qemu). The kernel I've used was 2.6.9, but 2.6.12 should work as well.

Quoted 2 lines

a) Is linux2.4 just the right option? What about linux 2.0.x?
Or for that matter even <2.0

2.6 has serious advantage over others when considering embedded environments (not sure if it applies to you)

Quoted 6 lines

b) What are the specific issues that are to be considered
while compiling an old kernel on a newer setup? I ask this because I compiled my current setup on a 2.6.11 machine and while doing "make modules_install", I got errors from depmod[%], complaining about depmod.old. I had to kludge my way through by setting up a link from depmod.old to depmod.

I did use uClibc and busybox (crosso compiled and linked to uClibc) to keep the distro as small as possible. (see buildroot from the maker of uClibc and busybox)

regards,

Signature · 3 lines
Pedro João Lopes Venda
email: pjvenda < at > rnl.ist.utl.pt
http://arrakis.dhis.org
#3 lore raw
In reply to Imanpreet Arora

I've made a printserver with i386DX/25, 8MB RAM and 170MB HDD. Kernel is 2.6.12 (very light - 1.2MB uncompressed), userspace is based on Slackware 9.0 (init scripts modified), print server is CUPS. It boots in about a minute. It ran with 4MB too but the boot time was around 15 minutes :-) (with original init scripts).

root@printserver:~# uname -a
Linux printserver 2.6.12-printserver #6 Fri Jul 1 23:40:17 CEST 2005 i386 unknown
root@printserver:~# cat /proc/cpuinfo
processor       : 0
vendor_id       : unknown
cpu family      : 3
model           : 0
model name      : 386
stepping        : unknown
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : no
fpu_exception   : no
cpuid level     : -1
wp              : no
flags           :
bogomips        : 4.28
root@printserver:~# free
             total       used       free     shared    buffers     cached
Mem:          6752       6196        556          0        528       3980
-/+ buffers/cache:       1688       5064
Swap:        32000          0      32000
Signature · 1 line
Ondrej Zary
#4 lore raw
In reply to Imanpreet Arora
Quoted 7 lines · Imanpreet Arora wrote/

Hi all,

For the last couple of days, I have been trying to set
up linux kernel under 8MB. So far I have set up a linux 2.4.31, which just works under 8MB. However, I would be grateful if someone could help with the following queries

Quoted 9 lines

a) Is linux2.4 just the right option? What about linux 2.0.x?
Or for that matter even <2.0
b) What are the specific issues that are to be considered
while compiling an old kernel on a newer setup? I ask this because I compiled my current setup on a 2.6.11 machine and while doing "make modules_install", I got errors from depmod[%], complaining about depmod.old. I had to kludge my way through by setting up a link from depmod.old to depmod.

Last year, at the Realtime linux workshop, there was a paper about running Linux on a machine with 2Mb of RAM + 2Mb of Flash. They even manage to boot in 1 second! Nevertheless, they had to do several modifications to achieve this. Maybe with the new options in the 2.6 kernel, it would be easier...

Check it here:
http://www.realtimelinuxfoundation.org/events/rtlws-2004/papers.html#PAPER_5795

Regards,
Eric

#5 lore raw
In reply to Imanpreet Arora
Quoted 9 lines · Imanpreet Arora

Hi all,

For the last couple of days, I have been trying to set
up linux kernel under 8MB. So far I have set up a linux 2.4.31, which just works under 8MB. However, I would be grateful if someone could help with the following queries

a) Is linux2.4 just the right option? What about linux 2.0.x?
Or for that matter even <2.0

2.4 is the worst choice. You want either 2.6 + patches from the linux-tiny project or you want a noticably older kernel. The 2.6 option as it is works with what is being developed should be the more maintainable option.

Eric