VDavid003 / minimal_sboot_wrapper

A small Samsung S-Boot Linux wrapper to boot Mainline Linux on Exynos 7885.
13 stars 1 forks source link

Question: Limited to 7885 ? #2

Open crashniels opened 1 year ago

crashniels commented 1 year ago

Is this limited to the 7885 (apart from the gpio buttons) ? I'm trying to boot mainline on my s6 edge which has the 7420. Thanks.

VDavid003 commented 1 year ago

It's not exactly limited to any SoC model, or SoC vendor even. It's not really limited to SBoot either actually, you just have to adjust the addresses accordingly to your device and bootloader's values (where to put the kernel in memory and where the ramdisk is). I've seen this wrapper working on galaxy s9 exynos instead with minor modifications A kind of descendant of this project is UniLoader at https://github.com/ivoszbg/uniLoader That one also has some framebuffer output and support for multiple SoCs with kconfig. (so no hardcoding there) I've seen that load on an even wider range of SoCs, and I even remember some attempts of making it boot on iPhones/iPads as well.

VDavid003 commented 1 year ago

I've just noticed, there's a port of uniLoader for s6 as well :) https://github.com/ivoszbg/uniLoader/pull/4

crashniels commented 1 year ago

Thanks. I added my Edge model to my local fork and it compiles. Now I just need to figure out how to modify boot images to replace the kernel.

VDavid003 commented 1 year ago

I usually use magiskboot (can be extracted from magisk apk) to replace the kernel with the wrapper (or uniloader). On A8 (7885) I can remove the dtb (extra in magiskboot) without problem, as the dtb is loaded by the wrapper instead. I provide distro specific cpio ramdisk to the kernel in the boot.img, as the wrapper currently relies on s-boot (or any other bootloader) to provide it at a fixed address specified in the Makefile. Note that with this way of booting (ignoring sboot dtb), s-boot's cmdline gets lost, so all the data embedded there is lost as well like fw versions, boot type (for lpm charging), ect.