summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-core/initrdscripts
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/initrdscripts')
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh2
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-live.sh7
-rwxr-xr-xpoky/meta/recipes-core/initrdscripts/initramfs-framework/init2
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs48
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb8
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb1
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb1
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb1
-rw-r--r--poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb1
9 files changed, 67 insertions, 4 deletions
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 82b0aa819..b6855b5aa 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -291,7 +291,7 @@ umount /boot
sync
-echo "Remove your installation media, and press ENTER"
+echo "Installation successful. Remove your installation media and press ENTER to reboot."
read enter
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-live.sh b/poky/meta/recipes-core/initrdscripts/files/init-live.sh
index 46cab6cc7..65183d7ee 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -95,8 +95,11 @@ boot_live_root() {
# Move the mount points of some filesystems over to
# the corresponding directories under the real root filesystem.
for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
- mkdir -p ${ROOT_MOUNT}/media/${dir##*/}
- mount -n --move $dir ${ROOT_MOUNT}/media/${dir##*/}
+ # Parse any OCT or HEX encoded chars such as spaces
+ # in the mount points to actual ASCII chars
+ dir=`printf $dir`
+ mkdir -p "${ROOT_MOUNT}/media/${dir##*/}"
+ mount -n --move "$dir" "${ROOT_MOUNT}/media/${dir##*/}"
done
mount -n --move /proc ${ROOT_MOUNT}/proc
mount -n --move /sys ${ROOT_MOUNT}/sys
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/init b/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
index 37527a840..3c7e09422 100755
--- a/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -84,7 +84,7 @@ mount -t sysfs sysfs /sys
# populate bootparam environment
for p in `cat /proc/cmdline`; do
opt=`echo $p | cut -d'=' -f1`
- opt=`echo $opt | tr '.-' '__'`
+ opt=`echo $opt | sed -e 'y/.-/__/'`
if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
eval "bootparam_${opt}=true"
else
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/poky/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
new file mode 100644
index 000000000..e67ee4c25
--- /dev/null
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+nfsrootfs_enabled() {
+ if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+ return 1
+ fi
+ return 0
+}
+
+nfsrootfs_run() {
+ local nfs_opts
+ local location
+ local flags
+ local server_ip
+
+ nfs_opts=""
+ if [ "${bootparam_nfsroot#*,}" != "${bootparam_nfsroot}" ]; then
+ nfs_opts="-o ${bootparam_nfsroot#*,}"
+ fi
+
+ location="${bootparam_nfsroot%%,*}"
+ if [ "${location#*:}" = "${location}" ]; then
+ # server-ip not given. Get server ip from ip option
+ server_ip=""
+ if [ "${bootparam_ip#*:}" != "${bootparam_ip}" ]; then
+ server_ip=$(echo "$bootparam_ip" | cut -d: -f2)
+ fi
+
+ if [ -z "$server_ip" ]; then
+ fatal "Server IP is not set. Update ip or nfsroot options."
+ fi
+ location=${server_ip}:${location}
+ fi
+
+ flags="-o nolock"
+ if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
+ if [ -n "$bootparam_rootflags" ]; then
+ bootparam_rootflags="$bootparam_rootflags,"
+ fi
+ bootparam_rootflags="${bootparam_rootflags}ro"
+ fi
+ if [ -n "$bootparam_rootflags" ]; then
+ flags="$flags -o $bootparam_rootflags"
+ fi
+
+ mount -t nfs ${flags} ${nfs_opts} ${location} ${ROOTFS_DIR}
+}
+
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 75d965f06..660343eaf 100644
--- a/poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -2,6 +2,7 @@ SUMMARY = "Modular initramfs system"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
PR = "r4"
@@ -9,6 +10,7 @@ inherit allarch
SRC_URI = "file://init \
file://exec \
+ file://nfsrootfs \
file://rootfs \
file://finish \
file://mdev \
@@ -24,6 +26,7 @@ do_install() {
# base
install -m 0755 ${WORKDIR}/init ${D}/init
+ install -m 0755 ${WORKDIR}/nfsrootfs ${D}/init.d/85-nfsrootfs
install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
@@ -53,6 +56,7 @@ PACKAGES = "${PN}-base \
initramfs-module-mdev \
initramfs-module-udev \
initramfs-module-e2fs \
+ initramfs-module-nfsrootfs \
initramfs-module-rootfs \
initramfs-module-debug \
"
@@ -83,6 +87,10 @@ SUMMARY_initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystem
RDEPENDS_initramfs-module-e2fs = "${PN}-base"
FILES_initramfs-module-e2fs = "/init.d/10-e2fs"
+SUMMARY_initramfs-module-nfsrootfs = "initramfs support for locating and mounting the root partition via nfs"
+RDEPENDS_initramfs-module-nfsrootfs = "${PN}-base"
+FILES_initramfs-module-nfsrootfs = "/init.d/85-nfsrootfs"
+
SUMMARY_initramfs-module-rootfs = "initramfs support for locating and mounting the root partition"
RDEPENDS_initramfs-module-rootfs = "${PN}-base"
FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index f588a1077..cc842ae8b 100644
--- a/poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -6,6 +6,7 @@ SRC_URI = "file://init-install-efi.sh"
PR = "r1"
RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
S = "${WORKDIR}"
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index 9222d57c1..48fc0c4a7 100644
--- a/poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -8,6 +8,7 @@ PR = "r9"
S = "${WORKDIR}"
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
do_install() {
install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
index 78a61cde2..523138cff 100644
--- a/poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
@@ -2,6 +2,7 @@ SUMMARY = "initramfs-framework module for EFI installation option"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
PR = "r4"
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
index 04e90cd30..56898e824 100644
--- a/poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
@@ -2,6 +2,7 @@ SUMMARY = "initramfs-framework module for installation option"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
# The same restriction as grub
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
OpenPOWER on IntegriCloud