summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
Commit message (Collapse)AuthorAgeFilesLines
* initramfs-framework: support PARTLABEL optionDiego Rondini2019-10-021-0/+5
| | | | | | | | | | | | | Since commit (kernel >= 4.20): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f027c34d844013d9d6c902af8fa01a82d6e5073d specifying rootfs by PARTLABEL is supported. This commit adds support to specify root by GPT partition label. (From OE-Core rev: ebc974be12c3e83e961c99c24fde267d6c8e8bfc) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: fix var nameDiego Rondini2019-09-271-2/+2
| | | | | | | | | Use appropriate variable name for root of partuuid. (From OE-Core rev: d954ddcb2a9678b3b964279b41c0ec677ea9f03a) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: support PARTLABEL optionRichard Purdie2019-09-191-2/+2
| | | | | | | | | | | | | | Since commit (kernel >= 4.20): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f027c34d844013d9d6c902af8fa01a82d6e5073d specifying rootfs by PARTLABEL is supported. This commit adds support to specify root by GPT partition label. RP: [Fixup to match v2 of the patch] (From OE-Core rev: 6901b7840dd9429064003ab939ba7e5cca5dc37f) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: support PARTLABEL optionDiego Rondini2019-09-191-0/+5
| | | | | | | | | | | | Since commit (kernel >= 4.20): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f027c34d844013d9d6c902af8fa01a82d6e5073d specifying rootfs by PARTLABEL is supported. This commit adds support to specify root by GPT partition label. (From OE-Core rev: e714b8982c2decbc24598af46f44c3a94834591f) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: merge multiple "mkdir" callsMax Kellermann2019-05-071-5/+1
| | | | | | | | | | Reduce overhead. (From OE-Core rev: 31e6ea22523ded6a4e4f46472ab95ed17efe890b) Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-extract/init-install-efi-testfs: Unify question spacesGianfranco Costamagna2019-04-041-1/+1
| | | | | | | | | | | | unify the spacing for questions in various places e.g. before the [Y/n] there should be a space, and before "?" there should be none. Unify the questions where the system expect an answer from the end user. (From OE-Core rev: 7a3f128b19e55b751e81bc676e5946544b0c8735) Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: add lvm moduleLiwei Song2019-03-252-0/+22
| | | | | | | | | | lvm module will initial lvm volume to support boot from Logical Volume. (From OE-Core rev: 3a4213f014fc4aa5be05dfc0722d87e01e5ff10c) Signed-off-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: mount efivarfs to make Intel VROC work wellLiwei Song2019-03-251-0/+5
| | | | | | | | | | | | | efivafs contain some meta data about Intel VROC, which will be used by mdadm to create raid device. These are preparation work to support boot from Intel VROC RAID disk. (From OE-Core rev: b25869c76975bbcec8d2f22f680e58976ec4de5c) Signed-off-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-boot: create /dev/consoleJacob Kroon2019-01-111-1/+6
| | | | | | | | | | | | | | | | | | | | The Yocto kernel expects a proper /dev/console to exist before running init, otherwise booting will fail with the message: Kernel panic - not syncing: /dev/console is missing or not a character device! Please ensure your rootfs is properly configured Add similar fix as was done for initramfs-framework and initramfs-live-boot in commits 0352841cd92f6316bcac092e2fff9d28c352b36b 1b64664f0c388f41084f5db6e46e3e68c53fb6d9 (From OE-Core rev: 490d6fbd14805b6c72b525fbe8c9c6e08d796597) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: improve info messageAnuj Mittal2018-10-121-1/+1
| | | | | | | | | | Let users know that the installation was successful and that pressing Enter would lead to a reboot. (From OE-Core rev: a5993d9afab060d07213c14c0188422c9e258693) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework/udev: call settle before killAnuj Mittal2018-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | When mount command is executed in rootfs module of initrd, eudev creates a loop0 device node, applies rules and adds a inotify watch to it. Right after this step, we execute finish which first tries to kill any running udevd daemon before doing a switch_root. In some cases, it is possible that switch_root is executed before inotify_add_watch was actually processed which would lead to errors like: | inotify_add_watch(6, /dev/loop0, 10) failed: No such file or directory Make sure that we process all the events in queue before actually trying to kill udevd to prevent this race. Fixes [YOCTO #12861] (From OE-Core rev: a85c34d263fcf1542bbedcaf1634302466bb20cf) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: Don't use 'tr'Andrew Bresticker2018-09-131-1/+1
| | | | | | | | | tr is available in busybox, but not in toybox. Just use sed instead. (From OE-Core rev: 518cca6711f737f44ff74a5ac1308de8c9b49e78) Signed-off-by: Andrew Bresticker <abrestic@waymo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox/packagegroups: Break out the busybox-syslog dependencyRichard Purdie2018-09-105-0/+5
| | | | | | | | | | | | | | | | | | | | The busybox-syslog rrecomends is proving tricky as it gets pulled in early and there are conflicts between its use of update-alternatives and busybox needing to provide those things. We already have recipes using BAD_RRECOMMENDS to remove this dependency, it probably makes sense to spell it out explicitly and allow it to be overridden more easily. This patch does this, dropping the now unneeded BAD_RRECOMMENDS. It preserves the dependency as a recommendation for now, further cleanup may allow simplication of that. This unbreaks certain build failures on the autobuilder, more as a workaround but is a change we probably want to make anyway. (From OE-Core rev: 544ade2d78f1375d9e93d6bf5842d857ddaf3530) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: add nfsrootfs moduleOleksii Konoplitskyi2018-07-092-0/+55
| | | | | | | | | nfsrootfs module mounts rootfs via nfs parsing "nfsroot" and "ip" cmdline options. (From OE-Core rev: d1737f2dabac5e338061863c78a91b4c115365c7) Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts/init-live.sh: fix mounts w/ spaces fail to move to real rootfsArsalan H. Awan2018-06-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are spaces in the mount points of devices e.g.: a partition mounted at "/run/media/My Root Partition-sda1", the initrd fails to move such mount points over to the corresponding directories at /media under the real root filesystem, and the mount points would appear at the same location as they were mounted on when detected by initrd, for example: here: "/run/media/My Root Partition-sda1" instead of here: "/media/My Root Partition-sda1" This causes issues such as: * The disks/partitions cannot be formated with any filesystem using e.g. mkfs.ext4 or mke2fs in general. When tried to do so by making sure the device is not mounted, it failed with errors such as: > /dev/sda1 is apparently in use by the system; will not make a filesystem here! > /dev/sda1: Device or resource busy while setting up superblock * The read/write operations become extremely slow. e.g. Under testing, it took approx. 2 hours just to copy 700 MB of data to the partition, and it took more than 40 minutes to delete that data from it. Same operations took under 5 minutes on a partition that had no spaces in its mount point (or that was successfully moved to real root by initrd and appeared under /media instead of /run/media). This commit fixes such issues by quoting the arguments of failing mount move commands and by parsing OCT or HEX encoded special characters such as spaces to ASCII charecters in the mount points as kernel populates the procfs like so. (From OE-Core rev: 6f8f984ba363f764e83290b972ec31a90aad1603) Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: add timeout for legacy grubCatalin Enache2018-06-041-0/+2
| | | | | | | | | | | | | After installing an image from an iso, booting the system using the legacy boots makes the grub prompt wait for an enter. This is not desirable since many of this devices are embedded devices that should start by them self without user entry. (From OE-Core rev: f6d85426e48d458d0835d4fd3314ce53ab92bd38) Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: init-install(-efi).sh: don't assume 20M boot partitionCalifornia Sullivan2018-04-036-8/+30
| | | | | | | | | | | | | | | | | | | | | With multi kernel support in the installer we can exceed this limit. Calculate a sane size by checking the size of the original boot partition minus some objects we know won't be installed, plus some extra space for users. In addition, in the common case where only one small kernel is present to be installed, we actually get a smaller boot partition with less wasted space. Also add VIRTUAL-RUNTIME_base-utils to RDEPENDS where these scripts are used, as they're needed for the du command. [YOCTO #12583]. (From OE-Core rev: 2ca601bef44a07512c93b8452cf9001dce402617) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: format rootfs partition as ext4Anuj Mittal2018-03-282-6/+6
| | | | | | | | | | | Use ext4 filesystem instead of ext3 when using the live image to install on target. wic defaults to ext4 as well. (From OE-Core rev: db6c3d681807cfef098ead1db098f5268e1eb055) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: support multiple kernels and don't assume vmlinuzCalifornia Sullivan2018-03-061-3/+34
| | | | | | | | | | | | | | Since kernels will not necessarily be installed as vmlinuz anymore, don't assume that's its name for either the bootloader config or the copy of the kernel. Also, allow installing multiple kernels by searching for common kernel names. (From OE-Core rev: 5d66a4ce7f2595e75fe2af62c11ee957540ca067) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: Update to support installing multiple kernelsCalifornia Sullivan2018-03-061-5/+10
| | | | | | | | | | | | | | | We can no longer rely on the kernel having a static name of "vmlinuz". This means we can't use it as a sentinel value in our sed commands, and we can't just copy vmlinuz to the boot directory. Instead, we'll use "root=" as the sentinel value for our sed commands, and we'll search for common kernel names to copy into our boot directory. (From OE-Core rev: 3d67edb695368bfa5917dca2aab6a8dc4c437efc) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: rootfs: add support for LABELRicardo Salveti2018-02-161-0/+5
| | | | | | | | | | The rootfs can also be found via the partition label. (From OE-Core rev: 037255f3c448bfc05f3e7373e1ddeee4bbea2164) Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-module-install: Remove allarch and FILESEXTRAPATHSMartin Jansa2017-12-102-6/+5
| | | | | | | | | | | | | | | | | | | * files is already included in default FILESPATH * it cannot inherit allarch as it RDEPENDS on bunch of TUNE_PKGARCH packages * use the same COMPATIBLE_HOST restrictions as grub has to prevent ERRORs in bitbake world ERROR: Nothing RPROVIDES 'grub' (but oe-core/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb RDEPENDS on or otherwise requires it) grub was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) grub was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) NOTE: Runtime target 'grub' is unbuildable, removing... Missing or unbuildable dependency chain was: ['grub'] ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. (From OE-Core rev: ecad98a0ffe41d8cc8890d16be09e4b604a1e192) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: Add exec moduleOtavio Salvador2017-12-102-0/+38
| | | | | | | | | | | | This new module allow for easy execution of external scripts or applications. It runs anything found in /exec.d directory in order and in case of no scripts to be available, it opens a shell. (From OE-Core rev: 9b98c97338b4c3f985eca572d6a1e21324fa0fbc) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot-tiny: Create the initramfs-live-boot-tiny recipeAlejandro Hernandez2017-12-021-0/+21
| | | | | | | | | | | | | | | | | | The original initramfs-live-boot recipe RDEPENDS on udev, which is ok since the init script relies some of its functionality on udevadm and such, but on core-image-tiny-initramfs the init script simply drops to shell after a basic setup, so udev is not needed. This patch splits up an initramfs-live-boot-tiny recipe which does not use udev, but uses busybox-mdev instead, eudev installed about 600 extra Kilobytes to core-image-tiny-initramfs userspace, by avoiding to install eudev we achieve an even smaller footprint (almost 40% smaller). (From OE-Core rev: 7725bad91b89a291a7099b2d99789a86b028f329) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* install*.sh: add short sleep after parted commandsCalifornia Sullivan2017-12-022-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wasn't able to install to my Optane SSD due to the following error: Formatting /dev/nvme0n1p1 to vfat... mkfs.fat 4.1 (2017-01-24) mkfs.vfat: unable to open /dev/nvme0n1p1: No such file or directory Target install-efi failed A couple lines later I see: [ 10.265401] nvme0n1: p1 p2 p3 Then looking at the device itself after booting from a USB stick: root@intel-corei7-64: ~# ls /dev/nvme0n1* /dev/nvme0n1 /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 So it looks like the parted commands return before the device node is actually created. Work around this issue by waiting for device nodes for a short duration. (From OE-Core rev: 9daafd49b448122e35d67a1637ce2212793a4dc5) 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>
* init-install: fix grub-install commandCalifornia Sullivan2017-12-021-1/+1
| | | | | | | | | | | | | The grub_version variable was calling 'grub-install -v' (verbose) instead of 'grub-install -V' (version) causing unexpected failures. Fixes bug [YOCTO #12111]. (From OE-Core rev: 38dcbd96e82b1c40576a0514f053266429dca5d1) 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>
* initramfs-framework: add install moduleCalifornia Sullivan2017-11-301-0/+20
| | | | | | | | | | | | | | The non-EFI counterpart for installation was previously missing for initramfs-framework. This simply puts the normal install script in the correct location for initramfs-framework to make use of it. Partial fix for [YOCTO #12346]. (From OE-Core rev: f9d7cf30b12cbc5f642a11c0511dc1dc3ccf1aa5) 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>
* initramfs-module-install-efi: update summaryCalifornia Sullivan2017-11-301-1/+1
| | | | | | | | | | Note that this is an installation option for EFI systems. (From OE-Core rev: 366ddd22245a72df4c8e561761c6df8a6654bba6) 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>
* initramfs-module-install-efi: point to original copy and delete new fileCalifornia Sullivan2017-11-302-279/+3
| | | | | | | | | | There is no need to maintain two of the exact same files. (From OE-Core rev: 49ba882be9e28a51651a543779e6f02d33861393) 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>
* initramfs-live-install: Add aarch64 arch to COMPATIBLE_HOST.Peter Griffin2017-11-112-2/+2
| | | | | | | | | | So that we can use this on aarch64 with HiKey board. (From OE-Core rev: d78a3cd2a76b381b0395d99201f670c94fb594c7) Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: Allow directories with spacesOtavio Salvador2017-09-121-2/+2
| | | | | | | | | | | | | | | | | | | When mdev module loads the Linux kernel modules, it can visit directories with spaces. To allow that, we must quote the variable otherwise it misunderstand it arguments as multiple entries. Fixes: ,---- | Freeing unused kernel memory: 3072K (80d00000 - 81000000) | cat: can't open '/sys/devices/platform/Vivante': No such file or directory | cat: can't open 'GCCore/modalias': No such file or directory `---- (From OE-Core rev: afc73dd6346325de0a39997a3045b6659f9658b5) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: bump PR and fix install-efi and setup-live modulesCalifornia Sullivan2017-09-123-3/+7
| | | | | | | | | | | | | | | | | | | | Bump initramfs-framework PR, as it was missed in the previous initramfs-framework patch. These modules are shell scripts so they can be allarch. Fix the SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS in layer.conf, as these dependencies moved from the main recipe to these modules. Finally, set the PR to 4 in the new module recipes to avoid breaking package feeds. Fixes [YOCTO #12024]. (From OE-Core rev: d8af496dde699fadb2b21ff45cd20cf31e8abaf7) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: split setup-live and install-efi into separate recipesCalifornia Sullivan2017-09-113-18/+38
| | | | | | | | | | | | | | Having these the initramfs-framework recipe forced initramfs-framework users to build several tools they didn't need, and made it more difficult to declare the recipe as allarch. Fixes [YOCTO #12024]. (From OE-Core rev: e4cc1a22dd4fc9b3b12808c86213eb613f1ecb51) 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>
* initramfs-live-boot: disable systemd-update-done.service on live imagesCarlos Alberto Lopez Perez2017-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | When systemd is used, it will invoke a service on first boot that triggers a rebuild of ldconfig caches (rebuild dynamic linker cache). This is fine on the first boot of a system that has been installed, but it makes no sense on a live system. The worst part is that rebuilding this caches is slow and it causes the live system to take longer to boot. (I measured this in 30 seconds longer on a standard PC system booting core-image-sato live from an USB memory). Disable this by touching /etc/.updated and /var/.updated on the live initramfs. For more details see https://bugzilla.redhat.com/show_bug.cgi?id=1201725 and https://www.freedesktop.org/software/systemd/man/systemd-update-done.service.html (From OE-Core rev: d73493e63c506dca0e767ff183ca36bc48c2f03e) Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: Change recipe to be allarchOtavio Salvador2017-08-311-6/+2
| | | | | | | | | | | | | | | There is no COMPATIBLE_HOST in the recipe neither it makes sense for this to be machine specific. Possibly, initramfs-framework's based modules may be machine specific but if there is the case they can just RDEPENDS on initramfs-framework-base and provide the specific module as another recipe. (From OE-Core rev: 9a661bca9d9dd03627a5efaea0f9247394f05b0e) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework/setup-live: quote bootparam_root variableCalifornia Sullivan2017-08-241-1/+1
| | | | | | | | | | | 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>
* initramfs-framework/setup-live: also boot live image if root=/dev/ram0California Sullivan2017-08-191-1/+1
| | | | | | | | | | | | | | | | | | 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>
* initramfs-framework/setup-live: remove superfluous breakCalifornia Sullivan2017-08-091-2/+0
| | | | | | | | | | | 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>
* initramfs-framework: include install-efi module in recipe for installationNg, Wei Tee2017-07-272-3/+292
| | | | | | | | | | | | | | | | | Utilized the existing init-install-efi.sh script and renamed it to install-efi.sh to manage the installation process of images in initramfs-framework model. This script will be executed when "install" option is being chosen in the grub menu and install the image on the target platform. A new install-efi module is being added in the recipe to handle the installation process using initramfs-framework. [YOCTO #10989] (From OE-Core rev: 41b34441c22143cbabace3d794ead05801afb7a0) Signed-off-by: Ng, Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: module to support boot live imageNg, Wei Tee2017-07-272-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gummiboot: Remove/change gummiboot references with systemd-bootAlejandro Hernandez2017-01-092-12/+12
| | | | | | | | | | | | | | | After systemd-boot was introduced, its been tested for a while with no major issues being found until now, this patch completely replaces all gummiboot instances with systemd-boot ones, taking the next step into cleaning up systemd-boot/gummiboot. [YOCTO #10332] (From OE-Core rev: f9a61d3400ad9068a6d83b8eb6aefe3098c58e68) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: add support for NVME target installJoe Konno2016-11-152-2/+8
| | | | | | | | | | | | | | Add awareness of /dev/nvme* block devices to install scripts. As presently written, installer knows only of /dev/sd* and /dev/mmcblk* block devices. Building upon scaffolding put in place by Awais in... 80ec9f627915 ("initrdscripts: handle mmc device as installer medium") (From OE-Core rev: b5a036ce958e3fe24690531712071abc14b48033) Signed-off-by: Joe Konno <joe.konno@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Fixes the install script failing when not finding any mmcblk ↵Alejandro Hernandez2016-08-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | devices The init-install.sh and init-install-efi.sh scripts perform a check to see which devices are available on a booted system for installation. Recently, the way we check for these devices changed on 993bfb, greping for devices found on /sys/block/, this change caused the installer to fail (at least) when not finding any mmcblk devices, due to the fact that we call sh -e to execute this script, so any command (grep) or pipeline exiting with a non-zero status causes the whole script to exit This patch throws in a harmless true exit status at the end of the pipeline(s) of the grep commands to avoid the installer script from exiting, fixing the issue. [YOCTO #10189] (From OE-Core rev: 384cf92ca9c3e66763c2c1ff2776c53d47ae25d6) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install*: /etc/mtab make a link rather than a copyAwais Belal2016-08-172-4/+4
| | | | | | | | | | | | | | | | Using a copy would only make management of devices erroneous and makes the system unstable in some scenarios as tools will have to manipulate both files separately. A link ensures that both files /proc/mounts and /etc/mtab will have the same information at all times and this is how it is handled on newer systems where there is such a need. Same is suggested by busybox. (From OE-Core rev: 9f9240d175acee274c04242fd5781094b3f5491b) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install*: only pick root mmc devicesAwais Belal2016-08-172-2/+14
| | | | | | | | | | | | | | | | Some eMMC devices show special sub-devices such as mmcblk0boot0 etc. The installation script currently pick all of them up and displays it to the user which makes some confusions because these sub-devices are pretty small and complete installation including rootfs won't be possible in most cases. We simply now drop these sub-devices and only present the user with the root of such mmc devices. (From OE-Core rev: 4b4d80306de8d8a2e3a2d784890f34e4a0ecfcf0) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts/init-install*: Add rootwait when installing to USB devicesCalifornia Sullivan2016-08-172-0/+11
| | | | | | | | | | | | | | | It can take a bit for USB devices to be detected, so if a USB device is your rootfs and you don't set rootwait you will most likely get a kernel panic. Fix this by adding rootwait to the kernel command line on installation. Fixes [YOCTO #9462]. (From OE-Core rev: 40e2d36573a7a6bce377b1f9653607065ba5ffb6) 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>
* initramfs-live-boot: Make sure we kill udev before switching root when live ↵Alejandro Hernandez2016-08-171-1/+3
| | | | | | | | | | | | | | | | | booting When live booting, we need to make sure the running udev processes are killed to avoid unexepected behavior, we do this just before switching root, once we do, a new udev process will be spawned from init and will take care of whatever work was still missing [YOCTO #9520] (From OE-Core rev: e88d9e56952414e6214804f9b450c7106d04318d) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts/init-install*: Select install target instead of looping throughCalifornia Sullivan2016-07-212-16/+28
| | | | | | | | | | | | | | Its not immediately apparent that more than one install target could be available. With this change we list the available devices up front then prompt the user for which one to use, reducing confusion. Fixes [YOCTO #9919]. (From OE-Core rev: e68774f684543fd75250e56ea88a5e0cb0a2dd0a) 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>
* initramfs-framework: make rootfs module optionalPatrick Ohly2016-07-201-1/+14
| | | | | | | | | | | | It still gets installed by default via RRECOMMENDS without having to update users of the framework (because without it, the framework is incomplete), but that recommendation can be overridden on a per-image basis. (From OE-Core rev: 73bfaa0e57a3b6c8779ba716c1e38fcbee734947) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: Add support for PartUUIDsIgor Stoppa2016-07-081-0/+5
| | | | | | | | | | | | | The rootfs can be addressed also by referring to the PartUUID value from the GPT. This patch enables such type of reference. (From OE-Core rev: 1ab2ca141d3defe4b80212e28ac7c3f2271e2515) Signed-off-by: Igor Stoppa <igor.stoppa@intel.com> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>