Port-arm archive

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

Re: Linksys NSLU2 (evbarm, armeb) userspace regression origin found



Hi again,

I have created the attached patch to fix the user space issue
introduced by the commit quoted in the mail below (basically adding
also ' TARGET_ENDIAN_DEFAULT=MASK_BIG_END' to tm_defines).

Using NetBSD 6.1.5 kernel and some more recent user spaces generated
from trunk (for instance, 'build', 'distribution', sets' obtained from
trunk code dated 2013-09-14), I get a lot of messages
'/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)' after
starting init.

Any idea what this is? Is it due to the fact I am using NetBSD
6.1.5_PATCH kernel with newer userspace (etc/obj/etc-release says
'NetBSD 6.99.23/evbarm')?

[...]
Loaded initial symtab at 0xc048b178, strtab at 0xc04b5f70, # entries 10272
pmap_postinit: Allocated 9 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.1.5_PATCH (NSLU2_ALL) #0: Tue Mar 24 09:05:14 EET 2015
        eddy@heidi:/home/eddy/usr/src/netbsd/net/src/sys/arch/evbarm/compile/obj/NSLU2_ALL
total memory = 32768 KB
avail memory = 26748 KB
[...]
root on npe0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 192.168.0.2
nfs_boot: my_name=kinder
nfs_boot: my_addr=192.168.0.251
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=192.168.0.2
root on 192.168.0.2:/export/netbsd-nslu2/root
root time: 0x5557204a
WARNING: clock lost 5615 days
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
Sat May 16 10:47:38 UTC 2015
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
Not checking /: fs_passno = 0 in /etc/fstab
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
/etc/ld.so.conf: invalid/unknown sysctl for libc.so.12 (22)
[...]



2015-05-14 1:33 GMT+03:00 Eddy Petrișor <eddy.petrisor+netbsd.org%gmail.com@localhost>:
> Hello,
>
> (The first paragraph contains some background information for people
> that might start directly with this mail.)
[..]
> 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
diff --git a/external/gpl3/gcc/dist/gcc/config.gcc b/external/gpl3/gcc/dist/gcc/config.gcc
index b15ef9c..68730f9 100644
--- a/external/gpl3/gcc/dist/gcc/config.gcc
+++ b/external/gpl3/gcc/dist/gcc/config.gcc
@@ -728,7 +728,7 @@ 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
-	arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
+	arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1 TARGET_ENDIAN_DEFAULT=MASK_BIG_END" ;;
 	esac
 	tmake_file="${tmake_file} arm/t-arm"
 	case ${target} in


Home | Main Index | Thread Index | Old Index