Due to divmod performing division by subtracting in a linear loop,
it's *really* slow. When performing division with larger numbers (like
32-bit addresses), it goes thru massive amounts of iterations and causes
a stall-like appearance.
Instead, let the compiler handle it by using cpu instructions like
UDIV/MSUB for armv8.
Fixes#86.
Add basic support for Motorola tundra, usable to boot mainline Linux.
UniLoader has to be packaged with mkbootimg (header_version 3), as it
acts as a wrapper for the kernel image and tree.
This commit adds support for the PSVita 1xxx/2xxx variants, which have:
- 4x Cortex A9
- OLED/LCD display (both types get init. by libbaremetal before)
- 512MB RAM (ew)
- Some PowerVR custom GPU (ew)
* Needs to be unlocked via an exploit
* mkbootimg --kernel uniLoader.lz4 --header_version 4 --out boot.img
* Has very slow fastboot (usb 1.1 speeds slow), so flashing via the
SoC flash mode or fastbootd is recommended
* fastboot flash boot boot.img reboot
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Tests all supposed-to-be-working devices (read - has a defconfig)
for compilation errors. No arm devices have defconfigs so it
hardcodes the arm64 compiler for now.
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>
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.
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.
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>
Commit 7993348878 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.
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.
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.
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>
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>