Commit Graph
174 Commits
Author SHA1 Message Date
Igor Belwon 314f2addeb board: fix main.h header 2026-02-23 23:02:53 +02:00
Igor Belwon eaacd962db main: refactor booting logic
- Move main headers from include/ to include/main/
- Split booting logic to boot.c and boot-fdt.c to avoid cluttering main()
- Conditionally compile boot-fdt only if libfdt is used
- Add some better logging

Change was tested on qemu-virt, which succesfully booted a kernel:
$ qemu-system-aarch64 -machine virt -cpu cortex-a72 -nographic -m 512m -kernel uniLoader.o
[INFO]              .__.____                     .___
[INFO]  __ __  ____ |__|    |    _________     __| _/___________
[INFO] |  |  \/    \|  |    |   /  _ \__  \   / __ |/ __ \_  __\
[INFO] |  |  /   |  \  |    |__(  <_> ) __ \_/ /_/ \  ___/|  |\/
[INFO] |____/|___|  /__|_______ \____(____  /\____ |\___  >__|
[INFO]            \/           \/         \/      \/    \/
[INFO] passed board initialization
[INFO] welcome to uniLoader (e69eba1) - date 2026-02-21 14:01:34 on qemu-virt
[INFO] Booting kernel...
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.12.73+deb13-arm64 (debian-kernel@lists.debian.org) (aarch64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44) #1 SMP Debian 6.12.73-1 (2026-02-17)
[    0.000000] KASLR enabled
[    0.000000] random: crng init done
[...]

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2026-02-23 23:02:53 +02:00
Igor Belwon ecd7ebf677 virt: disable gzip and libfdt
gzip: qemu shall use uniLoader.o as the kernel which also enables symbol maps and other cool stuff.
so, the gzip-compressed uniLoader image is useless and can slow down the compile process

libfdt: temporary. it doesn't seem to pick up the fdt that is passed when booting raw kernel

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2026-02-23 23:02:53 +02:00
tildeguy e69eba1d89 board: add support for Huawei Mediapad T5
Adds the initial support for Huawei Mediapad T5 (agassi2) and Hi6250-based devices.
2026-02-21 11:16:21 +01:00
tildeguy 88cc20b0d6 project: allow not to load ramdisk but only its size
HiSilicon bootloader copies the ramdisk itself, and marks
its memory region as protected, so we can't memcpy on it.
Even more: we also can NOT include the ramdisk into uniLoader
for it, because the kernel partition is too small.

The easiest workaround for that is just using an empty
blob/ramdisk, so it won't be copied. But it breaks
libfdt, as it doesn't know the actual ramdisk size.
2026-02-21 11:16:21 +01:00
tildeguy 4c41a44b62 lib: simplefb: allow boards to override font scale
Make it possible to set font scale via video_info struct,
as a dynamic font scale may be slightly too big on some screens.
2026-02-21 11:16:21 +01:00
faveoled c4d3f6490e board: add support for Samsung Galaxy S10 2026-02-07 09:34:05 +02:00
Hendra Manudinata da2cd8d222 configs: j4lte: Add required addresses 2026-01-27 10:52:40 +02:00
R0rt1z2 741f3e6a61 arch: zero BSS section during early boot
The C runtime requires that uninitialized global variables are zero.
In a bare-metal environment, memory contents are undefined at startup
and the BSS section is not automatically cleared, so we must zero out
this entire section ourselves.

Without this, static variables contain garbage values, leading to
unpredictable behavior. For example, the simplefb driver uses a static
variable to track the current print position, which resulted in text
being drawn at random locations on the screen.
2026-01-13 14:06:09 +02:00
evilMyQueen f60112e4b6 board: Order every board properly
This commit orders every board firstly in ascending numerical order
and then in alphabetical order of letters.
Also adds missing CONFIG_SAMSUNG_A336B to board/Makefile

Signed-off-by: evilMyQueen <evilMyQueen@mainlining.org>
2026-01-13 14:03:51 +02:00
R0rt1z2 ba5c82604a main: Fix duplicate drivers_init call
Commit https://github.com/ivoszbg/uniLoader/commit/7993348878f9252da96ac5096d2dbb3727b328bc accidentally replaced the late_init call with a
duplicate drivers_init call when converting the initcall logic to use
the new INITCALL macro.

This causes drivers to be probed twice during boot. For the simplefb
driver, this results in the framebuffer being cleared after the boot
logo has already been printed, since simplefb_probe() calls
clean_fbmem() unconditionally.
2026-01-06 00:16:31 +01:00
evilMyQueen 65de257b2c board: add support for Infinix Note 30 VIP
Signed-off-by: evilMyQueen <evilMyQueen@mainlining.org>
2026-01-04 10:51:14 +02:00
faveoled cf4c76be24 board: add support for Samsung Galaxy A30 2026-01-02 11:11:03 +02:00
Ivaylo Ivanov 6cd8dfd0d0 board: samsung-j5lte: cast mmio addresses in writel's
Fix build errors for j5lte by casting mmio addresses in writel's. While
at it, do some quality of life changes, like moving entry addresses out
of board/Kconfig into the j5lte defconfig and setting LINUX_KRNL_HEADER_IMG.
2025-12-28 17:33:25 +01:00
Ivaylo Ivanov a8428f37d6 lib: provide aeabi stubs to satisfy compiler on armv7
The framebuffer scaling code was not tested on armv7 due to no
current platforms making use of simplefb. Turns out the compiler
wants a set of aeabi helpers for divisions, not present due to
the bare metal nature of the bootloader. Satisfy this with empty
stubs.
2025-12-28 17:33:25 +01:00
vipoll 6d1c7a9dc9 board: samsung-herolte: fix incorrect framebuffer height 2025-12-28 14:39:35 +02:00
RadGoodNow 81f7b06b81 board: Add support for itel Vision 3 Plus
Signed-off-by: RadGoodNow <81907382+RadGoodNow@users.noreply.github.com>
2025-12-28 13:22:41 +01:00
BotchedRPR f6d2577d4b drivers: Add driver selection menu
This avoids building Exynos drivers for all platforms

Signed-off-by: BotchedRPR <igor.belwon@mentallysanemainliners.org>
2025-11-03 21:30:37 +02:00
vipoll 918e08f85d libfdt: use C memmove/memcpy instead of ASM to avoid rebooting
asm memmove() and memcpy() are not reliable yet,
so just use the C analogues for now
2025-11-03 21:30:37 +02:00
vipoll 266fb485dd drivers: introduce ramdisk-handler (adds linux,initrd-start/end at boot time) 2025-11-03 21:30:37 +02:00
vipoll f4a3e966b5 import libfdt from Linux v6.18-rc2-3080-g6474677ce915 2025-11-03 21:30:37 +02:00
Ivaylo Ivanov f22f626ebd .: add a project configuration file for readthedocs
readthedocs.org allows to automatically generate and publish HTML
documentations.
2025-11-03 18:41:58 +01:00
Ivaylo Ivanov 4d26881b3c README: add supported devices and rearrange information
As this is the first thing people will see about our project, keep
it simple, but well arranged and informative.
2025-11-03 17:19:38 +02:00
Violet 467d16f378 r0q: Enable Linux kernel header
S22 will only boot with this enabled in recent versions of uniLoader.
2025-10-31 10:51:46 +02:00
evilMyQueen 424b351dfc board: introduce support for Xiaomi Poco M3 Pro 5G
Signed-off-by: evilMyQueen <vernamjap@gmail.com>
2025-10-20 17:25:56 +03:00
evilMyQueen 3b18c48ba9 soc: fix Kconfig warning
Signed-off-by: evilMyQueen <vernamjap@gmail.com>
2025-10-18 14:02:09 +02:00
evilMyQueen b6635ab77d board: introduce support for xiaomi blossom devices
Signed-off-by: evilMyQueen <vernamjap@gmail.com>
2025-10-17 22:50:51 +02:00
predefine b80aaacaff board: introduce support for Xiaomi Redmi Note 8 Pro
Signed-off-by: predefine <predefine@yandex.ru>
2025-10-04 13:56:49 +03:00
Eric Gonçalves 6557f34c66 board: Add support for the Samsung Galaxy S22 2025-10-03 17:36:36 +03:00
Igor Belwon cb549596c0 kconfig: lxdialog: textbox: Fix compilation warnings
x, y are only used if OLD_NCURSES is set. Add the declaration in its
scope.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon c9c6116afd soc: Clear Kconfig of warnings
This removes default values for these SoCs. They're N by default. This
generates a Kbuild warnings.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon 22ee49a6cf board: Remove framebuffer properties
These properties are board specific, and were already moved to board
files. As such, remove these leftovers.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon 209066181c board: apple-n61ap: Hardcode framebuffer addresses
In preparation for removing these addresses from Kbuild configurators,
hardcode these properties.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon 6169f70a77 board: google-taimen: Remove framebuffer property
This does not work anyway, and may cause memory writes to protected
locations (as FRAMEBUFFER_BASE=0x0)

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon 305245a298 board: samsung: Hardcode framebuffer variables
In preparation for removing unnecessary variables from Kbuild
configuration options.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon 24c29ee8bf board: Fix samsung-r8s formatting
Replace spaces with tabs.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon dadfbf7587 drivers: framework: Remove unused macro
PASS_STRUCT macro is never used and essentially a duplicate of
REGISTER_DRIVER.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 22:17:28 +03:00
Igor Belwon b7e9edeae9 lib: debug: remove cyan color
This is never used. And produces a build warning. It may be added later
if necessary.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 4cca1ce703 board: volla-algiz: Remove stub init functions
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon e91301ee42 board: nothing-tetris: Remove stub init functions
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 1a54ea51c9 board: nokia-essential: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 9cd53a91eb board: google-taimen: Remove stub init functions
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 66baf5f889 board: apple-n61ap: Remove stub init functions
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 66f28ccbfb board: amazon-pw3: Remove stub init functions
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon dd4009796f board: samsung-zeroflte: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon db32feefde board: samsung-x1s: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 86a2d04a8d board: samsung-starlte: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 45a7056e08 board: samsung-r8s: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon ea8ec1bece board: samsung-jackpotlte: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00
Igor Belwon 5cf2f4b238 board: samsung-j5lte: Remove stub init function
This does not accomplish anything, and with the new initcall logic,
can be harmlessly removed.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-10-01 20:02:15 +02:00