Age | Commit message (Collapse) | Author |
|
Fix typos in debugging and error messages.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
Add support for force reboot in the case of fatal error. In some cases
it's better to force reboot (especially when hw watchdog is not
engaged) instead of waiting for 3600 seconds, for example in order to
trigger some recovery procedure during next boot procedure
(after unsuccessful OTA update etc).
ALso fix indendation issues in the fatal() function implementation.
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to
a subdir of WORKDIR and make S point at this instead.
I've chosen not to force S into any standard UNPACKDIR we may pick in
future just so the S = UNPACKDIR case is clearly visible by the
directory naming under WORKDIR as that should aid usability.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Where recipes use S = ${WORKDIR}, ensure they are referencing ${S} correctly
to access files as soon we want to stop doing this in WORKDIR at which point
they would break unless corrected.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Renaming the 'rootrw' kernel commandline parameter to
'overlayrootrwdev' to both align better with this modules name, and
point out the usage of the variable.
This patch also includes an if block to migrate the old 'rootrw'
block, should it be already used by someone.
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
The initramfs-framwork takes kernel commandline options and converts
them for internal use to variables following the 'bootparam_name'
pattern. The overlayroot module uses 'bootparam_rootfstype' and
'bootparam_rootfsflags' which both collide with linux kernel
parameters 'rootfstype' and 'rootfsflags'. This collision is solved
by putting the variables in the namespace of the initramfs-framework
module.
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
We've been removing PR values from recipes at upgrade time for a while. In general
anyone maintaining a binary distro would end up having to curate these themselves
so the values in OE-Core aren't really that useful anymore. In many ways it makes
sense to clear out the remaining ones (which are mostly for 'config' recipes that
are unlikely to increase in PV) and leave a clean slate for anyone implementing
a binary distro config.
References are left in meta-selftest since the tests there do involve them and
their removal upon upgrade.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add support for loongarch64 to:
linuxloader
core-image-minimal-initramfs
initramfs-module-install
Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn>
Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Operations such as mkfs fail on devices that are not
switched to the actual rootfs before switch_root is
called. The kernel interprets these devices as still
being used even after unmounting and errors such as
below are seen when the target is fully booted
root@v1000:~# umount /dev/sdb1
root@v1000:~# mkfs.ext4 /dev/sdb1
mke2fs 1.43.8 (1-Jan-2018)
/dev/sdb1 contains a ext4 file system
last mounted on Wed Nov 28 07:33:54 2018
Proceed anyway? (y,N) y
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Muhammad Hamza <muhammad_hamza@mentor.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When installed, this module mounts a read-write (RW) overlay on
top of a root filesystem, which is kept read-only (RO), free
from modifications by the user, this might prove to be useful
if we want to access or restore the original unmodified rootfs.
The existing overlay-etc.bbclass does something similar, it
mounts an overlay on top of the /etc directory, however doing
the same for root causes the original root to be inaccessible
once the system is booted, hence why this module is added to
the initramfs boot flow, allowing us to mount the RW overlay,
while keeping the original rootfs mounted at /rofs once the
system finishes booting. This script is loosely based on that
class.
This module requires rootrw=<foo> to be passed as a kernel
parameter to specify the device/partition to be used as RW by the
overlay and has a dependency on overlayfs support being present
in the running kernel.
It does not require the read-only IMAGE_FEATURE to be enabled.
The module needs to be executed after the initramfs-module-rootfs
since it relies on it to mount the filesystem at initramfs startup
but before the finish module which normally switches root.
After overlayroot is executed the usual boot flow continues from
the real init process.
If something goes wrong while running this module, the rootfs
is still mounted RO (with no overlay) and the finish module is
executed to continue booting normally.
Its worth noting that, on purpose, this isnt installed by default
on any images that use initramfs-framework to keep the boot flow
unmodified, only when a user manually requests to install it,
then it becomes functional.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Rename the image, the test controller class/code/module and the underlying
image sentinel file to all match the controller terminology.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If mounts are left lingering, then after we switch_root, attempts to
modify the block devices will result in an EBUSY with no way to unmount
them. As we're about to switch_root anyways, there isn't much use to
keep anything mounted unless it has the new rootfs.
Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is the result of automated script conversion:
scripts/contrib/convert-overrides.py <oe-core directory>
converting the metadata to use ":" as the override character instead of "_".
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Drop a duplicated check for "PARTLABEL=", also change to use elif to
avoid go through all the checks for root parameter.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently the install script copy only few hard coded item while
setting up target ESP, kernel artifacts, all .efi in EFI/BOOT,
grub & boot cfg and loader.conf.
While ESP can be much complex, eg: contain multiple initrd.
Add a ESP folder to carry any other files to setup onto ESP.
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It avoids init to crash when kernel cmdline contains a string with
spaces inside, like that:
dyndbg="file drivers/usb/core/hub.c +pltf"
Signed-off-by: Christophe Guibout <christophe.guibout@st.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of checking for existence of /dev in the mounted file system use
mountpoint to check if a root file system has been mounted. This allows
to use the rootfs module for OSTree based rootfs as well, where the file
system rootfs does not have any of the regular directories (at least
when using the modern layout).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If console=null systemd-udevd throws an assertion which prevents the
system from booting. This patch redirects stdin, stdout and stderr to
/dev/null in case that the console can't be opened so that udevd still
boots.
A systemd issue was reported here. However, they will not fix this
specific use-case:
https://github.com/systemd/systemd/issues/13332
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Use appropriate variable name for root of partuuid.
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Reduce overhead.
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>
|
|
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.
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>
|
|
lvm module will initial lvm volume to support boot from
Logical Volume.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Let users know that the installation was successful and that pressing
Enter would lead to a reboot.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
tr is available in busybox, but not in toybox. Just use sed instead.
Signed-off-by: Andrew Bresticker <abrestic@waymo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
nfsrootfs module mounts rootfs via nfs parsing "nfsroot" and "ip" cmdline options.
Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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].
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Use ext4 filesystem instead of ext3 when using the live image to install
on target. wic defaults to ext4 as well.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The rootfs can also be found via the partition label.
Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
* 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.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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).
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The grub_version variable was calling 'grub-install -v' (verbose) instead
of 'grub-install -V' (version) causing unexpected failures.
Fixes bug [YOCTO #12111].
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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].
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Note that this is an installation option for EFI systems.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|