9front - general discussion about 9front
 help / color / mirror / Atom feed
* nvram in usbdisk is not recognized
@ 2015-11-15  6:55 arisawa
  2015-11-15 15:06 ` [9front] " cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: arisawa @ 2015-11-15  6:55 UTC (permalink / raw)
  To: 9front

Hello,

nvram in usbdisk is not recognized when cpu server is booted via pxe.

my kernel is:
term% ls -l /386/9pcf
--rw-rw-rw- M 20 sys sys 4149116 Aug 27 10:09 /386/9pcf
term% 

on the fs server the usb device looks like:
term% ls /dev/sdU*
/dev/sdU56be1/9fat
/dev/sdU56be1/ctl
/dev/sdU56be1/data
/dev/sdU56be1/fscache
/dev/sdU56be1/fsworm
/dev/sdU56be1/nvram
/dev/sdU56be1/other
/dev/sdU56be1/plan9
/dev/sdU56be1/raw
/dev/sdU56be1/swap
term% 

the nvram is copied from file server's nvram

ether of the cpu is 001fd0169891.
the relevant part in /cfg/pxe/001fd0169891 is:
bootfile=/386/9pcf
fs=192.168.0.6
auth=192.168.0.6
bootargs=tcp
nobootprompt=tcp
nvram=/dev/sdU56be1/nvram
nvroff=0
nvrlen=512

in pxe booting, we have a message:
can't open /dev/sdU56be1/nvram: '/dev/sdU56be1' file does not exist
authid:

if my memory is correct, my cpu server that is working on old 9front kernel is OK in recognizing nvram in usbdisk.
at that time nvram was /dev/sdU6.0/nvram for example.

any hint welcome.

Kenji Arisawa



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-15  6:55 nvram in usbdisk is not recognized arisawa
@ 2015-11-15 15:06 ` cinap_lenrek
  2015-11-15 23:12   ` arisawa
  0 siblings, 1 reply; 9+ messages in thread
From: cinap_lenrek @ 2015-11-15 15:06 UTC (permalink / raw)
  To: 9front

i suspect this is a timing problem. that we try to access the usb device
before it has been recognized and mounted. can you check that it works
without the "nobootprompt=tcp" parameter? that is, let it sit at the
bootargs prompt for a few seconds before entering "tcp" or enter !rc
and ls the /shr directory for a while until the device shows up.

there is the boot parameter: usbwait=<seconds> (defaults to 2) that
can be used to give usb stuff more time to settle down.

this is a work arround right now. ideally, that parameter will go
away once the device enumeration and mounting is synchronized, but
right now its all asynchronous.

--
cinap


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-15 15:06 ` [9front] " cinap_lenrek
@ 2015-11-15 23:12   ` arisawa
  2015-11-22  2:28     ` cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: arisawa @ 2015-11-15 23:12 UTC (permalink / raw)
  To: 9front

thanks cinap,

how about the code something like below?

# wait for devices to settle down
#if(~ $#usbwait 1)
#	sleep $usbwait
#if(~ $#usbwait 0)
#	sleep 2
if(~ $nvram /dev/sdU*){
	done=''
	while(! ~ $done +++++ yes){
		sleep 1
		done=$done+
		if(test -e $nvram)
			done=yes
	}
}



