summaryrefslogtreecommitdiffstats
path: root/meta-sota/recipes-bsp
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2016-09-26 15:44:53 +0200
committerAnton Gerasimov <anton@advancedtelematic.com>2016-09-26 15:44:53 +0200
commit4e1566679067975e3e8ee0a9198e4df332e6e32e (patch)
tree9d0ca74f9868e22e878524aa6bfcebeb97a6990e /meta-sota/recipes-bsp
parent111007af41bd44d3b634563373fa7b04dc6aa2ae (diff)
Added initramfs image and fixed several error to make AGL rootfs
bootable as an OSTree deployment Bug-AGL: SPEC-253 Change-Id: If636a282d51a64c73c46ce70a361518c1f70cdd6 Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com>
Diffstat (limited to 'meta-sota/recipes-bsp')
-rw-r--r--meta-sota/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch27
-rw-r--r--meta-sota/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch165
-rw-r--r--meta-sota/recipes-bsp/u-boot/u-boot-ota_2015.07.bb24
-rw-r--r--meta-sota/recipes-bsp/u-boot/u-boot-ota_2016.07.bb23
4 files changed, 121 insertions, 118 deletions
diff --git a/meta-sota/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch b/meta-sota/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
index c33d40c..186a2a2 100644
--- a/meta-sota/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
+++ b/meta-sota/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
@@ -1,36 +1,41 @@
-From 2b4d519bef51d9bfb646588aa5198f71022a867b Mon Sep 17 00:00:00 2001
+From ebb26338d0c2f436a86fd4d7cb8d723a90d6a369 Mon Sep 17 00:00:00 2001
From: Anton Gerasimov <anton@advancedtelematic.com>
-Date: Mon, 15 Aug 2016 15:54:20 +0200
-Subject: [PATCH] Set up environment for OSTree integration
+Date: Thu, 15 Sep 2016 17:52:41 +0200
+Subject: [PATCH 1/2] Set up environment for OSTree integration
---
- include/configs/qemu-x86.h | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
+ include/configs/qemu-x86.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h
-index 476d37d..f49e2a5 100644
+index 78c296f..79df455 100644
--- a/include/configs/qemu-x86.h
+++ b/include/configs/qemu-x86.h
-@@ -56,4 +56,19 @@
+@@ -74,4 +74,24 @@
#undef CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_IS_NOWHERE
+#undef CONFIG_BOOTARGS
+#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0"
+
++#undef CONFIG_BOOTDELAY
++#define CONFIG_BOOTDELAY 3
++
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND "run loadenv;" \
-+ "ext2load ide 0:1 $loadaddr $kernel_image;" \
-+ "ext2load ide 0:1 $ramdiskaddr $ramdisk_image;" \
++ "setenv bootargs $bootargs\" console=ttyS0 root=/dev/hda\";" \
++ "ext2load ide 0 $loadaddr \"/boot\"$kernel_image;" \
++ "ext2load ide 0 $ramdiskaddr \"/boot\"$ramdisk_image;" \
+ "zboot $loadaddr - $ramdiskaddr $filesize"
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \
+ "ramdisk_image=/initrd\0" \
+ "ramdiskaddr=0x4000000\0" \
-+ "loadenv=if ext2ls ide 0:1 /loader.0/uEnv.txt; then ext2load ide 0:1 $loadaddr uEnv.txt; env import -t $loadaddr $filesize; fi;"
++ "bootdelay=3\0" \
++ "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;"
+
#endif /* __CONFIG_H */
--
-2.8.3
+2.9.3
diff --git a/meta-sota/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch b/meta-sota/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
index 83e223f..7540b74 100644
--- a/meta-sota/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
+++ b/meta-sota/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
@@ -1,44 +1,38 @@
-From d5bea58bf85522a289194d59dfab00207ffdfb4f Mon Sep 17 00:00:00 2001
+From ab0d7e270d89f6eb99582197d2d58bf60c9c3d26 Mon Sep 17 00:00:00 2001
From: Anton Gerasimov <anton@advancedtelematic.com>
-Date: Fri, 26 Aug 2016 13:51:30 +0200
+Date: Thu, 15 Sep 2016 16:49:32 +0200
Subject: [PATCH 2/2] Replace wraps with built-in code to remove dependency on
multilib
---
- arch/x86/config.mk | 3 --
- arch/x86/lib/gcc.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++-------
- 2 files changed, 86 insertions(+), 14 deletions(-)
+ arch/x86/config.mk | 2 --
+ arch/x86/lib/gcc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++---------
+ 2 files changed, 87 insertions(+), 19 deletions(-)
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
-index d7addd8..892e0fc 100644
+index 999143e..139576e 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
-@@ -21,9 +21,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
-
- PLATFORM_LDFLAGS += -Bsymbolic -Bsymbolic-functions -m elf_i386
+@@ -22,5 +22,3 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
+ PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386
+ LDFLAGS_FINAL += --gc-sections -pie
-LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
-LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
--
- # This is used in the top-level Makefile which does not include
- # PLATFORM_LDFLAGS
- LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined
diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c
-index 3c70d79..6b47785 100644
+index 497ad75..c321b11 100644
--- a/arch/x86/lib/gcc.c
+++ b/arch/x86/lib/gcc.c
-@@ -8,22 +8,97 @@
+@@ -19,22 +19,92 @@
#ifdef __GNUC__
-+#include <stdint.h>
-+#include <stddef.h>
- /*
- * GCC's libgcc handling is quite broken. While the libgcc functions
- * are always regparm(0) the code that calls them uses whatever the
- * compiler call specifies. Therefore we need a wrapper around those
- * functions. See gcc bug PR41055 for more information.
- */
+-/*
+- * GCC's libgcc handling is quite broken. While the libgcc functions
+- * are always regparm(0) the code that calls them uses whatever the
+- * compiler call specifies. Therefore we need a wrapper around those
+- * functions. See gcc bug PR41055 for more information.
+- */
-#define WRAP_LIBGCC_CALL(type, name) \
- type __normal_##name(type a, type b) __attribute__((regparm(0))); \
- type __wrap_##name(type a, type b); \
@@ -50,92 +44,95 @@ index 3c70d79..6b47785 100644
-WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
-WRAP_LIBGCC_CALL(long long, __moddi3)
-WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)
++#include <stdint.h>
++#include <stddef.h>
++
+uint64_t __udivmoddi4 ( uint64_t num,
-+ uint64_t den,
-+ uint64_t *rem_p )
++ uint64_t den,
++ uint64_t *rem_p )
+{
-+ uint64_t quot = 0, qbit = 1;
-+
-+ if ( den == 0 ) {
-+ return 1/((unsigned)den); /* Intentional divide by zero, without
-+ triggering a compiler warning which
-+ would abort the build */
-+ }
-+
-+ /* Left-justify denominator and count shift */
-+ while ( (int64_t)den >= 0 ) {
-+ den <<= 1;
-+ qbit <<= 1;
-+ }
-+
-+ while ( qbit ) {
-+ if ( den <= num ) {
-+ num -= den;
-+ quot += qbit;
-+ }
-+ den >>= 1;
-+ qbit >>= 1;
-+ }
-+
-+ if ( rem_p )
-+ *rem_p = num;
-+
-+ return quot;
-+}
++ uint64_t quot = 0, qbit = 1;
++
++ if ( den == 0 ) {
++ return 1/((unsigned)den); /* Intentional divide by zero, without
++ triggering a compiler warning which
++ would abort the build */
++ }
+
++ /* Left-justify denominator and count shift */
++ while ( (int64_t)den >= 0 ) {
++ den <<= 1;
++ qbit <<= 1;
++ }
++
++ while ( qbit ) {
++ if ( den <= num ) {
++ num -= den;
++ quot += qbit;
++ }
++ den >>= 1;
++ qbit >>= 1;
++ }
++
++ if ( rem_p )
++ *rem_p = num;
++
++ return quot;
++}
+uint64_t __udivdi3( uint64_t num, uint64_t den )
+{
-+ return __udivmoddi4(num, den, NULL);
++ return __udivmoddi4(num, den, NULL);
+}
+
+uint64_t __umoddi3 ( uint64_t num, uint64_t den )
+{
-+ uint64_t v;
++ uint64_t v;
+
-+ (void) __udivmoddi4(num, den, &v);
-+ return v;
++ (void) __udivmoddi4(num, den, &v);
++ return v;
+}
+
+int64_t __divmoddi4 ( int64_t num,
-+ int64_t den,
-+ int64_t* rem_p )
++ int64_t den,
++ int64_t* rem_p )
+{
-+ int minus = 0;
-+ int64_t v;
-+
-+ if ( num < 0 ) {
-+ num = -num;
-+ minus = 1;
-+ }
-+ if ( den < 0 ) {
-+ den = -den;
-+ minus ^= 1;
-+ }
-+
-+ v = __udivmoddi4(num, den, (uint64_t *)rem_p);
-+ if ( minus ) {
-+ v = -v;
-+ if ( rem_p )
-+ *rem_p = -(*rem_p);
-+ }
-+
-+ return v;
++ int minus = 0;
++ int64_t v;
++
++ if ( num < 0 ) {
++ num = -num;
++ minus = 1;
++ }
++ if ( den < 0 ) {
++ den = -den;
++ minus ^= 1;
++ }
++
++ v = __udivmoddi4(num, den, (uint64_t *)rem_p);
++ if ( minus ) {
++ v = -v;
++ if ( rem_p )
++ *rem_p = -(*rem_p);
++ }
++
++ return v;
+}
+
++
+int64_t __moddi3 (int64_t num, int64_t den)
+{
-+ int64_t v;
++ int64_t v;
+
-+ (void) __divmoddi4(num, den, &v);
-+ return v;
++ (void) __divmoddi4(num, den, &v);
++ return v;
+}
+
+int64_t __divdi3(int64_t num, int64_t den)
+{
-+ return __divmoddi4(num, den, NULL);
++ return __divmoddi4(num, den, NULL);
+}
#endif
--
-2.9.2
+2.9.3
diff --git a/meta-sota/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/meta-sota/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
new file mode 100644
index 0000000..ab5d403
--- /dev/null
+++ b/meta-sota/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
@@ -0,0 +1,24 @@
+include recipes-bsp/u-boot/u-boot.inc
+DEPENDS += "dtc-native"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
+
+# This revision corresponds to the tag "v2015.07"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "baba2f57e8f4ed3fa67fe213d22da0de5e00f204"
+
+SRC_URI += "file://0001-Set-up-environment-for-OSTree-integration.patch \
+ file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \
+ "
+
+PV = "v2015.07+git${SRCPV}"
+
+EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline "
+EXTRA_OEMAKE_append_qemux86 = " BUILD_ROM=y"
+EXTRA_OEMAKE_append_qemux86-64 = " BUILD_ROM=y"
+
+UBOOT_SUFFIX = "bin"
+UBOOT_SUFFIX_qemux86 = "rom"
+UBOOT_SUFFIX_qemux86-64 = "rom"
diff --git a/meta-sota/recipes-bsp/u-boot/u-boot-ota_2016.07.bb b/meta-sota/recipes-bsp/u-boot/u-boot-ota_2016.07.bb
deleted file mode 100644
index 7d440ef..0000000
--- a/meta-sota/recipes-bsp/u-boot/u-boot-ota_2016.07.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-include recipes-bsp/u-boot/u-boot.inc
-DEPENDS += "dtc-native"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-
-# This revision corresponds to the tag "v2016.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "25922d42f8e9e7ae503ae55a972ba1404e5b6a8c"
-
-SRC_URI += "file://0001-Set-up-environment-for-OSTree-integration.patch \
- file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch"
-
-PV = "v2016.07+git${SRCPV}"
-
-EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline"
-EXTRA_OEMAKE_append_qemux86 = " KCFLAGS=-fgnu89-inline BUILD_ROM=y"
-EXTRA_OEMAKE_append_qemux86-64 = " KCFLAGS=-fgnu89-inline BUILD_ROM=y"
-
-UBOOT_SUFFIX = "bin"
-UBOOT_SUFFIX_qemux86 = "rom"
-UBOOT_SUFFIX_qemux86-64 = "rom"