History log of /linux-master/arch/parisc/boot/compressed/Makefile
Revision Date Author Comments
# 53e7b5df 09-Jan-2022 Masahiro Yamada <masahiroy@kernel.org>

arch: decompressor: remove useless vmlinux.bin.all-y

Presumably, arch/{parisc,s390,sh}/boot/compressed/Makefile copied
arch/x86/boot/compressed/Makefile, but vmlinux.bin.all-y is useless
here because it is the same as $(obj)/vmlinux.bin.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>


# 7ce7e984 09-Jan-2022 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}

GZIP-compressed files end with 4 byte data that represents the size
of the original input. The decompressors (the self-extracting kernel)
exploit it to know the vmlinux size beforehand. To mimic the GZIP's
trailer, Kbuild provides cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}.
Unfortunately these macros are used everywhere despite the appended
size data is only useful for the decompressors.

There is no guarantee that such hand-crafted trailers are safely ignored.
In fact, the kernel refuses compressed initramdfs with the garbage data.
That is why usr/Makefile overrides size_append to make it no-op.

To limit the use of such broken compressed files, this commit renames
the existing macros as follows:

cmd_bzip2 --> cmd_bzip2_with_size
cmd_lzma --> cmd_lzma_with_size
cmd_lzo --> cmd_lzo_with_size
cmd_lz4 --> cmd_lz4_with_size
cmd_xzkern --> cmd_xzkern_with_size
cmd_zstd22 --> cmd_zstd22_with_size

To keep the decompressors working, I updated the following Makefiles
accordingly:

arch/arm/boot/compressed/Makefile
arch/h8300/boot/compressed/Makefile
arch/mips/boot/compressed/Makefile
arch/parisc/boot/compressed/Makefile
arch/s390/boot/compressed/Makefile
arch/sh/boot/compressed/Makefile
arch/x86/boot/compressed/Makefile

I reused the current macro names for the normal usecases; they produce
the compressed data in the proper format.

I did not touch the following:

arch/arc/boot/Makefile
arch/arm64/boot/Makefile
arch/csky/boot/Makefile
arch/mips/boot/Makefile
arch/riscv/boot/Makefile
arch/sh/boot/Makefile
kernel/Makefile

This means those Makefiles will stop appending the size data.

I dropped the 'override size_append' hack from usr/Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>


# 3cbadd20 12-Dec-2021 Masahiro Yamada <masahiroy@kernel.org>

parisc: decompressor: do not copy source files while building

As commit 7ae4a78daacf ("ARM: 8969/1: decompressor: simplify libfdt
builds") stated, copying source files during the build time may not
end up with as clean code as expected.

Do similar for parisc to clean up the Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>


# 6f21e734 30-Oct-2021 Masahiro Yamada <masahiroy@kernel.org>

parisc: decompressor: clean up Makefile

Do not list the same objects in 'OBJECTS' and 'targets'.

Instead, add $(OBJECTS) to 'targets'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>


# 07578f16 30-Oct-2021 Masahiro Yamada <masahiroy@kernel.org>

parisc: decompressor: remove repeated depenency of misc.o

The same dependency

$(obj)/misc.o: $(obj)/sizes.h

... appears twice, at line 29 and line 55 in this Makefile.

Remove the second one.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>


# 3da6379a 05-Sep-2021 Helge Deller <deller@gmx.de>

parisc: Add missing FORCE prerequisite in Makefile

Signed-off-by: Helge Deller <deller@gmx.de>


# 3fd84a4f 08-May-2020 Arnd Bergmann <arnd@arndb.de>

parisc: use -fno-strict-aliasing for decompressor

An experimental patch series of mine reworks how warnings are processed
in Kbuild. A side effect is a new warning about a harmless aliasing
rule violation in an inline function:

In file included from
include/linux/rhashtable-types.h:15:0,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from include/linux/uaccess.h:6,
from arch/parisc/boot/compressed/misc.c:7:
include/linux/workqueue.h: In function 'work_static':
include/linux/workqueue.h:212:2: warning: dereferencing
type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return *work_data_bits(work) & WORK_STRUCT_STATIC;

Make the decompressor use -fno-strict-aliasing like the rest of
the kernel for consistency, and to ensure this warning never makes
it into a release.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Helge Deller <deller@gmx.de>


# f2c5ed0d 01-Aug-2019 James Bottomley <James.Bottomley@HansenPartnership.com>

parisc: Add archclean Makefile target

Apparently we don't have an archclean target in our
arch/parisc/Makefile, so files in there never get cleaned out by make
mrproper. This, in turn means that the sizes.h file in
arch/parisc/boot/compressed never gets removed and worse, when you
transition to an O=build/parisc[64] build model it overrides the
generated file. The upshot being my bzImage was building with a SZ_end
that was too small.

I fixed it by making mrproper clean everything.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Helge Deller <deller@gmx.de>


# e50beea8 01-Aug-2019 Helge Deller <deller@gmx.de>

parisc: Strip debug info from kernel before creating compressed vmlinuz

Same as on x86-64, strip the .comment, .note and debug sections from the
Linux kernel before creating the compressed image for the boot loader.

Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Reported-by: Sven Schnelle <svens@stackframe.org>
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Helge Deller <deller@gmx.de>


# ec8f24b7 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier - Makefile/Kconfig

Add SPDX license identifiers to all Make/Kconfig files which:

- Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 34c201ae 15-Oct-2018 Helge Deller <deller@gmx.de>

parisc: Include compressed vmlinux file in vmlinuz boot kernel

Change the parisc vmlinuz boot code to include and process the real
compressed vmlinux.gz ELF file instead of a compressed memory dump.
This brings parisc in sync on how it's done on x86_64.

The benefit of this change is that, e.g. for debugging purposes, one can
then extract the vmlinux file out of the vmlinuz which was booted which
wasn't possible before. This can be archieved with the existing
scripts/extract-vmlinux script, which just needs a small tweak to prefer
to extract a compressed file before trying the existing given binary.

The downside of this approach is that due to the extra round of
decompression/ELF processing we need more physical memory installed to
be able to boot a kernel.

Signed-off-by: Helge Deller <deller@gmx.de>


# 8c031ba6 22-Sep-2017 Helge Deller <deller@gmx.de>

parisc: Unbreak bootloader due to gcc-7 optimizations

gcc-7 optimizes the byte-wise accesses of get_unaligned_le32() into
word-wise accesses if the 32-bit integer output_len is declared as
external. This panics then the bootloader since we don't have the
unaligned access fault trap handler installed during boot time.

Avoid this optimization by declaring output_len as byte-aligned and thus
unbreak the bootloader code.

Additionally, compile the boot code optimized for size.

Signed-off-by: Helge Deller <deller@gmx.de>


# 2f3c7b81 20-Aug-2017 Helge Deller <deller@gmx.de>

parisc: Add core code for self-extracting kernel

Signed-off-by: Helge Deller <deller@gmx.de>