mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
alarm/uboot-boundary to 2016.11-1
This commit is contained in:
parent
889600ab53
commit
6969dec1dd
11 changed files with 302 additions and 561 deletions
|
@ -1,34 +1,228 @@
|
|||
From c70e52af62bc27e37ab6838046f0c0a8a1963101 Mon Sep 17 00:00:00 2001
|
||||
From b4c63d53a572803057ba5bda9ed54fd3a8a77a37 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Jun 2015 14:36:09 -0600
|
||||
Subject: [PATCH 1/6] arch linux arm modifications
|
||||
Date: Fri, 25 Nov 2016 12:41:15 -0700
|
||||
Subject: [PATCH] arch linux arm modifications
|
||||
|
||||
---
|
||||
include/configs/nitrogen6x.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
board/boundary/nitrogen6x/nitrogen6x.c | 12 +++
|
||||
configs/mx6qsabrelite_defconfig | 1 +
|
||||
configs/nitrogen6q_defconfig | 1 +
|
||||
include/configs/nitrogen6x.h | 153 +++++++--------------------------
|
||||
4 files changed, 43 insertions(+), 124 deletions(-)
|
||||
|
||||
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
|
||||
index ab8b2be..ef2cb05 100644
|
||||
--- a/board/boundary/nitrogen6x/nitrogen6x.c
|
||||
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
|
||||
@@ -910,6 +910,18 @@ int board_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int board_late_init(void)
|
||||
+{
|
||||
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
+ if (gpio_get_value(WL12XX_WL_IRQ_GP))
|
||||
+ setenv("board_name", "nitrogen6x");
|
||||
+ else
|
||||
+ setenv("board_name", "sabrelite");
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int checkboard(void)
|
||||
{
|
||||
if (gpio_get_value(WL12XX_WL_IRQ_GP))
|
||||
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
|
||||
index d0ecdb9..b44f071 100644
|
||||
--- a/configs/mx6qsabrelite_defconfig
|
||||
+++ b/configs/mx6qsabrelite_defconfig
|
||||
@@ -42,3 +42,4 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
|
||||
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
|
||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_IDENT_STRING=" Arch Linux ARM"
|
||||
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
|
||||
index 0063df7..eaac435 100644
|
||||
--- a/configs/nitrogen6q_defconfig
|
||||
+++ b/configs/nitrogen6q_defconfig
|
||||
@@ -40,3 +40,4 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
|
||||
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
|
||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_IDENT_STRING=" Arch Linux ARM"
|
||||
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
|
||||
index f3efbb0..7dfaffc 100644
|
||||
index c22fed7..1dfc695 100644
|
||||
--- a/include/configs/nitrogen6x.h
|
||||
+++ b/include/configs/nitrogen6x.h
|
||||
@@ -82,6 +82,8 @@
|
||||
#define CONFIG_CMD_EXT4
|
||||
#define CONFIG_CMD_FS_GENERIC
|
||||
#define CONFIG_DOS_PARTITION
|
||||
+#define CONFIG_CMD_PART
|
||||
+#define CONFIG_PARTITION_UUIDS
|
||||
|
||||
#ifdef CONFIG_MX6Q
|
||||
#define CONFIG_CMD_SATA
|
||||
@@ -195,6 +197,8 @@
|
||||
@@ -126,138 +126,43 @@
|
||||
#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
|
||||
#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
|
||||
|
||||
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
||||
-#if defined(CONFIG_SABRELITE)
|
||||
+
|
||||
#if defined(CONFIG_SABRELITE)
|
||||
+#include <config_distro_defaults.h>
|
||||
+
|
||||
+#define CONFIG_BOARD_LATE_INIT
|
||||
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
- "script=boot.scr\0" \
|
||||
- "uimage=uImage\0" \
|
||||
- "console=ttymxc1\0" \
|
||||
+ "console=ttymxc1,115200\0" \
|
||||
+ "fdtfile=undefined\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
"initrd_high=0xffffffff\0" \
|
||||
- "fdt_file=imx6q-sabrelite.dtb\0" \
|
||||
+ "fdt_addr_r=0x18000000\0" \
|
||||
"fdt_addr=0x18000000\0" \
|
||||
- "boot_fdt=try\0" \
|
||||
+ "ramdisk_addr_r=0x19000000\0" \
|
||||
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
|
||||
+ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
|
||||
"ip_dyn=yes\0" \
|
||||
- "mmcdevs=0 1\0" \
|
||||
- "mmcpart=1\0" \
|
||||
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
||||
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
- "root=${mmcroot}\0" \
|
||||
- "loadbootscript=" \
|
||||
- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
- "bootscript=echo Running bootscript from mmc ...; " \
|
||||
- "source\0" \
|
||||
- "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
|
||||
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
- "mmcboot=echo Booting from mmc ...; " \
|
||||
- "run mmcargs; " \
|
||||
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
- "if run loadfdt; then " \
|
||||
- "bootm ${loadaddr} - ${fdt_addr}; " \
|
||||
- "else " \
|
||||
- "if test ${boot_fdt} = try; then " \
|
||||
- "bootm; " \
|
||||
- "else " \
|
||||
- "echo WARN: Cannot load the DT; " \
|
||||
- "fi; " \
|
||||
- "fi; " \
|
||||
- "else " \
|
||||
- "bootm; " \
|
||||
- "fi;\0" \
|
||||
- "netargs=setenv bootargs console=${console},${baudrate} " \
|
||||
- "root=/dev/nfs " \
|
||||
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
||||
- "netboot=echo Booting from net ...; " \
|
||||
- "run netargs; " \
|
||||
- "if test ${ip_dyn} = yes; then " \
|
||||
- "setenv get_cmd dhcp; " \
|
||||
- "else " \
|
||||
- "setenv get_cmd tftp; " \
|
||||
- "fi; " \
|
||||
- "${get_cmd} ${uimage}; " \
|
||||
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
||||
- "bootm ${loadaddr} - ${fdt_addr}; " \
|
||||
- "else " \
|
||||
- "if test ${boot_fdt} = try; then " \
|
||||
- "bootm; " \
|
||||
- "else " \
|
||||
- "echo WARN: Cannot load the DT; " \
|
||||
- "fi; " \
|
||||
- "fi; " \
|
||||
- "else " \
|
||||
- "bootm; " \
|
||||
- "fi;\0"
|
||||
+ "findfdt="\
|
||||
+ "if test $board_name = nitrogen6x ; then " \
|
||||
+ "setenv fdtfile imx6q-nitrogen6x.dtb; fi; " \
|
||||
+ "if test $board_name = sabrelite ; then " \
|
||||
+ "setenv fdtfile imx6q-sabrelite.dtb; fi; " \
|
||||
+ "if test $fdtfile = undefined; then " \
|
||||
+ "echo WARNING: Could not determine dtb to use; fi; \0" \
|
||||
+ BOOTENV
|
||||
+
|
||||
+#define BOOT_TARGET_DEVICES(func) \
|
||||
+ func(MMC, mmc, 0) \
|
||||
+ func(MMC, mmc, 1) \
|
||||
+ func(USB, usb, 0) \
|
||||
+ func(SATA, sata, 0)
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
- "for mmcdev in ${mmcdevs}; do " \
|
||||
- "mmc dev ${mmcdev}; " \
|
||||
- "if mmc rescan; then " \
|
||||
- "if run loadbootscript; then " \
|
||||
- "run bootscript; " \
|
||||
- "else " \
|
||||
- "if run loaduimage; then " \
|
||||
- "run mmcboot; " \
|
||||
- "fi; " \
|
||||
- "fi; " \
|
||||
- "fi; " \
|
||||
- "done; " \
|
||||
- "run netboot; "
|
||||
-#else
|
||||
-#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
|
||||
- "umsdevs=" CONFIG_UMSDEVS "\0" \
|
||||
- "console=ttymxc1\0" \
|
||||
- "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
|
||||
- "sf erase 0xc0000 0x2000 && " \
|
||||
- "echo restored environment to factory default ; fi\0" \
|
||||
- "bootcmd=for dtype in ${bootdevs}" \
|
||||
- "; do " \
|
||||
- "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
|
||||
- "usb start ;" \
|
||||
- "fi; " \
|
||||
- "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
|
||||
- "load " \
|
||||
- "${dtype} ${disk}:1 " \
|
||||
- "10008000 " \
|
||||
- "/6x_bootscript" \
|
||||
- "&& source 10008000 ; " \
|
||||
- "done ; " \
|
||||
- "done; " \
|
||||
- "setenv stdout serial,vga ; " \
|
||||
- "echo ; echo 6x_bootscript not found ; " \
|
||||
- "echo ; echo serial console at 115200, 8N1 ; echo ; " \
|
||||
- "echo details at http://boundarydevices.com/6q_bootscript ; " \
|
||||
- "setenv stdout serial;" \
|
||||
- "setenv stdin serial,usbkbd;" \
|
||||
- "for dtype in ${umsdevs} ; do " \
|
||||
- "if itest.s sata == ${dtype}; then " \
|
||||
- "initcmd='sata init' ;" \
|
||||
- "else " \
|
||||
- "initcmd='mmc rescan' ;" \
|
||||
- "fi; " \
|
||||
- "for disk in 0 1 ; do " \
|
||||
- "if $initcmd && $dtype dev $disk ; then " \
|
||||
- "setenv stdout serial,vga; " \
|
||||
- "echo expose ${dtype} ${disk} " \
|
||||
- "over USB; " \
|
||||
- "ums 0 $dtype $disk ;" \
|
||||
- "fi; " \
|
||||
- " done; " \
|
||||
- "done ;" \
|
||||
- "setenv stdout serial,vga; " \
|
||||
- "echo no block devices found;" \
|
||||
- "\0" \
|
||||
- "initrd_high=0xffffffff\0" \
|
||||
- "upgradeu=for dtype in ${bootdevs}" \
|
||||
- "; do " \
|
||||
- "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
|
||||
- "load ${dtype} ${disk}:1 10008000 " \
|
||||
- "/6x_upgrade " \
|
||||
- "&& source 10008000 ; " \
|
||||
- "done ; " \
|
||||
- "done\0" \
|
||||
+ "run findfdt; " \
|
||||
+ "run distro_bootcmd"
|
||||
+
|
||||
+#include <config_distro_bootcmd.h>
|
||||
|
||||
-#endif
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_MEMTEST_START 0x10000000
|
||||
#define CONFIG_SYS_MEMTEST_END 0x10010000
|
||||
--
|
||||
2.4.4
|
||||
2.10.2
|
||||
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
From 5b07fc2c680ad4279a45d863108544020b4d74cd Mon Sep 17 00:00:00 2001
|
||||
From: Sasha Levin <sasha.levin@oracle.com>
|
||||
Date: Mon, 13 Oct 2014 15:51:05 -0700
|
||||
Subject: [PATCH 2/6] kernel: add support for gcc 5
|
||||
|
||||
We're missing include/linux/compiler-gcc5.h which is required now
|
||||
because gcc branched off to v5 in trunk.
|
||||
|
||||
Just copy the relevant bits out of include/linux/compiler-gcc4.h,
|
||||
no new code is added as of now.
|
||||
|
||||
This fixes a build error when using gcc 5.
|
||||
|
||||
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
include/linux/compiler-gcc5.h | 66 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
create mode 100644 include/linux/compiler-gcc5.h
|
||||
|
||||
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
|
||||
new file mode 100644
|
||||
index 0000000..cdd1cc2
|
||||
--- /dev/null
|
||||
+++ b/include/linux/compiler-gcc5.h
|
||||
@@ -0,0 +1,66 @@
|
||||
+#ifndef __LINUX_COMPILER_H
|
||||
+#error "Please don't include <linux/compiler-gcc5.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.4.4
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
From 282ed8801c3e75e4c94943f56d399d630833591b Mon Sep 17 00:00:00 2001
|
||||
From: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
Date: Sun, 22 Jun 2014 23:10:39 +0200
|
||||
Subject: [PATCH 3/6] 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 <albert.u.boot@aribaud.net>
|
||||
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
---
|
||||
arch/arm/include/asm/io.h | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
|
||||
index 214f3ea..dc6138a 100644
|
||||
--- a/arch/arm/include/asm/io.h
|
||||
+++ b/arch/arm/include/asm/io.h
|
||||
@@ -77,7 +77,7 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
|
||||
#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
|
||||
#define __arch_putq(v,a) (*(volatile unsigned long long *)(a) = (v))
|
||||
|
||||
-extern inline void __raw_writesb(unsigned long addr, const void *data,
|
||||
+static inline void __raw_writesb(unsigned long addr, const void *data,
|
||||
int bytelen)
|
||||
{
|
||||
uint8_t *buf = (uint8_t *)data;
|
||||
@@ -85,7 +85,7 @@ extern inline void __raw_writesb(unsigned long addr, const void *data,
|
||||
__arch_putb(*buf++, addr);
|
||||
}
|
||||
|
||||
-extern inline void __raw_writesw(unsigned long addr, const void *data,
|
||||
+static inline void __raw_writesw(unsigned long addr, const void *data,
|
||||
int wordlen)
|
||||
{
|
||||
uint16_t *buf = (uint16_t *)data;
|
||||
@@ -93,7 +93,7 @@ extern inline void __raw_writesw(unsigned long addr, const void *data,
|
||||
__arch_putw(*buf++, addr);
|
||||
}
|
||||
|
||||
-extern inline void __raw_writesl(unsigned long addr, const void *data,
|
||||
+static inline void __raw_writesl(unsigned long addr, const void *data,
|
||||
int longlen)
|
||||
{
|
||||
uint32_t *buf = (uint32_t *)data;
|
||||
@@ -101,21 +101,21 @@ extern inline void __raw_writesl(unsigned long addr, const void *data,
|
||||
__arch_putl(*buf++, addr);
|
||||
}
|
||||
|
||||
-extern inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
|
||||
+static inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
|
||||
{
|
||||
uint8_t *buf = (uint8_t *)data;
|
||||
while(bytelen--)
|
||||
*buf++ = __arch_getb(addr);
|
||||
}
|
||||
|
||||
-extern inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
|
||||
+static inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
|
||||
{
|
||||
uint16_t *buf = (uint16_t *)data;
|
||||
while(wordlen--)
|
||||
*buf++ = __arch_getw(addr);
|
||||
}
|
||||
|
||||
-extern inline void __raw_readsl(unsigned long addr, void *data, int longlen)
|
||||
+static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
|
||||
{
|
||||
uint32_t *buf = (uint32_t *)data;
|
||||
while(longlen--)
|
||||
--
|
||||
2.4.4
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From 8158ac85f16963ff1d075255cd3f34b4f0614265 Mon Sep 17 00:00:00 2001
|
||||
From: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
Date: Thu, 26 Jun 2014 20:18:31 +0200
|
||||
Subject: [PATCH 4/6] 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 <jeroen@myspectrum.nl>
|
||||
Acked-by: Simon Glass <sjg@chromium.org>
|
||||
---
|
||||
common/main.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/common/main.c b/common/main.c
|
||||
index 32618f1..2979fbe 100644
|
||||
--- a/common/main.c
|
||||
+++ b/common/main.c
|
||||
@@ -17,8 +17,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) {}
|
||||
|
||||
static void modem_init(void)
|
||||
{
|
||||
--
|
||||
2.4.4
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
From deda59a4022fcedd781a893fe5e1bb495988858f Mon Sep 17 00:00:00 2001
|
||||
From: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
Date: Wed, 8 Oct 2014 22:57:22 +0200
|
||||
Subject: [PATCH 5/6] common: board: use __weak
|
||||
|
||||
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
---
|
||||
common/board_f.c | 10 ++--------
|
||||
common/board_r.c | 10 ++--------
|
||||
2 files changed, 4 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/common/board_f.c b/common/board_f.c
|
||||
index 4ea4cb2..215cc4a 100644
|
||||
--- a/common/board_f.c
|
||||
+++ b/common/board_f.c
|
||||
@@ -130,14 +130,11 @@ int init_func_watchdog_reset(void)
|
||||
}
|
||||
#endif /* CONFIG_WATCHDOG */
|
||||
|
||||
-void __board_add_ram_info(int use_default)
|
||||
+__weak void board_add_ram_info(int use_default)
|
||||
{
|
||||
/* please define platform specific board_add_ram_info() */
|
||||
}
|
||||
|
||||
-void board_add_ram_info(int)
|
||||
- __attribute__ ((weak, alias("__board_add_ram_info")));
|
||||
-
|
||||
static int init_baud_rate(void)
|
||||
{
|
||||
gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
|
||||
@@ -219,7 +216,7 @@ static int show_dram_config(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void __dram_init_banksize(void)
|
||||
+__weak void dram_init_banksize(void)
|
||||
{
|
||||
#if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE)
|
||||
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
||||
@@ -227,9 +224,6 @@ void __dram_init_banksize(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
-void dram_init_banksize(void)
|
||||
- __attribute__((weak, alias("__dram_init_banksize")));
|
||||
-
|
||||
#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
|
||||
static int init_func_i2c(void)
|
||||
{
|
||||
diff --git a/common/board_r.c b/common/board_r.c
|
||||
index 602a239..fa4bd9c 100644
|
||||
--- a/common/board_r.c
|
||||
+++ b/common/board_r.c
|
||||
@@ -60,7 +60,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
ulong monitor_flash_len;
|
||||
|
||||
-int __board_flash_wp_on(void)
|
||||
+__weak int board_flash_wp_on(void)
|
||||
{
|
||||
/*
|
||||
* Most flashes can't be detected when write protection is enabled,
|
||||
@@ -70,16 +70,10 @@ int __board_flash_wp_on(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int board_flash_wp_on(void)
|
||||
- __attribute__ ((weak, alias("__board_flash_wp_on")));
|
||||
-
|
||||
-void __cpu_secondary_init_r(void)
|
||||
+__weak void cpu_secondary_init_r(void)
|
||||
{
|
||||
}
|
||||
|
||||
-void cpu_secondary_init_r(void)
|
||||
- __attribute__ ((weak, alias("__cpu_secondary_init_r")));
|
||||
-
|
||||
static int initr_secondary_cpu(void)
|
||||
{
|
||||
/*
|
||||
--
|
||||
2.4.4
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
From 137c23ed9e6ad2cba575842065bffa6e59170e17 Mon Sep 17 00:00:00 2001
|
||||
From: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
Date: Mon, 23 Jun 2014 23:20:19 +0200
|
||||
Subject: [PATCH 6/6] common: board_f: cosmetic use __weak for leds
|
||||
|
||||
First of all this looks a lot better, but it also
|
||||
prevents a gcc warning (W=1), that the weak function
|
||||
has no previous prototype.
|
||||
|
||||
cc: Simon Glass <sjg@chromium.org>
|
||||
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
|
||||
Acked-by: Simon Glass <sjg@chromium.org>
|
||||
---
|
||||
common/board_f.c | 29 ++++++++++-------------------
|
||||
include/status_led.h | 22 +++++++++++-----------
|
||||
2 files changed, 21 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/common/board_f.c b/common/board_f.c
|
||||
index 215cc4a..6e955bb 100644
|
||||
--- a/common/board_f.c
|
||||
+++ b/common/board_f.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <os.h>
|
||||
#include <post.h>
|
||||
#include <spi.h>
|
||||
+#include <status_led.h>
|
||||
#include <trace.h>
|
||||
#include <watchdog.h>
|
||||
#include <asm/errno.h>
|
||||
@@ -78,25 +79,15 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
************************************************************************
|
||||
* 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) {}
|
||||
|
||||
/*
|
||||
* Why is gd allocated a register? Prior to reloc it might be better to
|
||||
diff --git a/include/status_led.h b/include/status_led.h
|
||||
index 0eb91b8..b8aaaf7 100644
|
||||
--- a/include/status_led.h
|
||||
+++ b/include/status_led.h
|
||||
@@ -272,19 +272,21 @@ extern void __led_set (led_id_t mask, int state);
|
||||
# include <asm/status_led.h>
|
||||
#endif
|
||||
|
||||
+#endif /* CONFIG_STATUS_LED */
|
||||
+
|
||||
/*
|
||||
* Coloured LEDs API
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
-extern void coloured_LED_init (void);
|
||||
-extern void red_led_on(void);
|
||||
-extern void red_led_off(void);
|
||||
-extern void green_led_on(void);
|
||||
-extern void green_led_off(void);
|
||||
-extern void yellow_led_on(void);
|
||||
-extern void yellow_led_off(void);
|
||||
-extern void blue_led_on(void);
|
||||
-extern void blue_led_off(void);
|
||||
+void coloured_LED_init(void);
|
||||
+void red_led_on(void);
|
||||
+void red_led_off(void);
|
||||
+void green_led_on(void);
|
||||
+void green_led_off(void);
|
||||
+void yellow_led_on(void);
|
||||
+void yellow_led_off(void);
|
||||
+void blue_led_on(void);
|
||||
+void blue_led_off(void);
|
||||
#else
|
||||
.extern LED_init
|
||||
.extern red_led_on
|
||||
@@ -297,6 +299,4 @@ extern void blue_led_off(void);
|
||||
.extern blue_led_off
|
||||
#endif
|
||||
|
||||
-#endif /* CONFIG_STATUS_LED */
|
||||
-
|
||||
#endif /* _STATUS_LED_H_ */
|
||||
--
|
||||
2.4.4
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
echo "checking for U-Boot upgrades..";
|
||||
setenv offset 0x400
|
||||
if load ${dtype} ${disk}:1 12000000 /boot/u-boot.imx; then
|
||||
echo " found u-boot.imx $filesize bytes)";
|
||||
if sf probe || sf probe || sf probe 1 27000000 || sf probe 1 27000000; then
|
||||
echo "probed SPI ROM";
|
||||
if sf read 0x12400000 $offset $filesize; then
|
||||
if cmp.b 0x12000000 0x12400000 $filesize; then
|
||||
echo " no upgrade needed";
|
||||
else
|
||||
echo " need U-Boot upgrade, flashing in 5 seconds..";
|
||||
for n in 5 4 3 2 1; do
|
||||
echo $n;
|
||||
sleep 1;
|
||||
done
|
||||
echo " erasing flash..";
|
||||
sf erase 0 0xC0000;
|
||||
# two steps to prevent bricking
|
||||
echo " writing flash..";
|
||||
sf write 0x12000000 $offset $filesize;
|
||||
echo " verifying flash..";
|
||||
if sf read 0x12400000 $offset $filesize; then
|
||||
if cmp.b 0x12000000 0x12400000 $filesize; then
|
||||
echo "---- U-Boot upgraded. resetting..";
|
||||
reset;
|
||||
else
|
||||
echo " read verification error";
|
||||
fi
|
||||
else
|
||||
echo " error re-reading EEPROM";
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo " error reading boot loader from EEPROM";
|
||||
fi
|
||||
else
|
||||
echo " error initializing EEPROM";
|
||||
fi;
|
||||
else
|
||||
echo " no U-Boot image found on SD card";
|
||||
fi
|
||||
|
||||
setenv bootargs
|
||||
setenv nextcon 0;
|
||||
|
||||
if hdmidet ; then
|
||||
setenv bootargs $bootargs video=mxcfb${nextcon}:dev=hdmi,1280x720M@60,if=RGB24
|
||||
setenv fbmem "fbmem=28M";
|
||||
setexpr nextcon $nextcon + 1
|
||||
else
|
||||
echo "------ no HDMI monitor";
|
||||
fi
|
||||
|
||||
i2c dev 2
|
||||
if i2c probe 0x04 ; then
|
||||
setenv bootargs $bootargs video=mxcfb${nextcon}:dev=ldb,LDB-XGA,if=RGB666
|
||||
if test "0" -eq $nextcon; then
|
||||
setenv fbmem "fbmem=10M";
|
||||
else
|
||||
setenv fbmem ${fbmem},10M
|
||||
fi
|
||||
setexpr nextcon $nextcon + 1
|
||||
else
|
||||
echo "------ no Freescale display";
|
||||
fi
|
||||
|
||||
if i2c probe 0x38 ; then
|
||||
setenv bootargs $bootargs video=mxcfb${nextcon}:dev=ldb,1024x600M@60,if=RGB666
|
||||
if test "0" -eq $nextcon; then
|
||||
setenv fbmem "fbmem=10M";
|
||||
else
|
||||
setenv fbmem ${fbmem},10M
|
||||
fi
|
||||
setexpr nextcon $nextcon + 1
|
||||
else
|
||||
echo "------ no 1024x600 display";
|
||||
fi
|
||||
|
||||
if i2c probe 0x48 ; then
|
||||
setenv bootargs $bootargs video=mxcfb${nextcon}:dev=lcd,CLAA-WVGA,if=RGB666
|
||||
if test "0" -eq $nextcon; then
|
||||
setenv fbmem "fbmem=10M";
|
||||
else
|
||||
setenv fbmem ${fbmem},10M
|
||||
fi
|
||||
setexpr nextcon $nextcon + 1
|
||||
else
|
||||
echo "------ no 800x480 display";
|
||||
fi
|
||||
|
||||
while test "3" -ne $nextcon ; do
|
||||
setenv bootargs $bootargs video=mxcfb${nextcon}:off ;
|
||||
setexpr nextcon $nextcon + 1 ;
|
||||
done
|
||||
|
||||
setenv bootargs $bootargs $fbmem
|
||||
|
||||
part uuid ${dtype} ${disk}:1 uuid
|
||||
|
||||
setenv bootargs $bootargs console=ttymxc1,115200 vmalloc=400M root=PARTUUID=${uuid} rw rootwait consoleblank=0
|
||||
|
||||
setenv fdtfile imx6q-nitrogen6x.dtb
|
||||
load ${dtype} ${disk}:1 10800000 /boot/zImage && load ${dtype} ${disk}:1 11000000 /boot/dtbs/${fdtfile} && bootz 10800000 - 11000000
|
||||
|
||||
load ${dtype} ${disk}:1 10800000 /boot/uImage && bootm 10800000
|
|
@ -1,61 +1,51 @@
|
|||
# U-Boot: Boundary Devices Nitrogen6X/Sabre Lite
|
||||
# U-Boot: Nitrogen6x/SabreLite
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
||||
buildarch=4
|
||||
|
||||
pkgname=uboot-boundary
|
||||
pkgver=2014.07
|
||||
pkgname='uboot-boundary'
|
||||
pkgver=2016.11
|
||||
pkgrel=1
|
||||
pkgdesc="U-Boot for Nitrogen6x/SabreLite"
|
||||
arch=('armv7h')
|
||||
pkgdesc="U-Boot for Nitrogen6X/Sabre Lite"
|
||||
url="https://github.com/boundarydevices/u-boot-imx6/tree/production"
|
||||
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
||||
license=('GPL')
|
||||
makedepends=('git' 'bc')
|
||||
backup=('6x_bootscript')
|
||||
_commit=bb9dde563768731423fd6c560e95e1793a90710a
|
||||
source=("https://github.com/boundarydevices/u-boot-imx6/archive/${_commit}.tar.gz"
|
||||
install=$pkgname.install
|
||||
backup=('boot/boot.txt' 'boot/boot.scr')
|
||||
depends=('mtd-utils')
|
||||
makedepends=('bc' 'dtc' 'git')
|
||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
|
||||
'0001-arch-linux-arm-modifications.patch'
|
||||
'0002-kernel-add-support-for-gcc-5.patch'
|
||||
'0003-ARM-asm-io.h-use-static-inline.patch'
|
||||
'0004-common-main.c-make-show_boot_progress-__weak.patch'
|
||||
'0005-common-board-use-__weak.patch'
|
||||
'0006-common-board_f-cosmetic-use-__weak-for-leds.patch'
|
||||
'6x_bootscript')
|
||||
md5sums=('b12f5f383c57de06f16625b3465e74d9'
|
||||
'cda62610b898b6e0ee13e64882a63107'
|
||||
'721a46867e189d8dedc6b6f86a536a34'
|
||||
'f6b687eca2d2d01f741cbda90dbacb41'
|
||||
'8087672256020417438b12ec4946e1cf'
|
||||
'a536d28bf45add6dbf9f84277f943de8'
|
||||
'2823d0e0c3c826632f6ae934f2b746d9'
|
||||
'8a6b2f50fef47b1ebb011a6d697f0025')
|
||||
'boot.txt'
|
||||
'mkscr')
|
||||
md5sums=('ca1f6e019d08aff8d0ca1beb2e66737d'
|
||||
'872b9eaa45228ac33e8e0a7383b9d0e3'
|
||||
'95f60c0ae1315e986d8a2aee15d5f854'
|
||||
'021623a04afd29ac3f368977140cfbfd')
|
||||
|
||||
prepare() {
|
||||
cd u-boot-imx6-${_commit}
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
git apply ../0001-arch-linux-arm-modifications.patch
|
||||
git apply ../0002-kernel-add-support-for-gcc-5.patch
|
||||
git apply ../0003-ARM-asm-io.h-use-static-inline.patch
|
||||
git apply ../0004-common-main.c-make-show_boot_progress-__weak.patch
|
||||
git apply ../0005-common-board-use-__weak.patch
|
||||
git apply ../0006-common-board_f-cosmetic-use-__weak-for-leds.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-imx6-${_commit}
|
||||
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
unset CFLAGS CXXFLAGS CPPFLAGS
|
||||
|
||||
make distclean
|
||||
make nitrogen6q_config
|
||||
make
|
||||
make EXTRAVERSION=-${pkgrel}
|
||||
}
|
||||
|
||||
package() {
|
||||
cd u-boot-imx6-${_commit}
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot.imx "${pkgdir}"/boot
|
||||
tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" -d ../6x_bootscript ${pkgdir}/6x_bootscript
|
||||
mkdir -p ${pkgdir}/boot
|
||||
cp u-boot.imx ${pkgdir}/boot
|
||||
|
||||
install -Dm644 ../boot.txt "${pkgdir}"/boot/boot.txt
|
||||
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
|
||||
install -Dm755 ../mkscr "${pkgdir}"/boot/mkscr
|
||||
}
|
||||
|
|
16
alarm/uboot-boundary/boot.txt
Normal file
16
alarm/uboot-boundary/boot.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
# After modifying, run ./mkscr
|
||||
|
||||
if test -n ${distro_bootpart}; then setenv bootpart ${distro_bootpart}; else setenv bootpart 1; fi
|
||||
part uuid ${devtype} ${devnum}:${bootpart} uuid
|
||||
|
||||
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait
|
||||
|
||||
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
|
||||
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
|
||||
else
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r};
|
||||
fi;
|
||||
fi;
|
||||
fi
|
9
alarm/uboot-boundary/mkscr
Executable file
9
alarm/uboot-boundary/mkscr
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -x /usr/bin/mkimage ]]; then
|
||||
echo "mkimage not found. Please install uboot-tools:"
|
||||
echo " pacman -S uboot-tools"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr
|
34
alarm/uboot-boundary/uboot-boundary.install
Normal file
34
alarm/uboot-boundary/uboot-boundary.install
Normal file
|
@ -0,0 +1,34 @@
|
|||
flash_uboot() {
|
||||
echo "A new U-Boot version needs to be flashed onto /dev/mtd0."
|
||||
echo "This will also erase the stored U-Boot environment."
|
||||
echo "Do this now? [y|N]"
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
if [[ -e /dev/mtd0 ]]; then
|
||||
echo "Erasing flash.."
|
||||
flash_erase -q /dev/mtd0 0 194
|
||||
echo "Writing flash.."
|
||||
nandwrite -qs 1024 /dev/mtd0 /boot/u-boot.imx
|
||||
else
|
||||
echo "SPI flash not found at /dev/mtd0, not flashing"
|
||||
fi
|
||||
else
|
||||
echo "You can do this later by reinstalling this package"
|
||||
fi
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
post_install() {
|
||||
flash_uboot
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
## arg 2: the old package version
|
||||
post_upgrade() {
|
||||
if (( $(vercmp $2 2016.11-1) < 0 )); then
|
||||
echo ' >>> Note: 6x_bootscript is no longer sourced. Make any customizations within'
|
||||
echo ' /boot/boot.txt and run ./mkscr within /boot to convert it to the'
|
||||
echo ' boot.scr file.'
|
||||
fi
|
||||
flash_uboot
|
||||
}
|
Loading…
Reference in a new issue