Commit Graph

104 Commits

Author SHA1 Message Date
Igor Belwon
f6f2c5e030 gitignore: Ignore lz4-built uniLoader 2025-08-23 18:40:17 +02:00
Igor Belwon
ac9b574b27 project: Add new compression options
Add support for compressing the uniLoader image with lz4, and while we're at it add two new Kconfig variables for setting compression tools used in the build.
2025-08-23 18:39:52 +02:00
Ivaylo Ivanov
759bc09d8f board: introduce support for Samsung Galaxy A3 2016 2025-08-07 13:54:27 +03:00
Ivaylo Ivanov
1b07caaea4 lib: simplefb: calculate font scaling factor dynamically
Instead of hardcoding it to 2 for all devices, scale it dynamically
per device width and height.
2025-08-07 13:13:05 +03:00
Ivaylo Ivanov
5f0cca1951 lib: simplefb: return on a null fb_info
This should avoid cases where fb_info struct is not populated.
2025-08-07 11:36:45 +03:00
Ivaylo Ivanov
aa0163f2a5 lib: simplefb: drop passing fb base via func args
As we can make use of the video_info struct for base address,
this argument is not required anymore and only breaks havoc on
boards that don't set the CONFIG option.
2025-08-07 11:09:29 +03:00
Ивайло Иванов
eae304698b Merge pull request #39 from BotchedRPR/master
Introduce support for qemu virt platform
2025-07-30 09:34:31 +03:00
BotchedRPR
e8bd7fdf7f board: Introduce support for qemu virt platform
This platform can be used for testing and easier debug of the bootloader.

After compiling, the emulation can be started with this command line:

qemu-system-aarch64 -machine virt -cpu cortex-a72 -nographic -m 512m -kernel uniLoader.o
2025-07-24 23:12:51 +02:00
Ivaylo Ivanov
3472279d6f aarch64: guard reloc's linux header with CONFIG_LINUX_KRNL_HEADER_IMG
Boards can enable it where needed.
2025-07-23 10:45:03 +03:00
Ivaylo Ivanov
0d0f1f8f61 board: introduce support for Google Pixel 2 XL
Simple framebuffer doesn't work due to the previous bootloader messing
up with the display on exit uefi boot services. Uart works with a
usb3.1 cable and a breakout board, where a 51k resistor is connected
A5 and A6, A5 is wired to the +5V, B8 to RX and GND to GND.
2025-07-23 10:40:46 +03:00
Ivaylo Ivanov
be87eecf40 aarch64: add an option to append a linux kernel image header for no-PiC 2025-07-23 10:37:48 +03:00
Ivaylo Ivanov
2990092d47 Makefile: set compiler optimizations for armv8-a and provide uniLoader as gzip
uniLoader needs to be gzipped on Qualcomm platforms, as the bootloader
expects that format (usually).
2025-07-23 10:18:30 +03:00
ghatt-o
bc7d49209a README: change arm64 build example to aarch64 2025-07-12 13:04:32 +03:00
Ivaylo Ivanov
579bbfa393 lib: break ABI by reworking simplefb and then fix it
Jokes aside, commit adds support for colored indexes based on the
loglevel, introduces a better simplefb probing that does not depend
on hardcoded config options. Implementing support for fdt should be
easier now.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
0497f0f546 include: drop unneeded writel definition from main.h 2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
83f36d5576 main: set printk log levels to meaningful values 2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
4bc933e9d5 Makefile: change build priority of folders 2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
5359c3caeb board: rework the board data structure
Since we don't have to worry about writing positionally-independent
code, we can safely pass around globally defined structures and
have more fun with pointers without falling into UB.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
293f64ad9c board: move starlte device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
eb2b393eee board: move zeroflte device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig. The device
is assumed to need POSITION_INDEPENDENT. There's a small possibility it
may not work because it has not yet been tested on real hw.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
56a5fb25b2 board: move jackpotlte device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig. The device
is assumed to need POSITION_INDEPENDENT. There's a small possibility it
may not work because it has not yet been tested on real hw.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
fae8c25c8a board: move noblelte device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig. The device
is assumed to need POSITION_INDEPENDENT. There's a small possibility it
may not work because it has not yet been tested on real hw.
2025-07-11 13:45:58 +03:00
Ivaylo Ivanov
c1364d31af board: move exynos990-based device specific addresses to defconfigs
This is done with the idea of uncluttering the Kconfig. Also set up
a TEXT_BASE and POSITION_INDEPENDENT.
2025-07-11 13:45:42 +03:00
Ivaylo Ivanov
a75d1d649a board: move g0s device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig. Also set
TEXT_BASE and POSITION_INDEPENDENT
2025-07-11 13:38:37 +03:00
Ivaylo Ivanov
c6b486f0ed aarch64: introduce early relocation of the bootloader
All newer exynos devices with s-boot have the "feature" of placing the
android kernel at a random location in dram, specifically around
0x80000000 and 0x83000000. This made it hard to assume where we are at,
hence why we made everything as PiE (position-independent) as possible.

This, however, resulted in a lot of issues. I usually managed to get
around them with ugly hacks, but in the last 5-6 commits, with the
fixed support for armv7, everything fell apart for arm64.

