Commit Graph

4 Commits

Author SHA1 Message Date
California Sullivan
26b6995f61 initramfs-framework/setup-live: quote bootparam_root variable
When bootparam_root was empty the if statement would resolve into
invalid syntax instead of short circuiting after the -z, causing a boot
failure.

(From OE-Core rev: dcd129504ea64986652e2e5907d9badf9373e367)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-24 13:48:10 +01:00
California Sullivan
769c774f89 initramfs-framework/setup-live: also boot live image if root=/dev/ram0
Our grub and syslinux bootloaders both define root=/dev/ram0 for live
images by default. Kernel docs show that root=/dev/ram0 is just a
sentinel value for the kernel to mount the initrd as root, which then
mounts and switches to the real root. This is exactly what our scripts
do, so just check for root=/dev/ram0 as well.

See: https://www.kernel.org/doc/html/v4.11/admin-guide/initrd.html#operation

This fixes the issue where the new initramfs-framework scripts would not
boot live images that use grub or syslinux bootloaders.

(From OE-Core rev: a30f8f60017d566d845ee5d3a8cfc338017211b0)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-19 22:15:39 +01:00
California Sullivan
511dbdbc9a initramfs-framework/setup-live: remove superfluous break
This causes us to fall out of the module setup/run loop in the base init
script should "root=" be defined, causing a boot failure.

(From OE-Core rev: 4f109da34a080c0d7cb86eaea1f7b6dfef3d04cb)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-09 09:24:16 +01:00
Ng, Wei Tee
716d5d9e65 initramfs-framework: module to support boot live image
setup-live module is a new module being introduced to integrate the
functionality of init-live.sh into new scriptlet named setup-live in
order to support the live boot image. The udev-extraconf rdepends is
being added to perform automounting. It gets to run before the rootfs
and finish module.

The setup-live scriplet include the changes for:

- Create a conditional loop for the bootparam_root variable. If it is
not set, then it will boot from ROOT_IMAGE. Else, it will boot normally
which is not from removable media.

- Gives a standard path to the original boot disk mount which can be
used to. While /media/sda is a good guess, it isn't always right, nor
is it a good assumption that only one boot disk is in the system.

- The current rootfs module has no support for rootfs images, currently
it only support for rootfs partitions for wic image. Therefore, there
is a need to assign the rootfs image for live image.

[YOCTO #11701]

(From OE-Core rev: 4d3300e85a8e65207a415b9cf84c9fa1f71b0406)

Signed-off-by: Ng, Wei Tee <wei.tee.ng@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00