aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
AgeCommit message (Collapse)Author
2013-02-04initramfsframework: Improve RDEPENDS to be package specificRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04initramfs-live-boot: Set RDEPENDS on the specific package that needs itRichard Purdie
Set the RDEPENDS on the specific package that has the dependency and stop it being applied to for example ${PN}-doc (and others). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04initramds-framework: add shutdown hook for udevIan Reinhart Geiser
In cases where other initramfs modules need to rely on udev running (ie in my case I have to load firmware on a device that is slow to start) there needs to be a way to keep it running during the lifecycle of the initramfs but still be shut down before swith_root is called. I added a module_pre_hook that will shut down udev before the finish module is called. Signed-off-by: Ian Reinhart Geiser <igeiser@devonit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25init-live.sh: move /media/xxx over to the real root filesystemChen Qi
Previously, the /media/xxx which contains the root image was not moved to be under the real root filesystem. Because of this, the output of the 'mount' command is somewhat confusing, that is, it has some mount point that is not even in the filesystem. Besides, on some machine, it caused the recovery procedure when we booted it next time. This patches fixes this issue by moving the /media/xxx over to be under the real root filesystem. [YOCTO #2064] [YOCTO #3705] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18initramfs-live-boot: handle multiple udev locationsRoss Burton
udevd isn't on $PATH and is in different places depending on what version of udev is being used. Copy the code from initramfs-framework to search for the right udevd at boot time instead of hard-coding a location. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-04init-live.sh: avoid duplicate mount points for the same filesystemChen Qi
A live system had duplicate mount points for the same filesystem in the output of 'mount' command. That was because we didn't handle the temporary mounts properly before switch_root. This patch fixes this problem by moving the mount points of some filesystems to the corresponding directories in the real root filesystem. [YOCTO #3155] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-19init-live: default to initrd shell if image isn't foundAlexandru DAMIAN
Adds "debugshell" command line parameter for live/install images. If the init live fails to find and mount a root-fs image, dumps to a shell after timeout so that the developer can figure what's wrong. Timeout defaults to 30 seconds, but it can be changed as param argument. Prior art in Ubuntu. Also, leaving a system stale isn't good form. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-03initramfs-framework: udev: Handle alternative binary pathsOtavio Salvador
This allows use of udev daemon for different installation destinations so allowing use of udev's from systemd code for initramfs. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03initramfs-framework: init: Stop mount warnings during bootOtavio Salvador
For a completely quiet boot using recent versions of utilities, the /etc/fstab and /var/lock need to be available. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-12initrdscripts: fix udevd in the live boot init scriptsRoss Burton
udevd moved location and isn't in $PATH anymore, so use an absolute path to start it. The control socket path moved too, so mkdir the directory it's in. Mounts the new devtmpfs on /dev device tree. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02Revert "initrd: Spawn an emergency shell when something goes wrong"Ross Burton
This had nowhere near enough testing... This reverts commit ffb6928f5783e5202d9849c3a185e29be1d41c63. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28initramfs: Make mkdir not failDamien Lespiau
This patch make "mkdir foo" not fail if foo already exists. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28initrd: Spawn an emergency shell when something goes wrongDamien Lespiau
set -e allows to exit if a command fails. We install a trap and execute emergency_shell() when either the init script exits or when ctrl-c is typed (say if we are stuck somewhere and we want to debug it). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19EFI: Make installer EFI awareDarren Hart
[YOCTO #1919] Create a basic EFI installer script modeled after the existing installer and add it to a new initramfs-live-install-efi recipe. Update the init-live.sh script to distinguish between LABEL=install and LABEL=install-efi and select the appropriate script. Add the efi installer to core-image-minimal-initramfs. Update grub-efi.bbclass to use "LABEL=install-efi" when it detects a label of "install". This is clearly not ideal, but a proper fix would involve decoupling the LABELS assignment from the image-live.bbclass usage of SYSLINUX_LABELS. We should be able to address that in a follow-on clean-up series. V2: Include missing initramfs-live-install-efi_1.0.bb V3: Rebase after Radu's console_params fix Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Add console kernel optionsRadu Moisan
Live image installer did not preserve BSP specified console= kernel parameter. This patch updates the init scripts that are responsible for grub.cfg creation so that options like console= are passed allong from installer to installed img [YOCTO #2426] Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09init-install: Clean up partition alignmentDarren Hart
The current partitioning scheme leaves a 1MB gap between all the generated partitions by adding a 1 to the end of the last partition to use as the start of the next. parted is smart enough to not overlap start and end positions of the same value. This avoids the 1 MB gaps. Rather than pad the disk with 1MB in the beginning and cut it off at the MB boundary on the end, we can use 0% and 100% to allow parted to do the required math and use as much of the disk as possible. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2012-07-09init-install: Correct ext2->ext3 typo in loggingDarren Hart
We create both the boot and root partitions as ext3 now, update the logging accordingly. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2012-07-09init-install: Use swap_ratio in the calulation of swap_sizeDarren Hart
swap_size currently uses a hard coded percentage and ignores the swap_ratio variable. Fortunately they are the same value currently. Make the calculation use the variable to avoid problems in the future. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2012-05-06initrdscripts: Update install.sh to work with mmc devicesDarren Hart
Fixes [YOCTO #2385] The installer only searches for hd[ab] sd[ab]. Some newer BSPs have mmcblk devices that should be used as the install target. These devices also have a partition prefix (mmcblk0p1 instead of mmcblk01). As they are detected asynchronously, it is necessary to add the rootwait kernel parameter to avoid a race condition trying to mount the root device. As BSPs like the FRI2 and the sys940x have mmc devices and will have a 1.2 release, we should push this to 1.2.1. The changes are perfectly contained and easily verified. Test for an mmcblk device and add the p partition prefix if necessary. Add the rootwait kernel parameter when an mmcblk device is detected. Replace the series of explicit umount commands with a single umount using a wildcard. This will find all the partitions and will not try to unmount non-existant devices. Avoid copy and paste errors by replacing /dev/${device}${pX} references with the previously assigned rootfs, bootfs, and swap variables. These changes have been tested on the FRI2 Sato image which installed to /dev/mmcblk0 as well as the N450 Sato image which installed to /dev/sda. Both were successful. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-22initramfs-live-boot: Disable unionfs until its issue with the system rootdir ↵Richard Purdie
are resolved There are issues with the current unionfs when making a union mount over "/". Until these are resolved we can't use unionfs for live booting so disable this temporarily as a workaround. unionfs is usable in other circumstances. [YOCTO #2331 workaround] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11initrdscripts: fix init-live.sh and use unionfsYang Shi
[YOCTO #1487] When booting up with liveCD image, init scripts can't work well on read-only filesystem. Unionfs, which is supported in Yocto kernel, allows a filesystem to appear as writeable, but without actually allowing writes to change the filesystem. Use unionfs to mount rootfs and make root file system can be writen when using liveCD to boot up. Set UNION_FS variable depending on kernel config, so that it can work with kernel which doesn't have unionfs feature. [RP: Mark recipe as machine specific due to kernel dependency] Signed-off-by: Yang Shi <yang.shi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08initrdscripts: add sleep to avoid kernel messages before install messageSaul Wold
As suggested by Darren Hart [YOCTO #725] Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-12-08initramfs-framework: provides a modular initramfsOtavio Salvador
Provides the API and modules for a modular initramfs. The currently included modules are: * initramfs-module-debug adds support to dynamic debugging of initramfs using bootparams * initramfs-module-udev: enables udev usage * initramfs-module-mdev: enables mdev usage * initramfs-module-e2fs: adds support for ext4, ext3 and ext2 filesystems Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-10-14initramfs-live-boot: make it more generic and easy to useOtavio Salvador
The script was making some assumptions that enforced many requirement in the machine kernel configuration and usage, besides it were too while booting. Changes included: * fix indentation; * rdepends on udev; * allow use of isofs as module; * remove rootdelay param parsing as it was unused; * don't verbosely kill udevd and mknod; * mount devtmpfs into rootfs, if available, before swithing root; Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-09-16Set an explicit path for the initrd scriptsDarren Hart
If we don't set PATH, then the shell will specify one for us. Busybox adds the sbin dirs, but bash does not. I hit an issue where bash (among other things) ended up in my initrd and the boot scripts failed due to a bad default PATH. While that is a separate issue, we should not be at the mercy of the shell's default PATH. Update the initrdscripts to all specify: PATH=/sbin:/bin:/usr/sbin:/usr/bin Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16initramfs-live-install: add PN to RDEPENDSTom Zanussi
RDEPENDS is package-specific, so add ${PN} to it. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-15initramfs-live-install: add support for grub2Tom Zanussi
grub2 needs a different set of install steps from grub 0.97. This adds them to init-install.sh and adds an install-time check that determines which version is being used and which steps to use depending on the version of grub selected. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2011-09-07initramfs-live-install: Be consistent with grub.Lianhao Lu
[YOCTO #1428] Because the underlying grub 0.97 the initramfs-live-install RDEPDNEDS on only supports 32bit x86 target, set the COMPATIBLE_HOST accordingly. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-08-24initrdscripts: fix init-live.sh for hddimg and livecdJingdong Lu
Both hddimg and livecd use init-live.sh script to boot the rootfs.img. But the paths of rootfs.img in hddimg and livecd are different. So we add a variable "ISOLINUX" to provide a correct path. Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
2011-08-19initrdscripts: fix init-live.shJingdong Lu
Fix bug: [YOCTO #686] Because the variable "ROOT_IMAGE" in init-live.sh is not correct, it fails to run when using liveCD. Modify value of "ROOT_IMAGE" to "isolinux/rootfs.img". If we want to use liveCD, we also need to add some kernel options related to CDROM support when compling kernel. Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
2011-08-12init-install.sh: Fix make partition and make file system issuesMei Lei
[YOCTO #1151] Change the offset from the beginning of the disk to aligne the blocks. In this script, we use mkfs.ext3 to create file system after partition, but we use mkpartfs to create file system repeatly, and get some warnings about choose another specific tools to create file system for reliability. So use mkpart instead of mkpartfs and only use mkfs.ext3 to create file system. Signed-off-by: Mei Lei <lei.mei@intel.com>
2011-06-13initrdscripts: Inhibit compiler/libc dependencies as this is just a ↵Richard Purdie
configuration file Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09initramfs-live-install: comment out allarch inherit to resolve no providerTom Zanussi
initramfs-live-install is only compatible with i.86|x86_64 so shouldn't inherit 'allarch'. This comments it out. More specifically, commit 52295fa3deef3b0374b99829626d524cefae6001 (Improve handling of 'all' architecture recipes and their interaction with sstate) sets TARGET_ARCH which due to the COMPATIBLE_HOST setting in the recipe causes it to be skipped and gives the following error for any -live build: NOTE: Resolving any missing task queue dependencies NOTE: Runtime target 'initramfs-live-install' is unbuildable, removing... Missing or unbuildable dependency chain was: ['initramfs-live-install'] ERROR: Required build target 'core-image-sato-live' has no buildable providers. Missing or unbuildable dependency chain was: ['core-image-sato-live', 'core-ima\ ge-minimal-initramfs', 'initramfs-live-install'] ERROR: Nothing RPROVIDES 'initramfs-live-install' Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Commented out with explaination instead of remove Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-31Improve handling of 'all' architecture recipes and their interaction with sstateRichard Purdie
The existing PACKAGE_ARCH = "all" mechanism of sharing packages is problematic with sstate since there are a variety of variables which have target specific values and the sstate package therefore correctly changes signature depending on the MACHINE setting. This patch creates a new "allarch" class which sets: PACKAGE_ARCH = "all" (as per the existing convention) INHIBIT_DEFAULT_DEPS = "1" (since its not target specific and therefore can't depend on the cross compiler or target libc) TARGET_ARCH = "all" TARGET_OS = "linux" TARGET_CC_ARCH = "none" (since these variables shouldn't change between the different packages and target compiler flags shouldn't be getting used) PACKAGE_EXTRA_ARCHS = "" (since we shouldn't be depending on any architecture specific package architectures) Not all PACKAGE_ARCH = "all" recipes can use this class since some run configure checks on the compiler. This means they have target specific components and therefore the "all" classification is incorrect. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21Further cleanup of various poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20Replace POKYBASE with COREBASERichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07init-live.sh: add 'coldplug' udev triggerTom Zanussi
Fixes [BUGID #693] The init-live.sh script starts udevd in init-live.sh:early_setup(), but doesn't account for the possibility that the root device may have already been registered by the kernel before udevd starts up. If the device is detected after udevd starts up, everything's fine - udevd gets the 'add' uevent for the device, the root image shows up at e.g. /media/sda/rootfs.img, and the boot continues. If however the device is detected before udevd starts up, udevd misses the 'add' uevent and the root image never shows up, causing it to stay in the 'waiting for removable media' loop forever. The 'udevadm trigger' command is meant to be used to avoid this situation, but init-live.sh doesn't use it. Furthermore, since the default was changed in udev 152 from 'add' to 'change', the command needs to explicity name 'add' as the action. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2010-12-10Correct DESCRIPTION typos in various recipesDarren Hart
An investigation into undocumented variables uncovered a few mispellings of the variable DESCRIPTION. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2010-12-06initramfs-live-boot:Add license checksum to bb fileMei Lei
Add COPYING.MIT file checksum to bb file Signed-off-by: Mei Lei <lei.mei@intel.com>
2010-12-06initramfs-boot:Add license checksum to bb fileMei Lei
Add COPYING.MIT file checksum to bb file Signed-off-by: Mei Lei <lei.mei@intel.com>
2010-12-06initramfs-live-install:Add license checksum to bb fileMei Lei
Add COPYING.MIT file checksum to bb file Signed-off-by: Mei Lei <lei.mei@intel.com>
2010-09-30initrdscripts: remove the incorrect moblin message (Bug 368)Yu Ke
When install the live image into netbook/emenlow, the install tool prompt: # Found drive at /dev/sda. Do you want to install moblin there ? [y/n] The "moblin" here should be replaced by "poky". Fix [BUGID #368] Signed-off-by: Yu Ke <ke.yu@intel.com>
2010-08-27Major layout change to the packages directoryRichard Purdie
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>