diff options
author | Dubiousjim <dubiousjim@gmail.com> | 2013-07-05 00:21:10 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-08 14:47:11 +0000 |
commit | 607124c60c1e5b65dbe78d65269a75cc980e421c (patch) | |
tree | 05f87ae0558bd1b94ff8537cdfdebf369778265f /mkinitram | |
parent | 9e94ea184410e57649bad2f1f5ab1d5787ef9657 (diff) | |
download | abuild-607124c60c1e5b65dbe78d65269a75cc980e421c.tar.gz abuild-607124c60c1e5b65dbe78d65269a75cc980e421c.tar.bz2 abuild-607124c60c1e5b65dbe78d65269a75cc980e421c.tar.xz abuild-607124c60c1e5b65dbe78d65269a75cc980e421c.zip |
remove unused files
as discussed in http://lists.alpinelinux.org/alpine-devel/3122.html
Diffstat (limited to 'mkinitram')
-rw-r--r-- | mkinitram | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/mkinitram b/mkinitram deleted file mode 100644 index 2ae21f8..0000000 --- a/mkinitram +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh - -msg() { - echo "==>" $@ -} - -die() { - echo $@ - exit 1 -} - -unapk() { - local dest="$1" - shift - while [ $# -gt 0 ]; do - tar -C "$dest" -zxf "$1" - shift - done - rm -f "$dest/.PKGINFO" -} - - -APKS=../aports/core/*/ - -image=$PWD/image -dest=$PWD/test.gz -init=init - - -kernel=$1 -# if no kernel specified, then guess... -if [ -z "$kernel" ]; then - kernel=$(ls /lib/modules 2>/dev/null | tail -n 1) -fi - -if [ ! -d /lib/modules/$kernel ]; then - die "modules dir /lib/modules/$kernel was not found" -fi -msg "mkinitram Using kernel $kernel" - -# create empty image dir - -rm -rf "$image" -mkdir -p "$image/dev" "$image/etc/rcS.d" - -# unpack busybox and deps -unapk $image $APKS/uclibc-[0-9]*.apk \ - $APKS/busybox-[0-9]*.apk \ - $APKS/alpine-baselayout-[0-9]*.apk \ - $APKS/apk-tools-[0-9]*.apk - -ln -sf /bin/busybox $image/init - -# create misc devs and enable boot scripts -mknod $image/dev/null c 2 2 -ln -s ../init.d/mdev $image/etc/rcS.d/S10mdev -ln -s ../init.d/hwdrivers $image/etc/rcS.d/S30hwdrivers -ln -s ../init.d/modutils $image/etc/rcS.d/S40modutils -ln -s ../init.d/modloop $image/etc/rcS.d/S50modloop -ln -s ../init.d/hwdrivers $image/etc/rcS.d/S60hwdrivers - -mkdir $image/.modloop - -# load those extra drivers -for i in ide-cd usb-storage ide-disk loop; do - echo $i >> $image/etc/modules -done - - -# copy kernel modules -kmods=$image/lib/modules/$kernel -mkdir -p $kmods/kernel/drivers $kmods/kernel/fs - -for i in acpi ata block ide scsi cdrom usb message hid; do - cp -LpR /lib/modules/$kernel/kernel/drivers/$i $kmods/kernel/drivers/ -done - -for i in isofs vfat nls ext2 cramfs '*.ko'; do - cp -LpR /lib/modules/$kernel/kernel/fs/$i $kmods/kernel/fs/ -done -cp -LpR /lib/modules/$kernel/kernel/lib $kmods/kernel/ - -depmod $kernel -b $image - - -# generate the image -cd $image -find . | cpio -o -H newc | gzip -9 > $dest |