<Armbian-Discord>
<c0rnelius> Yeah that LED mess on the zero is something else. i remove it from the DTS and use an overlay depending on the revision I'm messing with.
<Armbian-Discord>
<Tonymac32> Probably the best option
<Armbian-Discord>
<c0rnelius> pretty much the only option that makes any sense.
<Armbian-Discord>
<Aoyfe> Okies, so Armbian won't boot from USB on my ODroid HC4. u-boot gives me the following on the serial console:
<Armbian-Discord>
<Aoyfe> ```
<Armbian-Discord>
<Aoyfe> => usb start
<Armbian-Discord>
<Aoyfe> starting USB...
<Armbian-Discord>
<Aoyfe> Bus usb@ff500000: Register 3000140 NbrPorts 3
<Armbian-Discord>
<Aoyfe> Starting the controller
<Armbian-Discord>
<Aoyfe> USB XHCI 1.10
<Armbian-Discord>
<Aoyfe> scanning bus usb@ff500000 for devices... cannot reset port 2!?
<Armbian-Discord>
<Aoyfe> 1 USB Device(s) found
<Armbian-Discord>
<Aoyfe> scanning usb for storage devices... 0 Storage Device(s) found
<Armbian-Discord>
<c0rnelius> if you run env print "i believe" it gives you the if fi to run to start from it. I had to do it a few times when I bricked something. I can't recall off the top of my had the whole statement.
<Armbian-Discord>
<c0rnelius> this doesn't look very good scanning bus usb@ff500000 for devices... cannot reset port 2!?
<Armbian-Discord>
<Aoyfe> Yeah, if I unplug the UFD and then run usb reset on the u-boot console, that goes away.
<Armbian-Discord>
<Aoyfe> However, the UFD is correctly detected if I boot Armbian from an SD card.
<Armbian-Discord>
<c0rnelius> sounds likely its something not enabled in u-boot then.
<Armbian-Discord>
<Aoyfe> Exciting.
<Armbian-Discord>
<c0rnelius> does it boot from USB when using petitboot?
<Armbian-Discord>
<c0rnelius> if it was easy it would just work out of the box.
<Armbian-Discord>
<Aoyfe> If it was easy I wouldn't be on Day 3 of trying to get all this to work. 😄
<Armbian-Discord>
<Aoyfe> Looks like the answer is "add support for this UFD to u-boot or buy another one", from the look of things?
<Armbian-Discord>
<c0rnelius> basically, yes.
<Armbian-Discord>
<Aoyfe> Wonder why it works in Linux
<Armbian-Discord>
<c0rnelius> what exactly is on the USB?
<Armbian-Discord>
<c0rnelius> how is the filesystem structured ?
<Armbian-Discord>
<c0rnelius> there is an auto in the usb start statement I suggested that just looks for something it knows and runs with it. In my case I had a FAT boot partition with an extlinux.conf file on it. It booted right up.
<Armbian-Discord>
<Aoyfe> It's Armbian on the USB stick
<Armbian-Discord>
<Aoyfe> I ran usb start though, which will just scan for devices without trying to boot from them
<Armbian-Discord>
<c0rnelius> so ext4. a ROOTFS and /boot. No specific designated BOOT partition.
<Armbian-Discord>
<Aoyfe> Yeah, that's right
<Armbian-Discord>
<Aoyfe> But I'm getting that error message when I just scan the USB bus./
<Armbian-Discord>
<c0rnelius> I can't say for sure as I haven't played around enough with it, but I can say when I had a BOOT partition it worked everytime.
<Armbian-Discord>
<c0rnelius> Yeah thats a problem. I don't know.
<Armbian-Discord>
<Aoyfe> Did you wipe SPI?
<Armbian-Discord>
<c0rnelius> The board I was doing this on doesn't have SPI. Same SoC though. I don't see why that would matter to much if it wiped. The whole reason to wipe is to make it not register.
<Armbian-Discord>
<Aoyfe> If it's wiped then it's booting directly from u-boot on the USB stick rather than trying to scan USB devices afterwards.
<Armbian-Discord>
<c0rnelius> Well thats a good point. How are you loading u-boot? emmc or sd?
<Armbian-Discord>
<c0rnelius> In my case it was flashed to eMMC and booting USB.
<Armbian-Discord>
<Aoyfe> flashed to SPI from an sdcard-booted Armbian install
<Armbian-Discord>
<c0rnelius> ah... hmm. beyond my scope of understanding then 🙂
<Armbian-Discord>
<c0rnelius> So beyond having a recovery option whats the need to boot from USB? I always find it super strange that so many people want to do this on arm devices.
<Armbian-Discord>
<Aoyfe> sdcards are absolute ass as root media. 🙂
<Armbian-Discord>
<c0rnelius> the Hc4 does have an eMMC option right and if using pboot I thought they could run the whole OS off the SATA.
<Armbian-Discord>
<Aoyfe> It does, but I specifically don't want to use the SATA drives for boot media because of Ceph
<Armbian-Discord>
<c0rnelius> but you could put a boot partition on the emmc and then the rootfs on the sata. best of both worlds and nothing hanging off the board.
<Armbian-Discord>
<Aoyfe> No, Ceph wants the entire drive. 🙂
<Armbian-Discord>
<c0rnelius> I see
<Armbian-Discord>
<Aoyfe> As does Talos
<Armbian-Discord>
<Aoyfe> So UFD as the boot media gives me something small and easy to work with as the rootfs/boot device, then Ceph deals with bulk storage.
<Armbian-Discord>
<Aoyfe> @rpardini Any thoughts here? u-boot gives back weird things when I look at the USB hub:
<Armbian-Discord>
<Aoyfe> ```
<Armbian-Discord>
<Aoyfe> => usb info
<Armbian-Discord>
<Aoyfe> 1: Hub, USB Revision 3.0
<Armbian-Discord>
<Aoyfe> This appears to affect booting from my UFD.
Armbian-Discord has quit [Remote host closed the connection]
Armbian-Discord has joined #armbian-amlogic
<Armbian-Discord>
<rpardini> Nah. I haven't plugged anything into my HC4's USB2 port for years. Try: update u-boot, first to 22.10, then to 23.01, then go hunting for patches. A fix/revert for the HC4 usb has posted to kernel list -- that might take a while to trickle down to u-boot sources.
<Armbian-Discord>
<narmstrong> Hmm I think I never tested the usb on the hc4 since boot from usb, I’ll have a try this week
<Armbian-Discord>
<Aoyfe> USB works once I'm in Linux, it just doesn't work in u-boot.
<Armbian-Discord>
<Aoyfe> The problem appears to be that u-boot doesn't have a driver for it, which is sort of interesting since the vendor ID indicates it's a "Linux Foundation root hub"
<Armbian-Discord>
<rpardini> That 1: Hub, USB Revision 3.0 there could indicate a C4 thing leaking into the HC4, maybe...?
<Armbian-Discord>
<Aoyfe> I think the ethernet and a couple other devices are on USB.
<Armbian-Discord>
<Tenkawa> Sounds like Broadcom....
<Armbian-Discord>
<Tenkawa> heh
<Armbian-Discord>
<Tenkawa> Why would they want to be like them
<Armbian-Discord>
<Tonymac32> Drivers maybe, but I feel like anything before these newest Amlogics were supported fast enough not to f around with that
<Armbian-Discord>
<c0rnelius> Hmm. I just booted the Le Potato using USB. Must be able to do it on the HC4.
<Armbian-Discord>
<Aoyfe> Yeah, I'm sure it's possible, just seems weird that it doesn't work out of the box
<Armbian-Discord>
<rpardini> yeah but that's kernel and I'm sure if/how does that apply to u-boot, or if that's reverting something that never ever made it to u-boot, etc.
<Armbian-Discord>
<Aoyfe> This is the part where I sheepishly admit that I have never dealt with diffs from an e-mail list before. Is there any way to easily take the patch body in that email and apply it to the u-boot source?
<Armbian-Discord>
<rpardini> dude it's 2 lines, don't overcomplicate things
<Armbian-Discord>
<Aoyfe> Fair 😛
<Armbian-Discord>
<rpardini> "how can I apply a patch to a file in a project to another"
<Armbian-Discord>
<rpardini> 😛
<Armbian-Discord>
<Aoyfe> I'm trying to generate the patch so that I can leverage Talos' build chain.
<Armbian-Discord>
<rpardini> append .patch to the commit URL in github or such
<Armbian-Discord>
<Aoyfe> All good, just manually made the changes locally and generated the patch
<Armbian-Discord>
<c0rnelius> The way I got this to work was creating a boot img "contains a boot script" for SD and then flashing the OS to USB. So it boots from SD first, finds the script and loads the USB.
<Armbian-Discord>
<c0rnelius> there is nothing on the SD but the script and I flashed u-boot to it.
<Armbian-Discord>
<Aoyfe> Right, the problem here seems to be that u-boot has no idea how to deal with the USB hub.
<Armbian-Discord>
<Aoyfe> So it doesn't even detect that there's a USB device there to boot from.
<Armbian-Discord>
<c0rnelius> it looks disabled in the dts ```
<Armbian-Discord>
<c0rnelius> &usb2_phy0 {
<Armbian-Discord>
<c0rnelius> status = "disabled";
<Armbian-Discord>
<c0rnelius> };
<Armbian-Discord>
<c0rnelius> ```
<Armbian-Discord>
<c0rnelius> Hmm. I got this Tritium H5 to USB boot as well. I suspect you just need to patch that DTS u-boot file.
<Armbian-Discord>
<Aoyfe> Yeah the patch from my link looks like it enables it. I'll test it shortly
<Armbian-Discord>
<c0rnelius> ah i guess I should have read up. didn't notice ur link.