mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-06-13 13:30:04 +00:00
improvs-drivers
The current drivers/framework.c is useless, as REGISTER_DRIVER() is a macro
that just directly calls the driver probe function. Every board file has to
reference each driver's probe function by name. This was just done to make room
for proper driver probing in the future, where we are now, so implement that.
Make drivers self-register at link time by emitting a struct driver into a
.uniloader_drivers section via DRIVER_REGISTER(). The linker brackets
the section with __drivers_start / __drivers_end symbols.
Boards describe their hardware as a static struct with the format
{ driver_name, plat_data, label }. Remove the drivers_init hook from
struct board_ops as it's no longer necessary.
The drivers probe will now be placed between early_init and splash.
The framework looks up each device's driver_name up in the
linker section and calls probe(plat_data). A failed probe is logged.
Do --whole-archive as well to convince the linker to not drop the drivers
in archived .o files that aren't called outside the archive.
Adopt all boards to use the framework.
All of the changes in this commit are co-dependent on each other, as we're
doing a large change to the ABI.
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.6%
C++
6%
Makefile
4.4%
Assembly
2.9%
Yacc
1.8%
Other
2.3%