Commit c73a8cdf authored by Natanael Copa's avatar Natanael Copa

alpine.mk/initram: name modloop after kernel flavor

So we can support multiple kernels in parallel.
parent 73fe3d0a
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment