Signed-off-by: Denys Dmytriyenko <[email protected]> --- ...K-am335x-Work-around-file-expansion-macro.patch | 73 ++++++++++++++++++++++ recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb | 6 +- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch
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 0000000..a1502b2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-ti-staging/0001-HACK-am335x-Work-around-file-expansion-macro.patch @@ -0,0 +1,73 @@ +From 374035ab26df67968de5ecfc4983f68f9b0142e4 Mon Sep 17 00:00:00 2001 +From: Dan Murphy <[email protected]> +Date: Mon, 5 Mar 2018 14:37:24 -0600 +Subject: [PATCH] HACK: am335x: Work around file expansion macro + +When building with the O= directive for AM335 and +an excessively long path name the build cannot fit into +the SPL region of the AM335. + +The __FILE__ macro reports the full path of the file and +stores it in the data section of the image. + +As a work around change the BUG() and WARN_ON macros for +the AM335 to only report the function and line number that +created the issue. For all other devices report the filename +as normal + +Signed-off-by: Dan Murphy <[email protected]> +--- + include/linux/bug.h | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/include/linux/bug.h b/include/linux/bug.h +index f07bb716fc..cf3f735dd6 100644 +--- a/include/linux/bug.h ++++ b/include/linux/bug.h +@@ -6,12 +6,26 @@ + #include <linux/compiler.h> + #include <linux/printk.h> + ++#ifdef CONFIG_AM33XX ++ + #define BUG() do { \ +- printk("BUG at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ ++ printk("BUG in %s():%d!\n", __func__, __LINE__); \ + panic("BUG!"); \ + } while (0) + +-#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ++#define WARN_ON(condition) ({ \ ++ int __ret_warn_on = !!(condition); \ ++ if (unlikely(__ret_warn_on)) \ ++ printk("WARNING in /%s():%d!\n", __func__, __LINE__); \ ++ unlikely(__ret_warn_on); \ ++}) ++ ++#else ++ ++#define BUG() do { \ ++ printk("BUG at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ ++ panic("BUG!"); \ ++} while (0) + + #define WARN_ON(condition) ({ \ + int __ret_warn_on = !!(condition); \ +@@ -19,6 +33,7 @@ + printk("WARNING at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ + unlikely(__ret_warn_on); \ + }) ++#endif /* _CONFIG_AM33XX */ + + #define WARN_ON_ONCE(condition) ({ \ + static bool __warned; \ +@@ -31,4 +46,6 @@ + unlikely(__ret_warn_once); \ + }) + ++#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ++ + #endif /* _LINUX_BUG_H */ +-- +2.16.1.194.gb2e45c695 + 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 d64fe44..01a71d9 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 @@ require u-boot-ti.inc -PR = "r0" +PR = "r1" BRANCH = "ti-u-boot-2018.01" -SRCREV = "806db183bfaff66890c560c4b462404448023e36" +SRCREV = "240ae44c5535bb7a2b6553813f5c42a4a1c5772a" + +SRC_URI_append_ti33x = " file://0001-HACK-am335x-Work-around-file-expansion-macro.patch" -- 2.7.4 -- _______________________________________________ meta-ti mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-ti
