Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Linksys NSLU2 (evbarm, armeb) userspace regression origin found



Hello,

(The first paragraph contains some background information for people
that might start directly with this mail.)

After my previously reported struggles with booting NetBSD on one of
my Linksys NSLU2[s], finding a different mode the 6.99.17 kernel was
failing[D], the success I had with booting NetBSD 6.1 from netbsd_6_1
branch[b] and confirming the NetBSD 6.1 kernel can work with NetBSD
userspace, then hacking together a dedicated (but strongly dependent
on the exact same version of the RedBoot bootloader on the slug)
second stage bootloader to load automatically a netbsd-nfs.bin image
over TFTP based on apex[a] and even changing the default commands
executed in RedBoot (after getting and checking my JTAG dongle)[j], I
finally was in a good position use the netbsd_6_1 kernel to bisect
through the NetBSD history to find out when the regression in
userspace NetBSD 7 was introduced.


I have managed to bisect through the history of the NetBSD 7 and found
out that the offending commit leading to the second type of failure[D]
(manifesting through endless repetition of the error message 'Process
(pid 1) got sig 11' when trying to run init) was 1.15 of
external/gpl3/gcc/dist/gcc/config.gcc:

===============
Revision 1.15 / (download) - annotate - [selected], Thu Jan 31
06:53:21 2013 UTC (2 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.14: +7 -2 lines
Diff to previous 1.14 (colored)

Cleanup arm--netbsdelf-*eabi*
===============

This was the only modified file at the same time with this commit
message and the commit before that was done approximately one minute
before it at 06:52:16 (in case somebody wants to replicate).

The unified diff is quoted below in the mail. The side-by side changes
are visible online at:

http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config.gcc.diff?r1=1.14&r2=1.15&f=h



To make sure I haven't made any mistake:
1) I have made sure I had a clean tree then using build.sh I did
'build', 'distribution' and 'sets' did the necessary preparations
(automated through a script, so there couldn't be any errors there)
and tried to start netbsd_6_1 kernel with the userspace generated from
the code right after the change; it failed to boot manifesting as
described in [D].
2) I did the same with the code before the change and confrimed this can boot
3) I have confirmed that reverting the change in question fixes the issue



Notes:
a) I suspect reverting only the first chunks to contain
TARGET_ENDIAN_DEFAULT=MASK_BIG_END would revert the problem, but I am
unsure, I haven't tested yet, I haven't anlaysed the cause, but I
don't have the necessary NetBSD+GCC knowledge to confirm this; help is
greatly appreciated
b) Not sure if this is change refers to the problem reported in PR
#48337 (reported on 23rd of Oct 2013 against 6.99.24), but I am
willing to do the necessary testing to confirm this.
c) I tried reverting the change in a more recent code, but the code
base changed too much and I lack the necessary knowledge to adapt the
revert to check; I am willing and can try proposed fixes, if some kind
netbsd person has the skills and will to provide such a fix



Help is greatly appreciated!




===================================================================
RCS file: /ftp/cvs/cvsroot/src/external/gpl3/gcc/dist/gcc/config.gcc,v
rcsdiff: /ftp/cvs/cvsroot/src/external/gpl3/gcc/dist/gcc/config.gcc,v:
warning: Unknown phrases like `commitid ...;' are present.
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- src/external/gpl3/gcc/dist/gcc/config.gcc 2012/12/20 07:12:26 1.14
+++ src/external/gpl3/gcc/dist/gcc/config.gcc 2013/01/31 06:53:21 1.15
@@ -724,11 +724,11 @@ arm*-*-freebsd*)
 arm*-*-netbsdelf*)
  tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h
arm/arm.h"
  case ${target} in
- armeb*) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END" ;;
+ armeb*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
  esac
  tmake_file="${tmake_file} arm/t-arm"
  case ${target} in
- arm*-*-netbsdelf-*eabi)
+ arm*-*-netbsdelf-*eabi*)
     tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
     tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi"
     tmake_file="$tmake_file arm/t-netbsd-eabi"
@@ -744,6 +744,11 @@ arm*-*-netbsdelf*)
     tmake_file="$tmake_file arm/t-netbsd"
     ;;
  esac
+ case ${target} in
+ arm*-*-netbsdelf-*eabihf*)
+    tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
+    ;;
+ esac
  ;;
 arm*-*-netbsd*)
  tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"





[i] http://mail-index.netbsd.org/port-arm/2015/02/19/msg002863.html
[D] http://mail-index.netbsd.org/port-arm/2015/03/04/msg002893.html
[b] http://mail-index.netbsd.org/port-arm/2015/03/24/msg002963.html
[a] http://mail-index.netbsd.org/port-arm/2015/04/26/msg003143.html
[j] http://mail-index.netbsd.org/port-arm/2015/05/04/msg003157.html


Home | Main Index | Thread Index | Old Index