Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Vipin Gahlaut
Hi Experts,

The trick for changing from CONFIG_USB to CONFIG_USB_DISK did help to
compile but it doesn't seem to be correct fix and not helping at run time.
I have configured libpayload with CONFIG_USB support but that define is not
included in the filo/build/config.h. As a result I get debug message No USB
stack in libpayload. So FILO is assuming that libpayload is not configured
with USB stack.

Here is a summary of problem and looking for your guidance

1. in Filo there are two configuration files (.config and lib.config)
2. When  USB stack is enabled in libpayload CONFIG_USB=y is defined in
lib.config but not in .config
3. build/config.h does not have CONFIG_USB defined. As a result all the
code kept under CONFIG_USB macro in FILO source tree assumes that
libpayload does not have USB stack.

Can someone please let me know what is the correct procedure to include USB
stack in libpayload and inform to FILO that yes libpayload really has usb
stack support?



On Sat, Oct 11, 2014 at 12:14 AM, Vipin Gahlaut gail...@gmail.com wrote:

 Here is the patch I used to fix build error.

 diff --git a/drivers/usb.c b/drivers/usb.c
 index 0da6efa..a959389 100644
 --- a/drivers/usb.c
 +++ b/drivers/usb.c
 @@ -20,7 +20,7 @@
  #include libpayload-config.h

  /* Only use this code if libpayload is compiled with USB stack */
 -#ifdef CONFIG_USB
 +#ifdef CONFIG_USB_DISK
  #include fs.h
  #include usb/usb.h
  #include usb/usbmsc.h

 Please let me know if this is correct and I should submit it

 On Fri, Oct 10, 2014 at 11:41 PM, Vipin Gahlaut gail...@gmail.com wrote:

 Hi,

 We need USB support in Filo. Our Linux kernel and file system is expected
 to be on USB thumb driver. We have enabled USB in menuconfig; however build
 fails with following errors.

 blockdev.c:(.text+0x18e): undefined reference to `usb_read'
 /home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o:
 In function `devopen':
 blockdev.c:(.text+0x91e): undefined reference to `usb_probe'

 We are using latest FILO and Coreboot from git repository. These
 functions seems to be defined in drivers/usb.c and usb.c is getting
 compiled.

 Problem seems to be due to the fact that CONFIG_USB=y in .config is
 automatically removed during make and these function are defined in usb.c
 under #ifdef CONFIG_USB

 Can you please suggest a solution and let me know why CONFIG_USB is
 removed from my .config



-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Nico Huber
Hello Vipin,

 Can you please suggest a solution and let me know why CONFIG_USB is removed
 from my .config
The prefix for libpayload's configurations options changed to CONFIG_LP_,
lately. The last commit for FILO (60d45fc) tried to fix it, but seems to
have missed some options. So CONFIG_USB is CONFIG_LP_USB, now.

Also, if you get current FILO to compile with USB support, depending on your
platform, it might not work as expected. I hit some strange regressions with
older hardware this week, that I'm still investigating.

Nico

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Vipin Gahlaut
Hi Nico,

Thanks for the details. I somehow managed to build filo by defining
CONFIG_USB in build/config.h However having problems at run time. Logs are
below. Can you please suggest last known commit where USB was working good?
Currently it seems to be messed up. I have to boot Linux from USB using
coreboot without Seabios and I am facing problem with both FILO and GRUB2.

Logs for the problem I am getting repeatedly at run time
change on port 1
fullspeed device
first get_descriptor(DT_DEV) failed
set_address failed



On Sun, Oct 12, 2014 at 6:59 PM, Nico Huber nic...@gmx.de wrote:

 Hello Vipin,

  Can you please suggest a solution and let me know why CONFIG_USB is
 removed
  from my .config
 The prefix for libpayload's configurations options changed to CONFIG_LP_,
 lately. The last commit for FILO (60d45fc) tried to fix it, but seems to
 have missed some options. So CONFIG_USB is CONFIG_LP_USB, now.

 Also, if you get current FILO to compile with USB support, depending on
 your
 platform, it might not work as expected. I hit some strange regressions
 with
 older hardware this week, that I'm still investigating.

 Nico

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread ron minnich
you can try to get filo to work, or you can work at John Lewis
excellent work on JELTKA and see if you would be better off using a
linux kernel instead.

My bias is towards JELTKA, personally.

ron

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Vipin Gahlaut
Hi Ron,

We have to reduce the boot time to minimum possible; hence the preference
is FILO/GRUB2.

Not sure the status of USB stuff in GRUB2 so trying hard to get FILO to
work.


On Sun, Oct 12, 2014 at 10:12 PM, ron minnich rminn...@gmail.com wrote:

 you can try to get filo to work, or you can work at John Lewis
 excellent work on JELTKA and see if you would be better off using a
 linux kernel instead.

 My bias is towards JELTKA, personally.

 ron

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Nico Huber
On 12.10.2014 18:21, Vipin Gahlaut wrote:
 Logs for the problem I am getting repeatedly at run time
 change on port 1
 fullspeed device
 first get_descriptor(DT_DEV) failed
 set_address failed
That's exactly what I observed on a kontron/986lcd-m (i945) with low-
speed devices connected to the UHCI. Are you using a similar platform?

Nico

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread Vipin Gahlaut
No. I am using qemu (version 2.1.2) with -usbdevice option. I run qemu with
following command

qemu-system-i386 -bios ./coreboot.rom -hda hda.img -usbdevice disk:usb.img
-nographic

On Sun, Oct 12, 2014 at 11:31 PM, Nico Huber nic...@gmx.de wrote:

 On 12.10.2014 18:21, Vipin Gahlaut wrote:
  Logs for the problem I am getting repeatedly at run time
  change on port 1
  fullspeed device
  first get_descriptor(DT_DEV) failed
  set_address failed
 That's exactly what I observed on a kontron/986lcd-m (i945) with low-
 speed devices connected to the UHCI. Are you using a similar platform?

 Nico

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-12 Thread ron minnich
reduce the boot time to the minimum possible -- what's that mean. Do
you have a number?

ARMs boot linux to usability in 800 ms. (number seen at FOSDEM in
2007). Is that fast enough?

SPI greatly increases time to boot, and the use of SPI may be more
important than the boot loader used.

Finally, in real world use, the static timing loops and serialization
of request/response actions of simple boot loaders may make them
slower than Linux. We found that linux could pull multi-megabye
kernel+initrd downloads over the network about 10x faster than
etherboot could back in 2002. Linux has internal concurrency that can
be very effective.

Which is to say, just saying 'filo is faster' is very simplistic,
especially absent hard numbers and some real measurements. Getting
boot time down is complex and can't be reduced to a buzzphrase.

ron

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Coreboot FILO payload build fails when USB support enabled

2014-10-10 Thread Vipin Gahlaut
Here is the patch I used to fix build error.

diff --git a/drivers/usb.c b/drivers/usb.c
index 0da6efa..a959389 100644
--- a/drivers/usb.c
+++ b/drivers/usb.c
@@ -20,7 +20,7 @@
 #include libpayload-config.h

 /* Only use this code if libpayload is compiled with USB stack */
-#ifdef CONFIG_USB
+#ifdef CONFIG_USB_DISK
 #include fs.h
 #include usb/usb.h
 #include usb/usbmsc.h

Please let me know if this is correct and I should submit it

On Fri, Oct 10, 2014 at 11:41 PM, Vipin Gahlaut gail...@gmail.com wrote:

 Hi,

 We need USB support in Filo. Our Linux kernel and file system is expected
 to be on USB thumb driver. We have enabled USB in menuconfig; however build
 fails with following errors.

 blockdev.c:(.text+0x18e): undefined reference to `usb_read'
 /home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o: In
 function `devopen':
 blockdev.c:(.text+0x91e): undefined reference to `usb_probe'

 We are using latest FILO and Coreboot from git repository. These functions
 seems to be defined in drivers/usb.c and usb.c is getting compiled.

 Problem seems to be due to the fact that CONFIG_USB=y in .config is
 automatically removed during make and these function are defined in usb.c
 under #ifdef CONFIG_USB

 Can you please suggest a solution and let me know why CONFIG_USB is
 removed from my .config

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot