summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_ostree.bbclass80
-rw-r--r--classes/image_types_ota.bbclass148
-rw-r--r--recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch27
-rw-r--r--recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch165
-rw-r--r--recipes-bsp/u-boot/u-boot-ota_2015.07.bb24
-rw-r--r--recipes-bsp/u-boot/u-boot-ota_2016.07.bb23
-rw-r--r--recipes-core/images/initramfs-ostree-image.bb23
-rw-r--r--recipes-sota/ostree-initramfs/ostree-initramfs.bb32
-rw-r--r--recipes-sota/ostree-initramfs/ostree-initramfs/COPYING.GPL339
-rw-r--r--recipes-sota/ostree/ostree_git.bb8
10 files changed, 665 insertions, 204 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 5b9ac97..a180721 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -1,33 +1,40 @@
1# OSTree deployment 1# OSTree deployment
2 2
3inherit image_types 3inherit image
4 4
5IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ 5IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \
6 virtual/kernel:do_deploy \ 6 virtual/kernel:do_deploy \
7 ${INITRAMFS_IMAGE}:do_image_cpio" 7 ${OSTREE_INITRAMFS_IMAGE}:do_image_cpio"
8 8
9# Please redefine OSTREE_REPO in your local.conf in order to have a persistent
10# OSTree repo
11OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
12export OSTREE_REPO 9export OSTREE_REPO
13
14# OSTREE_BRANCHNAME can also be redefined
15OSTREE_BRANCHNAME ?= "${IMAGE_BASENAME}"
16export OSTREE_BRANCHNAME 10export OSTREE_BRANCHNAME
17 11
18IMAGE_CMD_ostree () { 12IMAGE_CMD_ostree () {
19 OSTREE_ROOTFS=`mktemp -d ${WORKDIR}/ostree-root-XXXXX` 13 if [ -z "$OSTREE_REPO" ]; then
20 cp -rp ${IMAGE_ROOTFS}/* ${OSTREE_ROOTFS} 14 bbfatal "OSTREE_REPO should be set in your local.conf"
15 fi
16
17 if [ -z "$OSTREE_BRANCHNAME" ]; then
18 bbfatal "OSTREE_BRANCHNAME should be set in your local.conf"
19 fi
20
21 OSTREE_ROOTFS=`mktemp -du ${WORKDIR}/ostree-root-XXXXX`
22 cp -a ${IMAGE_ROOTFS} ${OSTREE_ROOTFS}
23 chmod a+rx ${OSTREE_ROOTFS}
24 sync
25
21 cd ${OSTREE_ROOTFS} 26 cd ${OSTREE_ROOTFS}
22 27
23 # Create sysroot directory to which physical sysroot will be mounted 28 # Create sysroot directory to which physical sysroot will be mounted
24 mkdir sysroot 29 mkdir sysroot
25 ln -sf /sysroot/ostree ostree 30 ln -sf sysroot/ostree ostree
26 ln -sf /sysroot/tmp tmp 31
32 rm -rf tmp/*
33 ln -sf sysroot/tmp tmp
27 34
28 mkdir -p usr/rootdirs 35 mkdir -p usr/rootdirs
29 mkdir -p var/rootdirs
30 36
37 mv etc usr/
31 # Implement UsrMove 38 # Implement UsrMove
32 dirs="bin sbin lib" 39 dirs="bin sbin lib"
33 40
@@ -35,23 +42,46 @@ IMAGE_CMD_ostree () {
35 if [ -d ${dir} ] && [ ! -L ${dir} ] ; then 42 if [ -d ${dir} ] && [ ! -L ${dir} ] ; then
36 mv ${dir} usr/rootdirs/ 43 mv ${dir} usr/rootdirs/
37 rm -rf ${dir} 44 rm -rf ${dir}
38 ln -sf /usr/rootdirs/${dir} ${dir} 45 ln -sf usr/rootdirs/${dir} ${dir}
39 fi 46 fi
40 done 47 done
48
49 if [ ! -d "usr/etc/tmpfiles.d" ]; then
50 mkdir usr/etc/tmpfiles.d
51 fi
52 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
53
54 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
55 echo "L /var/rootdirs/home - - - - /sysroot/home" >>${tmpfiles_conf}
56 # Preserve data in /home to be later copied to /sysroot/home by
57 # sysroot generating procedure
58 mkdir -p usr/homedirs
59 if [ -d "home" ] && [ ! -L "home" ]; then
60 mv home usr/homedirs/home
61 ln -sf var/rootdirs/home home
62 fi
41 63
42 # Move persistent directories to /var 64 # Move persistent directories to /var
43 dirs="home opt mnt media srv" 65 dirs="opt mnt media srv"
44 66
45 for dir in ${dirs}; do 67 for dir in ${dirs}; do
46 if [ -d ${dir} ] && [ ! -L ${dir} ]; then 68 if [ -d ${dir} ] && [ ! -L ${dir} ]; then
47 mv ${dir} var/rootdirs/ 69 if [ "$(ls -A $dir)" ]; then
48 ln -sf /var/rootdirs/${dir} ${dir} 70 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr"
71 fi
72 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf}
73 rm -rf ${dir}
74 ln -sf var/rootdirs/${dir} ${dir}
49 fi 75 fi
50 done 76 done
51 77
52 if [ -d root ] && [ ! -L root ]; then 78 if [ -d root ] && [ ! -L root ]; then
53 mv root var/roothome 79 if [ "$(ls -A root)" ]; then
54 ln -sf /var/roothome root 80 bberror "Data in /root directory is not preserved by OSTree."
81 fi
82 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf}
83 rm -rf root
84 ln -sf var/roothome root
55 fi 85 fi
56 86
57 # Creating boot directories is required for "ostree admin deploy" 87 # Creating boot directories is required for "ostree admin deploy"
@@ -63,14 +93,17 @@ IMAGE_CMD_ostree () {
63 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} | cut -f 1 -d " "` 93 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} | cut -f 1 -d " "`
64 94
65 cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} boot/vmlinuz-${checksum} 95 cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} boot/vmlinuz-${checksum}
66 cp ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz boot/initramfs-${checksum} 96 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}.cpio.gz boot/initramfs-${checksum}
67 97
68 cd ${WORKDIR} 98 cd ${WORKDIR}
69 99
70 # Create a tarball that can be then commited to OSTree repo 100 # Create a tarball that can be then commited to OSTree repo
71 OSTREE_TAR=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ostree.tar.bz2 101 OSTREE_TAR=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ostree.tar.bz2
72 tar -C ${OSTREE_ROOTFS} -cjf ${OSTREE_TAR} . 102 tar -C ${OSTREE_ROOTFS} --xattrs --xattrs-include='*' -cjf ${OSTREE_TAR} .
73 rm -rf ${OSTREE_ROOTFS} 103 sync
104
105 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
106 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
74 107
75 if [ ! -d ${OSTREE_REPO} ]; then 108 if [ ! -d ${OSTREE_REPO} ]; then
76 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 109 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
@@ -78,10 +111,11 @@ IMAGE_CMD_ostree () {
78 111
79 # Commit the result 112 # Commit the result
80 ostree --repo=${OSTREE_REPO} commit \ 113 ostree --repo=${OSTREE_REPO} commit \
81 --tree=tar=${OSTREE_TAR} \ 114 --tree=dir=${OSTREE_ROOTFS} \
82 --skip-if-unchanged \ 115 --skip-if-unchanged \
83 --branch=${OSTREE_BRANCHNAME} \ 116 --branch=${OSTREE_BRANCHNAME} \
84 --subject="Commit-id: ${IMAGE_NAME}" 117 --subject="Commit-id: ${IMAGE_NAME}"
85 118
119 rm -rf ${OSTREE_ROOTFS}
86} 120}
87 121
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index bb55e61..b9126ec 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -6,75 +6,103 @@
6# OSTree updates may require some space on boot file system for 6# OSTree updates may require some space on boot file system for
7# boot scripts, kernel and initramfs images 7# boot scripts, kernel and initramfs images
8# 8#
9BOOTFS_EXTRA_SIZE ?= "512" 9
10export BOOTFS_EXTRA_SIZE 10inherit image
11 11
12do_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ 12IMAGE_DEPENDS_otaimg = "e2fsprogs-native:do_populate_sysroot \
13 parted-native:do_populate_sysroot \ 13 virtual/bootloader:do_deploy"
14 virtual/kernel:do_deploy \ 14
15 virtual/bootloader:do_deploy \ 15calculate_size () {
16 ${INITRD_IMAGE}:do_image_cpio \ 16 BASE=$1
17 ${PN}:do_image_ext4" 17 SCALE=$2
18 18 MIN=$3
19ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext4" 19 MAX=$4
20INITRD_IMAGE ?= "core-image-minimal-initramfs" 20 EXTRA=$5
21INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz" 21 ALIGN=$6
22 22
23build_bootfs () { 23 SIZE=`echo "$BASE * $SCALE" | bc -l`
24 KERNEL_FILE=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} 24 REM=`echo $SIZE | cut -d "." -f 2`
25 KERNEL_SIZE=`du -Lbs ${KERNEL_FILE} | cut -f 1` 25 SIZE=`echo $SIZE | cut -d "." -f 1`
26 26
27 RAMDISK_FILE=${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz 27 if [ -n "$REM" -o ! "$REM" -eq 0 ]; then
28 RAMDISK_SIZE=`du -Lbs ${RAMDISK_FILE} | cut -f 1` 28 SIZE=`expr $SIZE \+ 1`
29 29 fi
30 EXTRA_BYTES=$(expr $BOOTFS_EXTRA_SIZE \* 1024 \* 1024) 30
31 31 if [ "$SIZE" -lt "$MIN" ]; then
32 TOTAL_SIZE=$(expr ${KERNEL_SIZE} \+ ${RAMDISK_SIZE} \+ ${EXTRA_BYTES}) 32 $SIZE=$MIN
33 TOTAL_BLOCKS=$(expr 1 \+ $TOTAL_SIZE / 1024) 33 fi
34 34
35 dd if=/dev/zero of=$1 bs=1024 count=${TOTAL_BLOCKS} 35 SIZE=`expr $SIZE \+ $EXTRA`
36 BOOTTMP=$(mktemp -d mkotaboot-XXX) 36 SIZE=`expr $SIZE \+ $ALIGN \- 1`
37 cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${BOOTTMP} 37 SIZE=`expr $SIZE \- $SIZE \% $ALIGN`
38 cp ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz ${BOOTTMP} 38
39 mkfs.ext4 $1 -d ${BOOTTMP} 39 if [ -n "$MAX" ]; then
40 rm -rf $BOOTTMP 40 if [ "$SIZE" -gt "$MAX" ]; then
41 return -1
42 fi
43 fi
44
45 echo "${SIZE}"
41} 46}
42 47
43do_otaimg () { 48export OSTREE_OSNAME
44 BOOTIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaboot.ext4 49export OSTREE_BRANCHNAME
45 rm -f $BOOTIMG 50export OSTREE_REPO
46 build_bootfs $BOOTIMG
47 51
48 ROOTIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 52IMAGE_CMD_otaimg () {
53 if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then
54 if [ -z "$OSTREE_REPO" ]; then
55 bbfatal "OSTREE_REPO should be set in your local.conf"
56 fi
49 57
50 BOOTFSBLOCKS=`du -bks ${BOOTIMG} | cut -f 1` 58 if [ -z "$OSTREE_OSNAME" ]; then
59 bbfatal "OSTREE_OSNAME should be set in your local.conf"
60 fi
51 61
52 ROOTFSBLOCKS=`du -bks ${ROOTIMG} | cut -f 1` 62 if [ -z "$OSTREE_BRANCHNAME" ]; then
53 TOTALSIZE=`expr $BOOTFSBLOCKS \+ $ROOTFSBLOCKS` 63 bbfatal "OSTREE_BRANCHNAME should be set in your local.conf"
54 END1=`expr $BOOTFSBLOCKS \* 1024` 64 fi
55 END2=`expr $END1 + 512`
56 END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
57 65
58 FULLIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg
59 rm -rf ${FULLIMG}
60 66
61 dd if=/dev/zero of=${FULLIMG} bs=1024 seek=${TOTALSIZE} count=1 67 PHYS_SYSROOT=`mktemp -d ${WORKDIR}/ota-sysroot-XXXXX`
62 parted ${FULLIMG} mklabel msdos
63 parted ${FULLIMG} mkpart primary ext4 0 ${END1}B
64 parted ${FULLIMG} unit B mkpart primary ext4 ${END2}B ${END3}B
65 68
66 OFFSET=`expr $END2 / 512` 69 ostree admin --sysroot=${PHYS_SYSROOT} init-fs ${PHYS_SYSROOT}
70 ostree admin --sysroot=${PHYS_SYSROOT} os-init ${OSTREE_OSNAME}
67 71
68 dd if=${BOOTIMG} of=${FULLIMG} conv=notrunc seek=1 bs=512 72 mkdir -p ${PHYS_SYSROOT}/boot/loader.0
69 dd if=${ROOTIMG} of=${FULLIMG} conv=notrunc seek=$OFFSET bs=512 73 ln -s loader.0 ${PHYS_SYSROOT}/boot/loader
70 74
71 cd ${DEPLOY_DIR_IMAGE} 75 touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt
72 rm -f ${IMAGE_LINK_NAME}.otaimg 76
73 ln -s ${IMAGE_NAME}.otaimg ${IMAGE_LINK_NAME}.otaimg 77 ostree --repo=${PHYS_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${OSTREE_BRANCHNAME}
74} 78 ostree admin --sysroot=${PHYS_SYSROOT} deploy --os=${OSTREE_OSNAME} ${OSTREE_OSNAME}:${OSTREE_BRANCHNAME}
79
80 # Copy deployment /home to sysroot
81 HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX`
82 tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs
83 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/
84 rm -rf ${HOME_TMP}
85
86 OTA_ROOTFS_SIZE=$(calculate_size `du -ks $PHYS_SYSROOT | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}")
75 87
76addtask otaimg before do_build 88 if [ $OTA_ROOTFS_SIZE -lt 0 ]; then
89 exit -1
90 fi
91 eval local COUNT=\"0\"
92 eval local MIN_COUNT=\"60\"
93 if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then
94 eval COUNT=\"$MIN_COUNT\"
95 fi
96
97 rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg
98 sync
99 dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=$OTA_ROOTFS_SIZE count=$COUNT bs=1024
100 mkfs.ext4 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -d ${PHYS_SYSROOT}
101 rm -rf ${PHYS_SYSROOT}
102
103 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg
104 ln -s ${IMAGE_NAME}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg
105 fi
106}
77 107
78IMAGE_TYPES += " otaimg" 108IMAGE_TYPEDEP_otaimg = "ostree"
79IMAGE_TYPES_MASKED += "otaimg"
80IMAGE_TYPEDEP_otaimg = "ext4"
diff --git a/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch b/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
index c33d40c..186a2a2 100644
--- a/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
+++ b/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
@@ -1,36 +1,41 @@
1From 2b4d519bef51d9bfb646588aa5198f71022a867b Mon Sep 17 00:00:00 2001 1From ebb26338d0c2f436a86fd4d7cb8d723a90d6a369 Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton@advancedtelematic.com> 2From: Anton Gerasimov <anton@advancedtelematic.com>
3Date: Mon, 15 Aug 2016 15:54:20 +0200 3Date: Thu, 15 Sep 2016 17:52:41 +0200
4Subject: [PATCH] Set up environment for OSTree integration 4Subject: [PATCH 1/2] Set up environment for OSTree integration
5 5
6--- 6---
7 include/configs/qemu-x86.h | 15 +++++++++++++++ 7 include/configs/qemu-x86.h | 20 ++++++++++++++++++++
8 1 file changed, 15 insertions(+) 8 1 file changed, 20 insertions(+)
9 9
10diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h 10diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h
11index 476d37d..f49e2a5 100644 11index 78c296f..79df455 100644
12--- a/include/configs/qemu-x86.h 12--- a/include/configs/qemu-x86.h
13+++ b/include/configs/qemu-x86.h 13+++ b/include/configs/qemu-x86.h
14@@ -56,4 +56,19 @@ 14@@ -74,4 +74,24 @@
15 #undef CONFIG_ENV_IS_IN_SPI_FLASH 15 #undef CONFIG_ENV_IS_IN_SPI_FLASH
16 #define CONFIG_ENV_IS_NOWHERE 16 #define CONFIG_ENV_IS_NOWHERE
17 17
18+#undef CONFIG_BOOTARGS 18+#undef CONFIG_BOOTARGS
19+#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0" 19+#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0"
20+ 20+
21+#undef CONFIG_BOOTDELAY
22+#define CONFIG_BOOTDELAY 3
23+
21+#undef CONFIG_BOOTCOMMAND 24+#undef CONFIG_BOOTCOMMAND
22+#define CONFIG_BOOTCOMMAND "run loadenv;" \ 25+#define CONFIG_BOOTCOMMAND "run loadenv;" \
23+ "ext2load ide 0:1 $loadaddr $kernel_image;" \ 26+ "setenv bootargs $bootargs\" console=ttyS0 root=/dev/hda\";" \
24+ "ext2load ide 0:1 $ramdiskaddr $ramdisk_image;" \ 27+ "ext2load ide 0 $loadaddr \"/boot\"$kernel_image;" \
28+ "ext2load ide 0 $ramdiskaddr \"/boot\"$ramdisk_image;" \
25+ "zboot $loadaddr - $ramdiskaddr $filesize" 29+ "zboot $loadaddr - $ramdiskaddr $filesize"
26+ 30+
27+#undef CONFIG_EXTRA_ENV_SETTINGS 31+#undef CONFIG_EXTRA_ENV_SETTINGS
28+#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \ 32+#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \
29+ "ramdisk_image=/initrd\0" \ 33+ "ramdisk_image=/initrd\0" \
30+ "ramdiskaddr=0x4000000\0" \ 34+ "ramdiskaddr=0x4000000\0" \
31+ "loadenv=if ext2ls ide 0:1 /loader.0/uEnv.txt; then ext2load ide 0:1 $loadaddr uEnv.txt; env import -t $loadaddr $filesize; fi;" 35+ "bootdelay=3\0" \
36+ "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;"
32+ 37+
33 #endif /* __CONFIG_H */ 38 #endif /* __CONFIG_H */
34-- 39--
352.8.3 402.9.3
36 41
diff --git a/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch b/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
index 83e223f..7540b74 100644
--- a/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
+++ b/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
@@ -1,44 +1,38 @@
1From d5bea58bf85522a289194d59dfab00207ffdfb4f Mon Sep 17 00:00:00 2001 1From ab0d7e270d89f6eb99582197d2d58bf60c9c3d26 Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton@advancedtelematic.com> 2From: Anton Gerasimov <anton@advancedtelematic.com>
3Date: Fri, 26 Aug 2016 13:51:30 +0200 3Date: Thu, 15 Sep 2016 16:49:32 +0200
4Subject: [PATCH 2/2] Replace wraps with built-in code to remove dependency on 4Subject: [PATCH 2/2] Replace wraps with built-in code to remove dependency on
5 multilib 5 multilib
6 6
7--- 7---
8 arch/x86/config.mk | 3 -- 8 arch/x86/config.mk | 2 --
9 arch/x86/lib/gcc.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++------- 9 arch/x86/lib/gcc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++---------
10 2 files changed, 86 insertions(+), 14 deletions(-) 10 2 files changed, 87 insertions(+), 19 deletions(-)
11 11
12diff --git a/arch/x86/config.mk b/arch/x86/config.mk 12diff --git a/arch/x86/config.mk b/arch/x86/config.mk
13index d7addd8..892e0fc 100644 13index 999143e..139576e 100644
14--- a/arch/x86/config.mk 14--- a/arch/x86/config.mk
15+++ b/arch/x86/config.mk 15+++ b/arch/x86/config.mk
16@@ -21,9 +21,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden 16@@ -22,5 +22,3 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
17 17 PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386
18 PLATFORM_LDFLAGS += -Bsymbolic -Bsymbolic-functions -m elf_i386
19 18
19 LDFLAGS_FINAL += --gc-sections -pie
20-LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 20-LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
21-LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 21-LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
22-
23 # This is used in the top-level Makefile which does not include
24 # PLATFORM_LDFLAGS
25 LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined
26diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c 22diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c
27index 3c70d79..6b47785 100644 23index 497ad75..c321b11 100644
28--- a/arch/x86/lib/gcc.c 24--- a/arch/x86/lib/gcc.c
29+++ b/arch/x86/lib/gcc.c 25+++ b/arch/x86/lib/gcc.c
30@@ -8,22 +8,97 @@ 26@@ -19,22 +19,92 @@
31 27
32 #ifdef __GNUC__ 28 #ifdef __GNUC__
33 29
34+#include <stdint.h> 30-/*
35+#include <stddef.h> 31- * GCC's libgcc handling is quite broken. While the libgcc functions
36 /* 32- * are always regparm(0) the code that calls them uses whatever the
37 * GCC's libgcc handling is quite broken. While the libgcc functions 33- * compiler call specifies. Therefore we need a wrapper around those
38 * are always regparm(0) the code that calls them uses whatever the 34- * functions. See gcc bug PR41055 for more information.
39 * compiler call specifies. Therefore we need a wrapper around those 35- */
40 * functions. See gcc bug PR41055 for more information.
41 */
42-#define WRAP_LIBGCC_CALL(type, name) \ 36-#define WRAP_LIBGCC_CALL(type, name) \
43- type __normal_##name(type a, type b) __attribute__((regparm(0))); \ 37- type __normal_##name(type a, type b) __attribute__((regparm(0))); \
44- type __wrap_##name(type a, type b); \ 38- type __wrap_##name(type a, type b); \
@@ -50,92 +44,95 @@ index 3c70d79..6b47785 100644
50-WRAP_LIBGCC_CALL(unsigned long long, __udivdi3) 44-WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
51-WRAP_LIBGCC_CALL(long long, __moddi3) 45-WRAP_LIBGCC_CALL(long long, __moddi3)
52-WRAP_LIBGCC_CALL(unsigned long long, __umoddi3) 46-WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)
47+#include <stdint.h>
48+#include <stddef.h>
49+
53+uint64_t __udivmoddi4 ( uint64_t num, 50+uint64_t __udivmoddi4 ( uint64_t num,
54+ uint64_t den, 51+ uint64_t den,
55+ uint64_t *rem_p ) 52+ uint64_t *rem_p )
56+{ 53+{
57+ uint64_t quot = 0, qbit = 1; 54+ uint64_t quot = 0, qbit = 1;
58+ 55+
59+ if ( den == 0 ) { 56+ if ( den == 0 ) {
60+ return 1/((unsigned)den); /* Intentional divide by zero, without 57+ return 1/((unsigned)den); /* Intentional divide by zero, without
61+ triggering a compiler warning which 58+ triggering a compiler warning which
62+ would abort the build */ 59+ would abort the build */
63+ } 60+ }
64+
65+ /* Left-justify denominator and count shift */
66+ while ( (int64_t)den >= 0 ) {
67+ den <<= 1;
68+ qbit <<= 1;
69+ }
70+
71+ while ( qbit ) {
72+ if ( den <= num ) {
73+ num -= den;
74+ quot += qbit;
75+ }
76+ den >>= 1;
77+ qbit >>= 1;
78+ }
79+
80+ if ( rem_p )
81+ *rem_p = num;
82+
83+ return quot;
84+}
85+ 61+
62+ /* Left-justify denominator and count shift */
63+ while ( (int64_t)den >= 0 ) {
64+ den <<= 1;
65+ qbit <<= 1;
66+ }
67+
68+ while ( qbit ) {
69+ if ( den <= num ) {
70+ num -= den;
71+ quot += qbit;
72+ }
73+ den >>= 1;
74+ qbit >>= 1;
75+ }
76+
77+ if ( rem_p )
78+ *rem_p = num;
79+
80+ return quot;
81+}
86+uint64_t __udivdi3( uint64_t num, uint64_t den ) 82+uint64_t __udivdi3( uint64_t num, uint64_t den )
87+{ 83+{
88+ return __udivmoddi4(num, den, NULL); 84+ return __udivmoddi4(num, den, NULL);
89+} 85+}
90+ 86+
91+uint64_t __umoddi3 ( uint64_t num, uint64_t den ) 87+uint64_t __umoddi3 ( uint64_t num, uint64_t den )
92+{ 88+{
93+ uint64_t v; 89+ uint64_t v;
94+ 90+
95+ (void) __udivmoddi4(num, den, &v); 91+ (void) __udivmoddi4(num, den, &v);
96+ return v; 92+ return v;
97+} 93+}
98+ 94+
99+int64_t __divmoddi4 ( int64_t num, 95+int64_t __divmoddi4 ( int64_t num,
100+ int64_t den, 96+ int64_t den,
101+ int64_t* rem_p ) 97+ int64_t* rem_p )
102+{ 98+{
103+ int minus = 0; 99+ int minus = 0;
104+ int64_t v; 100+ int64_t v;
105+ 101+
106+ if ( num < 0 ) { 102+ if ( num < 0 ) {
107+ num = -num; 103+ num = -num;
108+ minus = 1; 104+ minus = 1;
109+ } 105+ }
110+ if ( den < 0 ) { 106+ if ( den < 0 ) {
111+ den = -den; 107+ den = -den;
112+ minus ^= 1; 108+ minus ^= 1;
113+ } 109+ }
114+ 110+
115+ v = __udivmoddi4(num, den, (uint64_t *)rem_p); 111+ v = __udivmoddi4(num, den, (uint64_t *)rem_p);
116+ if ( minus ) { 112+ if ( minus ) {
117+ v = -v; 113+ v = -v;
118+ if ( rem_p ) 114+ if ( rem_p )
119+ *rem_p = -(*rem_p); 115+ *rem_p = -(*rem_p);
120+ } 116+ }
121+ 117+
122+ return v; 118+ return v;
123+} 119+}
124+ 120+
121+
125+int64_t __moddi3 (int64_t num, int64_t den) 122+int64_t __moddi3 (int64_t num, int64_t den)
126+{ 123+{
127+ int64_t v; 124+ int64_t v;
128+ 125+
129+ (void) __divmoddi4(num, den, &v); 126+ (void) __divmoddi4(num, den, &v);
130+ return v; 127+ return v;
131+} 128+}
132+ 129+
133+int64_t __divdi3(int64_t num, int64_t den) 130+int64_t __divdi3(int64_t num, int64_t den)
134+{ 131+{
135+ return __divmoddi4(num, den, NULL); 132+ return __divmoddi4(num, den, NULL);
136+} 133+}
137 134
138 #endif 135 #endif
139-- 136--
1402.9.2 1372.9.3
141 138
diff --git a/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
new file mode 100644
index 0000000..ab5d403
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
@@ -0,0 +1,24 @@
1include recipes-bsp/u-boot/u-boot.inc
2DEPENDS += "dtc-native"
3
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
6
7# This revision corresponds to the tag "v2015.07"
8# We use the revision in order to avoid having to fetch it from the
9# repo during parse
10SRCREV = "baba2f57e8f4ed3fa67fe213d22da0de5e00f204"
11
12SRC_URI += "file://0001-Set-up-environment-for-OSTree-integration.patch \
13 file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \
14 "
15
16PV = "v2015.07+git${SRCPV}"
17
18EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline "
19EXTRA_OEMAKE_append_qemux86 = " BUILD_ROM=y"
20EXTRA_OEMAKE_append_qemux86-64 = " BUILD_ROM=y"
21
22UBOOT_SUFFIX = "bin"
23UBOOT_SUFFIX_qemux86 = "rom"
24UBOOT_SUFFIX_qemux86-64 = "rom"
diff --git a/recipes-bsp/u-boot/u-boot-ota_2016.07.bb b/recipes-bsp/u-boot/u-boot-ota_2016.07.bb
deleted file mode 100644
index 7d440ef..0000000
--- a/recipes-bsp/u-boot/u-boot-ota_2016.07.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1include recipes-bsp/u-boot/u-boot.inc
2DEPENDS += "dtc-native"
3
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
6
7# This revision corresponds to the tag "v2016.07"
8# We use the revision in order to avoid having to fetch it from the
9# repo during parse
10SRCREV = "25922d42f8e9e7ae503ae55a972ba1404e5b6a8c"
11
12SRC_URI += "file://0001-Set-up-environment-for-OSTree-integration.patch \
13 file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch"
14
15PV = "v2016.07+git${SRCPV}"
16
17EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline"
18EXTRA_OEMAKE_append_qemux86 = " KCFLAGS=-fgnu89-inline BUILD_ROM=y"
19EXTRA_OEMAKE_append_qemux86-64 = " KCFLAGS=-fgnu89-inline BUILD_ROM=y"
20
21UBOOT_SUFFIX = "bin"
22UBOOT_SUFFIX_qemux86 = "rom"
23UBOOT_SUFFIX_qemux86-64 = "rom"
diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb
new file mode 100644
index 0000000..71aa631
--- /dev/null
+++ b/recipes-core/images/initramfs-ostree-image.bb
@@ -0,0 +1,23 @@
1# Netboot initramfs image.
2DESCRIPTION = "OSTree initramfs image"
3
4PACKAGE_INSTALL = "ostree ostree-initramfs systemd-initramfs busybox base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
5
6SYSTEMD_DEFAULT_TARGET = "initrd.target"
7
8# Do not pollute the initrd image with rootfs features
9IMAGE_FEATURES = ""
10
11export IMAGE_BASENAME = "initramfs-ostree-image"
12IMAGE_LINGUAS = ""
13
14LICENSE = "MIT"
15
16IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
17inherit core-image
18
19IMAGE_ROOTFS_SIZE = "8192"
20
21BAD_RECOMMENDATIONS += "busybox-syslog"
22
23
diff --git a/recipes-sota/ostree-initramfs/ostree-initramfs.bb b/recipes-sota/ostree-initramfs/ostree-initramfs.bb
new file mode 100644
index 0000000..5b3818c
--- /dev/null
+++ b/recipes-sota/ostree-initramfs/ostree-initramfs.bb
@@ -0,0 +1,32 @@
1# Small hook to call ostree-prepare-root on initrd-switch-root
2
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6S = "${WORKDIR}"
7
8SRC_URI = "file://COPYING.GPL"
9
10DEPENDS += " ostree"
11
12FILES_${PN} += "${systemd_unitdir} \
13 ${systemd_unitdir}/system \
14 ${systemd_unitdir}/system/initrd-switch-root.target.wants \
15 ${systemd_unitdir}/system/initrd-switch-root.target.wants/ostree-prepare-root.service \
16 ${sysconfdir}/initrd-release \
17 "
18
19export OSTREE_INITRAMFS_IMAGE
20
21do_install() {
22 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
23 install -d ${D}${sysconfdir}
24 echo "NAME=${OSTREE_INITRAMFS_IMAGE}" > ${D}/${sysconfdir}/initrd-release
25 install -d ${D}${systemd_unitdir}
26 install -d ${D}${systemd_unitdir}/system
27
28 install -d ${D}${systemd_unitdir}/system/initrd-switch-root.target.wants
29 ln -s ${systemd_unitdir}/system/ostree-prepare-root.service \
30 "${D}${systemd_unitdir}/system/initrd-switch-root.target.wants/ostree-prepare-root.service"
31 fi
32}
diff --git a/recipes-sota/ostree-initramfs/ostree-initramfs/COPYING.GPL b/recipes-sota/ostree-initramfs/ostree-initramfs/COPYING.GPL
new file mode 100644
index 0000000..d511905
--- /dev/null
+++ b/recipes-sota/ostree-initramfs/ostree-initramfs/COPYING.GPL
@@ -0,0 +1,339 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Lesser General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License along
307 with this program; if not, write to the Free Software Foundation, Inc.,
308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Lesser General
339Public License instead of this License.
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index a35799e..6adac5f 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -7,7 +7,7 @@ inherit autotools-brokensep pkgconfig systemd
7INHERIT_remove_class-native = "systemd" 7INHERIT_remove_class-native = "systemd"
8 8
9SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" 9SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
10SRCREV="v2016.10" 10SRCREV="v2016.5"
11 11
12S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
13 13
@@ -19,7 +19,8 @@ DEPENDS_remove_class-native = "systemd-native"
19RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz" 19RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz"
20RDEPENDS_${PN}_remove_class-native = "python-native" 20RDEPENDS_${PN}_remove_class-native = "python-native"
21 21
22EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man" 22EXTRA_OECONF = "CFLAGS='-DDISABLE_OTMPFILE' --with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man"
23EXTRA_OEMAKE = "CFLAGS='-DDISABLE_OTMPFILE'"
23 24
24SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" 25SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"
25SYSTEMD_REQUIRED_class-native = "" 26SYSTEMD_REQUIRED_class-native = ""
@@ -29,7 +30,7 @@ SYSTEMD_SERVICE_${PN}_class-native = ""
29 30
30PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" 31PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
31PACKAGECONFIG_class-native = "" 32PACKAGECONFIG_class-native = ""
32PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,," 33PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
33 34
34FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" 35FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild"
35 36
@@ -57,6 +58,7 @@ do_install_append() {
57 58
58FILES_${PN} += " \ 59FILES_${PN} += " \
59 ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ 60 ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \
61 ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \
60 ${datadir}/gir-1.0 \ 62 ${datadir}/gir-1.0 \
61 ${datadir}/gir-1.0/OSTree-1.0.gir \ 63 ${datadir}/gir-1.0/OSTree-1.0.gir \
62 ${libdir}/girepository-1.0 \ 64 ${libdir}/girepository-1.0 \