<apritzel>
gediz0x539: the BROM needs to set some bits correctly in EXT_CSD, I guess newer eMMC is more picky about this
<JuniorJPDJ>
apritzel: I'm including "sun6i-reference-design-tablet.dtsi" which has it defined
<gediz0x539>
apritzel: okay. boot0 and boot1 partitions aren't usable to store spl/u-boot proper IIUC
<gediz0x539>
i'll try to boot from data partition
<apritzel>
JuniorJPDJ: what about the usb0...supply properties? I guess you compared against the other .dts advertising USB OTG? like sun6i-a31s-primo81.dts
<apritzel>
gediz0x539: yeah, not sure the A20 BROM actually supports the boot partitions. But still eMMCs use a slightly different logical protocol compared to SD cards
<apritzel>
gediz0x539: so even when the BROM reads from the data partition there might be issues
<apritzel>
gediz0x539: on newer SoCs the BROM works fine with the boot partitions, it's just that U-Boot needs some help to detect that case
<apritzel>
jernej: it's one patch that actually might conflict with the series ;-)
<apritzel>
jernej: but yes, it helps a bit. The actual issue to solve though is to detect that we booted from the eMMC boot partition, since the BROM doesn't differentiate in the boot source byte (+0x28)
netlynx has quit [Quit: Ex-Chat]
<Pinchiukas>
How do I create a new device page? Just go to the desired URL, select "edit" and paste in the "new device template"?
<libv>
TX is probably hiding under the MAC address sticker
<libv>
just get a 3-pin terminal block, use hot-glue to stick it on the board somewhere flat and save, and then solder on some enamel wires with a good fine soldering iron
<libv>
and then hotglue the freshly soldered terminal block
<Pinchiukas>
I hope I won't have to depend on using the UART. I don't even own a soldering iron let alone have skills to solder.
<libv>
and then crimp the cables for your uart adapter accordingly
<libv>
Pinchiukas: anyone you know maybe?
<Pinchiukas>
Not sure. Currently writing a BananaPI Armbian image to a sdcard and expecting the world from that. :D
<asdf28>
Pinchiukas: thanks for making new page!
<Pinchiukas>
No worries, you guys help me out so much it's the least I could do. :)
<asdf28>
allwinner a20 forever
<libv>
i'm not sure i still have the hyundai A7 still
<apritzel>
Pinchiukas: I wonder if just adding the normal de and hdmi nodes to the DT make it already work under Linux, I don't see HDMI needing regulators on other A20 devices
<KotCzarny>
Pinchiukas: if you cant solder you can try ghetto connecting
<libv>
that's the one that's referenced in the howto with the obvious uart and jtag pads
<KotCzarny>
and it worked long enough to do what i needed
<karlp>
impressive :)
<KotCzarny>
it had to be pressed on, but.. :)
<libv>
KotCzarny: enamel wire is much more useful
<libv>
you can burn off the enamel where you want to solder
<KotCzarny>
sure, but this i had on hand
<KotCzarny>
and as i've said, worked for me
<libv>
i soldered a rom onto a hdmi edid-fake device for fosdem like that
<libv>
don't think i ever posted pictures
<karlp>
yeah, I'e even just held soem pins in palce and hit things with one hand.... not much fun though...
<libv>
and top tip for hot glue
<libv>
it will go all blobby and intransparent and stuff when you want to embed something in it
<libv>
heat-gun.
<KotCzarny>
if i ever learn how to solder.. so many ideas mmm
<libv>
the desoldering kind
<libv>
that was like a "wtf did i not think of that earlier" for me
<libv>
so if you hot snot something, and it is solid but looks crap, just hit it with your desoldering station until it is as pretty as hot glue can ever get
<karlp>
if it's solid and it looks crap... ignore it :)
<libv>
ah, magnet wire in proper english
<libv>
this is great for getting a permanent and isolated connection to some bigger thing that can hold a proper connector
<Pinchiukas>
Ok I have a linux image in a SD card in the device and it's in FEL mode connected to a linux machine. How do I make it boot from SD now?
<KotCzarny>
it should boot from sdcard without any mumbojumbo
prefixcactus has quit [Ping timeout: 260 seconds]
<Pinchiukas>
It didn't. Booted to the Android in it regularly.
<asdf28>
Pinchiukas maybe hold the button on the PCB?
prefixcactus has joined #linux-sunxi
<KotCzarny>
are you sure the image is bootable?
<Pinchiukas>
If I power it on while holding the button it "boots" in FEL mode.
<KotCzarny>
you can load spl/uboot/kernel/ramdisk with fel via usb
<apritzel>
Pinchiukas: where did you get your "Linux image" from
<Pinchiukas>
I did this: dd if=Armbian_21.02.3_Bananapi_focal_current_5.10.21.img of=/dev/disk2 bs=1k seek=8
cnxsoft has quit [Read error: Connection reset by peer]
<KotCzarny>
wrong
<KotCzarny>
drop the seek param
<Pinchiukas>
I was told by apritzel to use it.
<KotCzarny>
unless its image of the single partition
<apritzel>
Pinchiukas: for the U-Boot generated image
<Pinchiukas>
Oh, ok. Lemme retry.
<apritzel>
Pinchiukas: those images are typically complete SD card images, starting at the first sector, containing the partition table and everything
cnxsoft has joined #linux-sunxi
<apritzel>
Pinchiukas: this one definitely is, it has a partition table first, and the eGON magic is at 0x2000
alexxy has quit [Quit: No Ping reply in 180 seconds.]
alexxy has joined #linux-sunxi
dev1990 has quit [Read error: Connection reset by peer]
<JuniorJPDJ>
and for writing that big images try bs=4M
<Pinchiukas>
I had a breakthrough! It booted up from the SD card and I can see stuff happening. It's just that for some reason it's trying to PXE boot... :/
<JuniorJPDJ>
1k will be like an ethernity to flash
<JuniorJPDJ>
Pinchiukas: cool :D
dev1990 has joined #linux-sunxi
<Pinchiukas>
I guess maybe I should try a different image?
<apritzel>
Pinchiukas: so you see U-Boot via HDMI? What does it say before it's trying to PXE? It should try the SD card first ...
<asdf28>
i always wondered what the dts files in u-boot source are for
<KotCzarny>
asdf28: for bringing devices up. you can boot other things from uboot, not only linux
<apritzel>
Pinchiukas: don't bother, I can send you some hacked DTB in a minute
<apritzel>
asdf28: U-Boot uses a DTB for itself, we try to regularly sync this from the kernel
<apritzel>
asdf28: you can even use that DTB for the kernel as well, it's at $fdtcontroladdr
<asdf28>
interesting, i didnt know that. and the one that it uses for itself is embedded in the .bin file that you write to the SD card?
<apritzel>
asdf28: it's appended right after the U-Boot proper binary
<apritzel>
asdf28: if you use binwalk on the image, it finds it
<Pinchiukas>
As I understand I'll need to hack it into the image somehow, correct?
<apritzel>
Pinchiukas: just dd'ing to the SD card
<Pinchiukas>
Sweet!
<apritzel>
bloody checksums, need to repackage it ...
pdp7 has joined #linux-sunxi
<Pinchiukas>
I remember reading a pretty good article how the bios/grub/mbr boot worked. Is there something that'd help me understand how things boot here?
<apritzel>
it's completely different
wigyori has joined #linux-sunxi
<Pinchiukas>
Yeah i see that already. :) It would be nice to understand it.
<apritzel>
Pinchiukas: I don't have a comprehensible source at hand, but if you click around http://linux-sunxi.org/Category:Boot you find some breadcrumbs to follow
rellla has joined #linux-sunxi
<Pinchiukas>
Might not be enough for me but I'll try. :)
<Pinchiukas>
Suppose I'm debootstrapping my own OS, how would I build a DT file?
<apritzel>
Pinchiukas: mostly you start by copying one that is close, then amend it
<Pinchiukas>
I guess in a way I might need to do that anyway since there isn't really one specifically for my device. What would be the best starting point?
<apritzel>
Pinchiukas: well, since you booted with that, I'd use the sun7i-a20-bananapi.dts. Copy that, and go through it, trying to understand what each nodes does
<apritzel>
Pinchiukas: for most parts you can just use what's in there. First I'd remove the serials other than uart0
<apritzel>
and you need to learn as much as possible from the existing system
<Pinchiukas>
Yeah, that was the idea. Not sure how successful I'll be in understanding but I'll try. :) I was just thinking that maybe there's a device that's closer to mine than the BPi.