aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2017-04-11 16:49:11 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-04-23 19:12:00 +0000
commit521815fa95dba3d47704b62b4b6911fc994ad4c8 (patch)
tree3a58f617c7851c9c1af73351f8383feae5b193f7 /meta-agl-bsp/recipes-bsp/u-boot
parent2058488e70e63f9ce064273043aa627d786b58d7 (diff)
Switch to meta-updater
Replace SOTA-related sections with includes, moved u-boot-ota common to minnowboard and qemu to meta-agl-bsp Change-Id: I531f0eec07bab01610a225afc6d32a2f3a8156ad Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9095 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/recipes-bsp/u-boot')
-rw-r--r--meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch41
-rw-r--r--meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch86
-rw-r--r--meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch138
-rw-r--r--meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb25
-rw-r--r--meta-agl-bsp/recipes-bsp/u-boot/u-boot_2016.11.bb13
5 files changed, 303 insertions, 0 deletions
diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
new file mode 100644
index 000000000..5172fdd3a
--- /dev/null
+++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch
@@ -0,0 +1,41 @@
+From ebb26338d0c2f436a86fd4d7cb8d723a90d6a369 Mon Sep 17 00:00:00 2001
+From: Anton Gerasimov <anton@advancedtelematic.com>
+Date: Thu, 15 Sep 2016 17:52:41 +0200
+Subject: [PATCH 1/2] Set up environment for OSTree integration
+
+---
+ 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 78c296f..79df455 100644
+--- a/include/configs/qemu-x86.h
++++ b/include/configs/qemu-x86.h
+@@ -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;" \
++ "setenv bootargs $bootargs\" console=ttyS0 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda ramdisk_size=16384 \";" \
++ "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" \
++ "bootdelay=3\0" \
++ "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;"
++
+ #endif /* __CONFIG_H */
+--
+2.9.3
+
diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch
new file mode 100644
index 000000000..df1f786c6
--- /dev/null
+++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch
@@ -0,0 +1,86 @@
+From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001
+From: Ronan Le Martret <ronan.lemartret@iot.bzh>
+Date: Fri, 14 Oct 2016 09:03:11 +0200
+Subject: [PATCH] fix gcc6 build
+
+Signed-off-by: ronan <ronan@linux-pgnz.suse>
+---
+ include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 66 insertions(+)
+ create mode 100644 include/linux/compiler-gcc6.h
+
+diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h
+new file mode 100644
+index 0000000..a3d00d8
+--- /dev/null
++++ b/include/linux/compiler-gcc6.h
+@@ -0,0 +1,66 @@
++#ifndef __LINUX_COMPILER_H
++#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
++#endif
++
++#define __used __attribute__((__used__))
++#define __must_check __attribute__((warn_unused_result))
++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
++
++/* Mark functions as cold. gcc will assume any path leading to a call
++ to them will be unlikely. This means a lot of manual unlikely()s
++ are unnecessary now for any paths leading to the usual suspects
++ like BUG(), printk(), panic() etc. [but let's keep them for now for
++ older compilers]
++
++ Early snapshots of gcc 4.3 don't support this and we can't detect this
++ in the preprocessor, but we can live with this because they're unreleased.
++ Maketime probing would be overkill here.
++
++ gcc also has a __attribute__((__hot__)) to move hot functions into
++ a special section, but I don't see any sense in this right now in
++ the kernel context */
++#define __cold __attribute__((__cold__))
++
++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
++
++#ifndef __CHECKER__
++# define __compiletime_warning(message) __attribute__((warning(message)))
++# define __compiletime_error(message) __attribute__((error(message)))
++#endif /* __CHECKER__ */
++
++/*
++ * Mark a position in code as unreachable. This can be used to
++ * suppress control flow warnings after asm blocks that transfer
++ * control elsewhere.
++ *
++ * Early snapshots of gcc 4.5 don't support this and we can't detect
++ * this in the preprocessor, but we can live with this because they're
++ * unreleased. Really, we need to have autoconf for the kernel.
++ */
++#define unreachable() __builtin_unreachable()
++
++/* Mark a function definition as prohibited from being cloned. */
++#define __noclone __attribute__((__noclone__))
++
++/*
++ * Tell the optimizer that something else uses this function or variable.
++ */
++#define __visible __attribute__((externally_visible))
++
++/*
++ * GCC 'asm goto' miscompiles certain code sequences:
++ *
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
++ *
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
++ * Fixed in GCC 4.8.2 and later versions.
++ *
++ * (asm goto is automatically volatile - the naming reflects this.)
++ */
++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
++
++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
++#define __HAVE_BUILTIN_BSWAP32__
++#define __HAVE_BUILTIN_BSWAP64__
++#define __HAVE_BUILTIN_BSWAP16__
++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
+--
+2.6.6
+
diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
new file mode 100644
index 000000000..7540b7467
--- /dev/null
+++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch
@@ -0,0 +1,138 @@
+From ab0d7e270d89f6eb99582197d2d58bf60c9c3d26 Mon Sep 17 00:00:00 2001
+From: Anton Gerasimov <anton@advancedtelematic.com>
+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 | 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 999143e..139576e 100644
+--- a/arch/x86/config.mk
++++ b/arch/x86/config.mk
+@@ -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
+diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c
+index 497ad75..c321b11 100644
+--- a/arch/x86/lib/gcc.c
++++ b/arch/x86/lib/gcc.c
+@@ -19,22 +19,92 @@
+
+ #ifdef __GNUC__
+
+-/*
+- * 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); \
+- type __attribute__((no_instrument_function)) \
+- __wrap_##name(type a, type b) \
+- { return __normal_##name(a, b); }
+-
+-WRAP_LIBGCC_CALL(long long, __divdi3)
+-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 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);
++}
++
++uint64_t __umoddi3 ( uint64_t num, uint64_t den )
++{
++ uint64_t v;
++
++ (void) __udivmoddi4(num, den, &v);
++ return v;
++}
++
++int64_t __divmoddi4 ( int64_t num,
++ 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;
++}
++
++
++int64_t __moddi3 (int64_t num, int64_t den)
++{
++ int64_t v;
++
++ (void) __divmoddi4(num, den, &v);
++ return v;
++}
++
++int64_t __divdi3(int64_t num, int64_t den)
++{
++ return __divmoddi4(num, den, NULL);
++}
+
+ #endif
+--
+2.9.3
+
diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
new file mode 100644
index 000000000..dfa0631a0
--- /dev/null
+++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb
@@ -0,0 +1,25 @@
+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 \
+ file://0001-fixup-build-with-gcc6.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-agl-bsp/recipes-bsp/u-boot/u-boot_2016.11.bb b/meta-agl-bsp/recipes-bsp/u-boot/u-boot_2016.11.bb
new file mode 100644
index 000000000..2c7cc4bb9
--- /dev/null
+++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot_2016.11.bb
@@ -0,0 +1,13 @@
+require recipes-bsp/u-boot/u-boot.inc
+
+DEPENDS += "dtc-native"
+
+SRCREV = "5ea3e51fc481613a8dee8c02848d1b42c81ad892"
+
+PV = "v2016.11+git${SRCPV}"
+
+#This patch is not complacente with u-boot 2016.11
+#Version of u-boot from yocto 2.2 Morty is 2016.03 from:
+# meta/recipes-bsp/u-boot/u-boot_2016.03.bb
+SRC_URI_remove_raspberrypi3 = "file://0003-Include-lowlevel_init.o-for-rpi2.patch"
+SRC_URI_remove_raspberrypi2 = "file://0003-Include-lowlevel_init.o-for-rpi2.patch"