parisc: Wire up support for self-extracting kernel
authorHelge Deller <deller@gmx.de>
Sun, 20 Aug 2017 08:52:22 +0000 (10:52 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 22 Aug 2017 14:34:35 +0000 (16:34 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/Kconfig
arch/parisc/Makefile

index 9db4b4f2f8f543ef713cd540e78a48f8842be72f..13648519bd415e938368d9b6b8ae55e65fce2ff5 100644 (file)
@@ -20,6 +20,12 @@ config PARISC
        select BUG
        select BUILDTIME_EXTABLE_SORT
        select HAVE_PERF_EVENTS
+       select HAVE_KERNEL_BZIP2
+       select HAVE_KERNEL_GZIP
+       select HAVE_KERNEL_LZ4
+       select HAVE_KERNEL_LZMA
+       select HAVE_KERNEL_LZO
+       select HAVE_KERNEL_XZ
        select GENERIC_ATOMIC64 if !64BIT
        select GENERIC_IRQ_PROBE
        select GENERIC_PCI_IOMAP
index 75cb451b1f03069ccd2e77fae86cb1e4da6b7922..58fae5d2449daae762fbe09f54a52561e29832f9 100644 (file)
@@ -24,15 +24,20 @@ KBUILD_DEFCONFIG := default_defconfig
 NM             = sh $(srctree)/arch/parisc/nm
 CHECKFLAGS     += -D__hppa__=1
 LIBGCC         = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+export LIBGCC
 
 ifdef CONFIG_64BIT
 UTS_MACHINE    := parisc64
 CHECKFLAGS     += -D__LP64__=1 -m64
 CC_ARCHES      = hppa64
+LD_BFD         := elf64-hppa-linux
 else # 32-bit
 CC_ARCHES      = hppa hppa2.0 hppa1.1
+LD_BFD         := elf32-hppa-linux
 endif
 
+export LD_BFD
+
 ifneq ($(SUBARCH),$(UTS_MACHINE))
        ifeq ($(CROSS_COMPILE),)
                CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
@@ -88,6 +93,8 @@ libs-y        += arch/parisc/lib/ $(LIBGCC)
 
 drivers-$(CONFIG_OPROFILE)             += arch/parisc/oprofile/
 
+boot   := arch/parisc/boot
+
 PALO := $(shell if (which palo 2>&1); then : ; \
        elif [ -x /sbin/palo ]; then echo /sbin/palo; \
        fi)
@@ -116,11 +123,14 @@ INSTALL_TARGETS = zinstall install
 
 PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS)
 
-bzImage zImage: vmlinuz
+zImage: vmlinuz
 Image: vmlinux
 
-vmlinuz: vmlinux
-       @gzip -cf -9 $< > $@
+bzImage: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+vmlinuz: bzImage
+       $(OBJCOPY) $(boot)/bzImage $@
 
 install:
        $(CONFIG_SHELL) $(src)/arch/parisc/install.sh \