<Craphunzio>
Hello everyone. I am trying to work on a board I own, this is my first ever attempt to do anything similar.
<Craphunzio>
The board is naed Sg.Gme.R3.95h5a/tw. It is not listed in the wiki and it is not an Android board. According to what I found on the wiki, that is the most common (if not the only?) type of board dealt with in this project, is that correct? My board is a retrogaming console, namely a "pandora's box".
lkcl has joined #linux-sunxi
<Craphunzio>
That runs an A13 SoC and it has been "hacked" already. It runs the kernel and everything from a SD card and there are images that work fine by replacing the original one provided with the board. I would like to develop mine though so here I am searching for hints. Thanks to anybody.
chewitt has quit [Ping timeout: 240 seconds]
lurchi_ has quit [Ping timeout: 258 seconds]
kaspter has quit [Ping timeout: 258 seconds]
kaspter has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
<plaes>
Craphunzio: please start with the wiki page :)
kaspter has quit [Ping timeout: 265 seconds]
niceplaces has quit [Ping timeout: 256 seconds]
niceplace has joined #linux-sunxi
AneoX has joined #linux-sunxi
lurchi_ has quit [Ping timeout: 264 seconds]
lkcl has quit [Ping timeout: 240 seconds]
reinforce has quit [Quit: Leaving.]
JohnDoe_71Rus has joined #linux-sunxi
lkcl has joined #linux-sunxi
chewitt has joined #linux-sunxi
Nakaori has quit [Remote host closed the connection]
Nakaori has joined #linux-sunxi
tuxd3v has joined #linux-sunxi
kaspter has joined #linux-sunxi
lucascastro has joined #linux-sunxi
arti has quit [Ping timeout: 264 seconds]
arti has joined #linux-sunxi
AneoX has quit [Ping timeout: 264 seconds]
AneoX has joined #linux-sunxi
febs has quit [Remote host closed the connection]
<Craphunzio>
plaes: you mean by creating a wiki page?
<diego71>
Craphunzio: yes that would be nice
cmeerw has joined #linux-sunxi
<Craphunzio>
diego71 (are u italian by any chance btw?) that sounds like hell of a lot of work :sweat; but let's try that :-D
<asdf28>
i think plaes meant start reading the wiki page, not creating one
<asdf28>
?
<asdf28>
because you were asking for info
<Craphunzio>
asdf28 well I did but I'm still quite clueless. I am creating a new page though with the few infos I got
Craphunzio has quit [Ping timeout: 240 seconds]
lurchi_ has joined #linux-sunxi
Craphunzio has joined #linux-sunxi
<asdf28>
a good starting point would be to look at how the images you already have were built
<asdf28>
if they were built using a build system, you can look at that to see how it's done
<asdf28>
as soon as you understand it, you can play around and exchange parts of it to your liking
<asdf28>
a build system is a set of scripts that automates all the parts of creating an embedded linux system
<asdf28>
which is very complicated, at least to me
<asdf28>
if you're into retro gaming, you could have a look at lakka. you could download it and add your own board to the config files to build your own image
BorgCuba has joined #linux-sunxi
dev1990 has quit [Excess Flood]
dev1990 has joined #linux-sunxi
tuxd3v has quit [Ping timeout: 258 seconds]
Putti has quit [Remote host closed the connection]
selfbg has joined #linux-sunxi
Putti has joined #linux-sunxi
selfbg has quit [Client Quit]
\\Mr_C\\ has quit [Quit: (Read error: Connection reset by beer)]
selfbg has joined #linux-sunxi
selfbg has quit [Client Quit]
jelly has quit [Remote host closed the connection]
<BorgCuba>
It could be that the FPGA is used for HDMI output since the A13 does not have it (only a guess)
<BorgCuba>
whats on that sd-card?
<BorgCuba>
Craphunzio, but strange indeed
<BorgCuba>
Craphunzio, where did you get it?
<Craphunzio>
I just added a few informations some seconds ago. I got it second hands from a friend which ordered it from china. Those are mainly sold as "pandora's box" but they also have several other names such as "pandora's key"
<Craphunzio>
using an fpga chip that is currently sold at 40+ USD on a board "boasting" an 1.2 USD System-on-chip would be quite absurd
<Craphunzio>
I am afraid I cannot reach out for the SD card right now as it lies in the sleeping baby room (that's also my workshop lol).
<Craphunzio>
I a seeing if I saved some part of it here on my laptop...
tuxd3v has joined #linux-sunxi
<Craphunzio>
I have indeed! I actually found the whole boot partition of the system provided with the board. Would you be interested in taking a look?
<Craphunzio>
(and I also have the "uBoot legacy uImage" of the alternative system.
<Craphunzio>
I am still wondering what that is, if that's the kernel, or the bootloader, or both.
<BorgCuba>
uBoot would be the bootloader
<BorgCuba>
What do you want to do with it?
<BorgCuba>
Have you hooked it up to your tv?
<Craphunzio>
to a monitor, yes. Well I want to play retrogames on it :-D and learning plenty of things in the process.
<asdf28>
finally, someone who wants to play retro games
<BorgCuba>
Same for me :-)
<Craphunzio>
The original system was very limited software-wise. It had a few bugs and a plethora of limitations - you could configure next to nothing
<BorgCuba>
Craphunzio, I have an a13 device myself and I build a minimal rootfs with retroarch
<BorgCuba>
but your challenge will be the fpga!
<Craphunzio>
in the alternative one there's retroarch which can be tuned a lot. But I still find the overall thing bloated (the front-end is good looking but a loss of startup time)
<Craphunzio>
BorgCuba <3 that's what I'm after
<BorgCuba>
Craphunzio, I started downloading buildroot and added retroarch package as well as the mali drivers etc.
<Craphunzio>
a modern version of retroarch (that one is from 2018 afaik) and configured to my taste
<BorgCuba>
does the alt. version have a git repo or is it closed source?
<Craphunzio>
the alt version is totally closed. The discussions about its development happened on a forum that has been taken off the internet and there's no reference in archive.org either to those posts
<Craphunzio>
I meant that that project of "buildrooting retroarch" looks dead
<BorgCuba>
1st step would be to find the serial port on the pcb
<BorgCuba>
and then I would start by preparing a bootable sd-card and see what happens
<Craphunzio>
yup I tried searching for those pins and I have very good candidates, although I could not try them out yet since I'm waiting for my USB-to-Serial adapter from china
<Asara>
~/win 2
<Asara>
sorry :(
<Craphunzio>
that is why I was also trying to reverse-engineer the current SD cards, so to speak. Both use uboot and that's one of the few infos I was able to retrieve so far
<Craphunzio>
oh Borgcuba I misread our post. you built a minimal rootfs not a minimal buildroot image.
<BorgCuba>
thats the same I think
<Craphunzio>
:facepalm:
<BorgCuba>
although somebody may see that different
<BorgCuba>
I think for a13 you can also go with mainline uboot und kernel
<asdf28>
you should take a look at lakka, because this is essentially that. a minimal linux system with retroarch
<asdf28>
and try to add your board, see how it was done for the others
<asdf28>
the advantage is that most of the system is already configured, you only need to tinker with your board-specific settings
<asdf28>
i built lakka for my A20 banana pi this way
lurchi_ is now known as lurchi__
<asdf28>
the problem is that it doesn't work well with the newer mali and lima drivers, so it was useless in the end
<BorgCuba>
asdf28, and you did not make a pull request -> I can see a20 there
<asdf28>
yes i planned to add it some day, but it did not run well, so it makes no sense
<BorgCuba>
but i recently read that lime should be working now?
<BorgCuba>
For the a13 I used mali r4p0 in the end and it was working pretty good
<asdf28>
lima is working, but it's not working well together with the mesa 3D drivers
<asdf28>
maybe it's just me, but i could not get it working on my allwinner and amlogic boards
<BorgCuba>
some ps1 games played mostly smooth
<asdf28>
it's very choppy on my A20, and on my amlogic box all games are running too fast
<asdf28>
performance (in raw fps) is very good on both devices
<asdf28>
but it's not playable due to these bugs
<BorgCuba>
strange
<Craphunzio>
asdf28 thanks. Unfortunately the last time I tried it on a raspberry it took a very long time to boot and I am looking for something almost instantaneous. The original SD card system gets me up and playing in like 4 or 5 seconds. The alternative is a tad slower,
<asdf28>
oh.. yes it could be the services that it's loading
<Craphunzio>
I guess I should now read what mali and lima are.
<BorgCuba>
asdf28, s905?
<asdf28>
if you want to go for the fastest boot time, there might be better options
<asdf28>
but i am fine wit it
<asdf28>
yes, an s905x box
<Craphunzio>
nice, Mali is an art Museum in Lima. Very good.
<asdf28>
:->
<asdf28>
mali is the graphics driver from ARM for most allwinner devices, lima is a free open source variant of that, it comes with the linux kernel
<Craphunzio>
oh, thank you very much. And there are not good drivers then for the A13?
<asdf28>
i don't have an A13 board, sorry. you'd have to look at which graphics chip it uses
<asdf28>
but mostly, the stock driver (the one that comes with most pre-installed images) is the one that has the best performance
<BorgCuba>
Craphunzio, I used the r4p0 which was working best from the drivers I tried
<asdf28>
BorgCuba have you tried one of the newer ones?
<asdf28>
how were they?
<BorgCuba>
asdf28, no, I havent been doing anything like that recently
<asdf28>
i was especially interested in the newer drivers that enable KMS mode
<asdf28>
these drivers have the lowest input lag in my experience
<Craphunzio>
I wonder how to reverse-engineer the drivers used in the currently working images. I am trying with binwalk so far with not much succes
<asdf28>
nice, it has a VGA port
<asdf28>
why do you want to reverse engineer them? are they not open source?
<BorgCuba>
maybe the fpga gets its configuration from that so8 chip and the fpga just takes the rgb signals from the a13 and turns them into hdmi output?
<BorgCuba>
then it would be easy
<BorgCuba>
"easy"
<BorgCuba>
Craphunzio, do you use linux or windows or something else?
<Craphunzio>
asdf28 nope they are not open source. More in detail: the original system is not open source. The alternative should be, but all its development has been discussed on a board that is not online anylonger.
<Craphunzio>
I use Linux
<BorgCuba>
thats good
<asdf28>
oh, that sounds complicated
<Craphunzio>
I am a system administrator. Unix-wise I'm good for what matters the userspace It's the embedded world my problem.
<BorgCuba>
have you installed arm gcc?
<Craphunzio>
well buildroot built its own cross compiler
<BorgCuba>
well, if you use buildroot you dont need to
<BorgCuba>
yes indeed
<Craphunzio>
the problem is how the TURBOPHUCK fill those "make menuconfig" ncurses menu options :sweat:
<BorgCuba>
have a look at this: board/olimex/a13_olinuxino/
<BorgCuba>
from the 2020.02.8 buildroot
<BorgCuba>
I would start from there
<BorgCuba>
so: "make olimex_a13_olinuxino_defconfig"
<Craphunzio>
so you think that would be similar enough. Thank you
<Craphunzio>
the alt one contains much more files as long as the fex files to be used with VGA or HDMI or CGI output. Unfortunately I don't have them at hands and I can't get that SD card until tomorrow.
<BorgCuba>
Craphunzio, there much more to configure
<BorgCuba>
it seems like the old mali drivers gor removed and mainline-mali ist only for arm64
<BorgCuba>
do "/" "MALI" in make menuconfig
<BorgCuba>
maybe an older buildroot version works better. The kernel is stupidly old anyway
<Craphunzio>
well maybe it doesn't have to be super modern to work well
<Craphunzio>
after all it's quite an old SoC
<Craphunzio>
Thank you for all the feedback guys. It has been very nice to have someone who listened and gave a direction. Going to bed. Have a good night, or whatever time is it in the part of the world you're living onto.
<asdf28>
good night!
<asdf28>
come back soon
lurchi__ is now known as lurchi_
<BorgCuba>
Good night!
laurentC has quit [Remote host closed the connection]
<jernej>
Apritzel: sorry, I took few days off Linux stuff
<jernej>
not sure which way is better (regarding syscon)
<jernej>
easy way out would be to introduce another emac compatible
<jernej>
but since emac is completely the same, syscon with cells sound better
<apritzel>
jernej: yeah, was thinking similarly
<apritzel>
just not sure that syscon actually supports cells? Or at least if it would be accepted?
<apritzel>
ah, there is prior art ;-)
<jernej>
I think Rockchip uses cells?
<jernej>
not sure
<apritzel>
well, it's fairly easy: you just use of_property_read_u32_index(np, "syscon", 1) in the emac driver, and use that value as an offset into the regmap
Craphunzio has quit [Ping timeout: 240 seconds]
<apritzel>
I think...
<apritzel>
but it looks like just having a separate emac_variant_h616_emac2 with a differing syscon_field is a lot easier and cleaner
<apritzel>
don't we need a new compatible anyway due to the internal PHY handling? Or is that identical to the H6?
<jernej>
apritzel: handling is the same
<jernej>
however, you can mark support for gigabit disabled
<apritzel>
is that a generic property?
<jernej>
no, capability associated with compatible in emac driver
<apritzel>
so two compatibles for the H616, you mean?
<jernej>
yeah
<apritzel>
we could have one compatible, and if that is used, require an argument to the syscon phandle in this case, to use as an offset