[U-Boot] am335x uboot TFTP via SPL over usb is failing
Michael Welling
mwelling at ieee.org
Mon Jul 3 16:17:15 UTC 2017
On Mon, Jul 03, 2017 at 05:53:01PM +0530, Ravi Kumar Prasad wrote:
> Hi, Michael
> Please cc the your findings of second bisect here, so that someone can help
> further.
Okay sure.
After finding that the TFTP was failing after a specific commit, I reverted the commit
and found when the bootp started failuring.
This is the commit that caused the TFTP to start failing, it would transfer the whole file
then just start timing out.
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=71fc5f91d20ea6466fd6e45235257bec6eb5f413
Here is the output of the bisect looking for when the bootp stopped working with the tftp transfer never starting.
# bad: [e2351d5cf1e97408b4c52bafeaa85e0ca85c920c] Prepare v2017.07--rc2
git bisect bad e2351d5cf1e97408b4c52bafeaa85e0ca85c920c
# good: [98d2d5e8c473232dc718763dbec284b7349dcc05] Merge branch 'master' of git://git.denx.de/u-boot-ti
git bisect good 98d2d5e8c473232dc718763dbec284b7349dcc05
# bad: [39af3d8a0db0aab3f78ae5576f0f5c668505a667] sniper: Drop references to P970
git bisect bad 39af3d8a0db0aab3f78ae5576f0f5c668505a667
# bad: [7a1af7a79bd79ded6a78d0c1afdbc3353669e313] Merge branch 'master' of git://www.denx.de/git/u-boot-imx
git bisect bad 7a1af7a79bd79ded6a78d0c1afdbc3353669e313
# bad: [f6570871346aa3e83ba263bbed79a43875437112] usb_storage:Fix USB storage capacity detection on 64 bit architectures
git bisect bad f6570871346aa3e83ba263bbed79a43875437112
# good: [a0573d19885236ba03d412f7788104f75f0dea64] Merge branch 'master' of git://git.denx.de/u-boot-mips
git bisect good a0573d19885236ba03d412f7788104f75f0dea64
# bad: [1da7ce4155d0839d9d56525379493bb0f80b5330] Merge branch 'master' of git://git.denx.de/u-boot-uniphier
git bisect bad 1da7ce4155d0839d9d56525379493bb0f80b5330
# good: [0e7806d24a77179053c64ba481b3857805e061c8] ppc: amcc: Omit unneeded ns16550 CONFIG if using driver model
git bisect good 0e7806d24a77179053c64ba481b3857805e061c8
# good: [09f455dca74973ef5e42311162c8dff7e83d44a2] ARM: tegra: collect SoC sources into mach-tegra
git bisect good 09f455dca74973ef5e42311162c8dff7e83d44a2
# good: [9f076be71313c1900fa9824e1f866e750c32e0db] arm: ls102xa: workaround for cache coherency problem
git bisect good 9f076be71313c1900fa9824e1f866e750c32e0db
# bad: [4c7d025368fce4825a23aee90bd9a8fa1a95bbd7] ARM: UniPhier: move uniphier_ehci_reset() function
git bisect bad 4c7d025368fce4825a23aee90bd9a8fa1a95bbd7
# bad: [47d8ae4069b47ce966c0c5e0d8dd041e69ee1f86] zmx25: Convert to generic board
git bisect bad 47d8ae4069b47ce966c0c5e0d8dd041e69ee1f86
# bad: [346cfba4f013c34e1dc16948d1ed89dc8c44c478] ARM: remove dkb board support
git bisect bad 346cfba4f013c34e1dc16948d1ed89dc8c44c478
# good: [66afaef22889e2685aa500c047b66ac003eea264] kconfig: Adjust ordering so that defaults work as expected
git bisect good 66afaef22889e2685aa500c047b66ac003eea264
# bad: [d648964fc2495f1184af5782a0b7fc670ba5826e] kconfig: remove unneeded dependency on !SPL_BUILD
git bisect bad d648964fc2495f1184af5782a0b7fc670ba5826e
# bad: [e02ee2548afe22f7d197b89df2ae7bd72f1df630] kconfig: switch to single .config configuration
git bisect bad e02ee2548afe22f7d197b89df2ae7bd72f1df630
# first bad commit: [e02ee2548afe22f7d197b89df2ae7bd72f1df630] kconfig: switch to single .config configuration
Here is the patch that I was applying for the most part when performing the bisect: (it had to change slightly for early and late versions)
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index 352c1fb..06c1059 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -1,5 +1,5 @@
CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="NAND,SPL_USBETH_SUPPORT"
+CONFIG_SYS_EXTRA_OPTIONS="SPL_USBETH_SUPPORT"
CONFIG_CONS_INDEX=1
+S:CONFIG_ARM=y
+S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index ba442d5..f2c12b1 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -91,7 +91,7 @@ static const char driver_desc[] = DRIVER_DESC;
|USB_CDC_PACKET_TYPE_PROMISCUOUS \
|USB_CDC_PACKET_TYPE_DIRECTED)
-#define USB_CONNECT_TIMEOUT (3 * CONFIG_SYS_HZ)
+#define USB_CONNECT_TIMEOUT (15 * CONFIG_SYS_HZ)
/*-------------------------------------------------------------------------*/
@@ -1507,8 +1507,8 @@ static int rx_submit(struct eth_dev *dev, struct usb_request *req,
*/
debug("%s\n", __func__);
- if (!req)
- return -EINVAL;
+// if (!req)
+// return -EINVAL;
size = (ETHER_HDR_SIZE + dev->mtu + RX_EXTRA);
size += dev->out_ep->maxpacket - 1;
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index f1c270c..edb91fb 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -227,6 +227,7 @@
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
#endif
+#define CONFIG_ENV_IS_NOWHERE
#ifdef CONFIG_NAND
/* NAND: device related configs */
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 2bd1164..36e0b56 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -127,7 +127,7 @@
* we are on so we do not need to rely on the command prompt. We set a
* console baudrate of 115200 and use the default baud rate table.
*/
-#define CONFIG_SYS_MALLOC_LEN (16 << 20)
+#define CONFIG_SYS_MALLOC_LEN (1024 << 10)
#define CONFIG_SYS_HUSH_PARSER
#define CONFIG_SYS_PROMPT "U-Boot# "
#define CONFIG_SYS_CONSOLE_INFO_QUIET
>
> On Mon, Jun 26, 2017 at 5:12 PM, Ravi Kumar Prasad <7ravikp at gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm developing a node.js usb bootloader server for the am335x (BeagleBone)
> > platform which can boot it into USB mass storage mode. The server TFTPs SPL
> > over usb and then TFTPs uboot (configured for ums) via SPL.
> >
> > The SPL binary gets transferred successfully, but SPL can't TFTP the uboot
> > binary with the uboot build from latest sources.
> >
> > The previous versions of u-boot succeed in doing so. The known working
> > u-boot version was v2014.07 ( https://github.com/u-boot/u-boot/commit/
> > 524123a70761110c5cf3ccc5f52f6d4da071b959 ).
> >
> > So, we did a git bisect on uboot to track when it stopped failing to TFTP.
> > Here's the bisect log https://pastebin.com/hwXJUf3K
> >
> > Here's outputs of all u-boot https://pastebin.com/t2WNLQsQ
> >
> > So, first bad commit turns out to be this https://github.com/u-
> > boot/u-boot/commit/98d2d5e8c473232dc718763dbec284b7349dcc05
> >
> > Config used for u-boot build : am335x_evm_usbspl_defconfig
> > Patch for uboot ums : https://pastebin.com/rZ3R3zRs
> >
> > Here's code for the server https://github.com/ravikp7/node-beagle-boot ,
> > it currently works only on Linux.
> >
> > I need help in fixing this.
> >
> > Thanks
> > Ravi Kumar
> >
> >
More information about the U-Boot
mailing list