powerpc: Minor updates to improve build debugging
cover powerpc: Minor updates to improve build debugging
Hi Michael,
Here are a few minor updates to the powerpc build files that make debugging build problems a little easier. Please consider.
-Geoff
The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e:
Linux 5.6-rc7 (2020-03-22 18:31:56 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-powerpc
for you to fetch changes up to e6fb89a0946dd620f1d8120578744942ca934e11:
powerpc/head_check: Avoid broken pipe (2020-03-27 09:41:41 -0700)
----------------------------------------------------------------
Geoff Levand (3):
powerpc/head_check: Automatic verbosity
powerpc/wrapper: Output linker map file
powerpc/head_check: Avoid broken pipe
arch/powerpc/boot/wrapper | 3 ++- arch/powerpc/tools/head_check.sh | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/3 powerpc/head_check: Automatic verbosity
To aid debugging build problems turn on shell tracing for the head_check script when the build is verbose.
--- arch/powerpc/tools/head_check.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/tools/head_check.sh +4 -2
@@ -31,8 +31,10 @@ # level entry code (boot, interrupt vectors, etc) until r2 is set up. This # could cause the kernel to die in early boot. -# Turn this on if you want more debug output: -# set -x +# Allow for verbose output +if [ "$V" = "1" ]; then + set -x +fi if [ $# -lt 2 ]; then echo "$0 [path to nm] [path to vmlinux]" 1>&2
Signature · 1 line
2.20.1
PATCH 2/3 powerpc/wrapper: Output linker map file
In reply to Geoff LevandTo aid debugging wrapper troubles, output a linker map file 'wrapper.map' when the build is verbose.
--- arch/powerpc/boot/wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/boot/wrapper +2 -1
@@ -29,6 +29,7 @@ set -e # Allow for verbose output if [ "$V" = 1 ]; then set -x + map="-Map wrapper.map" fi # defaults
@@ -500,7 +501,7 @@ if [ "$platform" != "miboot" ]; then text_start="-Ttext $link_address" fi #link everything - ${CROSS}ld -m $format -T $lds $text_start $pie $nodl -o "$ofile" \ + ${CROSS}ld -m $format -T $lds $text_start $pie $nodl -o "$ofile" $map \ $platformo $tmp $object/wrapper.a rm $tmp fi
Signature · 1 line
2.20.1
PATCH 3/3 powerpc/head_check: Avoid broken pipe
In reply to Geoff LevandRemove the '-m4' option to grep to allow grep to process all of nm's output. This avoids the nm warning:
nm terminated with signal 13 [Broken pipe]
--- arch/powerpc/tools/head_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/tools/head_check.sh +1 -1
@@ -46,7 +46,7 @@ nm="$1" vmlinux="$2" # gcc-4.6-era toolchain make _stext an A (absolute) symbol rather than T -$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" -m4 > .tmp_symbols.txt +$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" > .tmp_symbols.txt vma=$(cat .tmp_symbols.txt | grep -e " [TA] _stext$" | cut -d' ' -f1)
Signature · 1 line
2.20.1