aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-10-22 12:33:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-10-22 12:34:30 +0000
commit1aecb7a940aa7f6224e384fa3d1becf08c962367 (patch)
tree1c64e1ecfb2aa70c24583b9f7abac0c3ab626a66 /main/mkinitfs
parentb4c235bebdb577ad873b0ae050bb887a6d284deb (diff)
downloadaports-1aecb7a940aa7f6224e384fa3d1becf08c962367.tar.bz2
aports-1aecb7a940aa7f6224e384fa3d1becf08c962367.tar.xz
main/mkinitfs: fix cryptroot in initramfs
fix setup of cryptroot in initramfs
Diffstat (limited to 'main/mkinitfs')
-rw-r--r--main/mkinitfs/APKBUILD8
-rw-r--r--main/mkinitfs/git.patch42
2 files changed, 26 insertions, 24 deletions
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index 4880db3a65..4c5da61f75 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
-pkgver=2.8.0_git20151020
+pkgver=2.8.0_git20151022
_ver=${pkgver%_git*}
pkgrel=0
pkgdesc="Tool to generate initramfs images for Alpine"
@@ -37,8 +37,8 @@ package() {
make install DESTDIR="$pkgdir" || return 1
}
md5sums="1a321336d97b22257349ddd36884ec34 mkinitfs-2.8.0.tar.xz
-14ca0439d28186fc13f2d115411a0a79 git.patch"
+a0259eb62f456868660a56cfd681fbe6 git.patch"
sha256sums="5ffe4c5ec9e0ff4581e5b24301fd30d0964120d6b30ee78ea79f31ff48eeab73 mkinitfs-2.8.0.tar.xz
-f95b76a4d4cdbc58b923ff06da954d357372935317e615274d18b5c85719f93b git.patch"
+74c141160c1ce7db6b3d79066993b91db9ce1dd227b02cac78a00f4033f78d4c git.patch"
sha512sums="c103003f95c7d7d94daa41d0a81b210a0208c93d77203978554fb127a21e2f143b56990865fc53e2c5c732ef663603b297da63d31f915b1e3a3e0f3818aa8f2e mkinitfs-2.8.0.tar.xz
-624ab23c0ebc5544b4ff1daed28b13643dd4b8e723a0b682c5a2528aaf989f43b82d39884f5ca354b5180db4945a02f18d1fde1b791d95326a70cbc21b8a5aea git.patch"
+8a87dba55eb8d72da95185e1fe04d3f60f5c3f48983637c97ba63053d19baf92a5a3bb8901c7878ce8b6565497b6a5821544019f94a18710c5f6da01d3f2c2d2 git.patch"
diff --git a/main/mkinitfs/git.patch b/main/mkinitfs/git.patch
index d0f183410c..fb94a1769b 100644
--- a/main/mkinitfs/git.patch
+++ b/main/mkinitfs/git.patch
@@ -223,7 +223,7 @@ index fa74c10..b0e6c22 100644
kernel/drivers/virtio
+kernel/drivers/net/virtio_net*
diff --git a/initramfs-init.in b/initramfs-init.in
-index 934fe92..ca4a5d5 100755
+index 934fe92..0834175 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -7,7 +7,7 @@ sysroot=/sysroot
@@ -529,7 +529,7 @@ index 934fe92..ca4a5d5 100755
# load available drivers to get access to modloop media
ebegin "Loading boot drivers"
-@@ -528,8 +339,6 @@ if [ -f /etc/modules ] ; then
+@@ -528,34 +339,36 @@ if [ -f /etc/modules ] ; then
modprobe -q $module $args
done
fi
@@ -537,8 +537,16 @@ index 934fe92..ca4a5d5 100755
-scan_drivers
eend 0
++if [ -n "$KOPT_cryptroot" ]; then
++ cryptopts="-c ${KOPT_cryptroot}"
++ if [ -n "$KOPT_cryptdm" ]; then
++ cryptopts="$cryptopts -m ${KOPT_cryptdm}"
++ fi
++fi
++
# check if root=... was set
-@@ -538,24 +347,27 @@ if [ -n "$KOPT_root" ]; then
+ if [ -n "$KOPT_root" ]; then
+ if [ "$SINGLEMODE" = "yes" ]; then
echo "Entering single mode. Type 'exit' to continue booting."
sh
fi
@@ -550,26 +558,20 @@ index 934fe92..ca4a5d5 100755
- start_$i
- done
+
-+ if [ -n "$KOPT_cryptroot" ]; then
-+ cryptopts="-c ${KOPT_cryptroot}"
-+ if [ -n "$KOPT_cryptdm" ]; then
-+ cryptopts="$cryptopts -m ${KOPT_cryptdm}"
-+ fi
-+ fi
ebegin "Mounting root"
if [ "$KOPT_overlaytmpfs" = "yes" ]; then
- mkdir -p /media/root-ro /media/root-rw $sysroot/media/root-ro $sysroot/media/root-rw
- retry_mount -o ro $KOPT_root /media/root-ro 2>/dev/null
+ mkdir -p /media/root-ro /media/root-rw $sysroot/media/root-ro \
+ $sysroot/media/root-rw
-+ nlplug-findfs -p /sbin/mdev $KOPT_root \
++ nlplug-findfs $cryptopts -p /sbin/mdev $KOPT_root \
+ && mount -o ro $KOPT_root /media/root-ro
mount -t tmpfs root-tmpfs /media/root-rw
mkdir -p /media/root-rw/work /media/root-rw/root
mount -t overlay -o lowerdir=/media/root-ro,upperdir=/media/root-rw/root,workdir=/media/root-rw/work overlayfs $sysroot
else
- retry_mount ${KOPT_rootfstype:+-t} ${KOPT_rootfstype} \
-+ nlplug-findfs -p /sbin/mdev $KOPT_root
++ nlplug-findfs $cryptopts -p /sbin/mdev $KOPT_root
+ mount ${KOPT_rootfstype:+-t} ${KOPT_rootfstype} \
-o ${KOPT_rootflags:-ro} \
- $KOPT_root $sysroot 2>/dev/null
@@ -577,7 +579,7 @@ index 934fe92..ca4a5d5 100755
fi
eend $?
-@@ -571,35 +383,11 @@ if [ -n "$KOPT_root" ]; then
+@@ -571,35 +384,11 @@ if [ -n "$KOPT_root" ]; then
exec /bin/busybox sh
fi
@@ -610,13 +612,13 @@ index 934fe92..ca4a5d5 100755
-fi
-
-retry_mount -o ro $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1
-+nlplug-findfs -p /sbin/mdev ${KOPT_debug_init:+-d} \
++nlplug-findfs $cryptopts -p /sbin/mdev ${KOPT_debug_init:+-d} \
+ ${KOPT_usbdelay:+-t $(( $KOPT_usbdelay * 1000 ))} \
+ -b /tmp/repositories -a /tmp/apkovls
eend $?
# early console?
-@@ -620,27 +408,24 @@ fi
+@@ -620,27 +409,24 @@ fi
mount -t tmpfs -o $rootflags tmpfs $sysroot
@@ -656,7 +658,7 @@ index 934fe92..ca4a5d5 100755
;;
esac
-@@ -660,26 +445,16 @@ if [ -f "$ovl" ]; then
+@@ -660,26 +446,16 @@ if [ -f "$ovl" ]; then
eend $? $errstr || ovlfiles=
# hack, incase /root/.ssh was included in apkovl
[ -d "$sysroot/root" ] && chmod 700 "$sysroot/root"
@@ -687,7 +689,7 @@ index 934fe92..ca4a5d5 100755
rc_add hwclock boot
rc_add modules boot
-@@ -695,17 +470,24 @@ if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then
+@@ -695,17 +471,24 @@ if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then
rm -f "$sysroot/etc/.default_boot_services"
fi
@@ -718,7 +720,7 @@ index 934fe92..ca4a5d5 100755
eend 0
else
KOPT_splash="no"
-@@ -723,13 +505,13 @@ if [ -f $sysroot/etc/fstab ]; then
+@@ -723,13 +506,13 @@ if [ -f $sysroot/etc/fstab ]; then
# move the ALPINE_MNT if ALPINE_DEV is specified in users fstab
# this is so a generated /etc/apk/repositories will use correct
# mount dir
@@ -738,7 +740,7 @@ index 934fe92..ca4a5d5 100755
# hack so we get openrc
pkgs="$pkgs alpine-base"
-@@ -776,11 +558,16 @@ if [ "$KOPT_keep_apk_new" != yes ]; then
+@@ -776,11 +559,16 @@ if [ "$KOPT_keep_apk_new" != yes ]; then
apkflags="$apkflags --clean-protected"
[ -n "$ovlfiles" ] && apkflags="$apkflags --overlay-from-stdin"
fi
@@ -755,7 +757,7 @@ index 934fe92..ca4a5d5 100755
eend $?
# unmount ovl mount if needed
-@@ -788,9 +575,11 @@ if [ -n "$ovl_unmount" ]; then
+@@ -788,9 +576,11 @@ if [ -n "$ovl_unmount" ]; then
umount $ovl_unmount 2>/dev/null
fi
@@ -770,7 +772,7 @@ index 934fe92..ca4a5d5 100755
fi
# generate repositories if none exists. this needs to be done after relocation
-@@ -810,10 +599,10 @@ fi
+@@ -810,10 +600,10 @@ fi
setup_inittab_console $CONSOLE
# copy alpine release info