victhor has quit [Remote host closed the connection]
cmeerw has quit [Ping timeout: 272 seconds]
thalesfragoso has joined #linux-sunxi
thalesfragoso has quit [Client Quit]
netlynx has quit [Quit: Ex-Chat]
dev1990 has quit [Quit: Konversation terminated!]
Mangy_Dog has quit [Ping timeout: 246 seconds]
ChriChri_ has joined #linux-sunxi
ChriChri has quit [Ping timeout: 260 seconds]
ChriChri_ is now known as ChriChri
TheSeven has quit [Disconnected by services]
[7] has joined #linux-sunxi
t3st3r has quit [Remote host closed the connection]
t3st3r has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 264 seconds]
asdf28 has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
gameblabla has joined #linux-sunxi
gameblabla has quit [Client Quit]
cmeerw has joined #linux-sunxi
apritzel has joined #linux-sunxi
jbrown has quit [Ping timeout: 258 seconds]
apritzel has quit [Ping timeout: 256 seconds]
jbrown has joined #linux-sunxi
apritzel has joined #linux-sunxi
asdf28 has quit [Ping timeout: 264 seconds]
asdf28 has joined #linux-sunxi
victhor has joined #linux-sunxi
yann has joined #linux-sunxi
yann has quit [Ping timeout: 240 seconds]
_whitelogger has joined #linux-sunxi
Mangy_Dog has joined #linux-sunxi
apritzel has quit [Ping timeout: 260 seconds]
netlynx has joined #linux-sunxi
netlynx has quit [Changing host]
netlynx has joined #linux-sunxi
popolon has joined #linux-sunxi
apritzel has joined #linux-sunxi
sunshavi has quit [Ping timeout: 260 seconds]
<bauen1>
apritzel: so i've tried to up the spl size to 64kb (minus toc0 magic bytes ~2kb ?) but it fails to execute properly, it actually loads as evidented by a lack of fel, i've setup the headers so the toc0 firmware isn't actually moved (the copy still happens but is effectively a nop) to 0x20840, could this be because after the 32kb SRAM A1 comes the SRAM C which is shared with AR100 and "weird" according
<apritzel>
bauen1: for my large SPL tests I just had less than 8KB of code, filled up with a pattern up to the limit, which got verified by the code
<bauen1>
apritzel: thanks, the last patch is what i'm looking for
<apritzel>
so it could well be that there could be problems if those SRAM C areas are used in anger, for instance to fill the I cache
<apritzel>
the H616 manual explicitly mentions that SRAM C can be used at "boot time"
<apritzel>
not sure if that is not really true for older SoCs, or just something that just got officially documented now
lkcl has joined #linux-sunxi
lurchi_ is now known as lurchi__
<bauen1>
yes, so making the spl bigger (up to maximum of ~63kb) seems to work but for some reason the spl then just starts entering some kind of loop of printing the welcome message, probably after loading something from the sd
<apritzel>
yeah, the whole loading logic is something separate
<apritzel>
at the moment it loads it expects a FIT image at 40KB (8KB SPL offset + 32 KB max SPL size)
lurchi__ is now known as lurchi_
<bauen1>
probably legacy image loading
<bauen1>
which i need to switch to fit anyway for verification
<apritzel>
H6 SPLs should be able to autodetect the type
<bauen1>
yes, and it seems to happily load parts of itself without any form of checksum whatsoever, at least that is my hypothesis
<apritzel>
bauen1: to be honest, I only built a 40KB SPL from the *U-Boot source* so far, there might be more surprises (in the build system, memory map or linker scripts) if we exceed certain limits like 64KB
<smaeul>
probably best to drop CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR and CONFIG_SPL_PAD_TO entirely and do `return 0x10 + spl_size / 512`
<smaeul>
for H6 and up
<smaeul>
(actually V5 is the lowest-numbered SoC to have the new MMIO layout)
warpme_ has joined #linux-sunxi
<apritzel>
smaeul: I am not sure we always know the offset at the *beginning* of compile time
<apritzel>
since it depends on the SPL code size
<apritzel>
so we could somehow patch in back in later, but what's actually the problem with detecting it?
dev1990 has quit [Read error: Connection reset by peer]
<apritzel>
but I agree to dropping CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR, just not sure this guards something else in the generic SPL code
dev1990 has joined #linux-sunxi
<smaeul>
apritzel: if CONFIG_SPL_PAD_TO is defined, we know it at the beginning, because that's the only value the offset can be
<apritzel>
yeah, that's rubbish ...
<apritzel>
it should be more of a alignment value
<smaeul>
so that's why I changed my mind on detecting, becase we don't want to force SPL to always be the max size
<smaeul>
yeah, and the aligned size is only known after mkimage
<smaeul>
so the question is: if the user manually enables SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR, should we take into account the SPL size, or assume they know what they're doing and use the value as-is?
<smaeul>
and does as-is include the alternate SPL offset?
<smaeul>
to make a TOC0/eGON universal image, you have to use both SPL locations, so U-Boot proper has to follow the second SPL
<smaeul>
so it'd be nice to say "U-Boot starts at 256k from the start of the disk" regardless of which SPL was loaded
<smaeul>
giving you 120k for the eGON and 128k for the TOC0
<apritzel>
but the boot source byte (@0x28 for eGON) encodes whether it's loaded from 128K or 8K, isn't that true for TOC0 as well?
<apritzel>
but yeah, I am all for some autodetection, but still being able to force it to a fixed value
<smaeul>
most likely, I haven't tried TOC0 at 128K
<smaeul>
but currently I would have to compile SPL twice: once with CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200 and once with 0x110 to undo the offset
<smaeul>
maybe that's fine, if building a universal image needs extra tooling anyway
<apritzel>
I think I tried TOC0 on my Remix at 128K, and had an image that booted on a normal Pine64 and a Remix
<apritzel>
indeed with specifying different offsets
<apritzel>
and yeah, an universal image might be something special
<apritzel>
not sure the current build system is ready for building that out of the box
gaston1980 has quit [Quit: Konversation terminated!]
luke-jr has joined #linux-sunxi
sunshavi has quit [Quit: ERC (IRC client for Emacs 27.1.90)]
sunshavi has joined #linux-sunxi
vagrantc has joined #linux-sunxi
linkmauve has quit [Ping timeout: 260 seconds]
sunshavi has quit [Ping timeout: 240 seconds]
maciejjo has joined #linux-sunxi
sunshavi has joined #linux-sunxi
megi has joined #linux-sunxi
apritzel has joined #linux-sunxi
linkmauve has joined #linux-sunxi
megi has quit [Quit: WeeChat 3.0]
megi has joined #linux-sunxi
megi has quit [Client Quit]
megi has joined #linux-sunxi
megi has joined #linux-sunxi
megi has quit [Client Quit]
asdf28 has quit [Ping timeout: 260 seconds]
megi has joined #linux-sunxi
gaston1980 has joined #linux-sunxi
<bauen1>
alrighty, so after some testing hunting down heisenbugs, it seems that "just" setting the size to 63kb doesn't work
<bauen1>
so there's probably more to it
<bauen1>
or rather, the second that i push the spl just over ~32kb, resulting in padding to 60kb (wtf that shouldn't happen) things just kind of break randomly