linux-yocto/arch/powerpc/boot
Madhavan Srinivasan 029f11349e powerpc/boot: Fix dash warning
[ Upstream commit e3f506b78d ]

'commit b2accfe7ca ("powerpc/boot: Check for ld-option support")' suppressed
linker warnings, but the expressed used did not go well with POSIX shell (dash)
resulting with this warning

arch/powerpc/boot/wrapper: 237: [: 0: unexpected operator
ld: warning: arch/powerpc/boot/zImage.epapr has a LOAD segment with RWX permissions

Fix the check to handle the reported warning. Patch also fixes
couple of shellcheck reported errors for the same line.

In arch/powerpc/boot/wrapper line 237:
if [ $(${CROSS}ld -v --no-warn-rwx-segments &>/dev/null; echo $?) -eq 0 ]; then
     ^-- SC2046 (warning): Quote this to prevent word splitting.
       ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                            ^---------^ SC3020 (warning): In POSIX sh, &> is undefined.

Fixes: b2accfe7ca ("powerpc/boot: Check for ld-option support")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250423082154.30625-1-maddy@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:43:57 +02:00
..
dts powerpc: dts: add missing space before { 2023-08-25 08:39:30 +10:00
.gitignore powerpc/boot: Add otheros-too-big.bld to .gitignore 2022-02-15 22:29:52 +11:00
4xx.c powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize 2020-01-06 16:25:27 +11:00
4xx.h powerpc/boot: Convert more files to use SPDX tags 2022-08-26 11:02:17 +10:00
44x.h powerpc/boot: Convert more files to use SPDX tags 2022-08-26 11:02:17 +10:00
addnote.c
bamboo.c
cpm-serial.c
crt0.S powerpc/boot: Fix crt0.S current address branch form 2023-04-12 10:58:10 +10:00
crtsavres.S
cuboot-8xx.c
cuboot-52xx.c
cuboot-83xx.c
cuboot-85xx-cpm2.c
cuboot-85xx.c
cuboot-824x.c
cuboot-acadia.c
cuboot-amigaone.c
cuboot-bamboo.c
cuboot-ebony.c
cuboot-hotfoot.c powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
cuboot-katmai.c
cuboot-kilauea.c
cuboot-pq2.c
cuboot-rainier.c
cuboot-sam440ep.c
cuboot-sequoia.c
cuboot-taishan.c
cuboot-warp.c
cuboot-yosemite.c
cuboot.c
cuboot.h
dcr.h
decompress.c powerpc/boot: Fix a typo in partial_decompress() comment 2021-05-17 15:27:16 +10:00
devtree.c powerpc/boot: Fixup device-tree on little endian 2021-06-21 21:16:32 +10:00
div64.S
ebony.c
elf_util.c
elf.h
ep88xc.c
ep8248e.c
epapr-wrapper.c
epapr.c
fixed-head.S
fixup-headers.sed
fsl-soc.c
fsl-soc.h
gamecube-head.S
gamecube.c
hack-coff.c
holly.c
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
io.h
libfdt_env.h
libfdt-wrapper.c
main.c powerpc/boot: Use address-of operator on section symbols 2020-06-30 14:38:00 +10:00
Makefile powerpc: drop MPC85xx_CDS platform support 2023-06-21 14:08:53 +10:00
microwatt.c powerpc/boot: Add a boot wrapper for Microwatt 2021-06-21 21:16:32 +10:00
mktree.c
motload-head.S
mpc8xx.c
mpc8xx.h
mpc52xx-psc.c
mvme5100.c
mvme7100.c
ns16550.c powerpc/boot: Fixup device-tree on little endian 2021-06-21 21:16:32 +10:00
of.c
of.h
ofconsole.c
oflib.c
opal-calls.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
opal.c
ops.h powerpc/boot: Convert more files to use SPDX tags 2022-08-26 11:02:17 +10:00
page.h
planetcore.c
planetcore.h
ppc_asm.h powerpc/64: switch asm helpers from GOT to TOC relative addressing 2022-09-28 19:22:12 +10:00
ppcboot-hotfoot.h
ppcboot.h
pq2.c
pq2.h
ps3-head.S
ps3-hvcall.S
ps3.c powerpc/ps3: Drop unused DBG macro 2020-11-19 14:50:14 +11:00
pseries-head.S
README
redboot-8xx.c
redboot-83xx.c
redboot.h
reg.h
rs6000.h
serial.c powerpc/boot: Convert more files to use SPDX tags 2022-08-26 11:02:17 +10:00
simple_alloc.c powerpc/boot: Only free if realloc() succeeds 2024-08-29 17:33:36 +02:00
simpleboot.c
stdbool.h
stdint.h
stdio.c
stdio.h
stdlib.c
stdlib.h
string.h
string.S
swab.h
treeboot-akebono.c
treeboot-bamboo.c
treeboot-currituck.c
treeboot-ebony.c
treeboot-iss4xx.c
types.h
ugecon.c
ugecon.h
util.S powerpc/boot: Make use of REL16 relocs in powerpc/boot/util.S 2020-12-04 01:00:44 +11:00
wii-head.S
wii.c
wrapper powerpc/boot: Fix dash warning 2025-05-09 09:43:57 +02:00
xz_config.h
zImage.coff.lds.S
zImage.lds.S powerpc/toc: Future proof kernel toc 2021-12-23 22:35:01 +11:00
zImage.ps3.lds.S powerpc/ps3: Re-align DTB in image 2021-06-10 21:44:57 +10:00

To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary:

objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz objcopy -j .kernel:System.map -O binary zImage System.map.gz objcopy -j .kernel:.config -O binary zImage config.gz objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz

Peter