# Issue TFTP booting from SPL

**URL:** <https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469>\
**Category:** Linux Discussions\
**Created:** [October 14, 2020, 5:14pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469 "2020-10-14T17:14:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 5:14pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/1 "2020-10-14T17:14:55Z")

</div>

Hey all (Robert)

I have a board that I’m trying to TFTP the spl and u-boot and have two issues I’ve been trying to work on. I’m using u-boot 2020.10 mainline so not exactly what’s prescribed here but I think it’s pretty similar.

I’m getting spl TFTP’d to the AM3352 no problem, but then it looks like spl can’t get ‘ethaddr’ so when it sends BOOTP requests they don’t go anywhere, and obviously can’t load u-boot.img.

Here’s the boot log:

 ![image](https://global.discourse-cdn.com/digikey/original/2X/a/a1d079719caf337c6a0034522b5149e034107864.png)

I guess my question is where should spl be getting env variables from? I tried doing set\_env(“ethaddr”, “00:11:22:33:44:55”); in “spl\_start\_uboot()” but it didn’t change anything.

Second question is when I compile I don’t seem to be getting u-boot.img for some reason. I assume that’s a setting somewhere?

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 14, 2020, 5:36pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/2 "2020-10-14T17:36:32Z")

</div>

Hi @AdamGerken, very strange, sadly I haven’t tried tftp on mainline in a while, I do know that it works over the usart:

> [@'CCC...' is not displayed in uart0 booting mode](https://forum.digikey.com/t/ccc-is-not-displayed-in-uart0-booting-mode/8438/10):
>
> Hi @dzhou, that was a little painful, but i also got it working: Using v2020.10-rc3 of [https://github.com/u-boot/u-boot](https://github.com/u-boot/u-boot) with the default am335x\_evm\_defconfig so no changes required. On Debian install: sudo apt install picocom lrzsz Verify board is sending a string of “CCC’s”… Un-power board, make sure it’s powered down Start Picocom: picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv" In picocom, Press CTRL+A; CTRL+S; transfer u-boot-spl.bin from u-boot/spl/ Plug in/power board, and wait…

and it did build the u-boot.img…

Normally ethaddr get’s set in u-boot.img:

```auto
Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
Net: eth2: ethernet@4a100000, eth3: usb_ether

```

Okay, time to fire up a tftp server and test some things…

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 5:41pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/3 "2020-10-14T17:41:03Z")

</div>

I just did away with the EEPROM checks all together in my board.c so maybe that’s the issue?

I can serial load u-boot-spl.bin and u-boot.bin with no issues at all. I can then TFTP load the Kernet, etc. I think (hope) my last issue is getting spl to TFTP u-boot

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 14, 2020, 5:43pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/4 "2020-10-14T17:43:32Z")

</div>

> [@AdamGerken](#):
>
> I just did away with the EEPROM checks all together in my board.c so maybe that’s the issue?

as long as that means it uses the “BeagleBone Black” DDR/Ethernet defaults, it’d expect it to work.

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 5:50pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/5 "2020-10-14T17:50:52Z")

</div>

Yes, the DDR init is now just hardcoded to use the right parameters, and that seems to work. There doesn’t appear to be any Ethernet related stuff in the board.c that applies any more.

There is some stuff that’s excluded by “if(board\_is\_ice2())” as well as the CPSW platdata that is untouched but shouldn’t be included due to #if !CONFIG\_IS\_ENABLED(OF\_CONTROL)

Which leaves the reading of the mac from the efuse which doesn’t run in SPL.

I hardcode the env board\_name in board\_late\_init() maybe that has some knock-on effect?

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 6:31pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/6 "2020-10-14T18:31:49Z")

</div>

Ok so I have CONFIG\_SPL\_ENV\_IS\_NOWHERE so the env should be in the spl binary. Any idea where this is set?

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 7:42pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/7 "2020-10-14T19:42:47Z")

</div>

Found this topic: [https://patchwork.ozlabs.org/project/uboot/patch/20191021232652.132164-4-sjg@chromium.org/](https://patchwork.ozlabs.org/project/uboot/patch/20191021232652.132164-4-sjg@chromium.org/)

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 14, 2020, 7:57pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/8 "2020-10-14T19:57:51Z")

</div>

Ok, adding` # CONFIG_SPL_USE_TINY_PRINTF is not set` got rid of the error in spl but I’m still not seeing the BOOTP messages from spl, only the ROM ones.

 ![image](https://global.discourse-cdn.com/digikey/original/2X/5/5076027acf0ff12583fdebb5c22003a56dcd99fd.png)

I’m still not convinced spl has an ethaddr set, which wouldn’t allow it to talk to the server, no? Do you know how spl gets its env variables? Even just a dummy MAC should be fine.

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 14, 2020, 8:23pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/9 "2020-10-14T20:23:39Z")

</div>

