Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317632 > unrolled thread

[PATCH v3 1/3] MIPS: zboot: Fix the build with XZ compression on older GCC versions

Started byAlban Bedel <albeu@free.fr>
First post2016-01-26 09:40 +0100
Last post2016-01-26 09:40 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 1/3] MIPS: zboot: Fix the build with XZ compression on older GCC versions Alban Bedel <albeu@free.fr> - 2016-01-26 09:40 +0100
    [PATCH v3 3/3] MIPS: ath79: Add zboot debug serial support Alban Bedel <albeu@free.fr> - 2016-01-26 09:40 +0100

#1317632 — [PATCH v3 1/3] MIPS: zboot: Fix the build with XZ compression on older GCC versions

FromAlban Bedel <albeu@free.fr>
Date2016-01-26 09:40 +0100
Subject[PATCH v3 1/3] MIPS: zboot: Fix the build with XZ compression on older GCC versions
Message-ID<qV7km-1uA-15@gated-at.bofh.it>
Some older GCC version (at least 4.6) emits calls to __bswapsi2() when
building the XZ decompressor. The link of the compressed image then
fails with the following error:

arch/mips/boot/compressed/decompress.o: In function '__fswab32':
include/uapi/linux/swab.h:60: undefined reference to '__bswapsi2'

Add bswapsi.o to the link to fix the build with these versions.

Signed-off-by: Alban Bedel <albeu@free.fr>
---
Changelog:
v2: * Added CC to stable as the patch hasn't been merged in 4.4
v3: * Updated to 4.5-rc1
    * Removed CC to stable as this version of the patch doesn't
      apply to 4.4.
---
 arch/mips/boot/compressed/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 4eff1ef..acfc3ce 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -39,10 +39,10 @@ vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
 vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY)		   += $(obj)/uart-alchemy.o
 endif
 
-vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
+vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
 
-$(obj)/ashldi3.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c: $(srctree)/arch/mips/lib/ashldi3.c
+$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
+$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
 	$(call cmd,shipped)
 
 targets := $(notdir $(vmlinuzobjs-y))
-- 
2.0.0

[toc] | [next] | [standalone]


#1317634 — [PATCH v3 3/3] MIPS: ath79: Add zboot debug serial support

FromAlban Bedel <albeu@free.fr>
Date2016-01-26 09:40 +0100
Subject[PATCH v3 3/3] MIPS: ath79: Add zboot debug serial support
Message-ID<qV7km-1uA-19@gated-at.bofh.it>
In reply to#1317632
Reuse the early printk code to support the serial in zboot. We copy
early_printk.c instead of referencing it because we need to build a
different object file for the normal kernel and zboot.

Signed-off-by: Alban Bedel <albeu@free.fr>
---
Changelog:
v2: * Properly delete the copied source files on clean
---
 arch/mips/Kconfig                  | 2 +-
 arch/mips/boot/compressed/Makefile | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 57a945e..0f6b20a 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -137,7 +137,7 @@ config ATH79
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_MIPS16
-	select SYS_SUPPORTS_ZBOOT
+	select SYS_SUPPORTS_ZBOOT_UART_PROM
 	select USE_OF
 	help
 	  Support for the Atheros AR71XX/AR724X/AR913X SoCs.
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 309d2ad..90aca95 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -37,8 +37,13 @@ vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT)		   += $(obj)/dbg.o
 vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
 vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
 vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY)		   += $(obj)/uart-alchemy.o
+vmlinuzobjs-$(CONFIG_ATH79)			   += $(obj)/uart-ath79.o
 endif
 
+extra-y += uart-ath79.c
+$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
+	$(call cmd,shipped)
+
 vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
 
 extra-y += ashldi3.c bswapsi.c
-- 
2.0.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web