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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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>
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>
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>
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>
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>