<Armbian-Discord>
<Tonymac32> It can take months to get a patch set approved, and that's for only 1 specific change
<Armbian-Discord>
<c0rnelius> so this is kind of interesting specify device tree efi: seeding entropy pool Reserved memory: created CMA memory pool at 0x0000000020c00000, size 896 MiB don't specify device tree efi: seeding entropy pool Reserved memory: created CMA memory pool at 0x000000006ac00000, size 256 MiB
<Armbian-Discord>
<c0rnelius> whats it reading if not the dtb to dictate the memory pool?
<Armbian-Discord>
<ManoftheSea> Compiled in dtb or kernel default?
<Armbian-Discord>
<c0rnelius> Short of not being able to use overlays, using a uefi setup on boards like the Radxa Zero would be a better approach because of the varying memory options that board provides. I'm pretty sure this 896 MiB is why 512 and 1GB models don't boot using Armbian.
<Armbian-Discord>
<c0rnelius> Of course there could be something else fundamentally wrong with the build, but this does seem to be a trend.
<Armbian-Discord>
<Tonymac32> no, the CMA allocation is killing it on the smaller boards
<Armbian-Discord>
<Tonymac32> it was the same problem faced on the C2/K2/Le Potato/La Frite/VIM
<Armbian-Discord>
<Tonymac32> 896 made the 512 MB and 1 GB devices fail to boot
<Armbian-Discord>
<Tonymac32> So are you saying you don't define the CMA in the device tree, or you don't specify a device tree at all?
<Armbian-Discord>
<c0rnelius> I don't tell it what device tree to use.
<Armbian-Discord>
<Tonymac32> ok, so it's defaulting to one
<Armbian-Discord>
<Tonymac32> and the one it is using has a small CMA
<Armbian-Discord>
<Tonymac32> at a different memory location
<Armbian-Discord>
<Tonymac32> which u-boot is it?
<Armbian-Discord>
<c0rnelius> Yeah whatever it finds in dtb/amlogic in this case I believe. That's where it's suppose to look.
<Armbian-Discord>
<c0rnelius> most recent release of uboot
<Armbian-Discord>
<c0rnelius> Stable
<Armbian-Discord>
<Tonymac32> armbian or vanilla?
<Armbian-Discord>
<c0rnelius> Vanilla. I do have it patched but it's not a fundamental change in this case it's just cosmetic. Splash.
<Armbian-Discord>
<Tonymac32> cool
<Armbian-Discord>
<c0rnelius> I'll test it on a zero tomorrow. That test is on a Potato.
<Armbian-Discord>
<Tonymac32> is the device tree you specified one that Armbian modified? The u-boot device tree has CMA of 256 MB
<Armbian-Discord>
<Tonymac32> just trying to see where the values live
<Armbian-Discord>
<c0rnelius> Well yeah I patched the kernel with the same patch Armbian uses. That's where the 896 comes from.
<Armbian-Discord>
<Tonymac32> ugh ok
<Armbian-Discord>
<Tonymac32> yeah that will break anything 1 GB or less
<Armbian-Discord>
<c0rnelius> That's the question I guess. Is it getting the 256 from uboot?
<Armbian-Discord>
<Tonymac32> that's for the potato and friends
<Armbian-Discord>
<c0rnelius> Makes sense then.
<Armbian-Discord>
<c0rnelius> Not sure how that can be isolated in the armbian build since things tend to be patched across the world and not the board.
<Armbian-Discord>
<Tonymac32> right
<Armbian-Discord>
<Tonymac32> My thought was to have a minimum CMA and have overlays for bigger ones
<Armbian-Discord>
<Tonymac32> the thing is the giant numbers are only needed by the half broken vdec
<Armbian-Discord>
<c0rnelius> That's a thought. You tried an overlay for CMA? Would that even work?
<Armbian-Discord>
<Tonymac32> sure, you just swap out the values, u-boot doesn't use it at all, so it modifies the tree and you load it up
<Armbian-Discord>
<Tonymac32> but with EFI, well I don't know how to do that 😄
<Armbian-Discord>
<c0rnelius> Worth an experiment
<Armbian-Discord>
<Tonymac32> I feel like the loaded boot menu program would need to do that
<Armbian-Discord>
<Tonymac32> I don't think GRUB is such a tool
<Armbian-Discord>
<c0rnelius> Nah grub isn't up for the task.
<Armbian-Discord>
<c0rnelius> So I'm thinking the overlay should really be for upping CMA, other wise it should default to 256 which should in theory make it bootable across the boards regardless of the memory footprint.
<Armbian-Discord>
<Tonymac32> right, agreed
<Armbian-Discord>
<Tonymac32> that way little boards work
<Armbian-Discord>
<Tonymac32> without interference
<Armbian-Discord>
<c0rnelius> Exactly
<Armbian-Discord>
<ManoftheSea> What does uefi change about different memory sizes?
<Armbian-Discord>
<c0rnelius> Apparently its not changing it. Whats happening is, if the devicetree isn't defined during boot, it will default to the one used during the creation of u-boot and since Armbian changes the CMA pool for GXL/G12 this results in a size diff.
<Armbian-Discord>
<ManoftheSea> okay, that makes sense.
<Armbian-Discord>
<ManoftheSea> I found where the extlinux.conf can be told to use a DTBO, but I don't know if u-boot provides the EFI environment if it works through the extlinux.conf LABEL Manjaro ARM KERNEL /Image FDT /dtbs/rockchip/rk3399-rockpro64.dtb FDTOVERLAYS /dtbs/overlays/pcf8574.dtbo APPEND initrd=/initramfs-linux.img [...]
<Armbian-Discord>
<c0rnelius> So the thought is, instead of forcing the CMA change across all those SoCs and leaving some boards unbootable, we could instead provide an overlay option for upping the pool for those who need it or want it.
<Armbian-Discord>
<ManoftheSea> It'd be possible to write an extlinux.conf that defaults to minimal memory, then you can set the default from the running system... Actually, that's not a bad idea for the ebin v5/v7 difference in network devices.
<Armbian-Discord>
<c0rnelius> Well yeah... I was doing the testing using grub. With extlinux.conf the board won't even unless defined.
<Armbian-Discord>
<c0rnelius> and no grub doesn't provide an overlay option like extlinux fdtoverlays does. not sure any uefi bootloaders/managers do at this time.
<Armbian-Discord>
<ManoftheSea> the fdtoverlays was added to the bootloader spec in 2019...
<Armbian-Discord>
<ManoftheSea> But also, the running system can apply overlays to configfs (maybe?)
<Armbian-Discord>
<c0rnelius> I've tried that, never got it working.
<Armbian-Discord>
<c0rnelius> I was able to enable the overlay but it didn't actually function.
<Armbian-Discord>
<c0rnelius> maybe something missing from the patch I used?
<Armbian-Discord>
<ManoftheSea> Well, if this is the latest https://systemd.io/BOOT_LOADER_SPECIFICATION/ then the keys are named "devicetree" and "devicetree-overlay" (and takes a space-separated list)
<Armbian-Discord>
<c0rnelius> oh interesting. let me try and see if that devicetree-overlay actually works.
<Armbian-Discord>
<ManoftheSea> in grub?
<Armbian-Discord>
<c0rnelius> yeah
<Armbian-Discord>
<ManoftheSea> Does Grub follow bootloader spec?
<Armbian-Discord>
<ManoftheSea> I thought bootloader spec was a thing the systemd folks were writing for themselves to follow
<Armbian-Discord>
<c0rnelius> its considered a bootloader so I would hope so.
<Armbian-Discord>
<c0rnelius> guess we are gonna find out
<Armbian-Discord>
<c0rnelius> i know when looking through the grub docs I didn't see anything about that devicetree-overlay option. but that doesn't mean it won't work.
<Armbian-Discord>
<ManoftheSea> it definitely doesn't follow the same format. GRUB's menu format predates bootloader spec, dunnit?
<Armbian-Discord>
<Tonymac32> this causes a race condition and is not stable enough to be mainline
<Armbian-Discord>
<c0rnelius> tells me it can't find the command devicetree-overlay .
<Armbian-Discord>
<c0rnelius> hmm. one problem there is you can't use systemd-boot on non-gpt partitions. at least I wasn't able too..? so if thats the case systemd-boot isn't viable with allwinner and amlogic.
<Armbian-Discord>
<c0rnelius> kind of a real dick punch honestly
<Armbian-Discord>
<c0rnelius> i also didn't do tons of research and basically just did the install and went about the setup which ended it with it telling me, no gpt? no fun for you!
<Armbian-Discord>
<ManoftheSea> I agree.
<Armbian-Discord>
<ManoftheSea> amlogic, at least, uses area right in the middle of the GPT header
<Armbian-Discord>
<ManoftheSea> You could use it in a fragile and broken way, I suppose...
<Armbian-Discord>
<ManoftheSea> I don't know about allwinner's bootloader requirements
<Armbian-Discord>
<c0rnelius> i believe allwinner as well. once you flash the boot bins it kills the gpt partition.
<Armbian-Discord>
<ManoftheSea> And I imagine I read something from Lennert about how systemd-boot is for the future, and MBR isn't part of the future
<Armbian-Discord>
<ManoftheSea> Allwinner uses something in the middle of the table, but the table can be offset. I think.
<Armbian-Discord>
<ManoftheSea> the header is just sector 1
<Armbian-Discord>
<c0rnelius> not sure honestly. I only recently started reading up on gpt and putting it in practice where I can.
<Armbian-Discord>
<c0rnelius> i've come to the conclusion sgdisk pretty much sucks though. using parted to create the table is cleaner.
<Armbian-Discord>
<ManoftheSea> hmm, 512 might be possible.
<Armbian-Discord>
<ManoftheSea> oh, wait, no, 512-byte sectors.
<Armbian-Discord>
<ManoftheSea> 16k would conflict with what, partitions 125-128?
<Armbian-Discord>
<ManoftheSea> sectors 33 and 34, so only the last two
<Armbian-Discord>
<c0rnelius> @Tonymac32 Well the overlays works. I did the test in reverse as the kernel is already patched at 896M Reserved memory: created CMA memory pool at 0x00000000e4c00000, size 256 MiB So should be as easy as changing 0x0 0x10000000 to 0x0 0x38000000 and "wham oh" people who use the overlay have it reserved at 896M. https://paste.debian.net/1252572/
<Armbian-Discord>
<ManoftheSea> what'd you use to load it?
<Armbian-Discord>
<c0rnelius> extlinux
<Armbian-Discord>
<narmstrong> Actually I added fdtoverlays to u-boot syslinux/extlinux 🙂
<Armbian-Discord>
<c0rnelius> thats because ur awesome 🙂