On Thu, Apr 24, 2003 at 12:58:08PM +0200, Peter Hermsdorf wrote:
i just tried the provided inird.bin with debian and it worked.
i would like to create a customized version of the image file. are there
somewhere a bunch of scipts/makefiles that compiles the sources and
creates the initrd.bin image file ?
btw: i already have some experience using the openzaurus buildroot and i`m
looking for something similar for debian on zaurus....
I built those images natively on the Zaurus, not by cross-compiling, so the
process is very straightforward (though slow). It is basically a
debootstrap, with some extra (nonessential) packages installed, then with
some bits removed like documentation.
Then use "mkfs.jffs2 --pad=14811135 --eraseblock=0x20000 --little-endian" to
create the image. In order to get it to fit, I had to add hardlink support
to mkfs.jffs2 (patch in the BTS under mtd-tools).
Here is the process I used for stripping down the system:
rm -rf /tmp/initrd
mkdir /tmp/initrd
cp -a ...nfs export.../* /tmp/initrd
# Remove cruft from using the tree for a live system
rm -rf /tmp/initrd/var/cache/apt/*.bin \
/tmp/initrd/var/cache/apt/archives/*.deb \
/tmp/initrd/var/lib/apt/lists/debian*
find /tmp/initrd \( -name '*~' -o -name '*.dpkg-*' -o -name '.nfs*' \) -print0 \
| xargs -0 rm -f
# And remove some useful stuff that we can live without
rm -rf /tmp/initrd/usr/doc /tmp/initrd/usr/share/doc \
/tmp/initrd/usr/man /tmp/initrd/usr/share/man \
/tmp/initrd/usr/share/locale \
/tmp/initrd/var/lib/dpkg/info/*.md5sums \
/tmp/initrd/var/lib/dpkg/*-old \
/tmp/initrd/etc/X11/xkb \
/tmp/initrd/usr/X11R6/lib/X11/locale/[^C]* \
/tmp/initrd/usr/X11R6/include/X11 \
/tmp/initrd/sbin/fsck.ext3 \
/tmp/initrd/usr/bin/localedef \
/tmp/initrd/usr/bin/apt-cdrom \
/tmp/initrd/lib/libslang* \
/tmp/initrd/usr/share/info \
/tmp/initrd/usr/X11R6/lib/libXft.so* \
/tmp/initrd/usr/lib/libfreetype.so* \
/tmp/initrd/usr/lib/gconv
rm -rf /tmp/initrd/tmp
mkdir /tmp/initrd/tmp
chmod 1777 /tmp/initrd/tmp