mirror of
https://github.com/dreemurrs-embedded/Jumpdrive.git
synced 2024-11-16 14:10:06 +00:00
Add support for sdm845 mainline Android devices: beryllium, enchilada, fajita
This commit is contained in:
parent
3383f2774a
commit
31af1bc923
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
/src/linux-rockchip
|
||||
/src/linux-sunxi
|
||||
/src/linux-librem5
|
||||
/src/linux-sdm845
|
||||
/src/busybox
|
||||
/src/u-boot
|
||||
/src/u-boot-librem5
|
||||
@ -15,6 +16,7 @@
|
||||
/*.dtb
|
||||
/*.img.xz
|
||||
/*.gz
|
||||
/*.gz-dtb
|
||||
/*.bin
|
||||
/*.tar.bz2
|
||||
/*.tar.xz
|
||||
|
49
Makefile
49
Makefile
@ -1,7 +1,7 @@
|
||||
CROSS_FLAGS = ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
|
||||
CROSS_FLAGS_BOOT = CROSS_COMPILE=aarch64-linux-gnu-
|
||||
|
||||
all: pine64-pinephone.img.xz pine64-pinetab.img.xz purism-librem5.tar.xz
|
||||
all: pine64-pinephone.img.xz pine64-pinetab.img.xz purism-librem5.tar.xz xiaomi-beryllium-tianma.img xiaomi-beryllium-ebbg.img oneplus-enchilada.img oneplus-fajita.img
|
||||
|
||||
|
||||
pine64-pinephone.img: fat-pine64-pinephone.img u-boot-sunxi-with-spl.bin
|
||||
@ -67,6 +67,28 @@ fat-pine64-pinebookpro.img: initramfs-pine64-pinebookpro.gz kernel-rockchip.gz s
|
||||
@mmd -i $@ extlinux
|
||||
@mcopy -i $@ src/pine64-pinebookpro.conf ::extlinux/extlinux.conf
|
||||
|
||||
kernel-xiaomi-beryllium-tianma.gz-dtb: kernel-sdm845.gz dtbs/sdm845/sdm845-xiaomi-beryllium-tianma.dtb
|
||||
cat kernel-sdm845.gz dtbs/sdm845/sdm845-xiaomi-beryllium-tianma.dtb > $@
|
||||
|
||||
kernel-xiaomi-beryllium-ebbg.gz-dtb: kernel-sdm845.gz dtbs/sdm845/sdm845-xiaomi-beryllium-ebbg.dtb
|
||||
cat kernel-sdm845.gz dtbs/sdm845/sdm845-xiaomi-beryllium-ebbg.dtb > $@
|
||||
|
||||
kernel-oneplus-enchilada.gz-dtb: kernel-sdm845.gz dtbs/sdm845/sdm845-oneplus-enchilada.dtb
|
||||
cat kernel-sdm845.gz dtbs/sdm845/sdm845-oneplus-enchilada.dtb > $@
|
||||
|
||||
kernel-oneplus-fajita.gz-dtb: kernel-sdm845.gz dtbs/sdm845/sdm845-oneplus-fajita.dtb
|
||||
cat kernel-sdm845.gz dtbs/sdm845/sdm845-oneplus-fajita.dtb > $@
|
||||
|
||||
boot-%.img: initramfs-%.gz kernel-%.gz-dtb
|
||||
rm -f $@
|
||||
$(eval BASE := $(shell cat src/deviceinfo_$* | grep base | cut -d "\"" -f 2))
|
||||
$(eval SECOND := $(shell cat src/deviceinfo_$* | grep second | cut -d "\"" -f 2))
|
||||
$(eval KERNEL := $(shell cat src/deviceinfo_$* | grep kernel | cut -d "\"" -f 2))
|
||||
$(eval RAMDISK := $(shell cat src/deviceinfo_$* | grep ramdisk | cut -d "\"" -f 2))
|
||||
$(eval TAGS := $(shell cat src/deviceinfo_$* | grep tags | cut -d "\"" -f 2))
|
||||
$(eval PAGESIZE := $(shell cat src/deviceinfo_$* | grep pagesize | cut -d "\"" -f 2))
|
||||
mkbootimg --kernel kernel-$*.gz-dtb --ramdisk initramfs-$*.gz --base $(BASE) --second_offset $(SECOND) --kernel_offset $(KERNEL) --ramdisk_offset $(RAMDISK) --tags_offset $(TAGS) --pagesize $(PAGESIZE) -o $@
|
||||
|
||||
%.img.xz: %.img
|
||||
@echo "XZ $@"
|
||||
@xz -c $< > $@
|
||||
@ -132,6 +154,24 @@ kernel-librem5.gz: src/linux_config_librem5 src/linux-librem5
|
||||
|
||||
dtbs/librem5/imx8mq-librem5-r2.dtb: kernel-librem5.gz
|
||||
|
||||
kernel-sdm845.gz: src/linux-sdm845
|
||||
@echo "MAKE $@"
|
||||
@mkdir -p build/linux-sdm845
|
||||
@mkdir -p dtbs/sdm845
|
||||
@$(MAKE) -C src/linux-sdm845 O=../../build/linux-sdm845 $(CROSS_FLAGS) defconfig sdm845.config
|
||||
@printf "CONFIG_USB_ETH=n" >> build/linux-sdm845/.config
|
||||
@$(MAKE) -C src/linux-sdm845 O=../../build/linux-sdm845 $(CROSS_FLAGS)
|
||||
@cp build/linux-sdm845/arch/arm64/boot/Image.gz $@
|
||||
@cp build/linux-sdm845/arch/arm64/boot/dts/qcom/sdm845-{xiaomi-beryllium-*,oneplus-enchilada,oneplus-fajita}.dtb dtbs/sdm845/
|
||||
|
||||
dtbs/sdm845/sdm845-xiaomi-beryllium-ebbg.dtb: kernel-sdm845.gz
|
||||
|
||||
dtbs/sdm845/sdm845-xiaomi-beryllium-tianma.dtb: kernel-sdm845.gz
|
||||
|
||||
dtbs/sdm845/sdm845-oneplus-enchilada.dtb: kernel-sdm845.gz
|
||||
|
||||
dtbs/sdm845/sdm845-oneplus-fajita.dtb: kernel-sdm845.gz
|
||||
|
||||
%.scr: src/%.txt
|
||||
@echo "MKIMG $@"
|
||||
@mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d $< $@
|
||||
@ -186,6 +226,12 @@ src/linux-librem5:
|
||||
@wget -c https://source.puri.sm/Librem5/linux-next/-/archive/pureos/5.9.16+librem5.2/linux-next-pureos-5.9.16+librem5.2.tar.gz
|
||||
@tar -xvf linux-next-pureos-5.9.16+librem5.2.tar.gz --strip-components 1 -C src/linux-librem5
|
||||
|
||||
src/linux-sdm845:
|
||||
@echo "WGET linux-sdm845"
|
||||
@mkdir src/linux-sdm845
|
||||
@wget -c https://gitlab.com/sdm845-mainline/sdm845-linux/-/archive/sdm845-stable/sdm845-linux-sdm845-stable.tar.gz
|
||||
@tar -xvf sdm845-linux-sdm845-stable.tar.gz --strip-components 1 -C src/linux-sdm845
|
||||
|
||||
src/arm-trusted-firmware:
|
||||
@echo "WGET arm-trusted-firmware"
|
||||
@mkdir src/arm-trusted-firmware
|
||||
@ -232,6 +278,7 @@ cleanfast:
|
||||
@rm -vf *.bin
|
||||
@rm -vf *.cpio
|
||||
@rm -vf *.gz
|
||||
@rm -vf *.gz-dtb
|
||||
@rm -vf *.scr
|
||||
@rm -vf splash/*.gz
|
||||
@rm -vf *.lst
|
||||
|
10
README.md
10
README.md
@ -5,6 +5,9 @@ A swiss army knife for mobile devices, currently supporting:
|
||||
- Pine64 PineTab
|
||||
- Pine64 PinePhone
|
||||
- Purism Librem 5
|
||||
- Xiaomi Pocophone F1
|
||||
- OnePlus 6
|
||||
- OnePlus 6T
|
||||
|
||||
You can use this to flash a image **directly to eMMC**, troubleshooting a broken system, and a lot more.
|
||||
|
||||
@ -32,6 +35,10 @@ In case eMMC isn't showing up try to charge your battery and try again. There ar
|
||||
|
||||
Extract the downloaded JumpDrive release archive for the Librem 5, put the device into flash mode, then run the `boot-purism-librem5.sh` script from the release.
|
||||
|
||||
### Xiaomi Pocophone F1 / OnePlus 6 / OnePlus 6T
|
||||
|
||||
Boot the image using `fastboot boot`.
|
||||
|
||||
### Building
|
||||
|
||||
The dependencies are:
|
||||
@ -44,6 +51,9 @@ Additional dependencies for the Purism Librem 5:
|
||||
- arm-none-eabi- toolchain
|
||||
- uuu
|
||||
|
||||
Additional dependencies for the Xiaomi Pocophone F1 / OnePlus 6 / OnePlus 6T:
|
||||
- mkbootimg
|
||||
|
||||
```shell-session
|
||||
$ git submodule update --init --recursive
|
||||
Downloads the projects to build
|
||||
|
BIN
splash/oneplus-enchilada-error.ppm
Normal file
BIN
splash/oneplus-enchilada-error.ppm
Normal file
Binary file not shown.
BIN
splash/oneplus-enchilada.ppm
Normal file
BIN
splash/oneplus-enchilada.ppm
Normal file
Binary file not shown.
BIN
splash/oneplus-fajita-error.ppm
Normal file
BIN
splash/oneplus-fajita-error.ppm
Normal file
Binary file not shown.
BIN
splash/oneplus-fajita.ppm
Normal file
BIN
splash/oneplus-fajita.ppm
Normal file
Binary file not shown.
1
splash/xiaomi-beryllium-ebbg-error.ppm
Symbolic link
1
splash/xiaomi-beryllium-ebbg-error.ppm
Symbolic link
@ -0,0 +1 @@
|
||||
xiaomi-beryllium-error.ppm
|
1
splash/xiaomi-beryllium-ebbg.ppm
Symbolic link
1
splash/xiaomi-beryllium-ebbg.ppm
Symbolic link
@ -0,0 +1 @@
|
||||
xiaomi-beryllium.ppm
|
BIN
splash/xiaomi-beryllium-error.ppm
Normal file
BIN
splash/xiaomi-beryllium-error.ppm
Normal file
Binary file not shown.
1
splash/xiaomi-beryllium-tianma-error.ppm
Symbolic link
1
splash/xiaomi-beryllium-tianma-error.ppm
Symbolic link
@ -0,0 +1 @@
|
||||
xiaomi-beryllium-error.ppm
|
1
splash/xiaomi-beryllium-tianma.ppm
Symbolic link
1
splash/xiaomi-beryllium-tianma.ppm
Symbolic link
@ -0,0 +1 @@
|
||||
xiaomi-beryllium.ppm
|
BIN
splash/xiaomi-beryllium.ppm
Normal file
BIN
splash/xiaomi-beryllium.ppm
Normal file
Binary file not shown.
1
src/deviceinfo_oneplus-enchilada
Symbolic link
1
src/deviceinfo_oneplus-enchilada
Symbolic link
@ -0,0 +1 @@
|
||||
deviceinfo_sdm845
|
1
src/deviceinfo_oneplus-fajita
Symbolic link
1
src/deviceinfo_oneplus-fajita
Symbolic link
@ -0,0 +1 @@
|
||||
deviceinfo_sdm845
|
6
src/deviceinfo_sdm845
Normal file
6
src/deviceinfo_sdm845
Normal file
@ -0,0 +1,6 @@
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="4096"
|
1
src/deviceinfo_xiaomi-beryllium-ebbg
Symbolic link
1
src/deviceinfo_xiaomi-beryllium-ebbg
Symbolic link
@ -0,0 +1 @@
|
||||
deviceinfo_sdm845
|
1
src/deviceinfo_xiaomi-beryllium-tianma
Symbolic link
1
src/deviceinfo_xiaomi-beryllium-tianma
Symbolic link
@ -0,0 +1 @@
|
||||
deviceinfo_sdm845
|
5
src/info-oneplus-enchilada.sh
Normal file
5
src/info-oneplus-enchilada.sh
Normal file
@ -0,0 +1,5 @@
|
||||
PLATFORM=oneplus-enchilada
|
||||
MANUFACTURER=OnePlus
|
||||
PRODUCT="OnePlus 6"
|
||||
EMMC=/dev/sda17
|
||||
SD=/dev/mmcblk0
|
5
src/info-oneplus-fajita.sh
Normal file
5
src/info-oneplus-fajita.sh
Normal file
@ -0,0 +1,5 @@
|
||||
PLATFORM=oneplus-fajita
|
||||
MANUFACTURER=OnePlus
|
||||
PRODUCT="OnePlus 6T"
|
||||
EMMC=/dev/sda17
|
||||
SD=/dev/mmcblk0
|
1
src/info-xiaomi-beryllium-ebbg.sh
Symbolic link
1
src/info-xiaomi-beryllium-ebbg.sh
Symbolic link
@ -0,0 +1 @@
|
||||
info-xiaomi-beryllium.sh
|
1
src/info-xiaomi-beryllium-tianma.sh
Symbolic link
1
src/info-xiaomi-beryllium-tianma.sh
Symbolic link
@ -0,0 +1 @@
|
||||
info-xiaomi-beryllium.sh
|
5
src/info-xiaomi-beryllium.sh
Normal file
5
src/info-xiaomi-beryllium.sh
Normal file
@ -0,0 +1,5 @@
|
||||
PLATFORM=xiaomi-beryllium
|
||||
MANUFACTURER=Xiaomi
|
||||
PRODUCT="Pocophone F1"
|
||||
EMMC=/dev/sda21
|
||||
SD=/dev/mmcblk0
|
Loading…
Reference in New Issue
Block a user