summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/distro/sota.conf.inc4
-rw-r--r--conf/include/local/sota_minnowboard.inc2
-rw-r--r--recipes-sota/ostree-initrd/files/init.sh3
-rw-r--r--recipes-sota/ostree-initrd/ostree-initrd.bb5
-rwxr-xr-xscripts/envsetup.sh1
-rwxr-xr-xscripts/qa60
6 files changed, 70 insertions, 5 deletions
diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc
index 5ec1d18..e334df0 100644
--- a/conf/distro/sota.conf.inc
+++ b/conf/distro/sota.conf.inc
@@ -1,7 +1,7 @@
1DISTRO_FEATURES_append = " sota" 1DISTRO_FEATURES_append = " sota"
2OVERRIDES .= ":sota" 2OVERRIDES .= ":sota"
3 3
4IMAGE_INSTALL_append = " ostree os-release" 4IMAGE_INSTALL_append = " ostree os-release rvi-sota-client"
5 5
6# live image for OSTree-enabled systems 6# live image for OSTree-enabled systems
7IMAGE_CLASSES += "image_types_ostree image_types_ota" 7IMAGE_CLASSES += "image_types_ostree image_types_ota"
@@ -21,3 +21,5 @@ OSTREE_BRANCHNAME ?= "ota-${MACHINE}"
21OSTREE_OSNAME ?= "poky" 21OSTREE_OSNAME ?= "poky"
22OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" 22OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
23 23
24# Prelinking increases the size of downloads and causes build errors
25USER_CLASSES_remove = "image-prelink"
diff --git a/conf/include/local/sota_minnowboard.inc b/conf/include/local/sota_minnowboard.inc
index d39f4d3..36d1a17 100644
--- a/conf/include/local/sota_minnowboard.inc
+++ b/conf/include/local/sota_minnowboard.inc
@@ -6,4 +6,4 @@ EFI_PROVIDER = "grub-efi"
6WKS_FILE = "efiimage-sota.wks" 6WKS_FILE = "efiimage-sota.wks"
7IMAGE_BOOT_FILES = "" 7IMAGE_BOOT_FILES = ""
8 8
9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/mmcblk2p2 console=ttyS0,115200 console=tty0" 9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0"
diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh
index 806a7b1..1814ca3 100644
--- a/recipes-sota/ostree-initrd/files/init.sh
+++ b/recipes-sota/ostree-initrd/files/init.sh
@@ -29,10 +29,11 @@ get_ostree_sysroot() {
29 for opt in `cat /proc/cmdline`; do 29 for opt in `cat /proc/cmdline`; do
30 arg=`echo $opt | cut -d'=' -f1` 30 arg=`echo $opt | cut -d'=' -f1`
31 if [ $arg == "ostree_root" ]; then 31 if [ $arg == "ostree_root" ]; then
32 echo $opt | cut -d'=' -f2 32 echo $opt | cut -d'=' -f2-
33 return 33 return
34 fi 34 fi
35 done 35 done
36 echo "LABEL=otaroot"
36} 37}
37 38
38export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/ostree 39export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/ostree
diff --git a/recipes-sota/ostree-initrd/ostree-initrd.bb b/recipes-sota/ostree-initrd/ostree-initrd.bb
index 5c85bee..b721405 100644
--- a/recipes-sota/ostree-initrd/ostree-initrd.bb
+++ b/recipes-sota/ostree-initrd/ostree-initrd.bb
@@ -5,15 +5,16 @@ SRC_URI = "file://init.sh"
5 5
6S = "${WORKDIR}" 6S = "${WORKDIR}"
7 7
8PV = "2"
9
8do_install() { 10do_install() {
9 install -dm 0755 ${D}/etc 11 install -dm 0755 ${D}/etc
10 touch ${D}/etc/initrd-release 12 touch ${D}/etc/initrd-release
11 install -dm 0755 ${D}/dev 13 install -dm 0755 ${D}/dev
12 install -dm 0755 ${D}/sbin 14 install -dm 0755 ${D}/sbin
13 install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init 15 install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init
14} 16}
15 17
16inherit allarch 18inherit allarch
17 19
18FILES_${PN} += " /dev /etc/initrd-release /sbin/init " 20FILES_${PN} += " /dev /etc/initrd-release /sbin/init "
19
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh
index 316a782..6c01d5b 100755
--- a/scripts/envsetup.sh
+++ b/scripts/envsetup.sh
@@ -49,5 +49,6 @@ else
49 cat ${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc >> conf/bblayers.conf 49 cat ${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc >> conf/bblayers.conf
50 echo "include conf/include/local/sota_${MACHINE}.inc" >> conf/local.conf 50 echo "include conf/include/local/sota_${MACHINE}.inc" >> conf/local.conf
51 echo "include conf/distro/sota.conf.inc" >> conf/local.conf 51 echo "include conf/distro/sota.conf.inc" >> conf/local.conf
52 echo "DISTRO = \"poky-sota-systemd\"" >> conf/local.conf
52fi 53fi
53 54
diff --git a/scripts/qa b/scripts/qa
new file mode 100755
index 0000000..e5133f0
--- /dev/null
+++ b/scripts/qa
@@ -0,0 +1,60 @@
1#!/usr/bin/env python3
2
3from subprocess import Popen, PIPE
4from glob import glob
5from os.path import dirname, join, abspath, exists
6from os import chdir
7import signal
8
9root = abspath(dirname(dirname(dirname(__file__))))
10print("Root dir is:" + root)
11
12args = ['bitbake', 'core-image-minimal']
13
14
15class Runner(object):
16 UNKNOWN = 'unknown'
17 PASS = 'pass'
18 FAIL = 'fail'
19 SKIP = 'skipped'
20
21 def __init__(self, dirs):
22 self._dirs = dirs
23 self._child = None
24 self._results = {}
25 for d in dirs:
26 self._results[d] = self.UNKNOWN
27
28 def run(self):
29 for d in self._dirs:
30 chdir(d)
31 if exists(join(d, '.qaskip')):
32 print("Skipping %s because of .qaskip file" % d)
33 self._results[d] = self.SKIP
34 continue
35 print("Building in " + d)
36 self._child = Popen(args=args, cwd=d, stdin=PIPE)
37 retcode = self._child.wait()
38 self._child = None
39 if retcode == 0:
40 self._results[d] = self.PASS
41 else:
42 self._results[d] = self.FAIL
43 print("Error, stopping qa script at %s" % d)
44 break
45 for d, result in self._results.items():
46 print("%20s %s" % (d, result))
47
48 def handle_signal(self, signo, stack_frame):
49 if self._child:
50 self._child
51
52
53def main():
54 dirs = glob(join(root, 'build*'))
55 runner = Runner(dirs)
56 signal.signal(signalnum=signal.SIGINT, handler=runner.handle_signal)
57 runner.run()
58
59if __name__ == "__main__":
60 main()