Building Tiny Linux Systems with Busybox, Part 2: Building the Kernel

Let Bruce help you put the BusyBox to work.
______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How Keyboard is working when no support provided in Linux

Anonymous's picture

How Keyboard is working when no support provided in Linux ?
When i booted Linux from floppy and used the ramdisk as the rootfs, everything is working fine.

But i was wondering how the keyboard is working ? No loadable drivers provided.
Also no support in Linux provided>

I am not getting the # prompt instead i am getting the $ prompet

K.RajaSekhar's picture

Hai Bruce Perens,

I have followed each and every step you told in this article but i am not getting the # prompt after booting it from the floppy. Instead i am getting the $ prompt.

How to get the # prompt can you tell me the error i am donig

Thanking you,
K.RajaSekahr

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

Anonymous's picture

Luckily he provided the list of names in almost the right format for python.
An easier way to create those links to busybox:

import os
names=["ls","ar","basename","cat","chgrp","chmod","chown","chroot","chvt","clear","cp","cut","date","dc","dd","deallocvtdf","dirname","dmesg","du","dumpkmap","dutmp","echo","false","fbset","fdflush","find","free","freeramdisk","fsck.minix","grep","gunzip","gzip","halt","head","hostid","hostname","id","init","insmod","kill","killall","length","linuxrc","ln","loadacm","loadfont","loadkmap","logger","logname","lsmod","makedevs","md5sum","mkdir","mkfifo","mkfs.minix","mknod","mkswap","mktemp","more","mount","mt","mv","nc","nslookup","ping","poweroff","printf","ps","pwd","reboot","rm","rmdir","rmmod","sed","setkeycodes", "sh", "sleep", "sort","swapoff","swapon","syn", "csyslogd", "tail", "tar", "tee", "telnet", "test", "touch", "tri", "true", "tty", "umount", "uname", "uniq", "update", "uptime", "usleep", "uudecode", "uuencode", "wc", "which", "whoami", "yes", "zcat"]
for name in names:
os.system("ln busybox "+name)

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

Thorsten's picture

I did this do create the links with a debian 'busybox-static'

#!/bin/sh
#
# Thorsten Strusch 2005-01-06
#
#########################################################################
#
BUSYBOX=$(which busybox)
#
Liste=$( $BUSYBOX 2>&1 | grep -A20 Currently | grep -v Curren | sed -e '{s/\t//}' -e '{s/\n//}' -e '{s/ //}' | grep -v ^$)
export IFS=','
for i in $Liste
do ln -s $BUSYBOX $i
done
unset IFS

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

Anonymous's picture

Or even easier:

from the busybox build dir

$ make PREFIX=../tiny-linux install-hardlinks

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

dragoran's picture

Hi...
all went ok, kernel uncompressed, but then..kernel panic :(

kernel panic: unable to mount root fs on 01:00, what that is.. i gave my full memory, but .. nothing.. why? can u send me reply?

P.S.: best article(s).. thanx...

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

Anonymous's picture

Im trying to make a mini floppy disk linux distro thing (if thats the right name) , i used a differant tutorial looks almost the same as this BUT .... i got the same boot error! that and something about VFS and "cramfs: wrong magic" so yeah. somethings up there, maybe i enabled some wrong options in the kernel and they are breaking each other.

Re: Building Tiny Linux Systems with Busybox, Part 2: Building t

Anonymous's picture

did you enable ROM filesystem support in the kernel? if not you can try mkcramfs instead

ROM filesystem

Anonymous's picture

I had a similar problem with romfs. In my case, I had to gzip the file system without "-9".

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState