diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-02 12:04:35 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-02 12:04:35 +0000 |
commit | 29c9030dcdc8a309f606fb816779353a87395604 (patch) | |
tree | b30374d94a0604e9ae5f3158065be2f3c7990b23 /mkinitram | |
parent | ebfe2cf1a71bddfa2f4d61b47a933ca5cd27f267 (diff) | |
download | abuild-29c9030dcdc8a309f606fb816779353a87395604.tar.gz abuild-29c9030dcdc8a309f606fb816779353a87395604.tar.bz2 abuild-29c9030dcdc8a309f606fb816779353a87395604.tar.xz abuild-29c9030dcdc8a309f606fb816779353a87395604.zip |
mk*: build and include modloop
try also mount modloop during boot and run a second pass hardware
detect.
Diffstat (limited to 'mkinitram')
-rw-r--r-- | mkinitram | 40 |
1 files changed, 28 insertions, 12 deletions
@@ -9,7 +9,18 @@ die() { exit 1 } -APKS=tmp/apks +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 @@ -25,7 +36,7 @@ fi if [ ! -d /lib/modules/$kernel ]; then die "modules dir /lib/modules/$kernel was not found" fi -msg "Using kernel $kernel" +msg "mkinitram Using kernel $kernel" # create empty image dir @@ -33,11 +44,11 @@ rm -rf "$image" mkdir -p "$image/dev" "$image/etc/rcS.d" # unpack busybox and deps -tar -C $image -zxf $APKS/uclibc-[0-9]*.apk -tar -C $image -zxf $APKS/busybox-[0-9]*.apk -tar -C $image -zxf $APKS/alpine-baselayout-[0-9]*.apk -tar -C $image -zxf $APKS/apk-tools-[0-9]*.apk -rm -f $image/.PKGINFO +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 @@ -45,24 +56,29 @@ 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; do +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 +mkdir -p $kmods/kernel/drivers $kmods/kernel/fs -for i in ata block ide ieee1394 scsi cdrom usb message; do +for i in ata block ide scsi cdrom usb message; do cp -LpR /lib/modules/$kernel/kernel/drivers/$i $kmods/kernel/drivers/ done -for i in fs lib; do - cp -LpR /lib/modules/$kernel/kernel/$i $kmods/kernel/ +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 |