ARM IMX6 build failure

2014-08-31 Thread Bjoern A. Zeeb



linking kernel.debug
locore.o: In function `virt_done':
(.text+0x130): undefined reference to `initarm'
uart_core.o: In function `uart_bus_probe':
/scratch/tmp/bz/head.svn/sys/dev/uart/uart_core.c:381: undefined reference to 
`uart_cpu_eqres'
uart_subr.o: In function `uart_getenv':
/scratch/tmp/bz/head.svn/sys/dev/uart/uart_subr.c:307: undefined reference to 
`uart_bus_space_mem'
/scratch/tmp/bz/head.svn/sys/dev/uart/uart_subr.c:307: undefined reference to 
`uart_bus_space_io'
uart_tty.o: In function `uart_cnprobe':
/scratch/tmp/bz/head.svn/sys/dev/uart/uart_tty.c:72: undefined reference to 
`uart_cpu_getdev'
machdep.o: In function `set_stackptrs':
/scratch/tmp/bz/head.svn/sys/arm/arm/machdep.c:1006: undefined reference to 
`irqstack'
/scratch/tmp/bz/head.svn/sys/arm/arm/machdep.c:1006: undefined reference to 
`abtstack'
/scratch/tmp/bz/head.svn/sys/arm/arm/machdep.c:1006: undefined reference to 
`undstack'
mp_machdep.o: In function `init_secondary':
/scratch/tmp/bz/head.svn/sys/arm/arm/mp_machdep.c:257: undefined reference to 
`pmap_pa'
pmap-v6.o: In function `pmap_enter_locked':
/scratch/tmp/bz/head.svn/sys/arm/arm/pmap-v6.c:3085: undefined reference to 
`systempage'
pmap-v6.o: In function `pmap_pinit':
/scratch/tmp/bz/head.svn/sys/arm/arm/pmap-v6.c:3506: undefined reference to 
`systempage'
gic.o: In function `arm_gic_probe':
/scratch/tmp/bz/head.svn/sys/arm/arm/gic.c:134: undefined reference to 
`ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/arm/gic.c:137: undefined reference to 
`ofw_bus_is_compatible'
pl310.o: In function `pl310_probe':
/scratch/tmp/bz/head.svn/sys/arm/arm/pl310.c:423: undefined reference to 
`ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/arm/pl310.c:426: undefined reference to 
`ofw_bus_is_compatible'
mpcore_timer.o: In function `arm_tmr_probe':
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:257: undefined reference to 
`ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:260: undefined reference to 
`ofw_bus_is_compatible’
mpcore_timer.o: In function `arm_tmr_probe':
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:257: undefined reference to 
`ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:260: undefined reference to 
`ofw_bus_is_compatible'
mpcore_timer.o: In function `arm_tmr_attach':
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:298: undefined reference to 
`OF_getencprop'
/scratch/tmp/bz/head.svn/sys/arm/arm/mpcore_timer.c:366: undefined reference to 
`ofw_bus_get_node_desc'
fsl_ocotp.o: In function `fsl_ocotp_devmap':
/scratch/tmp/bz/head.svn/sys/arm/freescale/fsl_ocotp.c:73: undefined reference 
to `OF_finddevice'
/scratch/tmp/bz/head.svn/sys/arm/freescale/fsl_ocotp.c:75: undefined reference 
to `fdt_depth_search_compatible'
/scratch/tmp/bz/head.svn/sys/arm/freescale/fsl_ocotp.c:77: undefined reference 
to `fdt_regsize'
fsl_ocotp.o: In function `ocotp_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/fsl_ocotp.c:151: undefined reference 
to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/fsl_ocotp.c:154: undefined reference 
to `ofw_bus_is_compatible'
imx6_anatop.o: In function `imx6_anatop_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx6_anatop.c:678: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx6_anatop.c:681: undefined 
reference to `ofw_bus_is_compatible'
imx6_ccm.o: In function `ccm_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx6_ccm.c:147: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx6_ccm.c:150: undefined 
reference to `ofw_bus_is_compatible'
imx_gpt.o: In function `imx_gpt_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_gpt.c:124: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_gpt.c:127: undefined 
reference to `ofw_bus_search_compatible'
imx_gpio.o: In function `imx51_gpio_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_gpio.c:380: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_gpio.c:383: undefined 
reference to `ofw_bus_search_compatible'
imx_i2c.o: In function `i2c_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_i2c.c:233: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_i2c.c:236: undefined 
reference to `ofw_bus_search_compatible'
imx_i2c.o: In function `i2c_get_node':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_i2c.c:151: undefined 
reference to `ofw_bus_get_node_desc'
imx_i2c.o:(.rodata+0x10): undefined reference to `ofw_bus_get_node_desc'
imx_sdhci.o: In function `imx_sdhci_probe':
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_sdhci.c:772: undefined 
reference to `ofw_bus_status_okay'
/scratch/tmp/bz/head.svn/sys/arm/freescale/imx/imx_sdhci.c:775: undefined 
reference to `ofw_bus_search_compatible'
imx_sdhci.o: In function `imx_sdhci_attach':
/scratc

Revision: 270871: kernel build failure due to: [...]/netmap.c:556:23: error: no member named 'if_pspare' in 'struct ifnet'

2014-08-31 Thread O. Hartmann

cc  -c -O3 -fno-strict-aliasing -march=native -std=c99  -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline
-Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs
-fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc  -I. 
-I/usr/src/sys
-I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse
-msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-mno-aes
-mno-avx
-Werror  /usr/src/sys/dev/netmap/netmap.c 
/usr/src/sys/dev/netmap/netmap.c:556:23: error:
no member named 'if_pspare' in 'struct ifnet' netmap_set_all_rings(NA(ifp), 1 
/* stopped
*/);


signature.asc
Description: PGP signature


Re: Kernel page fault with non-sleepable locks held error with kernel r270837

2014-08-31 Thread 小野寛生
Thank you for taking a look into this.

2014-08-31 15:47 GMT+09:00 John-Mark Gurney :
> Hiroo Ono () wrote this message on Sun, Aug 31, 2014 at 14:01 
> +0900:
>> During upgrading world and kernel from r26939 to r270837, I got the
>> following problem.
>> a) the arch is i386
>> b) kernel is of r270837, userland is of r26939 (make kernel is done
>> and rebooted, make installworld not yet).
>> c) booting in single user mode is OK.
>> d) during startup of multi-user mode, when dhclient is run, the
>> following message appears, and the system freezes:
>>
>> Starting devd.
>> wlan0: link state changed to UP
>> Starting webcamd.
>> Attached to ugen4.2[0]
>> Starting webcready running for ugen4.2.0
>> /usr/local/etc/rc.d/webcamd: WARNING: failed to start webcamd
>> Starting dhclient.
>> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
>> DHCPACK from 192.168.8.2
>> Kernel page fault with the following non-sleepable locks held:
>> exclusive sleep mutex so_rcv (so_rcv) r = 0 (0xc713f078) locked @
>> /usr/src/sys/kern/kern_event.c:2005
>
> I'm puzzled by this line number...  This line number doesn't do any
> locks, it is in the function knlist_remove_inevent...

The line 2005 is "mtx_lock((struct mtx *)arg);" of knlist_mtx_lock()
https://svnweb.freebsd.org/base/head/sys/kern/kern_event.c?revision=268843&view=markup#l2005

this function is assigned to (struct knlist *)->kn_lock in knlist_init()
https://svnweb.freebsd.org/base/head/sys/kern/kern_event.c?revision=268843&view=markup#l2058

>> KDB stack backtrace:
>>  rapper+0x2d/frame 0xe8f42710
>> kdb_backtrace(c11aaf80,0,c713f078,c119a9e8,7d5,...) at 0xc0b4b160 =
>> kdb_backtrace+0x30/frame 0xe8f42778
>> witness_warn(5,0,c136b0a0,76fb000,c1833d58,...) at 0xc8b68a52 =
>> witness_warn+0x402/frame 0xe8f427c8
>> trap_pfault(18,3fd,c0dcc2d0,c1f64a80,c75fa000,...) at 0xc102f46b =
>> trap_pfault+0x5b/frame 0xe8f42840
>> trap(e8f42988) at 0xc102edcf = trap+0x6cf/frame 0xe8f4297c
>> calltrap() at 0xc1017c4c = calltrap+0x6/frame 0xe8f4297c
>> filt_soread(c75f7828,0,c119a9e8,48d,0,...) at 0xc0b9837d =
>> filt_soread+0x9d/frame 0xe8f429f0
>> kqueue_register(c6f59310,1,1,4f5,0,...) at 0xc0ad1457 =
>> kqueue_register+0x807/frame 0xe8f42a68
>> kern_kevent(c6f59310,7,12c217ce1 = Xint0x80), eip =

calltrap() seems to be invoked by
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
of filt_soread() in sys/kern/uipc_socket.c
https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l3250

but I do not know where &so->so_rcv was previously locked.
knlist_init_mtx (which then calls knlist_init) is called with
so->so_rcv in sys/kern/uipc_socket.c in
line 517:   socreate()
https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l517
and
line 606: sonewconn()
https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l606

so the problem may be around there.
but, I cannot track any further.  the system freezes, so I cannot deal with ddb.

> But notice the knlist_remove_inevent doesn't appear in the back
> trace...
>
> Can you confirm that your kern_event.c is:
> __FBSDID("$FreeBSD: head/sys/kern/kern_event.c 268843 2014-07-18 14:27:04Z 
> bapt
> $");

I checked that it was this revision.

>> instruction poi = 0x28:0xe8f429f0 fff, type 0x1b
>> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
>> DHCPACK from 192.168.8.2
>>
>> e) kernel configuration differs from GENERIC on the following point
>> options  VIMAGE
>> options  DDB_NUMSYM
>> nocpuI486_CPU
>> nooptions  VESA
>>
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Modify bsdinstall to set the default locale?

2014-08-31 Thread Craig Rodrigues
Hi,

I recently did a fresh install of FreeBSD-10.stable on a new machine.

If I run the 'locale', I get this:

LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

Can we add something to bsdinstall/bsdconfig for setting the default locale?

We already have stuff in the installer for setting the keyboard and timezone.
--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Modify bsdinstall to set the default locale?

2014-08-31 Thread Allan Jude
On 2014-08-31 12:36, Craig Rodrigues wrote:
> Hi,
> 
> I recently did a fresh install of FreeBSD-10.stable on a new machine.
> 
> If I run the 'locale', I get this:
> 
> LANG=
> LC_CTYPE="C"
> LC_COLLATE="C"
> LC_TIME="C"
> LC_NUMERIC="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=
> 
> Can we add something to bsdinstall/bsdconfig for setting the default locale?
> 
> We already have stuff in the installer for setting the keyboard and timezone.
> --
> Craig
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> 

That would seem to make sense. Where do these settings actually get
stored? Where would I find a list of the possible settings to create the
dialog?

I've never tried to use any of the alternative locales

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: Modify bsdinstall to set the default locale?

2014-08-31 Thread Craig Rodrigues
On Sun, Aug 31, 2014 at 9:41 AM, Allan Jude  wrote:
> On 2014-08-31 12:36, Craig Rodrigues wrote:
>
> That would seem to make sense. Where do these settings actually get
> stored? Where would I find a list of the possible settings to create the
> dialog?
>
> I've never tried to use any of the alternative locales
>
> --
> Allan Jude
>

See:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html

The locale gets set by setting certain environment variables.

I don't have a PC-BSD system handy, but I think on PC-BSD, some files
like /etc/login.conf  , /etc/csh.cshrc,
or /etc/profile are modified with the default locale information.
Maybe bsdinstall should do something similar.

--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Modify bsdinstall to set the default locale?

2014-08-31 Thread Andrew Berg
On 2014.08.31 11:41, Allan Jude wrote:
> That would seem to make sense. Where do these settings actually get
> stored? Where would I find a list of the possible settings to create the
> dialog?
Setting them in /etc/login.conf for the default user class is how I do it.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Modify bsdinstall to set the default locale?

2014-08-31 Thread Shane Ambler
On 01/09/2014 02:11, Allan Jude wrote:
> On 2014-08-31 12:36, Craig Rodrigues wrote:
>> Hi,
>>
>> I recently did a fresh install of FreeBSD-10.stable on a new machine.
>>
>> If I run the 'locale', I get this:
>>
>> LANG=
>> LC_CTYPE="C"
>> LC_COLLATE="C"
>> LC_TIME="C"
>> LC_NUMERIC="C"
>> LC_MONETARY="C"
>> LC_MESSAGES="C"
>> LC_ALL=
>>
>> Can we add something to bsdinstall/bsdconfig for setting the default locale?
>>
>> We already have stuff in the installer for setting the keyboard and timezone.
>> --
>> Craig
>
> That would seem to make sense. Where do these settings actually get
> stored? Where would I find a list of the possible settings to create the
> dialog?
> 
> I've never tried to use any of the alternative locales
> 

They are environment variables - we can set manually in ~/.cshrc
Any unset will equal the LANG setting - empty just falls to "C".

Handbook Chapter 22 on localisation shows setting it in /etc/login.conf
which currently only has a lang setting for Russian accounts.

It also notes that Chinese, Japanese, and Korean will need to set more
than just lang.

-- 
FreeBSD - the place to B...Software Developing

Shane Ambler

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Kernel page fault with non-sleepable locks held error with kernel r270837

2014-08-31 Thread John-Mark Gurney
Hiroo Ono () wrote this message on Sun, Aug 31, 2014 at 20:43 +0900:
> Thank you for taking a look into this.
> 
> 2014-08-31 15:47 GMT+09:00 John-Mark Gurney :
> > Hiroo Ono () wrote this message on Sun, Aug 31, 2014 at 14:01 
> > +0900:
> >> During upgrading world and kernel from r26939 to r270837, I got the
> >> following problem.
> >> a) the arch is i386
> >> b) kernel is of r270837, userland is of r26939 (make kernel is done
> >> and rebooted, make installworld not yet).
> >> c) booting in single user mode is OK.
> >> d) during startup of multi-user mode, when dhclient is run, the
> >> following message appears, and the system freezes:
> >>
> >> Starting devd.
> >> wlan0: link state changed to UP
> >> Starting webcamd.
> >> Attached to ugen4.2[0]
> >> Starting webcready running for ugen4.2.0
> >> /usr/local/etc/rc.d/webcamd: WARNING: failed to start webcamd
> >> Starting dhclient.
> >> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
> >> DHCPACK from 192.168.8.2
> >> Kernel page fault with the following non-sleepable locks held:
> >> exclusive sleep mutex so_rcv (so_rcv) r = 0 (0xc713f078) locked @
> >> /usr/src/sys/kern/kern_event.c:2005
> >
> > I'm puzzled by this line number...  This line number doesn't do any
> > locks, it is in the function knlist_remove_inevent...
> 
> The line 2005 is "mtx_lock((struct mtx *)arg);" of knlist_mtx_lock()
> https://svnweb.freebsd.org/base/head/sys/kern/kern_event.c?revision=268843&view=markup#l2005
> 
> this function is assigned to (struct knlist *)->kn_lock in knlist_init()
> https://svnweb.freebsd.org/base/head/sys/kern/kern_event.c?revision=268843&view=markup#l2058

Sorry, turns out I had a local patch to my kern_event.c...

Can you find out what line the filt_soread is on?  This will help figure
out if it's kn or so...  If you could get the address of the page fault,
that would also be helpful...

Ok, a similar fix was committed in r133794, and a quick look at the code
doesn't show any knote's that are allocated on the stack anymore...

> >> KDB stack backtrace:
> >>  rapper+0x2d/frame 0xe8f42710
> >> kdb_backtrace(c11aaf80,0,c713f078,c119a9e8,7d5,...) at 0xc0b4b160 =
> >> kdb_backtrace+0x30/frame 0xe8f42778
> >> witness_warn(5,0,c136b0a0,76fb000,c1833d58,...) at 0xc8b68a52 =
> >> witness_warn+0x402/frame 0xe8f427c8
> >> trap_pfault(18,3fd,c0dcc2d0,c1f64a80,c75fa000,...) at 0xc102f46b =
> >> trap_pfault+0x5b/frame 0xe8f42840
> >> trap(e8f42988) at 0xc102edcf = trap+0x6cf/frame 0xe8f4297c
> >> calltrap() at 0xc1017c4c = calltrap+0x6/frame 0xe8f4297c
> >> filt_soread(c75f7828,0,c119a9e8,48d,0,...) at 0xc0b9837d =
> >> filt_soread+0x9d/frame 0xe8f429f0
> >> kqueue_register(c6f59310,1,1,4f5,0,...) at 0xc0ad1457 =
> >> kqueue_register+0x807/frame 0xe8f42a68
> >> kern_kevent(c6f59310,7,12c217ce1 = Xint0x80), eip =
> 
> calltrap() seems to be invoked by
> SOCKBUF_LOCK_ASSERT(&so->so_rcv);
> of filt_soread() in sys/kern/uipc_socket.c
> https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l3250
> 
> but I do not know where &so->so_rcv was previously locked.
> knlist_init_mtx (which then calls knlist_init) is called with
> so->so_rcv in sys/kern/uipc_socket.c in
> line 517: socreate()
> https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l517
> and
> line 606: sonewconn()
> https://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?revision=270664&view=markup#l606
> 
> so the problem may be around there.
> but, I cannot track any further.  the system freezes, so I cannot deal with 
> ddb.
> 
> > But notice the knlist_remove_inevent doesn't appear in the back
> > trace...
> >
> > Can you confirm that your kern_event.c is:
> > __FBSDID("$FreeBSD: head/sys/kern/kern_event.c 268843 2014-07-18 14:27:04Z 
> > bapt
> > $");
> 
> I checked that it was this revision.
> 
> >> instruction poi = 0x28:0xe8f429f0 fff, type 0x1b
> >> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
> >> DHCPACK from 192.168.8.2
> >>
> >> e) kernel configuration differs from GENERIC on the following point
> >> options  VIMAGE
> >> options  DDB_NUMSYM
> >> nocpuI486_CPU
> >> nooptions  VESA
> >>
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"