<noocsharp>
Hi, I'm trying to build crust meta and install it on an sd card for the pinephone. u-boot says "MMC Device 0 not found". I'm not sure how to interpret this. I know the card works, and the "eGON" magic is in the same place as a functional card. What else could be causing this?
<apritzel>
noocsharp: which version of U-Boot is this using?
<hauke>
is the D1 similar to the other allwinner SoCs just with a RISC-V core instead of a ARM?
<hauke>
I would like to add OpenWrt support for this D1 dev board and want to use upstream + some patches, but not the allwinner code
<hauke>
I do not want to touch the wifi ;-)
<apritzel>
hauke: yes, in fact it has two (disabled?) A7 cores on the die, and there is a sibling chip which uses exactly those two cores
<hauke>
apritzel: lol, didn't know there are A7 cores in the chip
<hauke>
Are the peripherals just an extension of some previous generation?
<apritzel>
hauke: but as usual Allwinner changes random bits here and there, as they do with so every new "generation"
<MoeIcenowy>
apritzel: hahahaha
<MoeIcenowy>
what I am most afraid of now is DRAM controller
<apritzel>
yes, the devices are very similar, yet still many of them require code changes to work
<hauke>
apritzel: ok thanks
<MoeIcenowy>
sent RFC patches to give mkimage -T sunxi_egon RV support
<apritzel>
MoeIcenowy: aparts from some rebasing artefacts (s/Aflags/Aflag/) looks alrightt
<apritzel>
thanks for keeping compatibility!
<apritzel>
MoeIcenowy: and I see now what you meant with the weird immediate encoding ;-)
<MoeIcenowy>
apritzel: I think there's rumors saying that this immediate encoding is friendly to silicon implementation
<gamiee>
immediate encoding? :o
<MoeIcenowy>
gamiee: we are discussing RISC-V
<vagrantc>
so curious to see #linux-sunxi move on to supporting RISC-V
<apritzel>
vagrantc: move? I hope it's copy
<vagrantc>
hah
<vagrantc>
it's just the community has been so associated in my mind with ARM
<MoeIcenowy>
sunxi is so associated with ARM that my patch must consider ARM as a default fallback value
<MoeIcenowy>
oops D1 BSP fails to build on my host with GCC 10
<MoeIcenowy>
my uart0-helloworld-sdboot port for D1 suddenly stopped working...
<apritzel>
MoeIcenowy: could that be problem due to the late (or early?) time over there at you? :-D
<MoeIcenowy>
oooops
<MoeIcenowy>
it's power issue
<MoeIcenowy>
my PC Vbus seems to be not powerful enough
<apritzel>
vagrantc: challenge of the day: find a "deflector" instruction encoding that is a branch in ARM32 and some NOP-like instruction in RISC-V (or the other way around)
<apritzel>
vagrantc: so that you can have a single image that boots on Allwinner ARM and RISC-V chips
<vagrantc>
hah!
<vagrantc>
at least with the sifive boards they use some special partition header ... so it might work at arbitrary offsets
<apritzel>
shouldn't be too hard, given that RV has the opcode in the low bits, and ARM in the high bits
<MoeIcenowy>
I think Si5 boards can parse GPT
<apritzel>
but AW chose the same BootROM payload format (magic and checksum)
<MoeIcenowy>
which is just powerful
<apritzel>
and actually we need both of them to be some kind of branch instructions
<apritzel>
MoeIcenowy: sure, that's how you would design
<apritzel>
but this is Allwinner, go figure!
<vagrantc>
the love/hate relationship of sunxi and allwinner
<MoeIcenowy>
apritzel: well I think parsing GPT is overkill
<apritzel>
but elegant and future proof
<apritzel>
RPi parses MBR only, IIRC
<apritzel>
and just reading GPT is straight forward
<vagrantc>
i vaguely recall allwinner offsets conflicting with default GPT partition tables
<MoeIcenowy>
vagrantc: well to prevent this they provided a new possible offset for BL
<vagrantc>
an excercise in going crazy with offsets
<apritzel>
vagrantc: the default 8K is within the normal GPT allocation, although you can construct a GPT with less entries
<apritzel>
or just use the 128KB offset, and be well behind the GPT
<vagrantc>
for both allwinner and rockchip i'm starting to wonder if i shouldn't default to some non-default offsets :)
<jernej>
MoeIcenowy: what kind of problems do you have with DRAM? is it similar to some DW controller we already know?
<MoeIcenowy>
jernej: I cannot RE the file now
<MoeIcenowy>
it uses T-Head extension
<MoeIcenowy>
BTW, bad news, jumping to 0x20 to enter FEL seems to be not working on D1
<jernej>
MoeIcenowy: are those instructions used all over the place or just here and there?
<MoeIcenowy>
all over the place
<MoeIcenowy>
the compiler seems to be made to utilize it
<jernej>
it seems that AW makes DRAM RE process more challenging with every new SoC :)
jernej_ has joined #linux-sunxi
jernej has quit [Read error: Connection reset by peer]
<apritzel>
MoeIcenowy: what do those custom instructions do?
jernej_ is now known as jernej
<MoeIcenowy>
apritzel: various
BorgCuba has joined #linux-sunxi
<BorgCuba>
so this is the official channel but freenode went to libera I read?
<MoeIcenowy>
BorgCuba: freenode is still freenode, it's just no the original freenode
<MoeIcenowy>
some people from freenode created libera
<MoeIcenowy>
but it's the channel users' choice to switch to libera, oftc, etc
<BorgCuba>
sure
<BorgCuba>
how is the h616 port progressing?
<cyrozap>
MoeIcenowy: When you say "T-Head extension", what do you mean, exactly? Does T-Head have a custom RISC-V extension? If it's documented somewhere, support could be added to Ghidra to disassemble/decompile it.
<BorgCuba>
I will look it up on the site
<MoeIcenowy>
cyrozap: it's documented, in Chinese
<apritzel>
BorgCuba: I posted v7 on Tuesday, but it will most likely miss 5.14
<apritzel>
BorgCuba: there might be a chance to get minimal support into (MMC, and GBit Ethernet, but no USB, no RTC), but I am not sure it's worth it
<apritzel>
(and it's not my decision anyway)
<cyrozap>
MoeIcenowy: Oh, heh. Well, if you have a link to it, I might try adding the processor variant to Ghidra.
<BorgCuba>
apritzel, I tried your kernel last year in december (5.10) on my h313 device
<apritzel>
BorgCuba: X96Q?
<BorgCuba>
Yes, I think so
<BorgCuba>
the dirty cheap one ;-)
<apritzel>
that's the one ;-)
<apritzel>
in eBay search for "Allwinner", sort by price ;-)
<BorgCuba>
I think you or sb else mentioned that panfrost might work as well?
<apritzel>
reportedly, somewhat
<apritzel>
but you definitely need kernel patches for the display engine and HDMI
<BorgCuba>
I see, so you have not tested it I guess
<apritzel>
unless you are happy with pure to-memory 3D rendering, which is a bit like looking at the Matrix in its encoded way ;-)
<apritzel>
I briefly tried some patches from jernej, but just got a black screen, although this is supposed to work (other people seem to be able to use it)
<BorgCuba>
indeed, I think it was jernej. I have to consult the logs
<apritzel>
but I haven't tried hard, and I prefer serial anyway ;-)