We have a number of utility computers running that are based on uClibc. Every time we rebuild the devices, we have to basically create a new distribution. It appears that the Debian packages are no longer being maintained. That is OK, though, because we have figured out most of the tricks to getting this to work in our GIAGD articles. This article is the current status of getting a system running. Note that this procedure is much the same for pretty much any GNU/Linux system. You pretty much just need a filesystem with standard libraries and utilities, a kernel, and a boot loader. We have repeated techniques like this in many different articles. One thing, though, about uClibc is that it is very minimal. The entire system with GCC, networking, standard utilities, and ssh is only 94 megs with the current uClibc filesystem. We got the system running this time using a VMWare workstation. Mostly, this procedure differs in that most everything is included and works besides the boot loader. We will move it to our devices and add stuff like video later. First, we mount the new uClibc filesystem and create a tarball to extract to the new GIAGD filesystem:
$ mount . . . /root_fs_i386.ext2 on /mnt/giagd type ext2 (rw,loop=/dev/loop0) usr-1@wks-1 newgiagd $ cd /mnt usr-1@wks-1 mnt $ ls camera cdrom floppy giagd usbcard zip usr-1@wks-1 mnt $ su Password: root@wks-1 mnt # tar -cjpf /devsys.tar.bz2 . root@wks-1 mnt # pwd /mnt root@wks-1 mnt # cd giagd root@wks-1 giagd # ls bin etc lib lost+found opt root tmp var dev home linuxrc mnt proc sbin usr root@wks-1 giagd # tar -cjpf /devsys.tar.bz2 . root@wks-1 giagd # tar -tjvf /devsys.tar.bz2 | more tar: Record size = 8 blocks drwxr-xr-x root/root 0 1969-12-31 16:00:00 ./ drwx------ root/root 0 2005-01-11 16:12:18 ./lost+found/ drwx------ root/root 0 2005-01-11 16:12:18 ./bin/ lrwxrwxrwx root/root 0 2005-01-11 04:15:10 ./bin/cc -> /usr/bin/ccache lrwxrwxrwx root/root 0 2005-01-11 04:15:10 ./bin/gcc -> /usr/bin/ccache lrwxrwxrwx root/root 0 2005-01-11 04:15:10 ./bin/c++ -> /usr/bin/ccache lrwxrwxrwx root/root 0 2005-01-11 04:15:10 ./bin/g++ -> /usr/bin/ccache -rws------ root/root 361092 2004-10-08 19:49:18 ./bin/busybox lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/addgroup -> busybox lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/adduser -> busybox lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/ash -> busybox -rwx------ root/root 13828 2005-01-11 16:12:18 ./bin/cat -rwx------ root/root 25156 2005-01-11 16:12:18 ./bin/chgrp -rwx------ root/root 24804 2005-01-11 16:12:18 ./bin/chmod -rwx------ root/root 27236 2005-01-11 16:12:18 ./bin/chown -rwx------ root/root 38724 2005-01-11 16:12:18 ./bin/cp -rwx------ root/root 35588 2005-01-11 16:12:18 ./bin/date -rwx------ root/root 22532 2005-01-11 16:12:18 ./bin/dd lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/delgroup -> busybox lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/deluser -> busybox lrwxrwxrwx root/root 0 2005-01-11 04:30:20 ./bin/df -> busybox -rwx------ root/root 3776 2005-01-11 16:12:18 ./bin/dmesg root@wks-1 giagd #
We need a kernel:
usr-1@wks-1 linux-2.4.29 $ make oldconfig rm -f include/asm ( cd include ; ln -sf asm-i386 asm) /bin/sh scripts/Configure -d arch/i386/config.in # # Using defaults found in .config . . . make dep clean bzImage . . .
We need to boot using our superrescue CD, and then transfer the filesystem over to the new system:
All that remains it go get lilo installed. We were able to use the latest lilo available here. To compile this, we needed the bin86 utilities from here. Bin86 needed a symbolic link from gcc to cc. The system is live!
There are more details on these steps here.