> [@AdamGerken](#):
>
> I’m still not convinced spl has an ethaddr set, which wouldn’t allow it to talk to the server, no? Do you know how spl gets its env variables? Even just a dummy MAC should be fine.

It’ll should have a default MAC from the bootrom… Sorry i haven’t worked enough on this boot method, ravikp7 used the vid/pid for identification:

> **[GitHub - ravikp7/node-beagle-boot: A node.js USB bootloader server for...](https://github.com/ravikp7/node-beagle-boot)**
>
> A node.js USB bootloader server for BeagleBone for booting it into mass storage mode - GitHub - ravikp7/node-beagle-boot: A node.js USB bootloader server for BeagleBone for booting it into mass sto...

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 15, 2020, 2:55pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/10 "2020-10-15T14:55:52Z")

</div>

@RobertCNelson I’m trying to see why ethernet isn’t working in 2020.10 spl. I’m looking through your u-boot source/patch and see that there’s a large section of CPSW code that is #ifndef’d out by `CONFIG_DM_ETH` however there are no DM configs in the am335x\_evm\_defconfig, and only GPIO and SERIAL in arch/arm/mach-omap2/am335x/Kconfig so I’m assuming you don’t use DM for the ethernet drivers? Have you ever tried DM? I’m starting to think that even though DM\_ETH was required from 2020.07 onwards and appears to have been updated it isn’t actually supported.

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 15, 2020, 3:08pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/11 "2020-10-15T15:08:10Z")

</div>

> [@AdamGerken](#):
>
> Have you ever tried DM? I’m starting to think that even though DM\_ETH was required from 2020.07 onwards and appears to have been updated it isn’t actually supported.

DM\_ETH is the only option after 2019.04, that’s one reason why we still use that old version for [BeagleBoard.org](http://BeagleBoard.org)…

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 15, 2020, 3:18pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/12 "2020-10-15T15:18:17Z")

</div>

I understand. Such a pain. It works perfectly in u-boot, just doesn’t work in spl. Someone has been doing a lot of work on the am335x\_evm platform in the latest u-boot so hopefully soon TI will be catching up with the times.

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 2:40pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/13 "2020-10-16T14:40:58Z")

</div>

Hey @RobertCNelson, Happy Friday. I diverted back to your 2019.04 plus patches and hardcoded the board.c for my board, all is working great now. So I think, for future reference, 2020.10 doesn’t really support DM Ethernet in SPL, even though it appears to. Oh well.

I do have two hopefully quick questions about 2019.04 now…

1. I always get `RTC 32KCLK Source: External.` Even though I don’t have an external RTC. I added in `CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC` in hopes that rtc32k\_enable would kick in and enable the internal RTC. I do have an OSC hooked up so it _should_ work, but `board_init` always reports External.

EDIT: never mind on the RTC. I was writing 1 to bit 3, instead of a 0. Real RTFM moment.

1. My MMC1 bus, which is an eMMC like the BBB, reports that it’s using a 4-bit bus. Is there anyway to tell it to use 8? I can confirm with 2020.10 and the DM\_MMC with dts that the 8-bit mode is working.

Thanks!

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 16, 2020, 2:53pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/14 "2020-10-16T14:53:18Z")

</div>

> [@AdamGerken](#):
>
> My MMC1 bus, which is an eMMC like the BBB, reports that it’s using a 4-bit bus. Is there anyway to tell it to use 8? I can confirm with 2020.10 and the DM\_MMC with dts that the 8-bit mode is working.

Humm, it should be in 8-bit mode based on:

> <https://github.com/u-boot/u-boot/blob/3c99166441bf3ea325af2da83cfe65430b49c066/board/ti/am335x/board.c#L1058-L1086>

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 2:58pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/15 "2020-10-16T14:58:15Z")

</div>

Yeah, that’s what I thought. I still have that in my board.c but:

![image](https://global.discourse-cdn.com/digikey/original/2X/9/9397a515b302bf3c7e956a2b94b129332acc0ecd.png)

I tried adding #define CONFIG\_HSMMC2\_8BIT to board.h per: [https://lists.denx.de/pipermail/u-boot/2013-August/160783.html](https://lists.denx.de/pipermail/u-boot/2013-August/160783.html) but that didn’t help.

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 3:30pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/16 "2020-10-16T15:30:48Z")

</div>

Thought I had it… CONFIG\_OF\_CONTROL was set, but un defining that doesn’t help.

I do get: `No match for driver 'omap_hsmmc'` for both in my boot log but I don’t think that’s the issue, right?

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [October 16, 2020, 4:37pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/17 "2020-10-16T16:37:30Z")

</div>

Do you need 8-bit mode in u-boot, as the kernel has it’s own pinmux, thus this would only affect u-boot…

Regards,

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 4:39pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/18 "2020-10-16T16:39:20Z")

</div>

Not really “need” but the board is going to boot from eMMC and u-boot is going to flash the eMMC image from TFTP so a little extra speed would be nice…

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 6:02pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/19 "2020-10-16T18:02:14Z")

</div>

Any other clues or places to look? I’ve tried a bunch of stuff now and nothing is helping. Enabling HS400, etc…

---

<div class="post-metadata">

**Author:** ![AdamGerken](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AdamGerken](https://forum.digikey.com/u/AdamGerken)\
**Post date:** [October 16, 2020, 8:54pm UTC](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469/20 "2020-10-16T20:54:08Z")

</div>

@RobertCNelson does the BBB use all 8-bits? I can’t figure out what is different between my build and the am335x\_evm build…

[Next page](https://forum.digikey.com/t/issue-tftp-booting-from-spl/9469.md?page=2)
