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
apritzel has quit [Ping timeout: 480 seconds]
hentai has quit [Quit: SIGTERM]
mkf has quit [Ping timeout: 480 seconds]
hentai has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
ftg has quit [Read error: Connection reset by peer]
hentai has quit [Quit: SIGTERM]
Daanct12 has joined #linux-sunxi
vagrantc has joined #linux-sunxi
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
vagrantc has quit [Ping timeout: 480 seconds]
hexdump0815 has joined #linux-sunxi
hexdump02 has quit [Ping timeout: 480 seconds]
ity has quit [Remote host closed the connection]
dsimic is now known as Guest13507
dsimic has joined #linux-sunxi
Guest13507 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
junari_ has joined #linux-sunxi
junari has quit [Remote host closed the connection]
junari_ has quit [Remote host closed the connection]
junari has joined #linux-sunxi
junari_ has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
sh1 has quit [Ping timeout: 480 seconds]
bauen1 has joined #linux-sunxi
ity has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
sh1 has joined #linux-sunxi
vagrantc has joined #linux-sunxi
<Lightsword> finally got linux booting fully(into ramdisk) from SD card, guess need to figure out how to enable ethernet, I managed to hack up some uboot drivers that turn on the ethernet port lights but can't seem to get any real network activity(i.e. dhcp fails)
<Lightsword> also found this bug in uboot, seems there's a faulty assumption that all arm64 boards are at least 512MB ram, mine's only 256MB https://github.com/u-boot/u-boot/blob/v2025.04/include/configs/sunxi-common.h#L73
vagrantc has quit [Quit: leaving]
junari_ has quit [Ping timeout: 480 seconds]
ity has quit [Remote host closed the connection]
ity has joined #linux-sunxi
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
evgeny_boger has joined #linux-sunxi
evgeny_boger has quit [Ping timeout: 480 seconds]
bauen1 has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined #linux-sunxi
ungeskriptet has quit [Ping timeout: 480 seconds]
megi has quit [Quit: WeeChat 4.5.2]
megi has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
cnxsoft has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
Daanct12 has quit [Quit: WeeChat 4.6.1]
junari_ has joined #linux-sunxi
junari__ has joined #linux-sunxi
junari_ has quit [Remote host closed the connection]
junari_ has joined #linux-sunxi
junari__ has quit [Ping timeout: 480 seconds]
junari_ has quit [Remote host closed the connection]
junari has quit [Remote host closed the connection]
junari has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
junari_ has joined #linux-sunxi
junari has quit [Remote host closed the connection]
Schimsalabim has joined #linux-sunxi
junari__ has joined #linux-sunxi
junari_ has quit [Remote host closed the connection]
cnxsoft has joined #linux-sunxi
warpme has joined #linux-sunxi
hentai has joined #linux-sunxi
ungeskriptet has joined #linux-sunxi
apritzel has joined #linux-sunxi
<apritzel> Lightsword: but that only affects $ramdisk_addr_r, right? The other values should be fine?
<apritzel> and I find it hilarious that by far the most expensive device employing an Allwinner SoC is also the most stingy when it comes to DRAM size ...
<Lightsword> apritzel, I guess, actually there were other values that were problematic but those were configurable via kconfig at least, had to move the uboot load address and reduce malloc size in order to move uboot to a high enough load address so that I could actually unpack a full FIT image with ramdisk
<Lightsword> think stack size as well
<Lightsword> also had to strip down the kernel a bit for ramdisk boot to work
<Lightsword> apritzel, well with how many of these miners that they produce...I guess every little bit helps cost wise, but without a graphics stack 256MB is plenty of RAM in general
<Lightsword> also I think less ram reduces chance of hardware faults
<apritzel> > "move the uboot load address": which one do you mean? The 0x4a000000 where the U-Boot image gets loaded to? That should still work, shouldn't it?
<apritzel> and it's not easy to change, because that's somewhat hardcoded, in the SPL and also in TF-A
cnxsoft has quit [Ping timeout: 480 seconds]
<Lightsword> apritzel, yeah I changed that, it's like 167MB offset which makes it rather tricky to load a ~70MB FIT image and have everything unpack nicely, wasn't exactly hard to change though, it's like a couple of config variables BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="PRELOADED_BL33_BASE=0x4f000000" and CONFIG_TEXT_BASE=0x4f000000 for uboot
<apritzel> well, my point is that this is an not upstreamable hack
<apritzel> and you should be able to just load everything low, after all 256 MB should be enough
<apritzel> the 160M load address is just for *loading* U-Boot, it immediately relocates itself to the end of DRAM, so at U-Boot proper runtime the 160MB area doesn't matter anymore
<apritzel> so please try to keep the 0x4a000000 if anyhow possible, and adjust other variables
<Lightsword> apritzel, or well at least it didn't seem to be the main issue, which was that uboot would reserve like 64MB of ram for malloc right after the load address
<Lightsword> also was reserving 16MB for stack by default I think
<Lightsword> apritzel, the actual relocations changes I made don't require upstreaming, since that's purely configuration changes already and mostly just to make space for larger ramdisks, but should maybe do something about the addresses being wrong in sunxi-common.h which is an issue regardless
<Lightsword> apritzel, also any reason to not load the kernel right at the start of memory? wondering why that varies in sunxi-common.h based on the configured minimum ram size
<apritzel> there are certain constraints for where to load images, surely many more for arm32 than there are for arm64. And some historic ones as well: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm64/booting.rst#n144
<apritzel> so keep things simple, we just use *one* setup that should work universally, regardless of which kernel you load
<apritzel> for anything with H616 those old requirement don't apply, so you can load the kernel at anything 2MB aligned, and the ramdisk practically anywhere (I believe)
<apritzel> yes, but arm32 is completely separate mess, reaching back many more years into the "Middle Ages" of ARM Linux support
<apritzel> arm64 is a separate architecture particularly for that reason
<Lightsword> apritzel, so using 0x40080000 in the FIT image for kernel load/entry for arm64 should be the best location right?
<Lightsword> apritzel, btw is this something that should work on h616? https://github.com/apritzel/linux/commits/ac200-WIP/
<apritzel> better use 0x40200000, as U-Boot will copy it there anyway (the TEXT_OFFSET default in the kernel changed from 512K to 0)
<Lightsword> apritzel, if I leave the load/entry addresses out of the FIT image will it do that automatically?
<apritzel> Lightsword: H616 has ac300, which is slightly different. I think jernej had patches somewhere in his github
<apritzel> why do you need a FIT image anyway? Can't you just load the kernel and initrd separately, and use $fdtcontroladdr? Then you have better control
<apritzel> Lightsword: yes, I think so
<Lightsword> apritzel, I like to use FIT images so that I can store everything in a single UBI volume and then atomic rename the volume for updates https://sbabic.github.io/swupdate/handlers.html#atomic-volume-renaming
<Lightsword> if I use separate volumes for kernel/dtb/ramdisk the rename AFAIU is then no longer entirely atomic
<Lightsword> I think ubiswap(which is what I would need to use if splitting into multiple images) is not entirely atomic when operating on multiple volumes.
warpme has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ftg has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
hazardchem has quit [Read error: Connection reset by peer]
hazardchem has joined #linux-sunxi
JohnDoe_71Rus has quit [Remote host closed the connection]
aperezdc has quit [Remote host closed the connection]
aperezdc has joined #linux-sunxi
hentai has quit [Remote host closed the connection]
hentai has joined #linux-sunxi
hentai has quit [Remote host closed the connection]
hentai has joined #linux-sunxi
hentai has quit [Remote host closed the connection]
<apritzel> I don't know much about UBI, but I guess you put the FIT image in a static UBI volume? And at the moment you do this on the SD card, where UBI is actually not needed?