<div dir="ltr"><div><div><div><div><div><div>Hi Experts,<br><br></div>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.<br><br></div>Here is a summary of problem and looking for your guidance <br><br></div>1. in Filo there are two configuration files (.config and lib.config)<br></div>2. When  USB stack is enabled in libpayload CONFIG_USB=y is defined in lib.config but not in .config<br></div>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.<br><br></div>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?<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 11, 2014 at 12:14 AM, Vipin Gahlaut <span dir="ltr"><<a href="mailto:gailu96@gmail.com" target="_blank">gailu96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Here is the patch I used to fix build error.<br><br>diff --git a/drivers/usb.c b/drivers/usb.c<br>index 0da6efa..a959389 100644<br>--- a/drivers/usb.c<br>+++ b/drivers/usb.c<br>@@ -20,7 +20,7 @@<br> #include <libpayload-config.h><br> <br> /* Only use this code if libpayload is compiled with USB stack */<br>-#ifdef CONFIG_USB<br>+#ifdef CONFIG_USB_DISK<br> #include <fs.h><br> #include <usb/usb.h><br> #include <usb/usbmsc.h><br><br></div>Please let me know if this is correct and I should submit it<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 11:41 PM, Vipin Gahlaut <span dir="ltr"><<a href="mailto:gailu96@gmail.com" target="_blank">gailu96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi, <br><br></div>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.<br><br>blockdev.c:(.text+0x18e): undefined reference to `usb_read'<br>/home/vgahlaut/coreboot-fsp/coreboot/payloads/filo/build/fs/blockdev.o: In function `devopen':<br>blockdev.c:(.text+0x91e): undefined reference to `usb_probe'<br><br></div>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.<br><br></div>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<br><br></div>Can you please suggest a solution and let me know why CONFIG_USB is removed from my .config<br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>