mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
34fe1d66891f29ed4178afae80d097bf454fcb4a
For a while now, both simple-framebuffer and uart were hard-wired to the debug library. You could alternate between each or have both running, but the implementation was really ugly - ifdefs based on whether uart/simplefb are compiled in or not. As uniLoader has advanced enough to feature a sane-ish probing system for drivers, we can start experimenting with things like: - multiple framebuffers / UART devices - support for more complex peripherals (USB, storage) - multiple boot paths Hence registering output sinks as console devices, just like how u-boot and linux do, is a feature we should've had a long while ago. So let's begin working on that by decoupling framebuffer and uart from the "debug" interface in uni and rather allowing the registering of such sinks as "console" devices. With that, make the simple-framebuffer driver handle the debug level colors as well as the message assembling and writing to the framebuffer. That fully detaches it from the debug interface, as all that is required now is to invoke console_register() with the appropriate struct passed as an argument. As the drivers for output sinks are now responsible for the formatting of the messages, their set-up and writing, UART can be implemented as a sole driver as well. However, drivers register late in the boot process (after assembly, board early_initand other drivers with higher priority). With that in mind and all the leftover UART puts/c code in board files for several of the currently supported devices, introduce an early console path dedicated for debugging via UART. Looking at the currently supported devices, the only one requiring set-up before being able to output to UART is lucky7. For ease of use, make early_console_init weak, allowing it to be overrided by board files such as board-lucky7. Lastly, debug -> console, as that more correctly addresses the purpose of the library now.
uniLoader
uniLoader is a minimalistic loader, capable of booting Linux kernels. It can be used as an intermediate bootloader, providing a clean booting environment in case of a forced and buggy bootloader.
Supported Architectures
- ARMv7
- ARMv8
Supported Devices
Apple
- N61AP
Amazon
- PW3
Blackview
- Tab15Pro
- Taimen
Huawei
- Agassi2
itel
- P682LPN
Infinix
- X6710
Nokia
- Essential
Nothing
- Tetris
QEMU
- Virt
Realme
- RMX3511
Samsung
- A3XELTE
- A10
- A12S
- A30
- A33X
- BEYOND1LTE
- C1S
- DREAMLTE
- G0S
- GTA4XL
- HEROLTE
- J4LTE
- J5LTE
- JACKPOTLTE
- LUCKY7
- NOBLELTE
- R0Q
- R8S
- STARLTE
- X1S
- ZEROFLTE
Sony
- PDX245
- PSVITA
Volla
- Algiz
Xiaomi
- Begonia
- Blossom
- Camellia
Make Syntax
make ARCH=$(arch) CROSS_COMPILE=$(toolchain)
Building Example
sudo apt install aarch64-linux-gnu
git clone https://github.com/ivoszbg/uniLoader
cd uniLoader
cp /home/user/linux/arch/arm64/boot/Image blob/Image
cp /home/user/linux/arch/arm64/boot/dts/exynos/exynos8895-dreamlte.dtb blob/dtb
cp /home/user/ramdisk.gz blob/ramdisk
make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- dreamlte_defconfig
make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu-
Build with Clang and LLVM toolchain
make ARCH=aarch64 LLVM=1 dreamlte_defconfig
make ARCH=aarch64 LLVM=1
make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=/bin dreamlte_defconfig
make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=/bin
License
This project is licensed under GPLv2.
Languages
C
82.7%
C++
5.9%
Makefile
4.4%
Assembly
2.9%
Yacc
1.8%
Other
2.3%