Master image generation and testing
RFC PATCH v2 1/3 meta-yocto-bsp: copy install scripts from core (meta)
In reply to Stefan StanacarThese are the install files for a live image, an exact copy of init-install.sh and init-install-efi.sh from core. There are renamed here with -testfs. This is just a dummy commit, just to make it easier to see the diff in the next commit.
--- .../initrdscripts/files/init-install-efi-testfs.sh | 197 +++++++++++++++++++ .../initrdscripts/files/init-install-testfs.sh | 208 +++++++++++++++++++++ 2 files changed, 405 insertions(+) create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-efi-testfs.sh create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-testfs.sh
meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-efi-testfs.sh new file +197 -0
@@ -0,0 +1,197 @@ +#!/bin/sh -e +# +# Copyright (c) 2012, Intel Corporation. +# All rights reserved. +# +# install.sh [device_name] [rootfs_name] +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# We need 20 Mb for the boot partition +boot_size=20 + +# 5% for swap +swap_ratio=5 + +found="no" + +echo "Searching for a hard drive..." +for device in 'hda' 'hdb' 'sda' 'sdb' 'mmcblk0' 'mmcblk1' +do + if [ -e /sys/block/${device}/removable ]; then + if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then + found="yes" + + while true; do + # Try sleeping here to avoid getting kernel messages + # obscuring/confusing user + sleep 5 + echo "Found drive at /dev/${device}. Do you want to install this image there ? [y/n]" + read answer + if [ "$answer" = "y" ] ; then + break + fi + + if [ "$answer" = "n" ] ; then + found=no + break + fi + + echo "Please answer y or n" + done + fi + fi + + if [ "$found" = "yes" ]; then + break; + fi + +done + +if [ "$found" = "no" ]; then + exit 1 +fi + +echo "Installing image on /dev/${device}" + +# +# The udev automounter can cause pain here, kill it +# +rm -f /etc/udev/rules.d/automount.rules +rm -f /etc/udev/scripts/mount* + +# +# Unmount anything the automounter had mounted +# +umount /dev/${device}* 2> /dev/null || /bin/true + +mkdir -p /tmp +cat /proc/mounts > /etc/mtab + +disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") + +swap_size=$((disk_size*swap_ratio/100)) +rootfs_size=$((disk_size-boot_size-swap_size)) + +rootfs_start=$((boot_size)) +rootfs_end=$((rootfs_start+rootfs_size)) +swap_start=$((rootfs_end)) + +# MMC devices are special in a couple of ways +# 1) they use a partition prefix character 'p' +# 2) they are detected asynchronously (need rootwait) +rootwait="" +part_prefix="" +if [ ! "${device#mmcblk}" = "${device}" ]; then + part_prefix="p" + rootwait="rootwait" +fi +bootfs=/dev/${device}${part_prefix}1 +rootfs=/dev/${device}${part_prefix}2 +swap=/dev/${device}${part_prefix}3 + +echo "*****************" +echo "Boot partition size: $boot_size MB ($bootfs)" +echo "Rootfs partition size: $rootfs_size MB ($rootfs)" +echo "Swap partition size: $swap_size MB ($swap)" +echo "*****************" +echo "Deleting partition table on /dev/${device} ..." +dd if=/dev/zero of=/dev/${device} bs=512 count=2 + +echo "Creating new partition table on /dev/${device} ..." +parted /dev/${device} mklabel gpt + +echo "Creating boot partition on $bootfs" +parted /dev/${device} mkpart primary 0% $boot_size +parted /dev/${device} set 1 boot on + +echo "Creating rootfs partition on $rootfs" +parted /dev/${device} mkpart primary $rootfs_start $rootfs_end + +echo "Creating swap partition on $swap" +parted /dev/${device} mkpart primary $swap_start 100% + +parted /dev/${device} print + +echo "Formatting $bootfs to vfat..." +mkfs.vfat $bootfs + +echo "Formatting $rootfs to ext3..." +mkfs.ext3 $rootfs + +echo "Formatting swap partition...($swap)" +mkswap $swap + +mkdir /ssd +mkdir /rootmnt +mkdir /bootmnt + +mount $rootfs /ssd +mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt + +echo "Copying rootfs files..." +cp -a /rootmnt/* /ssd + +if [ -d /ssd/etc/ ] ; then + echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab + + # We dont want udev to mount our root device while we're booting... + if [ -d /ssd/etc/udev/ ] ; then + echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist + fi +fi + +umount /ssd +umount /rootmnt + +echo "Preparing boot partition..." +mount $bootfs /ssd + +EFIDIR="/ssd/EFI/BOOT" +mkdir -p $EFIDIR +cp /media/$1/vmlinuz /ssd +# Copy the efi loader +cp /media/$1/EFI/BOOT/*.efi $EFIDIR + +if [ -f /media/$1/EFI/BOOT/grub.cfg ]; then + GRUBCFG="$EFIDIR/grub.cfg" + cp /media/$1/EFI/BOOT/grub.cfg $GRUBCFG + # Update grub config for the installed image + # Delete the install entry + sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG + # Delete the initrd lines + sed -i "/initrd /d" $GRUBCFG + # Delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG + # Delete any root= strings + sed -i "s/ root=[^ ]*/ /" $GRUBCFG + # Add the root= and other standard boot options + sed -i "s@linux /vmlinuz *@linux /vmlinuz root=$rootfs rw $rootwait quiet @" $GRUBCFG +fi + +if [ -d /media/$1/loader ]; then + GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf" + # copy config files for gummiboot + cp -dr /media/$1/loader /ssd + # delete the install entry + rm -f /ssd/loader/entries/install.conf + # delete the initrd lines + sed -i "/initrd /d" $GUMMIBOOT_CFGS + # delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS + # delete any root= strings + sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS + # add the root= and other standard boot options + sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS +fi + +umount /ssd +sync + +echo "Remove your installation media, and press ENTER" + +read enter + +echo "Rebooting..." +reboot -f
meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-testfs.sh new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
1.8.5.3
RFC PATCH v2 2/3 meta-yocto-bsp: add master image for testing purposes
In reply to Stefan StanacarCustom recipe with custom initramfs and installers.
We need a master image running on the target hardware, that should be a
known good build, with a set of utilities installed so that we use it
to deploy the images under test.
This core-image-testmaster recipe isn't a requirement per se, any image can
be used as long as the required conditions are met. The test code assumes:
- that the device has a second rootfs labeled as testrootfs
- it has a properly configured bootloader entry for the second kernel and rootfs
- the master image has a /etc/masterimage file so it can differentiate between master
and test images
- the master image has tar, mount, bash (basically the normal linux utilities not the busybox
ones)
This recipes adds much more (python and parted aren't actually required, it's just future proof stuff)
The install scripts are similar to the default ones, but:
- custom partitioning, replaces the swap partiton with a second root filesystem
- adds labels to the partitions
- preconfigures a boot loader entry for the second
Other arches not using installers would simply deploy the image as they do, they just need to follow the same schema.
[YOCTO #5614]
--- .../images/core-image-testmaster-initramfs.bb | 20 ++++++++++++ .../recipes-core/images/core-image-testmaster.bb | 15 +++++++++ .../initrdscripts/files/init-install-efi-testfs.sh | 36 ++++++++++++---------- .../initrdscripts/files/init-install-testfs.sh | 33 +++++++++++--------- .../initramfs-live-install-efi-testfs_1.0.bb | 20 ++++++++++++ .../initramfs-live-install-testfs_1.0.bb | 20 ++++++++++++ 6 files changed, 112 insertions(+), 32 deletions(-) create mode 100644 meta-yocto-bsp/recipes-core/images/core-image-testmaster-initramfs.bb create mode 100644 meta-yocto-bsp/recipes-core/images/core-image-testmaster.bb create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
meta-yocto-bsp/recipes-core/images/core-image-testmaster-initramfs.bb new file +20 -0
@@ -0,0 +1,20 @@ +DESCRIPTION = "Small image capable of booting a device. The kernel includes \ +the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \ +first 'init' program more efficiently." + +PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-live-install-efi-testfs busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" + +# Do not pollute the initrd image with rootfs features +IMAGE_FEATURES = "" + +export IMAGE_BASENAME = "core-image-testmaster-initramfs" +IMAGE_LINGUAS = "" + +LICENSE = "MIT" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" + +BAD_RECOMMENDATIONS += "busybox-syslog"
meta-yocto-bsp/recipes-core/images/core-image-testmaster.bb new file +15 -0
@@ -0,0 +1,15 @@ +DESCRIPTION = "A master image to be deployed on a target useful for testing other images" + +IMAGE_FEATURES += "ssh-server-openssh package-management" + +inherit core-image + +IMAGE_INSTALL += "\ + packagegroup-core-full-cmdline \ + python-modules \ + python-misc \ + e2fsprogs-mke2fs \ + parted \ + " +INITRD_IMAGE = "core-image-testmaster-initramfs" +
meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-efi-testfs.sh +19 -17
@@ -8,11 +8,11 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin -# We need 20 Mb for the boot partition -boot_size=20 +# We need 200 Mb for the boot partition +boot_size=200 -# 5% for swap -swap_ratio=5 +# 50% for the second rootfs +testfs_ratio=50 found="no"
@@ -71,12 +71,12 @@ cat /proc/mounts > /etc/mtab disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") -swap_size=$((disk_size*swap_ratio/100)) -rootfs_size=$((disk_size-boot_size-swap_size)) +testfs_size=$((disk_size*testfs_ratio/100)) +rootfs_size=$((disk_size-boot_size-testfs_size)) rootfs_start=$((boot_size)) rootfs_end=$((rootfs_start+rootfs_size)) -swap_start=$((rootfs_end)) +testfs_start=$((rootfs_end)) # MMC devices are special in a couple of ways # 1) they use a partition prefix character 'p'
@@ -89,12 +89,12 @@ if [ ! "${device#mmcblk}" = "${device}" ]; then fi bootfs=/dev/${device}${part_prefix}1 rootfs=/dev/${device}${part_prefix}2 -swap=/dev/${device}${part_prefix}3 +testfs=/dev/${device}${part_prefix}3 echo "*****************" echo "Boot partition size: $boot_size MB ($bootfs)" echo "Rootfs partition size: $rootfs_size MB ($rootfs)" -echo "Swap partition size: $swap_size MB ($swap)" +echo "Testfs partition size: $testfs_size MB ($testfs)" echo "*****************" echo "Deleting partition table on /dev/${device} ..." dd if=/dev/zero of=/dev/${device} bs=512 count=2
@@ -109,19 +109,19 @@ parted /dev/${device} set 1 boot on echo "Creating rootfs partition on $rootfs" parted /dev/${device} mkpart primary $rootfs_start $rootfs_end -echo "Creating swap partition on $swap" -parted /dev/${device} mkpart primary $swap_start 100% +echo "Creating testfs partition on $testfs" +parted /dev/${device} mkpart primary $testfs_start 100% parted /dev/${device} print echo "Formatting $bootfs to vfat..." -mkfs.vfat $bootfs +mkfs.vfat -n "boot" $bootfs echo "Formatting $rootfs to ext3..." -mkfs.ext3 $rootfs +mkfs.ext3 -L "platform" $rootfs -echo "Formatting swap partition...($swap)" -mkswap $swap +echo "Formatting $testfs to ext3..." +mkfs.ext3 -L "testrootfs" $testfs mkdir /ssd mkdir /rootmnt
@@ -133,9 +133,9 @@ mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt echo "Copying rootfs files..." cp -a /rootmnt/* /ssd -if [ -d /ssd/etc/ ] ; then - echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab +touch /ssd/etc/masterimage +if [ -d /ssd/etc/ ] ; then # We dont want udev to mount our root device while we're booting... if [ -d /ssd/etc/udev/ ] ; then echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
@@ -184,6 +184,8 @@ if [ -d /media/$1/loader ]; then sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS # add the root= and other standard boot options sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS + # Add the test label + echo -ne "title test\nlinux /test-kernel\noptions root=$testfs rw $rootwait quiet\n" > /ssd/loader/entries/test.conf fi umount /ssd
meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-testfs.sh +18 -15
@@ -8,10 +8,10 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin # We need 20 Mb for the boot partition -boot_size=20 +boot_size=200 -# 5% for the swap -swap_ratio=5 +# 50% for the the test partition +testfs_ratio=50 # Get a list of hard drives hdnamelist=""
@@ -94,12 +94,12 @@ cat /proc/mounts > /etc/mtab disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") -swap_size=$((disk_size*swap_ratio/100)) -rootfs_size=$((disk_size-boot_size-swap_size)) +testfs_size=$((disk_size*testfs_ratio/100)) +rootfs_size=$((disk_size-boot_size-testfs_size)) rootfs_start=$((boot_size)) rootfs_end=$((rootfs_start+rootfs_size)) -swap_start=$((rootfs_end)) +testfs_start=$((rootfs_end)) # MMC devices are special in a couple of ways # 1) they use a partition prefix character 'p'
@@ -112,12 +112,12 @@ if [ ! "${device#mmcblk}" = "${device}" ]; then fi bootfs=/dev/${device}${part_prefix}1 rootfs=/dev/${device}${part_prefix}2 -swap=/dev/${device}${part_prefix}3 +testfs=/dev/${device}${part_prefix}3 echo "*****************" echo "Boot partition size: $boot_size MB ($bootfs)" echo "Rootfs partition size: $rootfs_size MB ($rootfs)" -echo "Swap partition size: $swap_size MB ($swap)" +echo "Testfs partition size: $testfs_size MB ($testfs)" echo "*****************" echo "Deleting partition table on /dev/${device} ..." dd if=/dev/zero of=/dev/${device} bs=512 count=2
@@ -131,19 +131,19 @@ parted /dev/${device} mkpart primary 0% $boot_size echo "Creating rootfs partition on $rootfs" parted /dev/${device} mkpart primary $rootfs_start $rootfs_end -echo "Creating swap partition on $swap" -parted /dev/${device} mkpart primary $swap_start 100% +echo "Creating testfs partition on $testfs" +parted /dev/${device} mkpart primary $testfs_start 100% parted /dev/${device} print echo "Formatting $bootfs to ext3..." -mkfs.ext3 $bootfs +mkfs.ext3 -L "boot" $bootfs echo "Formatting $rootfs to ext3..." -mkfs.ext3 $rootfs +mkfs.ext3 -L "platform" $rootfs -echo "Formatting swap partition...($swap)" -mkswap $swap +echo "Formatting testfs partition...($testfs)" +mkfs.ext3 -L "testrootfs" $testfs mkdir /tgt_root mkdir /src_root
@@ -155,7 +155,6 @@ mount -o rw,loop,noatime,nodiratime /media/$1/$2 /src_root echo "Copying rootfs files..." cp -a /src_root/* /tgt_root if [ -d /tgt_root/etc/ ] ; then - echo "$swap swap swap defaults 0 0" >> /tgt_root/etc/fstab echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab # We dont want udev to mount our root device while we're booting... if [ -d /tgt_root/etc/udev/ ] ; then
@@ -179,6 +178,10 @@ if [ -f /etc/grub.d/40_custom ] ; then sed -i "s/__CONSOLE__/$5/g" $GRUBCFG sed -i "/#/d" $GRUBCFG sed -i "/exec tail/d" $GRUBCFG + + # Add the test label + echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG + chmod 0444 $GRUBCFG fi grub-install /dev/${device}
meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb new file +20 -0
@@ -0,0 +1,20 @@ +SUMMARY = "Live image install script for grub-efi with a second rootfs/kernel option" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SRC_URI = "file://init-install-efi-testfs.sh" + +RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools" + +do_install() { + install -m 0755 ${WORKDIR}/init-install-efi-testfs.sh ${D}/install-efi.sh +} + +# While this package maybe an allarch due to it being a +# simple script, reality is that it is Host specific based +# on the COMPATIBLE_HOST below, which needs to take precedence +#inherit allarch +INHIBIT_DEFAULT_DEPS = "1" + +FILES_${PN} = " /install-efi.sh " + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb new file +20 -0
@@ -0,0 +1,20 @@ +SUMMARY = "Live image install script for grub with a second rootfs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SRC_URI = "file://init-install-testfs.sh" + +RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs" + +do_install() { + install -m 0755 ${WORKDIR}/init-install-testfs.sh ${D}/install.sh +} + +# While this package maybe an allarch due to it being a +# simple script, reality is that it is Host specific based +# on the COMPATIBLE_HOST below, which needs to take precedence +#inherit allarch +INHIBIT_DEFAULT_DEPS = "1" + +FILES_${PN} = " /install.sh " + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
Signature · 1 line
1.8.5.3
RFC PATCH v2 3/3 meta-yocto-bsp: add a controller for EFI targets
In reply to Stefan StanacarA bit of background:
- testimage.bbclass has the ability to allow a layer to provide it's own TEST_TARGET. OE-core has a QemuTarget and a SimpleRemoteTarget (ssh into an already up and running machine and run tests)
- basically testimage does something like:
- target.deploy()
- target.start()
- runTests()
- target.stop()
This module assumes a running EFI (and gummiboot as bootloader) machine with core-image-testmaster installed (or similar).
In order to use this Master Image mechanism there are some hard requirements:
- it only works for EFI-enabled hardware with EFI_PROVIDER = "gummiboot"
- your hardware under test has to be in DHCP-enabled network that gives it the same IP for each reboot
One time setup (master image):
- build core-image-testmaster with EFI_PROVIDER = "gummiboot"
- (for now you'll need SRCREV_meta_pn-linux-yocto = "${AUTOREV}" in local.conf so that some kernel configs required by gummiboot get enabled)
- install the image on the target
Test image setup:
- build your test image, e.g core-image-sato as you usually do, but with these in local.conf:
IMAGE_FSTYPES += "tar.gz"
(similar to above you need SRCREV_meta_pn-linux-yocto = "${AUTOREV}") - Now run the tests:
INHERIT += "testimage"
TEST_TARGET = "GenericEfi"
TEST_TARGET_IP = "192.168.2.3"
bitbake core-image-sato -c testimage
Other notes:
- TEST_POWERCONTROL_CMD can be a command that runs on the host and does power cycling.
The test code passes one argument to that command: off, on or cycle (off then on). In my case I use something like TEST_POWERCONTROL_CMD="/home/stefans/powercontrol.exp test 192.168.2.1 nuc1" in local.conf.
Basically my expect script does: 'ssh [email protected] and run some script there that controls power for a label called nuc1'.
- if no command is defined it would use classic reboot. This is fine as long as the machine
actually reboots (as in the ssh test hasn't failed), but it's useful for "simple-setup-with-one-board-on-the-desk" scenario, where some manual interaction is okay from time to time.
[YOCTO #5614]
--- meta-yocto-bsp/lib/oeqa/controllers/__init__.py | 0 meta-yocto-bsp/lib/oeqa/controllers/masterimage.py | 121 +++++++++++++++++++++ meta/lib/oeqa/runtime/ssh.py | 2 + 3 files changed, 123 insertions(+) create mode 100644 meta-yocto-bsp/lib/oeqa/controllers/__init__.py create mode 100644 meta-yocto-bsp/lib/oeqa/controllers/masterimage.py
meta-yocto-bsp/lib/oeqa/controllers/__init__.py new file +0 -0
meta-yocto-bsp/lib/oeqa/controllers/masterimage.py new file +121 -0
121 lines not on this page · raw message
meta/lib/oeqa/runtime/ssh.py +2 -0
@@ -14,3 +14,5 @@ class SshTest(oeRuntimeTest): def test_ssh(self): (status, output) = self.target.run('uname -a') self.assertEqual(status, 0, msg="SSH Test failed: %s" % output) + (status, output) = self.target.run('cat /etc/masterimage') + self.assertEqual(status, 1, msg="This isn't the right image - /etc/masterimage shouldn't be here %s" % output)
Signature · 1 line
1.8.5.3
v2 cover Master image generation and testing
Hello,
This is what I currently use for doing automated deployment for a genericx86-64 image. More details on the commit messages. There is nothing particular to genericx86-64,
it should work on any EFI-enabled device with gummiboot as bootloader.
Changes since v2:
- droped the kernel options patch, the required options are now in the default
config fragments. You still neeed to build with an updated SRCREV though, as the kernel recipes haven't picked up the changes yet.
(SRCREV_meta_pn-linux-yocto = "${AUTOREV}" in local.conf)
- impove a bit the master image recipe (inherit core-image and add to IMAGE_INSTALL instead
of overwriting IMAGE_INSTALL, that ensures we pick up the correct modules, as core-image brings in packagegroup-base-extended)
- tweaks and fixes for GenericEfi - I did a complete test run for a NUC device connected
to a web power strip. The powercontrol command is an expect script that does ssh on a device which controls the power strip (this is particular to a network setup that
I can't control). It still works for the no power command available case.
Also see YB#1596 and it's sub-bug #5614 for a bit of background. Any comments, questions, most welcome.
Cheers,
Stefan
Please review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.
The following changes since commit 92155fde2079251739f455bca599a52cd21ef12b:
bitbake: runqueue: Don't error if we never setup workers (2014-03-17 15:04:46 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib stefans/masterimage
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=stefans/masterimage
Stefan Stanacar (3):
meta-yocto-bsp: copy install scripts from core (meta)
meta-yocto-bsp: add master image for testing purposes
meta-yocto-bsp: add a controller for EFI targets
meta-yocto-bsp/lib/oeqa/controllers/__init__.py | 0 meta-yocto-bsp/lib/oeqa/controllers/masterimage.py | 121 ++++++++++++ .../images/core-image-testmaster-initramfs.bb | 20 ++ .../recipes-core/images/core-image-testmaster.bb | 15 ++ .../initrdscripts/files/init-install-efi-testfs.sh | 199 +++++++++++++++++++ .../initrdscripts/files/init-install-testfs.sh | 211 +++++++++++++++++++++ .../initramfs-live-install-efi-testfs_1.0.bb | 20 ++ .../initramfs-live-install-testfs_1.0.bb | 20 ++ meta/lib/oeqa/runtime/ssh.py | 2 + 9 files changed, 608 insertions(+) create mode 100644 meta-yocto-bsp/lib/oeqa/controllers/__init__.py create mode 100644 meta-yocto-bsp/lib/oeqa/controllers/masterimage.py create mode 100644 meta-yocto-bsp/recipes-core/images/core-image-testmaster-initramfs.bb create mode 100644 meta-yocto-bsp/recipes-core/images/core-image-testmaster.bb create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-efi-testfs.sh create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/files/init-install-testfs.sh create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb create mode 100644 meta-yocto-bsp/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
Signature · 1 line
1.8.5.3
Hi Stefan,
Quoted 35 lines · On Monday 17 March 2014 17:42:13 Stefan Stanacar wrote:
This is what I currently use for doing automated deployment for a genericx86-64 image. More details on the commit messages. There is nothing particular to genericx86-64,
it should work on any EFI-enabled device with gummiboot as bootloader.Changes since v2:
- droped the kernel options patch, the required options are now in the
default config fragments. You still neeed to build with an updated SRCREV though, as the kernel recipes haven't picked up the changes yet. (SRCREV_meta_pn-linux-yocto = "${AUTOREV}" in local.conf)
- impove a bit the master image recipe (inherit core-image and add toIMAGE_INSTALLinstead of overwritingIMAGE_INSTALL, that ensures we pick up the correct modules, as core-image brings in packagegroup-base-extended)
- tweaks and fixes for GenericEfi - I did a complete test run for a NUC
device connected to a web power strip. The powercontrol command is an expect script that does ssh on a device which controls the power strip (this is particular to a network setup that I can't control). It still works for the no power command available case.Also see YB#1596 and it's sub-bug #5614 for a bit of background. Any comments, questions, most welcome.
Cheers,
StefanPlease review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.
The following changes since commit
92155fde2079251739f455bca599a52cd21ef12b:bitbake: runqueue: Don't error if we never setup workers (2014-03-17
15:04:46 +0000)
Quoted 6 lines
are available in the git repository at:
git://git.yoctoproject.org/poky-contribstefans/masterimagehttp://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=stefans/masterimag
e
Looks good. Some review comments:
* Is all of packagegroup-core-full-cmdline really needed for the master image or just some specific utilities that it pulls in?
* Could we have TEST_POWERCONTROL_EXTRA_ARGS so that TEST_POWERCONTROL_CMD can be set generically for the user's setup and extra machine-specific arguments (such as serial port numbers or other identifiers) can be set easily on a per- machine basis if needed?
* I wonder if TEST_DEPLOY_CMDS should be lower-case since it would be most easily defined as a function i.e. testimage_deploy_cmds() { ... } than a traditional variable. (Reading it is exactly the same i.e. d.getVar().)
All of this seems generic enough that I think the better place for it would be OE-Core rather than meta-yocto-bsp. If you could apply these changes on top of OE-Core and send v3 to the OE-Core mailing list that would be great.
Thanks,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Hi Paul,
Quoted 42 lines · Paul Eggleton
Hi Stefan,
Quoted 39 lines · On Monday 17 March 2014 17:42:13 Stefan Stanacar wrote:
This is what I currently use for doing automated deployment for a genericx86-64 image. More details on the commit messages. There is nothing particular to genericx86-64,
it should work on any EFI-enabled device with gummiboot as bootloader.Changes since v2:
- droped the kernel options patch, the required options are now in the
default config fragments. You still neeed to build with an updated SRCREV though, as the kernel recipes haven't picked up the changes yet. (SRCREV_meta_pn-linux-yocto = "${AUTOREV}" in local.conf)
- impove a bit the master image recipe (inherit core-image and add toIMAGE_INSTALLinstead of overwritingIMAGE_INSTALL, that ensures we pick up the correct modules, as core-image brings in packagegroup-base-extended)
- tweaks and fixes for GenericEfi - I did a complete test run for a NUC
device connected to a web power strip. The powercontrol command is an expect script that does ssh on a device which controls the power strip (this is particular to a network setup that I can't control). It still works for the no power command available case.Also see YB#1596 and it's sub-bug #5614 for a bit of background. Any comments, questions, most welcome.
Cheers,
StefanPlease review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.
The following changes since commit
92155fde2079251739f455bca599a52cd21ef12b:bitbake: runqueue: Don't error if we never setup workers (2014-03-17
15:04:46 +0000)are available in the git repository at:
git://git.yoctoproject.org/poky-contribstefans/masterimage
Quoted 8 lines
Looks good. Some review comments:
* Is all of packagegroup-core-full-cmdline really needed for the master image or just some specific utilities that it pulls in?
No, just some specific utilities. I'm gonna change that to only those.
Quoted 4 lines
* Could we have
TEST_POWERCONTROL_EXTRA_ARGSso thatTEST_POWERCONTROL_CMDcan be set generically for the user's setup and extra machine-specific arguments (such as serial port numbers or other identifiers) can be set easily on a per- machine basis if needed?
Okay, will change that.
Quoted 5 lines
* I wonder if
TEST_DEPLOY_CMDSshould be lower-case since it would be most easily defined as a function i.e.testimage_deploy_cmds(){ ... } than a traditional variable. (Reading it is exactly the same i.e.d.getVar().)
I'd like to keep that configurable from .conf files. I did changed it be splitted by \n.
Quoted 4 lines
All of this seems generic enough that I think the better place for it would be OE-Core rather than meta-yocto-bsp. If you could apply these changes on top of OE-Core and send v3 to the OE-Core mailing list that would be great.
Okay, great. I'll move everything from meta-yocto-bsp to meta and re-send.
Cheers,
Stefan
Quoted 3 lines
Thanks,
Paul