summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch73
-rw-r--r--recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb6
2 files changed, 77 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch b/recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch
new file mode 100644
index 00000000..a1502b26
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch
@@ -0,0 +1,73 @@
1From 374035ab26df67968de5ecfc4983f68f9b0142e4 Mon Sep 17 00:00:00 2001
2From: Dan Murphy <dmurphy@ti.com>
3Date: Mon, 5 Mar 2018 14:37:24 -0600
4Subject: [PATCH] HACK: am335x: Work around file expansion macro
5
6When building with the O= directive for AM335 and
7an excessively long path name the build cannot fit into
8the SPL region of the AM335.
9
10The __FILE__ macro reports the full path of the file and
11stores it in the data section of the image.
12
13As a work around change the BUG() and WARN_ON macros for
14the AM335 to only report the function and line number that
15created the issue. For all other devices report the filename
16as normal
17
18Signed-off-by: Dan Murphy <dmurphy@ti.com>
19---
20 include/linux/bug.h | 21 +++++++++++++++++++--
21 1 file changed, 19 insertions(+), 2 deletions(-)
22
23diff --git a/include/linux/bug.h b/include/linux/bug.h
24index f07bb716fc..cf3f735dd6 100644
25--- a/include/linux/bug.h
26+++ b/include/linux/bug.h
27@@ -6,12 +6,26 @@
28 #include <linux/compiler.h>
29 #include <linux/printk.h>
30
31+#ifdef CONFIG_AM33XX
32+
33 #define BUG() do { \
34- printk("BUG at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
35+ printk("BUG in %s():%d!\n", __func__, __LINE__); \
36 panic("BUG!"); \
37 } while (0)
38
39-#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
40+#define WARN_ON(condition) ({ \
41+ int __ret_warn_on = !!(condition); \
42+ if (unlikely(__ret_warn_on)) \
43+ printk("WARNING in /%s():%d!\n", __func__, __LINE__); \
44+ unlikely(__ret_warn_on); \
45+})
46+
47+#else
48+
49+#define BUG() do { \
50+ printk("BUG at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
51+ panic("BUG!"); \
52+} while (0)
53
54 #define WARN_ON(condition) ({ \
55 int __ret_warn_on = !!(condition); \
56@@ -19,6 +33,7 @@
57 printk("WARNING at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
58 unlikely(__ret_warn_on); \
59 })
60+#endif /* _CONFIG_AM33XX */
61
62 #define WARN_ON_ONCE(condition) ({ \
63 static bool __warned; \
64@@ -31,4 +46,6 @@
65 unlikely(__ret_warn_once); \
66 })
67
68+#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
69+
70 #endif /* _LINUX_BUG_H */
71--
722.16.1.194.gb2e45c695
73
diff --git a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
index d64fe44e..01a71d9f 100644
--- a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
+++ b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
@@ -1,7 +1,9 @@
1require u-boot-ti.inc 1require u-boot-ti.inc
2 2
3PR = "r0" 3PR = "r1"
4 4
5BRANCH = "ti-u-boot-2018.01" 5BRANCH = "ti-u-boot-2018.01"
6 6
7SRCREV = "806db183bfaff66890c560c4b462404448023e36" 7SRCREV = "240ae44c5535bb7a2b6553813f5c42a4a1c5772a"
8
9SRC_URI_append_ti33x = " file://0001-HACK-am335x-Work-around-file-expansion-macro.patch"