diff options
Diffstat (limited to 'main/mkinitfs')
-rw-r--r-- | main/mkinitfs/0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch | 60 | ||||
-rw-r--r-- | main/mkinitfs/0002-init-new-boot-option-debug_init.patch | 27 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 6 |
3 files changed, 92 insertions, 1 deletions
diff --git a/main/mkinitfs/0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch b/main/mkinitfs/0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch new file mode 100644 index 0000000000..01cb2c2e3b --- /dev/null +++ b/main/mkinitfs/0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch @@ -0,0 +1,60 @@ +From 60821c8ba0118d231cd3b4fd008cd42868337439 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 27 Oct 2011 09:54:59 +0000 +Subject: [PATCH 1/2] init: try detect alpine_dev filesystem if not specified + +Note that ext4 will be detected as ext3 +--- + initramfs-init.in | 22 +++++++++++++++++++++- + 1 files changed, 21 insertions(+), 1 deletions(-) + +diff --git a/initramfs-init.in b/initramfs-init.in +index 0e30137..7c477c7 100755 +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -255,6 +255,20 @@ relocate_alpine_mnt() { + fi + } + ++# detect filesystem type on given device/UUID ++find_fs_type() { ++ local dev=$(findfs $1) ++ local i= ++ for i in $(blkid $dev); do ++ case $i in ++ TYPE=*) eval "$i" ++ echo $TYPE ++ return ++ ;; ++ esac ++ done ++} ++ + # gotta start from somewhere :) + echo "Alpine Init $VERSION" + +@@ -314,7 +328,7 @@ case "$ALPINE_DEV" in + UUID=*|LABEL=*) ;; + *) ALPINE_DEV=/dev/$ALPINE_DEV ;; + esac +- ++ + # look for standard mountpoint locations + ALPINE_MNT=$(find_mnt $ALPINE_DEV /etc/fstab) + [ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/${ALPINE_DEV##*/} +@@ -398,6 +412,12 @@ start_lvm + # locate boot media and mount it + ebegin "Mounting boot media" + mkdir -p $ALPINE_MNT ++ ++# try detect the filesystem ++if [ -z "$ALPINE_DEV_FS" ]; then ++ ALPINE_DEV_FS=$(find_fs_type $ALPINE_DEV) ++fi ++ + if [ -n "$ALPINE_DEV_FS" ]; then + mount_opts="-t $ALPINE_DEV_FS" + fi +-- +1.7.7.1 + diff --git a/main/mkinitfs/0002-init-new-boot-option-debug_init.patch b/main/mkinitfs/0002-init-new-boot-option-debug_init.patch new file mode 100644 index 0000000000..361c1da239 --- /dev/null +++ b/main/mkinitfs/0002-init-new-boot-option-debug_init.patch @@ -0,0 +1,27 @@ +From 8ff0a825348f5a0c628540d3a859a73624c7f066 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 27 Oct 2011 12:05:27 +0000 +Subject: [PATCH 2/2] init: new boot option: debug_init + +will enable lots of verbose debugging +--- + initramfs-init.in | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/initramfs-init.in b/initramfs-init.in +index 7c477c7..69e8d27 100755 +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -289,6 +289,9 @@ while [ $# -gt 0 ]; do + shift + done + ++# enable debugging if requested ++[ -n "$KOPT_debug_init" ] && set -x ++ + # pick first keymap if found + for map in /etc/keymap/*; do + if [ -f "$map" ]; then +-- +1.7.7.1 + diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 957b106163..2a6991dfa2 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -1,12 +1,14 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mkinitfs pkgver=2.4.1 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for Alpine" url=http://git.alpinelinux.org/cgit/mkinitfs depends="busybox apk-tools>=2.0" triggers="$pkgname.trigger=/usr/share/kernel/*" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 + 0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch + 0002-init-new-boot-option-debug_init.patch eglibc.patch " arch="noarch" @@ -43,4 +45,6 @@ package() { make install DESTDIR="$pkgdir" || return 1 } md5sums="f38010635e83fe277e1e261a4a9ea66e mkinitfs-2.4.1.tar.bz2 +1ae074d8f56f355c4fdb3a3813c7cd4a 0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch +5182b1172fb8f975d208f5cff8497ae0 0002-init-new-boot-option-debug_init.patch e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" |