summaryrefslogtreecommitdiff
path: root/initramfs-init
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-12 07:30:02 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-12 07:30:02 +0000
commitc73a8cdf05d5b84225884573b546c123667de991 (patch)
treed9e6f20dff5b2d00c11049dfdefd688592417d68 /initramfs-init
parent73fe3d0a6e701560d50e4d75071c4569d84df69d (diff)
downloadabuild-c73a8cdf05d5b84225884573b546c123667de991.tar.gz
abuild-c73a8cdf05d5b84225884573b546c123667de991.tar.bz2
abuild-c73a8cdf05d5b84225884573b546c123667de991.tar.xz
abuild-c73a8cdf05d5b84225884573b546c123667de991.zip
alpine.mk/initram: name modloop after kernel flavor
So we can support multiple kernels in parallel.
Diffstat (limited to 'initramfs-init')
-rwxr-xr-xinitramfs-init15
1 files changed, 9 insertions, 6 deletions
diff --git a/initramfs-init b/initramfs-init
index b14477d..b2375fe 100755
--- a/initramfs-init
+++ b/initramfs-init
@@ -113,17 +113,20 @@ mount $ALPINE_MNT >/dev/null 2>&1
eend $?
ebegin "Mounting loopback device for kernel modules"
modprobe loop
-mount -o loop,ro -t cramfs /media/$ALPINE_DEV/$(dirname ${KOPT_BOOT_IMAGE:-""})/modloop.cmg /.modloop
+mount -o loop,ro -t cramfs $ALPINE_MNT/$KOPT_BOOT_IMAGE.cmg /.modloop
rc=$?
if [ "$rc" = 0 ]; then
rm -rf /lib/modules
ln -sf /.modloop/modules /lib
fi
+eend $?
+
if [ -d $ALPINE_MNT/firmware ]; then
- mkdir -p /lib/firmware
- cp -a $ALPINE_MNT/firmware/* /lib/firmware/
+ ebegin "Copying firmware from $ALPINE_MNT/firmware"
+ mkdir -p /lib
+ cp -R -a $ALPINE_MNT/firmware /lib/
+ eend $?
fi
-eend $?
# early console?
if [ "$SINGLEMODE" = "yes" ]; then
@@ -157,14 +160,14 @@ fi
# install new root
ebegin "Installing packages to root filesystem"
mkdir -p /etc/apk
-for i in /media/$ALPINE_DEV/packages/*; do
+for i in $ALPINE_MNT/packages/*; do
echo $i >> /etc/apk/repositories
done
apk add --root /newroot --initdb --quiet --progress $pkgs
eend $?
# copy alpine release info
-cp /media/$ALPINE_DEV/.alpine-release $NEWROOT/
+cp $ALPINE_MNT/.alpine-release $NEWROOT/
ln -sf /.alpine-release $NEWROOT/etc/alpine-release
# if there is no repositories file, then use the default