Xperia 1 VI is a flagship phone manufactured by Sony, based on the
Qualcomm Snapdragon 8 Gen 3 Mobile Platform.
Add support for this board.
NOTE: This board is new, and as such, it requires some ugly hax and
a fallback boot method to boot any sort of [u-boot/uniLoader/mainline]
In short:
- build:
- ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- make -j32
- cat uniLoader.gz dummy.dtb > uni.dtb
- mkbootimg --kernel uni.dtb --ramdisk <some ramdisk (required)> \
--pagesize 4096 --base 0x0 --kernel_offset 0x8000 \
--ramdisk_offset 0x1000000 --tags_offset 0x100 \
--dtb_offset 0x1f00000 --header_version 0 --os_version 16.0.0 \
--os_patch_level 2026-04 -o boot.img
(yes, all properties are required.)
- prepare device:
- boot to fastboot mode (volume up and plug in USB)
- fastboot erase dtbo erase vendor_boot
- flash:
- fastboot flash boot boot.img continue
Where:
- dummy.dtb is a skeleton.dtsi with a reserved memory node called
splash_region as a child of the chosen node.
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Pass the address of the address of the DTB to patch_dtb in boot.c, rather than just the address to the DTB.
This allows the modified DTB address to overwrite the address of the original DTB, fixing a bug where
the ramdisk address was not being passed to the kernel via the DTB successfully.
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 https://github.com/ivoszbg/uniLoader/commit/7993348878f9252da96ac5096d2dbb3727b328bc 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.