> 2015/11/16 0:06、cinap_lenrek@felloff.net のメール:
> 
> i suspect this is a timing problem. that we try to access the usb device
> before it has been recognized and mounted. can you check that it works
> without the "nobootprompt=tcp" parameter? that is, let it sit at the
> bootargs prompt for a few seconds before entering "tcp" or enter !rc
> and ls the /shr directory for a while until the device shows up.
> 
> there is the boot parameter: usbwait=<seconds> (defaults to 2) that
> can be used to give usb stuff more time to settle down.
> 
> this is a work arround right now. ideally, that parameter will go
> away once the device enumeration and mounting is synchronized, but
> right now its all asynchronous.
> 
> --
> cinap



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-15 23:12   ` arisawa
@ 2015-11-22  2:28     ` cinap_lenrek
  2015-11-24  2:30       ` arisawa
  0 siblings, 1 reply; 9+ messages in thread
From: cinap_lenrek @ 2015-11-22  2:28 UTC (permalink / raw)
  To: 9front

i just commited the change that replaces the usbwait= hack. usbd
will signal the completion of device enumeration now to nusbrc by
removing /env/usbbusy variable so all usb devices will be available
on boot now.

--
cinap


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-22  2:28     ` cinap_lenrek
@ 2015-11-24  2:30       ` arisawa
  2015-11-24  4:41         ` cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: arisawa @ 2015-11-24  2:30 UTC (permalink / raw)
  To: 9front

thanks, cinap.

what are the files you fixed?


> 2015/11/22 11:28、cinap_lenrek@felloff.net のメール:
> 
> i just commited the change that replaces the usbwait= hack. usbd
> will signal the completion of device enumeration now to nusbrc by
> removing /env/usbbusy variable so all usb devices will be available
> on boot now.
> 
> --
> cinap



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-24  2:30       ` arisawa
@ 2015-11-24  4:41         ` cinap_lenrek
  0 siblings, 0 replies; 9+ messages in thread
From: cinap_lenrek @ 2015-11-24  4:41 UTC (permalink / raw)
  To: 9front

...
24	b348be4bbd8a/changes/sys/man/8/plan9.ini
24	b348be4bbd8a/changes/sys/src/9/boot/bootrc
2	852ae2e2f3c1/changes/sys/src/9/boot/nusbrc
1	852ae2e2f3c1/changes/sys/src/cmd/nusb/usbd/fns.h
16	852ae2e2f3c1/changes/sys/src/cmd/nusb/usbd/hub.c
8	852ae2e2f3c1/changes/sys/src/cmd/nusb/usbd/usbd.c
8	07933b644910/changes/sys/src/9/port/devenv.c
...

--
cinap


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
@ 2015-11-15  8:36 Matthew Veety
  0 siblings, 0 replies; 9+ messages in thread
From: Matthew Veety @ 2015-11-15  8:36 UTC (permalink / raw)
  To: 9front

Awesome! Glad I could be some help. :)

--
Veety



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
  2015-11-15  7:04 Matthew Veety
@ 2015-11-15  8:30 ` arisawa
  0 siblings, 0 replies; 9+ messages in thread
From: arisawa @ 2015-11-15  8:30 UTC (permalink / raw)
  To: 9front

thanks that resolved my problem.

> 2015/11/15 16:04、Matthew Veety <mveety@mveety.com> のメール:
> 
> I would try adding something like usbwait=5 or so to that machine's
> plan9.ini.  It might be taking a long time for the usb devices to come
> online.  This was the case on the raspberry pi a while ago, and I have
> to do this when I'm booting my macbook with the local fs.
> 
> --
> Veety
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] nvram in usbdisk is not recognized
@ 2015-11-15  7:04 Matthew Veety
  2015-11-15  8:30 ` arisawa
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Veety @ 2015-11-15  7:04 UTC (permalink / raw)
  To: 9front

I would try adding something like usbwait=5 or so to that machine's
plan9.ini.  It might be taking a long time for the usb devices to come
online.  This was the case on the raspberry pi a while ago, and I have
to do this when I'm booting my macbook with the local fs.

--
Veety



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-24  4:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15  6:55 nvram in usbdisk is not recognized arisawa
2015-11-15 15:06 ` [9front] " cinap_lenrek
2015-11-15 23:12   ` arisawa
2015-11-22  2:28     ` cinap_lenrek
2015-11-24  2:30       ` arisawa
2015-11-24  4:41         ` cinap_lenrek
2015-11-15  7:04 Matthew Veety
2015-11-15  8:30 ` arisawa
2015-11-15  8:36 Matthew Veety

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).