From: John Crispin Date: Thu, 17 Dec 2015 09:29:42 +0000 (+0000) Subject: uboot-omap: update to 2015.10 X-Git-Tag: reboot~1149 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=98b9dfd2b5370b453798a2b7da356b7fef7f9b51;p=openwrt%2Fstaging%2Fchunkeey.git uboot-omap: update to 2015.10 - tested on Beagleboard C4 - remove upstream patches - disable THUMB mode on OMAP3 this increases binary size (remove CONFIG_SYS_THUMB_BUILD) - reduce SPL size by disabling EXT feature (remove CONFIG_SPL_EXT_SUPPORT) this fixes 2015.07 and 2015.10-rc3 Beagleboard C4 booting which were broken by upstream commit with id: bd2c4522c26d535515aebca52d27c004a7e0c05c Arm THUMB mode is broken because of an yet unknown errata see: http://lists.denx.de/pipermail/u-boot/2015-August/225793.html - backport upstream fix that was introduced in 2015.10-rc5 and was not fixed in 2015.10 final Signed-off-by: Dirk Neukirchen SVN-Revision: 47924 --- diff --git a/package/boot/uboot-omap/Makefile b/package/boot/uboot-omap/Makefile index e21e2e1b2b..5441bafba4 100644 --- a/package/boot/uboot-omap/Makefile +++ b/package/boot/uboot-omap/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=u-boot -PKG_VERSION:=2013.10 +PKG_VERSION:=2015.10 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ http://mirror2.openwrt.org/sources \ ftp://ftp.denx.de/pub/u-boot -PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2 +PKG_MD5SUM:=7c203b0fc3390a122d8e8b75f147eac5 PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README diff --git a/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch b/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch new file mode 100644 index 0000000000..b8e65b5005 --- /dev/null +++ b/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch @@ -0,0 +1,33 @@ +From c139b5ff0999ec3d44a02ebdb623a92e5782e53e Mon Sep 17 00:00:00 2001 +From: Tom Rini +Date: Tue, 27 Oct 2015 19:04:40 -0400 +Subject: [PATCH] image.c: Fix non-Android booting with ramdisk and/or device + tree + +In 1fec3c5 I added a check that if we had an Android image we default to +trying the kernel address for a ramdisk. However when we don't have an +Android image buf is NULL and we oops here. Ensure that we have 'buf' +to check first. + +Reported-by: elipe Balbi +Signed-off-by: Tom Rini +--- + common/image.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/image.c b/common/image.c +index e607109..85c4f39 100644 +--- a/common/image.c ++++ b/common/image.c +@@ -913,7 +913,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, + * Look for an Android boot image. + */ + buf = map_sysmem(images->os.start, 0); +- if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) ++ if (buf && genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) + select = argv[0]; + #endif + +-- +1.7.10.4 + diff --git a/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch b/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch deleted file mode 100644 index a230dfe9c9..0000000000 --- a/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/include/configs/omap4_common.h -+++ b/include/configs/omap4_common.h -@@ -143,7 +143,7 @@ - "vram=16M\0" \ - "mmcdev=0\0" \ - "mmcroot=/dev/mmcblk0p2 rw\0" \ -- "mmcrootfstype=ext3 rootwait\0" \ -+ "mmcrootfstype=ext4 rootwait\0" \ - "mmcargs=setenv bootargs console=${console} " \ - "vram=${vram} " \ - "root=${mmcroot} " \ diff --git a/package/boot/uboot-omap/patches/002-fix_jffs2.patch b/package/boot/uboot-omap/patches/002-fix_jffs2.patch deleted file mode 100644 index 849c633221..0000000000 --- a/package/boot/uboot-omap/patches/002-fix_jffs2.patch +++ /dev/null @@ -1,30 +0,0 @@ -Building boards that have JFFS2 support enabled will fail when using -U-Boot's builtin GCC library, for example like this: - -USE_PRIVATE_LIBGCC=yes ./MAKEALL omap3_evm -... -fs/jffs2/libjffs2.o: In function `jffs2_1pass_build_lists': -fs/jffs2/jffs2_1pass.c:1441: undefined reference to `__aeabi_uldivmod' - -This is caused by a u64 / u32 division in jffs2_1pass.c; the problem -can be avoided by using do_div() instead of plain division. - -Signed-off-by: Wolfgang Denk -Reported-by: Chris Ruehl -Cc: Chris Ruehl - ---- - fs/jffs2/jffs2_1pass.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/fs/jffs2/jffs2_1pass.c -+++ b/fs/jffs2/jffs2_1pass.c -@@ -1438,7 +1438,7 @@ jffs2_1pass_build_lists(struct part_info - { - struct b_lists *pL; - struct jffs2_unknown_node *node; -- u32 nr_sectors = part->size/part->sector_size; -+ u32 nr_sectors = do_div(part->size, part->sector_size); - u32 i; - u32 counter4 = 0; - u32 counterF = 0; diff --git a/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch b/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch deleted file mode 100644 index b0b85e5f51..0000000000 --- a/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -242,6 +242,8 @@ - "setenv fdtfile omap3-beagle.dtb; fi; " \ - "if test $beaglerev = Cx; then " \ - "setenv fdtfile omap3-beagle.dtb; fi; " \ -+ "if test $beaglerev = C4; then " \ -+ "setenv fdtfile omap3-beagle.dtb; fi; " \ - "if test $beaglerev = xMAB; then " \ - "setenv fdtfile omap3-beagle-xm.dtb; fi; " \ - "if test $beaglerev = xMC; then " \ diff --git a/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch b/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch new file mode 100644 index 0000000000..7b7bfa8fbe --- /dev/null +++ b/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch @@ -0,0 +1,11 @@ +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -233,8 +233,6 @@ + #define CONFIG_SPL_EXT_SUPPORT + #endif + +-#define CONFIG_SYS_THUMB_BUILD +- + /* General parts of the framework, required. */ + #define CONFIG_SPL_I2C_SUPPORT + #define CONFIG_SPL_LIBCOMMON_SUPPORT diff --git a/package/boot/uboot-omap/patches/101-disable_ext.patch b/package/boot/uboot-omap/patches/101-disable_ext.patch new file mode 100644 index 0000000000..9e0e47caf3 --- /dev/null +++ b/package/boot/uboot-omap/patches/101-disable_ext.patch @@ -0,0 +1,10 @@ +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -230,7 +230,6 @@ + #define CONFIG_SPL_LIBDISK_SUPPORT + #define CONFIG_SPL_MMC_SUPPORT + #define CONFIG_SPL_FAT_SUPPORT +-#define CONFIG_SPL_EXT_SUPPORT + #endif + + /* General parts of the framework, required. */ diff --git a/package/boot/uboot-omap/patches/400-gcc-5-compiler.patch b/package/boot/uboot-omap/patches/400-gcc-5-compiler.patch deleted file mode 100644 index 8724927402..0000000000 --- a/package/boot/uboot-omap/patches/400-gcc-5-compiler.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Hans de Goede -Date: Sat, 7 Feb 2015 21:52:40 +0000 (+0100) -Subject: Add linux/compiler-gcc5.h to fix builds with gcc5 -X-Git-Tag: v2015.04-rc2~31 -X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=478b02f1a7043b673565075ea5016376f3293b23 - -Add linux/compiler-gcc5.h to fix builds with gcc5 - -Add linux/compiler-gcc5/h from the kernel sources at: - -commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b -Author: Steven Noonan -Date: Sat Oct 25 15:09:42 2014 -0700 - - compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles - -Signed-off-by: Hans de Goede ---- - ---- /dev/null -+++ b/include/linux/compiler-gcc5.h -@@ -0,0 +1,65 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include directly, include 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. -+ * -+ * (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 */ diff --git a/package/boot/uboot-omap/patches/410-use-static-inline.patch b/package/boot/uboot-omap/patches/410-use-static-inline.patch deleted file mode 100644 index e030cac3e6..0000000000 --- a/package/boot/uboot-omap/patches/410-use-static-inline.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Jeroen Hofstee -Date: Sun, 22 Jun 2014 21:10:39 +0000 (+0200) -Subject: ARM:asm:io.h use static inline -X-Git-Tag: v2014.10-rc2~47 -X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8863aa5c984460ce1112d8db895cbf8b13a6ac9d - -ARM:asm:io.h use static inline - -When compiling u-boot with W=1 the extern inline void for -read* is likely causing the most noise. gcc / clang will -warn there is never a actual declaration for these functions. -Instead of declaring these extern make them static inline so -it is actually declared. - -cc: Albert ARIBAUD -Signed-off-by: Jeroen Hofstee ---- - ---- a/arch/arm/include/asm/io.h -+++ b/arch/arm/include/asm/io.h -@@ -75,42 +75,42 @@ static inline phys_addr_t virt_to_phys(v - #define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v)) - #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) - --extern inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) -+static inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) - { - uint8_t *buf = (uint8_t *)data; - while(bytelen--) - __arch_putb(*buf++, addr); - } - --extern inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) -+static inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) - { - uint16_t *buf = (uint16_t *)data; - while(wordlen--) - __arch_putw(*buf++, addr); - } - --extern inline void __raw_writesl(unsigned int addr, const void *data, int longlen) -+static inline void __raw_writesl(unsigned int addr, const void *data, int longlen) - { - uint32_t *buf = (uint32_t *)data; - while(longlen--) - __arch_putl(*buf++, addr); - } - --extern inline void __raw_readsb(unsigned int addr, void *data, int bytelen) -+static inline void __raw_readsb(unsigned int addr, void *data, int bytelen) - { - uint8_t *buf = (uint8_t *)data; - while(bytelen--) - *buf++ = __arch_getb(addr); - } - --extern inline void __raw_readsw(unsigned int addr, void *data, int wordlen) -+static inline void __raw_readsw(unsigned int addr, void *data, int wordlen) - { - uint16_t *buf = (uint16_t *)data; - while(wordlen--) - *buf++ = __arch_getw(addr); - } - --extern inline void __raw_readsl(unsigned int addr, void *data, int longlen) -+static inline void __raw_readsl(unsigned int addr, void *data, int longlen) - { - uint32_t *buf = (uint32_t *)data; - while(longlen--) diff --git a/package/boot/uboot-omap/patches/420-use-weak-in-board.patch b/package/boot/uboot-omap/patches/420-use-weak-in-board.patch deleted file mode 100644 index b46e616f76..0000000000 --- a/package/boot/uboot-omap/patches/420-use-weak-in-board.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: Jeroen Hofstee -Date: Wed, 8 Oct 2014 20:57:21 +0000 (+0200) -Subject: arm: board: use __weak -X-Git-Tag: v2015.01-rc1~176 -X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8590c800ee60e46f15d6085e3c1fed0d6881fc62 - -arm: board: use __weak - -Signed-off-by: Jeroen Hofstee -Acked-by: Albert ARIBAUD ---- - ---- a/arch/arm/lib/board.c -+++ b/arch/arm/lib/board.c -@@ -62,25 +62,15 @@ extern void dataflash_print_info(void); - ************************************************************************ - * May be supplied by boards if desired - */ --inline void __coloured_LED_init(void) {} --void coloured_LED_init(void) -- __attribute__((weak, alias("__coloured_LED_init"))); --inline void __red_led_on(void) {} --void red_led_on(void) __attribute__((weak, alias("__red_led_on"))); --inline void __red_led_off(void) {} --void red_led_off(void) __attribute__((weak, alias("__red_led_off"))); --inline void __green_led_on(void) {} --void green_led_on(void) __attribute__((weak, alias("__green_led_on"))); --inline void __green_led_off(void) {} --void green_led_off(void) __attribute__((weak, alias("__green_led_off"))); --inline void __yellow_led_on(void) {} --void yellow_led_on(void) __attribute__((weak, alias("__yellow_led_on"))); --inline void __yellow_led_off(void) {} --void yellow_led_off(void) __attribute__((weak, alias("__yellow_led_off"))); --inline void __blue_led_on(void) {} --void blue_led_on(void) __attribute__((weak, alias("__blue_led_on"))); --inline void __blue_led_off(void) {} --void blue_led_off(void) __attribute__((weak, alias("__blue_led_off"))); -+__weak void coloured_LED_init(void) {} -+__weak void red_led_on(void) {} -+__weak void red_led_off(void) {} -+__weak void green_led_on(void) {} -+__weak void green_led_off(void) {} -+__weak void yellow_led_on(void) {} -+__weak void yellow_led_off(void) {} -+__weak void blue_led_on(void) {} -+__weak void blue_led_off(void) {} - - /* - ************************************************************************ -@@ -199,27 +189,21 @@ typedef int (init_fnc_t) (void); - - int print_cpuinfo(void); - --void __dram_init_banksize(void) -+__weak void dram_init_banksize(void) - { - gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; - gd->bd->bi_dram[0].size = gd->ram_size; - } --void dram_init_banksize(void) -- __attribute__((weak, alias("__dram_init_banksize"))); - --int __arch_cpu_init(void) -+__weak int arch_cpu_init(void) - { - return 0; - } --int arch_cpu_init(void) -- __attribute__((weak, alias("__arch_cpu_init"))); - --int __power_init_board(void) -+__weak int power_init_board(void) - { - return 0; - } --int power_init_board(void) -- __attribute__((weak, alias("__power_init_board"))); - - /* Record the board_init_f() bootstage (after arch_cpu_init()) */ - static int mark_bootstage(void) diff --git a/package/boot/uboot-omap/patches/430-use-weak-in-main.patch b/package/boot/uboot-omap/patches/430-use-weak-in-main.patch deleted file mode 100644 index 07c197fc17..0000000000 --- a/package/boot/uboot-omap/patches/430-use-weak-in-main.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Jeroen Hofstee -Date: Thu, 26 Jun 2014 18:18:31 +0000 (+0200) -Subject: common: main.c: make show_boot_progress __weak -X-Git-Tag: v2014.10-rc1~130 -X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=3422299dc28fa8257677d03cc1253e3c9bf17e9f - -common: main.c: make show_boot_progress __weak - -This not only looks a bit better it also prevents a -warning with W=1 (no previous prototype). - -Signed-off-by: Jeroen Hofstee -Acked-by: Simon Glass ---- - ---- a/common/main.c -+++ b/common/main.c -@@ -27,8 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; - /* - * Board-specific Platform code can reimplement show_boot_progress () if needed - */ --void inline __show_boot_progress (int val) {} --void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress"))); -+__weak void show_boot_progress(int val) {} - - #define MAX_DELAY_STOP_STR 32 - diff --git a/package/boot/uboot-omap/patches/440-use-normal_board_usb_init.patch b/package/boot/uboot-omap/patches/440-use-normal_board_usb_init.patch deleted file mode 100644 index c334e371a8..0000000000 --- a/package/boot/uboot-omap/patches/440-use-normal_board_usb_init.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/usb/host/ehci-omap.c -+++ b/drivers/usb/host/ehci-omap.c -@@ -96,11 +96,10 @@ static void omap_ehci_soft_phy_reset(int - } - #endif - --inline int __board_usb_init(void) -+static int board_usb_init(void) - { - return 0; - } --int board_usb_init(void) __attribute__((weak, alias("__board_usb_init"))); - - #if defined(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO) || \ - defined(CONFIG_OMAP_EHCI_PHY2_RESET_GPIO) || \