| 21b86515 | 24-Apr-2024 |
Geert Uytterhoeven <geert+renesas@glider.be> |
sh: boot: Add proper forward declarations
arch/sh/boot/compressed/misc.c:110:6: warning: no previous prototype for ‘ftrace_stub’ [-Wmissing-prototypes] arch/sh/boot/compressed/misc.c:113:6: warning:
sh: boot: Add proper forward declarations
arch/sh/boot/compressed/misc.c:110:6: warning: no previous prototype for ‘ftrace_stub’ [-Wmissing-prototypes] arch/sh/boot/compressed/misc.c:113:6: warning: no previous prototype for ‘arch_ftrace_ops_list_func’ [-Wmissing-prototypes] arch/sh/boot/compressed/misc.c:123:6: warning: no previous prototype for ‘decompress_kernel’ [-Wmissing-prototypes]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/b7ea770a3bf26fb2a5f59f4bb83072b2526f7134.1713959841.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
show more ...
|
| 25c7d77d | 24-Apr-2024 |
Geert Uytterhoeven <geert+renesas@glider.be> |
sh: boot: Remove sh5 cache handling
Commit 37744feebc086908 ("sh: remove sh5 support") in v5.8 forgot to remove the sh5 cache handling.
Suggested-by: Yoshinori Sato <ysato@users.sourceforge.jp> Sig
sh: boot: Remove sh5 cache handling
Commit 37744feebc086908 ("sh: remove sh5 support") in v5.8 forgot to remove the sh5 cache handling.
Suggested-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/23e9b3fd0d78e46c9fc1835852ba226aba92c3ca.1713959531.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
show more ...
|
| 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 becaus
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>
show more ...
|
| 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) exploi
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>
show more ...
|
| 82977af9 | 09-Jan-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
sh: rename suffix-y to suffix_y
'export suffix-y' does not work reliably because hyphens are disallowed in shell variables.
A similar issue was fixed by commit 2bfbe7881ee0 ("kbuild: Do not use hyp
sh: rename suffix-y to suffix_y
'export suffix-y' does not work reliably because hyphens are disallowed in shell variables.
A similar issue was fixed by commit 2bfbe7881ee0 ("kbuild: Do not use hyphen in exported variable name").
If I do similar in dash, ARCH=sh fails to build.
$ mv linux linux~ $ cd linux~ $ dash $ make O=foo/bar ARCH=sh CROSS_COMPILE=sh4-linux-gnu- defconfig all make[1]: Entering directory '/home/masahiro/linux~/foo/bar' [ snip ] make[4]: *** No rule to make target 'arch/sh/boot/compressed/vmlinux.bin.', needed by 'arch/sh/boot/compressed/piggy.o'. Stop. make[3]: *** [/home/masahiro/linux~/arch/sh/boot/Makefile:40: arch/sh/boot/compressed/vmlinux] Error 2 make[2]: *** [/home/masahiro/linux~/arch/sh/Makefile:194: zImage] Error 2 make[1]: *** [/home/masahiro/linux~/Makefile:350: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/masahiro/linux~/foo/bar' make: *** [Makefile:219: __sub-make] Error 2
The maintainer of GNU Make stated that there is no consistent way to export variables that do not meet the shell's naming criteria. (https://savannah.gnu.org/bugs/?55719)
Consequently, you cannot use hyphens in exported variables.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
show more ...
|
| 7fe859ee | 17-Jan-2021 |
Masahiro Yamada <masahiroy@kernel.org> |
sh: boot: avoid unneeded rebuilds under arch/sh/boot/compressed/
Even if none of source code is updated, the following are every time rebuilt:
CC arch/sh/boot/compressed/cache.o SHIPPED ar
sh: boot: avoid unneeded rebuilds under arch/sh/boot/compressed/
Even if none of source code is updated, the following are every time rebuilt:
CC arch/sh/boot/compressed/cache.o SHIPPED arch/sh/boot/compressed/ashiftrt.S AS arch/sh/boot/compressed/ashiftrt.o SHIPPED arch/sh/boot/compressed/ashldi3.c CC arch/sh/boot/compressed/ashldi3.o SHIPPED arch/sh/boot/compressed/ashrsi3.S AS arch/sh/boot/compressed/ashrsi3.o SHIPPED arch/sh/boot/compressed/ashlsi3.S AS arch/sh/boot/compressed/ashlsi3.o SHIPPED arch/sh/boot/compressed/lshrsi3.S AS arch/sh/boot/compressed/lshrsi3.o LD arch/sh/boot/compressed/vmlinux OBJCOPY arch/sh/boot/zImage
Add build artifacts to 'targets' as needed.
I turned the library files to check-in files. It is simpler than copying from arch/sh/lib/ at build-time.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Rich Felker <dalias@libc.org>
show more ...
|