ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
vagrantc has joined #linux-sunxi
grming has quit [Quit: Konversation terminated!]
vagrantc has quit [Quit: leaving]
cnxsoft has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
pabs has quit [Remote host closed the connection]
pmp-p is now known as Guest498
pmp-p has joined #linux-sunxi
pabs has joined #linux-sunxi
Guest498 has quit [Ping timeout: 480 seconds]
pabs has quit [Remote host closed the connection]
pabs has joined #linux-sunxi
rubberduck has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall. ]
rubberduck has joined #linux-sunxi
<MoeIcenowy> is the title of main page just "sunxi" intended?
cnxsoft has quit []
cnxsoft has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
<libv> LordKalma: good point, we have that on our radar
<libv> MoeIcenowy: fixed, thanks
chewitt has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
<libv> so minima.linux-sunxi.org has a clouded port of our wiki, and will in a few days take over the duties of our old server
<libv> so please poke at it and what we missed from the old wiki
apritzel has joined #linux-sunxi
<karlp> libv: on http://minima.linux-sunxi.org/USB_Gadget/Ethernet the "sticky-note-pin.png" and "MBOX icon information.png" don't show up as images, just as text links?
* pabs suggests getting the old wiki saved to archive.org by the ArchiveTeam folks before the switchover happens
<libv> pabs: we have several full backups
<libv> i pull a daily one here for local storage myself
<libv> karlp: good catch, thanks
<libv> pabs: the data is one thing, and the images/ dir, that's all backed up
<libv> that's the most important bits
<libv> the issues we might have is mediawiki extensions
<libv> the ones we were using on the old version i had to go and find newer versions matching the latest mediawiki, and sometimes had to find replacement packages
<libv> and it's those things that are, thanks to good mediawiki infrastructure (db upgrade is nice), easy to miss, or not catch all corner cases
<libv> like these pngs
<libv> even though i somehow feel like they are not really necessary here
<karlp> I've got no comment on page design :)
<libv> :)
<libv> yeah, this needs to be fixed
<libv> the png issue
<libv> not the page
<libv> because if i fix the contents, it will vanish anyway
<libv> someone wrote that on the front page ;p
<libv> when i go look at the templates themselves, then they look ok: https://minima.linux-sunxi.org/Template:Note
pmp-p has quit [Ping timeout: 480 seconds]
<libv> hrm, could this be because we renamed images/ uploads/...
grming has joined #linux-sunxi
JohnDoe_71Rus has quit []
bauen1 has joined #linux-sunxi
<mnemoc> libv: MBOX_icon_information.png ended in overlay/images instead of overlay/uploads
JohnDoe_71Rus has joined #linux-sunxi
cnxsoft has quit []
evgeny_boger has quit [Quit: evgeny_boger]
evgeny_boger has joined #linux-sunxi
apritzel has quit [Remote host closed the connection]
<libv> mnemoc: i put it there to see if that would fix it
<libv> which it didn't
<libv> and then my 6y old sidetracked me again
<libv> mnemoc: google gives me nothing on that issue
<libv> it's in templates only
Net147_ has joined #linux-sunxi
Net147 has quit [Read error: Connection reset by peer]
<libv> heh, works ok on my build machine
NekoMay has quit [Ping timeout: 480 seconds]
<mnemoc> meh :-/
apritzel has joined #linux-sunxi
<libv> no rename of images to uploads there
grming has quit [Remote host closed the connection]
grming has joined #linux-sunxi
NekoMay has joined #linux-sunxi
<mnemoc> maybe it would be simpler to revert the uploads/ change and rely on the overlay
pmp-p has joined #linux-sunxi
vagrantc has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
apritzel has quit []
ftg has joined #linux-sunxi
<upnix> After writing u-boot-sunxi-with-spl.bin to the correct location on an SD card, should I notice the boot process of my device acting any differently when the SD card is inserted? I see on the "Bootable SD card" wiki page that there are several more steps to get a rootfs loaded, but I'd like to make sure I got the bootloader part right before I move on.
<upnix> This is a T95H-like device, and U-Boot was compiled using the X96 Mate defconf file on U-Boot v2023.01-rc2.
<upnix> The bin file was written with: dd if=u-boot-sunxi-with-spl.bin of=/dev/sdd bs=1024 seek=8
<DuClare> Surely u-boot prints its version at some point during bootup?
<upnix> It does. It's the original version. I should say - there's not change in boot behaviour whether the SD card is loaded or not. It's identical according to a diff
<DuClare> The first thing I'd do is figure out the boot priority for your device
<DuClare> (Or just try to neuter whatever other thing it is booting from)
<upnix> It's booting from the eMMC.. And the way I'd neuter it would be to short something.. I suppose. But there may be no way coming back from that, and I don't even know if that would be sufficient
<DuClare> Is there a fel mode button?
<upnix> There is
<upnix> I'm reading now about booting over USB using FEL. Is that what you're thinking?
<DuClare> Possibly. Also wondering whether it might affect boot order
<DuClare> Your chip may also have boot select lines
<DuClare> H616 does, according to its datasheet
<DuClare> Incredible, it has 5 bits to select from all of 6 possible boot devices
<DuClare> And one of them is "no support"
<DuClare> :D
apritzel has joined #linux-sunxi
JohnDoe_71Rus has quit []
<apritzel> upnix: that's odd, it should boot from the SD card
<apritzel> if you check the "3.4.2.1.1. GPIO Pin Select" table in the H616 manual, you will see that SMHC0 is always the first, regardless of the boot select pins
<apritzel> upnix: can you make sure that it reboots correctly?
<apritzel> sometimes the UART leaks some current, that prevents proper booting
<apritzel> also possibly try a different SD card
<jernej> IIRC secure boot also changes boot order, but that isn't enabled on vast majority of TV boxes
<DuClare> There is efuse based boot select too
<upnix> apritzel: Secure boot might be enabled? On the console I see: NOTICE: secure os exist \ secure enable bit: 1 \ secure storage read hdcpkey fail \ secure storage read hdcpkey fail with:-1
<apritzel> upnix: it's possible, though the word "secure" doesn't mean much when it comes to Allwinner ;-)
<apritzel> it's very rare to see secure-boot enabled Allwinner boxes, the only one I know is the Remix Mini PC
<apritzel> upnix: to verify that, you can enable TOC0 secure boot support in U-Boot
<upnix> Am I wrong to expect *any* sort of indication from the stock UBoot that it's reading the SD card? That's what worries me a bit.
<apritzel> make menuconfig, type '/' for the search dialog, type 'TOC0', then press '1' to go to the menu and enable TOC0
<apritzel> U-Boot isn't involved at all in reading the SD card, that's all done by the boot ROM (BROM)
<upnix> I'll try to TOC0 after I try a different micro SD card
<upnix> Ah, I see. So I'm not seeing that going on at all
<apritzel> the BROM always tries the SD card first
<apritzel> it if doesn't like that, or if it doesn't find a valid bootable image, it tries the other boot sources
<apritzel> looking for TOC0 (secure boot) instead of eGON (non-secure) would explain it
dikiy has joined #linux-sunxi
<apritzel> but again it's rare, and by experience there is most likely something else going on
<apritzel> remove power, disconnect the UART cables, re-connect the UART, then re-apply the power
<upnix> Hey! Compiling with TOC0 actually got me something new:
<upnix> U-Boot SPL 2023.01-rc2 (Dec 01 2022 - 13:43:28 -0700) \ DRAM: 4096 MiB \ Failed to set core voltage! Can't set CPU frequency \ SP
<upnix> Is this double bad? Secure boot is enabled, and the x96 Mate config isn't setting the CPU frequency?
<apritzel> upnix: that's very interesting, you have found the second secure boot device ;-)
<apritzel> but as you can see the banner, the "secure" part is already solved
<apritzel> that's what I meant above with Allwinner's loose interpretation of secure
<apritzel> upnix: do you have the box still open, or did you take pictures?
<upnix> I have it open right in front of me
<apritzel> is that this blue T95H one?
<apritzel> so this message tells me that this box doesn't have a PMIC (which is quite common for the cheaper boxes)
<apritzel> ah yes, that's what I see all over Aliexpress ;-)
<upnix> Do you want a picture of the board itself?
<apritzel> upnix: yes, those pictures help tremendously, but it would be even better to have a Wiki page
<apritzel> so that you can upload your pictures there, and that we have all information in one place
<apritzel> so did you have Trusted Firmware compiled and copied or linked as bl31.bin?
<upnix> Yeah, I cloned the arm-trusted-firmware repository, compiled with "make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h616 DEBUG=1 bl31", then compiled U-Boot with "make CROSS_COMPILE=aarch64-linux-gnu- BL31=../arm-trusted-firmware/build/sun50i_h616/debug/bl31.bin"
<apritzel> and for U-Boot: please copy the x96_mate_defconfig file, remove every line with I2C in the copy, and add "CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y"
<apritzel> very good, that's exactly right
<upnix> Ok, I was going to try compiling again from the master branch of U-Boot, but I'll go back to v2023.01-rc2
<apritzel> also add "# SUNXI_NO_PMIC is not set"
<apritzel> wrong
<apritzel> also add "SUNXI_NO_PMIC=y"
<apritzel> the H616 defaults to a PMIC, because 2 out of 2 supported boards have one ;-)
<apritzel> upnix: do you have a download link to any vendor firmware? any version would do
<upnix> I do have an image that I was able to use to unbrick using PhoenixSuit
<apritzel> or can you post the serial output of the vendor firmware, to check the DRAM type? If it's LPDDR3 or DDR3
<apritzel> yeah, that one
<upnix> I'm thinking it has DDR3 - DRAM Type =3 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
<apritzel> that's good, because that's already supported by U-Boot
<apritzel> did the mainline U-Boot produce more output?
<upnix> SUNXI_NO_PMIC=y doesn't look recognized: arch/../configs/x96_mate_T95_defconfig:11:warning: unexpected data: SUNXI_NO_PMIC=y
<apritzel> oh, sorry
<apritzel> CONFIG_SUNXI_NO_PMIC=y
<upnix> The mainline U-Boot only produced those 4 lines
<apritzel> mmh, interesting, maybe disabling the PMIC helps, though it looks non-fatal in the code - except for the CPU still running at a very low frequency
bauen1 has joined #linux-sunxi
<upnix> Power on now gets me two fewer lines: U-Boot SPL 2023.01-rc2 (Dec 01 2022 - 14:20:54 -0700) \ DRAM: 8192 MiB
<upnix> And my RAM doubled?
<apritzel> ah, that would explain something
<apritzel> so the DRAM setup isn't right
<apritzel> it's close enough to pass the setup, but anything trying to run from it fails (like TF-A or the U-Boot stack from that point on)
<upnix> In the menuconfig I saw there were some options for increased output - is that worth setting?
<apritzel> I don't think menuconfig helps here. Adding #define DEBUG at the very beginning of source files does, but in this case I doubt it
dikiy has quit [Ping timeout: 480 seconds]
<apritzel> upnix: if you look at the orangepi_zero2_defconfig, there are more DRAM parameters you could try
<upnix> I'll give them a shot
<apritzel> or you could also lower the DRAM frequency
<apritzel> try CONFIG_DRAM_CLK=624
<apritzel> we default to 720 MHz, which is somewhat optimistic, and requires that all other parameters are spot on
evgeny_boger has quit [Ping timeout: 480 seconds]
<upnix> U-Boot compiled with CONFIG_DRAM_CLK=624 shows the right RAM amount, but it hangs on "SPL:"
<upnix> So I'm going to carry on with seeing what the orangepi_zero2_defconfig has that I might be able to use
<apritzel> try just: "CONFIG_DRAM_SUN50I_H616_READ_CALIBRATION=y" and "CONFIG_DRAM_SUN50I_H616_UNKNOWN_FEATURE=y"
<apritzel> that's what jernej used for the other T95H box - which looks different, though (https://minima.linux-sunxi.org/T95H)
<upnix> I tried a couple variations. I think this most closely matches what you suggested - https://gist.github.com/upnix/d26c4e6ec0aae5c255537d4b699ec890
<upnix> But no luck
<apritzel> mmh, yes, that's what I meant - bummer that it didn't work
<apritzel> can you put the serial output from the vendor firmware somewhere? there might be some more hints in there
<apritzel> thanks! so they use 600 MHz
grming has quit [Quit: Konversation terminated!]
grming has joined #linux-sunxi
upnix has quit [Quit: Page closed]
warpme____ has quit []