alpine.mk/initram: name modloop after kernel flavor

So we can support multiple kernels in parallel.
This commit is contained in:
Natanael Copa 2009-02-12 07:30:02 +00:00
parent 73fe3d0a6e
commit c73a8cdf05
2 changed files with 11 additions and 8 deletions

View File

@ -89,7 +89,7 @@ $(REPOS_DIRSTAMP): $(SOURCE_APKBUILDS)
#
modloop: $(MODLOOP)
MODLOOP := $(ISO_DIR)/boot/modloop.cmg
MODLOOP := $(ISO_DIR)/boot/$(KERNEL_NAME).cmg
MODLOOP_DIR := $(DESTDIR)/modloop
MODLOOP_DIRSTAMP := $(DESTDIR)/stamp.modloop

View File

@ -113,18 +113,21 @@ 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
if [ -d $ALPINE_MNT/firmware ]; then
mkdir -p /lib/firmware
cp -a $ALPINE_MNT/firmware/* /lib/firmware/
fi
eend $?
if [ -d $ALPINE_MNT/firmware ]; then
ebegin "Copying firmware from $ALPINE_MNT/firmware"
mkdir -p /lib
cp -R -a $ALPINE_MNT/firmware /lib/
eend $?
fi
# early console?
if [ "$SINGLEMODE" = "yes" ]; then
echo "Entering single mode. Type 'exit' to continue booting."
@ -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