summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
Commit message (Collapse)AuthorAgeFilesLines
* init-install-efi.sh: remove all root=foo from grub.cfgRobert Yang2016-04-031-1/+1
| | | | | | | | | | | | | There might be more than one root=/dev/foo in the config file which would cause unepected errros on the installed target, so remove all of them. [YOCTO #9354] (From OE-Core rev: ca402bc3bc4e9a5c3e19a6ca504017335212b2c9) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: fix disk_sizeRobert Yang2016-04-033-3/+3
| | | | | | | | | | It mis-matched "SanDisk" or "Disk Flags" before, which caused unexpected error. (From OE-Core rev: a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: fix overlay fsRobert Yang2016-03-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The name changes from overlayfs to overlayo * The workdir is a must when mount * The updir must be a subdir of rootfs.rw This patch plus with another one which has been sent to linux-yocto can fix the error when boot iso: EXT4-fs (loop0): re-mounted. Opts: data=ordered Populating dev cache /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/rcS.d/S36udev-cache: line 73: can't create /etc/udev-cache.tar.gz: Read-only file system udev-cache: update failed! rm: can't remove '/etc/udev/cache.data': Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system rm: can't remove '/tmp': Read-only file system ln: /tmp/tmp: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system ln: /etc/resolv.conf: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system /etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create /etc/volatile.cache.build: Read-only file system (From OE-Core rev: ba918e0e36418ec6e14aef537ff4fdf45af6d8d4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: fix ROOT_MOUNTRobert Yang2016-03-291-1/+1
| | | | | | | | | The '/' in the end is not needed, which caused '//' in the path. (From OE-Core rev: 6b0fc87ced857763ae7e9d1012fb9f5c952c2cc8) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live : make it easier to add custom boot targetsJérémy Rosen2016-03-201-12/+6
| | | | | | | | | | | | | | | | | | | | When booting from the live image, the label from the bootloader is passed to init.sh. init.sh uses the label to either boot a live image or call a script to take over and install the system. It is possible to add new labels to the bootloader via the LABELS family of variables, but the names in init.sh were hardcoded to install and install-efi this patch checks if a shell script with the same name as the label is available instead of using a hardcoded list. Any recipe can add such file and this provide a new boot target to the live image (From OE-Core rev: 2c10ca0fe612818cb43931b969ad2af5502f1e84) Signed-off-by: Jérémy Rosen <jeremy.rosen@openwide.fr> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: fix mmc device as install targetUrs Fässler2016-02-111-7/+7
| | | | | | | | | | Installing from USB to an internal SD Card did not work with Linux 4.4 in Yocto jethro. With this patch, consistent names are used for the paritions. (From OE-Core rev: 00a45d2e50c4f044ee4099940dd7d13ca44f7187) Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework_1.0:replace busybox for variable.Alejandro Joya2016-01-061-1/+1
| | | | | | | | | | | It replaces the use of busybox as hardcoded dependency to more dynamic this wouldn't affect the way that the initrams is build, just it let a more flexible replacement in the core. (From OE-Core rev: f0f7062e9aa5e7708fc92cac2afb1aa85eb3d4ef) Signed-off-by: Alejandro Joya <alejandro.joya.cruz@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: create directory /var/runWills Wang2015-12-081-0/+1
| | | | | | | | | | | | | The following error occurs when udevd startup: udevd[146]: bind failed: No such file or directory error binding udev control socket udevd[146]: error binding udev control socket (From OE-Core rev: 4db089f10a379bc9a4df287bd657153eb4b94c45) Signed-off-by: Wills Wang <wills.wang@live.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi: fix script for eMMC installationNg, Mei Yeen2015-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Running the install option from bootloader to install image to eMMC will fail with error: Formatting /dev/mmcblk01 to vfat... mkfs.fat 3.0.28 (2015-05-16) /dev/mmcblk01: No such file or directory This issue impacts both grub and gummiboot install option to eMMC device. The installation failure is due to the following: [1] Unable to partition eMMC as the partition prefix 'p' is not appended The condition checking failed with the additional /dev/ appended with the target device name. [2] The partition uuid for boot, root and swap partition is not captured for eMMC This fix updated the condition checking and changed the variables to reference the boot, root and swap partitions for UUID. [YOCTO #8710] (From OE-Core rev: a7d081c3db776c8b0734942df6bf96f811f15bd3) Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi: fix script for gummiboot loaderNg, Mei Yeen2015-12-011-0/+1
| | | | | | | | | | | | | | | After running gummiboot loader install option, the installed target storage device boot parameter for root=PARTUUID is empty causing boot failure. This issue is only observed with gummiboot and not with GRUB loader. This fix assign the rootuuid of the rootfs partition for gummiboot loader. [YOCTO #8709] (From OE-Core rev: fd5fa06fe45ca1fdf20df4198ae323967244af5b) Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: better error reporting for invalid root boot parameterPatrick Ohly2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | When the "boot" parameter refers to a non-existent device, the only visible output at normal log levels was a rather confusing: ERROR: There's no '/dev' on rootfs. That's because the actual error, not being able to find the root device, was only a debug message, which gets ignored in the default mode. Promoting the "root '$bootparam_root' doesn't exist." message from "debug" to "msg" gives sufficient context to understand the error. A more intrusive change would be to change also the control flow. (From OE-Core rev: 71d7803e5b13e26fd8001e87cfbac68114ddaa30) 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: fix "support dropping into shell on failure"Patrick Ohly2015-09-231-1/+1
| | | | | | | | | | | | Due to a missing $ before the variable name, all fatal errors ended up invoking a shell, instead of only doing that when init_fatal_sh is set as boot parameter. (From OE-Core rev: 2a4335eae4b31ea9451a665dad2ba33ae4967670) 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>
* init-install-efi.sh: Avoid /mnt/mtab creation if already presentLeonardo Sandoval2015-09-181-1/+5
| | | | | | | | | | | | | | The base-files recipe installs /mnt/mtab (it is a softlink of /proc/mounts), so if an image includes the latter, there is no new to created it again inside the install-efi.sh script, otherwise an error may occur as indicated on the bug's site. [YOCTO #7971] (From OE-Core rev: 6c6c6528954952e1e323f5a26afd93b99913e6f2) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: support dropping into shell on failurePatrick Ohly2015-09-121-0/+4
| | | | | | | | | | | | | | | | | When the init_fatal_sh boot parameter is present (i.e. used without value) and a fatal problem occurs inside the initramfs-module, a shell will be started instead of looping forever. Useful for debugging. Interestingly enough, the code was already indented to support such an if check... (From OE-Core rev: 1d3dc681e809846dba7cae4f81566045a3f8c205) 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: support init boot parameterPatrick Ohly2015-09-121-1/+1
| | | | | | | | | | | | | It can be useful for debugging to override the default /sbin/init. This is something typically done via the init boot parameter which then gets interpreted by the kernel. But when using an initramfs, it is the initramfs which must react to the option. (From OE-Core rev: dfd6d4c765924f472ac2df724342547b5c15249a) 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: support ro boot parameterPatrick Ohly2015-09-121-0/+6
| | | | | | | | | | | | | | | | Default is to mount the rootfs read/write. "ro" can be used to turn that into read-only, which is useful on systems where userspace does an fsck before remounting read-write. Giving both "ro" and "rw" will still mount read-only regardless of the order, because the ordering information is not preserved by the initramfs-framework's boot param support. (From OE-Core rev: a09f10f9360862c16fb68972ac041d474d6e3a64) 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: support rootflags and rootfstype boot parameterPatrick Ohly2015-09-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These two parameters are supported by the kernel (https://www.kernel.org/doc/Documentation/kernel-parameters.txt). When an initramfs is used, the kernel does not mount the rootfs and the initramfs needs to react to them. The boot parameters can be set both by the image creator and by users. Supporting these two parameters is useful: - rootflags is needed to ensure that the rootfs is already mounted as intended in the time between starting init and init remounting it (as systemd does); this is critical for IMA where iversion must be active already when system starts writing files. - setting it correctly up-front avoids messages from the kernel ("cannot mount ... as ext2 because ...") when trying to guess the desired type. For example, assuming that only one of ext4/ext3/ext2 is set, rootfstype could be set in an image recipe with: APPEND_append = "${@''.join([' rootfstype=' + i for i in ['ext4', 'ext3', 'ext2'] if i in d.getVar('IMAGE_FSTYPES', True).split()])}" (From OE-Core rev: b8ea1c61b4b8071edf70f5d42119c54ea84de330) 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: handle kernel parameters with . insidePatrick Ohly2015-09-061-1/+2
| | | | | | | | | | | | | Kernel parameters like "uvesafb.mode_option=640x480-32" were turned into shell variables named "bootparam_uvesafb.mode_option", which triggered errors from the shell because the name is not valid. Now points get replaced with underscores, leading to bootparam_uvesafb_mode_option in this example. (From OE-Core rev: de81e804f0654092d20ccb8e6e40f4ff614c4b09) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: create /dev/consolePatrick Ohly2015-09-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Some kernels, for example linux-yocto 3.19 for qemux86, fail to execute /init in an initramfs unless there is already a /dev/console char device in the initramfs. Booting then fails with: Kernel panic - not syncing: /dev/console is missing or not a character device! Please ensure your rootfs is properly configured The panic itself comes from a linux-yocto specific patch to kernel_init_freeable in init/main.c, but even without it, that function will print an error when /dev/console is missing. The kernel's Documentation/initrd.txt also mentions creating that device. It remained unclear why this is not a problem on other machines. On intel-corei7-64 from meta-intel, something (the kernel?) creates /dev/console and /dev/[012] before transfering control to the init script. In that case, creating /dev/console in advance is not necessary, but does not cause any problem either. (From OE-Core rev: 1b64664f0c388f41084f5db6e46e3e68c53fb6d9) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: create /dev/consolePatrick Ohly2015-09-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some kernels, for example linux-yocto 3.19 for qemux86, fail to execute /init in an initramfs unless there is already a /dev/console char device in the initramfs. Booting then fails with: Kernel panic - not syncing: /dev/console is missing or not a character device! Please ensure your rootfs is properly configured The panic itself comes from a linux-yocto specific patch to kernel_init_freeable in init/main.c, but even without it, that function will print an error when /dev/console is missing. The kernel's Documentation/initrd.txt also mentions creating that device. It remained unclear why this is not a problem on other machines. On intel-corei7-64 from meta-intel, something (the kernel?) creates /dev/console and /dev/[012] before transfering control to the init script. In that case, creating /dev/console in advance is not necessary, but does not cause any problem either. (From OE-Core rev: 0352841cd92f6316bcac092e2fff9d28c352b36b) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: Check if an installation device is presentLeonardo Sandoval2015-08-011-0/+5
| | | | | | | | | | | | In case there is no installation device present, give a better message to the user and abort installation. [YOCTO #7971] (From OE-Core rev: f1596b7169146afcb38db683eb6170a480422d73) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: handle mmc device as installer mediumAwais Belal2015-07-162-8/+32
| | | | | | | | | | | | | | | | | | Platforms which have the capability of using the MMC as an installer medium will present the same MMC device as an installation candidate. This happens because the MMC devices appear as mmcblk<X> and the current script strips up the <X> which is needed to identify an MMC device uniqely. This patch now updates the way device identifier stripping is done and handles the exclusion of installer device from installation candidates more generically. (From OE-Core rev: 80ec9f62791575de4948d7635dc6674abfac2193) 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: Properly delete partition tableEd Bartosh2015-06-232-2/+2
| | | | | | | | | | | Fixed deletion of the partition table by increasing amount of sectors from 2(correct for msdos PT) to 35 as GPT size is 34 sectors + 1 sector for protective MBR. (From OE-Core rev: 9be59c02901a6c9ecaaa293aea2e938edf9b122c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: code cleanup: replace /dev/$device -> $deviceEd Bartosh2015-06-232-46/+46
| | | | | | | | | Shortened code by including /dev/ prefix into variable. (From OE-Core rev: f2fe5735a2d2c5a5cbadd3486aa24a4931655526) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: code cleanup: Replace tabs with spacesEd Bartosh2015-06-232-52/+51
| | | | | | | | | Cleaned up spaces from init-install* shell scripts. (From OE-Core rev: 2cc5492a7e196adaab8bc35b48299c9e4d229ebc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Specify partition name in parted command lineEd Bartosh2015-06-232-7/+9
| | | | | | | | | | | | | | parted allows to use names for partitions if GPT partition table is used on the device. msdos partitioning can have only partition types: 'primary', 'logical' or 'extended'. Used meaningful partition names in parted command line for GPT partitioning. (From OE-Core rev: ef2c6df7fcfd02ed45637f2e6b48f324d7a56b88) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Specify filesystem type in parted command lineEd Bartosh2015-06-232-7/+7
| | | | | | | | | | Explicitly specified filesystem type for parted mkpart command. This makes partition table to look more informative. (From OE-Core rev: 945a5172c2b996f0f307813d061250c39f77ebd2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Implement UUID supportEd Bartosh2015-06-231-6/+17
| | | | | | | | | | | | | | Used partition UUID in kernel command line to specify root partition. Searched root device by file system uuid in GRUB configuration. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] (From OE-Core rev: 4c223e0bd8770909dca1131580878eba6855e085) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Use GPT table with GRUB 2Ed Bartosh2015-06-231-12/+40
| | | | | | | | | | | | | Changed partition type from 'msdos' to 'gpt'. Added special partition for grub stage2 bootloader. NOTE: This is done only for GRUB 2 as legacy GRUB is rarely used and doesn't support GPT partitions. (From OE-Core rev: 9544ac920d65edb7ddb267482c84d6fc1b464912) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi: Implement UUID supportEd Bartosh2015-06-231-4/+7
| | | | | | | | | | | | | | | | | | | | | Using UUID in favor of device names is more reliable as UUID names are persistent. Device names can change as the order of adding device nodes is arbitrary. This sometimes results in device names switching on each boot, which can cause system fail to boot. Persistent naming solves these issues. Used partition UUID in kernel command line to specify root partition. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] (From OE-Core rev: f51b050e0df6ceaea07fbda99f54dc4aeaab334c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-install: Add blkid to initramfsEd Bartosh2015-06-232-2/+2
| | | | | | | | | | | | | Added util-linux-blkid to the list of dependencies of initramfs-live-install and initramfs-live-install-efi. This is a part of the work to support partiion UUID in installer. blkid is going to be used to get partition and filesystem UUIDs. (From OE-Core rev: 3c26a5ad5937556dfd3262fa50e63350c5c71623) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: make boot drive detection more genericAwais Belal2015-05-242-2/+4
| | | | | | | | | | | | | | | | | | | The init script that invokes install and install-efi scripts passes the first parameter that identifies the boot drive but in cases when this disk is labeled and kernel configurations allow disk labeling under /run/media/ this would pass the disk label. The earlier implementation considered that the drive name will be passed and in case the label is passed it fails and provides the boot drive as an option for installation driver. We now use a more generic approach to identify the boot drive which can handle both drive name as well as label if passed. (From OE-Core rev: 1964b697ddadc59e27087f9f1f6b24236f4addcc) 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-efi.sh: fix gummiboot entry installationReinette Chatre2015-04-211-3/+3
| | | | | | | | | | | | | | | After selecting the "install" gummiboot option of a Live image we are seeing boot failure resulting from the gummiboot entries not being installed correctly. This seems to be a problem in this init-install-efi.sh script where it incorrectly installs the gummiboot entries into the root filesystem, not the boot partition. We fix it by installing the entries in the boot partition. (From OE-Core rev: c9b06c79ed8a082d1b385e9f61721aeeda9bf1af) Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: set proper S valuePetter Mabäcker2015-01-237-0/+14
| | | | | | | | | | | | | | After removal of auto-creating S we must ensure that all recipes are using a proper value for S. Fix all recipes that only need to set S equals to WORKDIR. [YOCTO #5627] (From OE-Core rev: 9d220b1bfe4589736604dd5a7129e3699377d830) Signed-off-by: Petter Mabäcker <petter@technux.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Skip CDROM devices during probeDrew Moseley2014-08-022-0/+6
| | | | | | | | (From OE-Core rev: e8ee8b765183fb3ebe5e94df6375c2fad111dcc7) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Strip partition number from live_dev_nameDrew Moseley2014-08-022-0/+2
| | | | | | | | | | | | | This is needed in case the boot disk was created with mkdiskimage. In that case the parameter passed is a variant of /dev/sda4 which includes the partition number. Without this change this install script will offer to install onto the live media. (From OE-Core rev: 9f6d7d42eaad225698de730d5c76bfe9523f4a78) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: Verify /sys based files exist before displaying themDrew Moseley2014-08-021-3/+8
| | | | | | | | | | | | Some mmc cards do not have all the data files in /sys/block populated. Check for existence before displaying the files to avoid erroring out of the install process. (From OE-Core rev: 4abe5563f61a228963e1e442ebc2df9f2d01be80) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Move boot media to /media/realroot for easy access after boot.Brian Lloyd2014-07-102-3/+11
| | | | | | | | | | | | | | | | | | | | | There are cases where software after boot may need to know the current boot disk. Under the current system, it is not guaranteed which disk is the boot. 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. This gives a standard path to the original boot disk mount which can be used to, for instance, update the syslinux file on the boot media with a newer kernel, or updating the boot parameters to add user options for future boots. Knowing which disk is the boot media keeps from updating the non-boot disk when for instance multiple syslinux boot medias are plugged in (ie ensure correct syslinux is updated when the booted system is updated). (From OE-Core rev: 2be3b2607fd164d18498299dbfc020ff17dd2ca9) Signed-off-by: Brian Lloyd <blloyd@familyhonor.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: improve hard drive searching processDrew Moseley2014-07-101-32/+53
| | | | | | | | | | | | | | | | | | | | | (This patch was originally done against init-install.sh in OE-Core rev 358f0584d779825307eec08c023b5ff14e72cf9e) Previously, only unremovable hard drives are searched and are treated as candidates of target disks to intall into. However, it's possible that we're going to install the live image into a removable media such as an USB. This patch enables this possibility. In addition, this patch presents more information about the hard drives so that user may have more knowledge about which hard drive they are going to install their image into. (From OE-Core rev: 7386acf4ab63a5959e4907b29459b767f2bf2fdb) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: fix to handle the boot partition correctlyDrew Moseley2014-07-101-22/+25
| | | | | | | | | | | | | | | | | | | | | (This patch was originally done against init-install.sh in OE-Core rev aa67b1333b4774e1845f562085f7048df65a644f) Previously, the boot partition was created for the target hard drive but there was no corresponding entry for it in /etc/fstab. Besides, even if the boot partition was mounted, it would just result in odd directory hierarchy like /boot/boot/grub. However, what we really need is /boot/grub. This patch fixes this problem. Besides, for future maintance work, this patch also renames some of the intermediate directories. It uses more descriptive names like /tgt_root and /src_root. The name of /ssd is dropped. (From OE-Core rev: 3b1bae7ad8d36930aae840175c6a3433c1469772) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: Verify /sys based files exist before displaying themDrew Moseley2014-07-101-3/+8
| | | | | | | | | | | | Some mmc cards do not have all the data files in /sys/block populated. Check for existence before displaying the files to avoid erroring out of the install process. (From OE-Core rev: 1d73e3f9d9977382efdb0c111c556c6048bd60b4) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-testfs.sh: add '--hotkey x' to 'test' menuentryCorneliu Stoicescu2014-07-031-1/+1
| | | | | | | | | Add a hotkey for the GRUB 'test' menuentry. This can be used by expect scripts to boot into 'test' when doing runtime hardware tests. (From OE-Core rev: 17b97fd6c724ba6e506cbadb18facdfd9c472e79) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: Try to boot if boot label is unknownDrew Moseley2014-06-291-0/+4
| | | | | | | | | | | | | The init-live.sh scripts assumes that the boot label set by the LABELS variable is either "boot", "install", or "install-efi". If that variable is overridden to something else we fall off the end of the case statement and the system locks up. If the boot label is unknown, at least attempt to boot. (From OE-Core rev: 98353862c08be2f1724aaad7aa4ed0521e3621f2) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: get rid of udev-utilsChen Qi2014-06-251-1/+1
| | | | | | | | | | | Now that udev-utils package has been removed and 'udevadm' has been moved to udev package, the initramfs-framework should also get rid of the udev-utils package. (From OE-Core rev: f0b8f08e13f395820172d16c9d4c016a0fbdbfe9) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-testfs: create signature file for master imageCristian Iorga2014-06-231-0/+4
| | | | | | | | | Also small cosmetic changes. (From OE-Core rev: 33c464269155f268cb08f086e530187bac61c299) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-testfs: fix typoCristian Iorga2014-06-231-1/+1
| | | | | | | | | | _EOF marker was not used properly (space left before end of line). (From OE-Core rev: 913fd224499c57c7596bd49e1eec5f570c3edf68) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-core/init-install-testfs.sh: do not overwrite /etc/mtab if the link ↵Cristian Iorga2014-06-231-1/+3
| | | | | | | | | | | | | | | | already exist Overwriting of /etc/mtab would fail as below if the /etc/mtab link already exist during installation phase, this patch fix this problem by checking existance of the link before try to overwrite it. Error message during installation if the /etc/mtab exists: "cat: /proc/mounts: input file is output file" (From OE-Core rev: 5cd96e28825d345650be878d4b7be4fea2996839) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-testfs: add grub serial line supportCristian Iorga2014-06-231-0/+5
| | | | | | | | | | | | | | | | For automated hardware testing, boot process control via serial interface is needed. As such, in grub, serial line support is added upon testmaster image install. Also add a specific timeout to automatically start the master image upon start of testing phase. Tested on multiple hardware targets without issues. (From OE-Core rev: 219228805a4d5d822894c8f6c2526e1b9a8609ff) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-core/init-install.sh: do not overwrite /etc/mtab if the link already existShan Hai2014-06-101-1/+3
| | | | | | | | | | | | | | | Overwriting of /etc/mtab would fail as below if the /etc/mtab link already exist during installation phase, this patch fix this problem by checking existance of the link before try to overwrite it. Error message during installation if the /etc/mtab exists: "cat: /proc/mounts: input file is output file (From OE-Core rev: 26a5121e966f465386da4ead40cc558fd877ce2b) Signed-off-by: Shan Hai <shan.hai@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-2.00: remove our 40_customRoy Li2014-06-061-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have this in recipes-bsp/grub/grub/40_custom: [snip] menuentry "Linux" { set root=(hd0,1) linux /vmlinuz root=__ROOTFS__ rw __CONSOLE__ __VIDEO_MODE__ __VGA_MODE__ quiet } [snip] These lines are only for initrdscripts/files/init-install.sh, the side effect is that it would make the target's grub-mkconfig doesn't work well since the 40_custom will be installed to /etc/grub.d/40_custom, the grub-mkconfig will run the 40_custom, and there will always be a 'menuentry "Linux"' menu in grub.cfg no matter it is valid or not, we can do this in init-install.sh rather than grub to fix the problem, which is also much simpler. We have done the related work in init-install.sh, now we need remove our own 40_custom, and use grub's own 40_custom which is the right one. (From OE-Core rev: e5f6dc48930c8ff35df5cff3550ec2ee86641faf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>