So, the solution for this is to implement code at the beginning
of the bootloader that relocates it to a safe place in memory.
This is currently enabled for dreamlte, and it must be enabled
and configured for all other boards with that issue. Otherwise they
will NOT boot anymore. Boards that don't need this can keep
CONFIG_POSITION_INDEPENDENT disabled.
2025-07-10 15:58:45 +03:00
Ivaylo Ivanov
2ebd7ac7a5 board: move a336b device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 12:04:02 +03:00
Ivaylo Ivanov
a8968af653 board: move a127f device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 12:01:52 +03:00
Ivaylo Ivanov
d6cc10d79f board: move a105f device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 12:00:52 +03:00
Ivaylo Ivanov
5a53509a00 board: move dreamlte device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 11:49:44 +03:00
Ivaylo Ivanov
c9dad42f53 board: move n61ap device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 11:42:19 +03:00
Ivaylo Ivanov
2ceed988bc board: apple: modernize n61ap
This brings it up to the latest changes, like the other boards,
and makes it compilable.
2025-07-09 11:42:19 +03:00
Ivaylo Ivanov
4763355d48 aarch64: drop hardcoding start.o in favor of having a text section
This resolves the current compiling issue of multiple definitions,
since arch/built-in.o is included in makefile.
2025-07-09 11:42:19 +03:00
Ivaylo Ivanov
850ba48539 board: move pw3 device specific addresses to defconfig
This is done with the idea of uncluttering the Kconfig
2025-07-09 11:42:11 +03:00
Ivaylo Ivanov
925a60bbf9 main: spew out a "versioning" tag that's defined in root makefile
This will be useful for tracking bugs of users in the future. Also
lowercase each print and drop exclamation marks because I like this
aesthetic of unofficialness a bit better.
2025-07-08 19:05:46 +03:00
Ivaylo Ivanov
280972aec2 lib: debug: add printf functionality with nanoprintf
Add the respectively required definitions in unic.
2025-07-08 19:02:39 +03:00
Ivaylo Ivanov
0008ecfa60 arch: use per-arch makefile instead of hardcoding in the root one
At some point building for arm32 was broken, because the assumption
of an assembly memcpy existing was made. It, however, did not exist
for arm32, only arm64, hence build failing. Avoid this.
2025-07-08 18:07:32 +03:00
Ivaylo Ivanov
8dc27cc402 board: introduce Amazon Kindle PW3 support
With support for this board also come the following changes:
- rework blobs handling to get past the 0 size bug
- basic cpu "set up" in start.S
- assembly memcpy
- uart debugging
2025-07-08 15:54:02 +03:00
Muhammad
20f759082d board: Add support for Samsung Galaxy A33
Adds basic support for the Exynos 1280 SoC in the Galaxy A33
2025-04-04 16:43:32 +03:00
Anri Dellal
b92c92452b board: add support for Samsung Galaxy A10
Add support for Samsung Galaxy A10, codenamed A105F.
2025-04-04 16:32:11 +03:00
Alexandru Chimac
95f4202dec gta4xl: Set CONFIG_RAMDISK_ENTRY 2025-04-04 16:15:06 +03:00
famfo
c41e339369 board: Add support for Samsung A127F
Add support for the Samsung Galaxy A12 Nacho, codenamed A127F,
as well as define the SoC.
2025-04-04 16:13:57 +03:00
Ivaylo Ivanov
5ee9fd9c1a board: add support for Volla Phone Quintus
Add support for the Volla Algiz phone, as well as define MT6877.
2025-04-04 16:01:57 +03:00
famfo
21bf08f9d4 main: Move initialization of board_data to the stack
When the board_data is initialized at compile time, it is placed into
the data section, which doesn't get relocated by the linker. The resulting
address of the board_data that is passed to board_init lies within reserved
memory and the device crashes.
2025-04-04 15:57:39 +03:00
Ivaylo Ivanov
d3865c371b board: Add support for g0s (Samsung Galaxy S22+)
Add basic support for S22+. Set up some regulators via ACPM and kill
the watchdog till we have proper watchdog feeding.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2025-02-24 10:21:49 +02:00
Ivaylo Ivanov
39735b91f3 drivers: samsung: Introduce exynos-acpm
Implement an ACPM driver with helpers to allow communicating
with PMIC via SPMI for newer exynos devices.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2025-02-24 10:20:05 +02:00
Ivaylo Ivanov
15b9df6604 blob: Uncache blob files
To properly make use of the gitignore, drop the empty blob files.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2025-02-24 10:19:17 +02:00
Igor Belwon
3657d228bc check-lxdialog: Fix lxdialog check on new compilers
This causes menuconfig to not work, as without the function
return type, gcc will produce a warning.

Fixes:
$ make menuconfig
  HOSTCC  scripts/kconfig/conf.o
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: *** [/home/igor/phones/z3s/uniLoader/scripts/kconfig/Makefile:219: scripts/kconfig/dochecklxdialog] Error 1

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
2025-01-15 21:04:44 +01:00
Denzeel Oliva
b46bbd2a47 board: Add support for r8s (Samsung Galaxy S20 FE)
Add basic support for Galaxy S20 FE, based on the Exynos 990.

Signed-off-by: Denzeel Oliva <wachiturroxd150@gmail.com>
[added a commit message]
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2024-12-01 22:16:01 +02:00
Ivaylo Ivanov
eba7aec49d drivers: samsung: Introduce exynos-speedy
Speedy is a serial communication bus that is typically used in
Exynos SoC devices for communicating with a PMIC. Implement
basic support for it, as well as add its first user - s2mps17 in
board-dreamlte.

Also, while at it, implement a simple readl function.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2024-10-28 15:09:59 +02:00
Ivaylo Ivanov
8b562d28fa board: Set CONFIG_RAMDISK_ENTRY for all exynos990 platforms
Needed for Linux to boot a ramdisk, works on all 990 platforms and
removes the need of configuring it manually.

Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org>
2024-10-22 11:27:50 +03:00