mirror of
https://github.com/dreemurrs-embedded/Jumpdrive.git
synced 2024-11-16 14:10:06 +00:00
Add Pocket P.C. support
This commit is contained in:
parent
9ec8c77d79
commit
8f296e08a4
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,10 +6,12 @@
|
|||||||
/dtbs
|
/dtbs
|
||||||
/src/linux-rockchip
|
/src/linux-rockchip
|
||||||
/src/linux-sunxi
|
/src/linux-sunxi
|
||||||
|
/src/linux-pocketpc
|
||||||
/src/linux-librem5
|
/src/linux-librem5
|
||||||
/src/linux-sdm845
|
/src/linux-sdm845
|
||||||
/src/busybox
|
/src/busybox
|
||||||
/src/u-boot
|
/src/u-boot
|
||||||
|
/src/u-boot-pocketpc
|
||||||
/src/u-boot-librem5
|
/src/u-boot-librem5
|
||||||
/src/arm-trusted-firmware
|
/src/arm-trusted-firmware
|
||||||
/*.scr
|
/*.scr
|
||||||
|
54
Makefile
54
Makefile
@ -1,7 +1,7 @@
|
|||||||
CROSS_FLAGS = ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
|
CROSS_FLAGS = ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
|
||||||
CROSS_FLAGS_BOOT = 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 boot-xiaomi-beryllium-tianma.img boot-xiaomi-beryllium-ebbg.img boot-oneplus-enchilada.img boot-oneplus-fajita.img
|
all: pine64-pinephone.img.xz pine64-pinetab.img.xz purism-librem5.tar.xz boot-xiaomi-beryllium-tianma.img boot-xiaomi-beryllium-ebbg.img boot-oneplus-enchilada.img boot-oneplus-fajita.img sourceparts-pocketpc.img.xz
|
||||||
|
|
||||||
|
|
||||||
pine64-pinephone.img: fat-pine64-pinephone.img u-boot-sunxi-with-spl.bin
|
pine64-pinephone.img: fat-pine64-pinephone.img u-boot-sunxi-with-spl.bin
|
||||||
@ -46,6 +46,26 @@ fat-pine64-pinetab.img: initramfs-pine64-pinetab.gz kernel-sunxi.gz pine64-pinet
|
|||||||
@mcopy -i $@ initramfs-pine64-pinetab.gz ::initramfs.gz
|
@mcopy -i $@ initramfs-pine64-pinetab.gz ::initramfs.gz
|
||||||
@mcopy -i $@ pine64-pinetab.scr ::boot.scr
|
@mcopy -i $@ pine64-pinetab.scr ::boot.scr
|
||||||
|
|
||||||
|
sourceparts-pocketpc.img: fat-sourceparts-pocketpc.img u-boot-sunxi-with-spl-pocketpc.bin
|
||||||
|
rm -f $@
|
||||||
|
truncate --size 50M $@
|
||||||
|
parted -s $@ mktable msdos
|
||||||
|
parted -s $@ mkpart primary fat32 2048s 100%
|
||||||
|
parted -s $@ set 1 boot on
|
||||||
|
dd if=u-boot-sunxi-with-spl-pocketpc.bin of=$@ bs=8k seek=1
|
||||||
|
dd if=fat-$@ of=$@ seek=1024 bs=1k
|
||||||
|
|
||||||
|
fat-sourceparts-pocketpc.img: initramfs-sourceparts-pocketpc.gz kernel-pocketpc.gz sourceparts-pocketpc.scr dtbs/pocketpc/sun50i-a64-pocket-pc.dtb
|
||||||
|
@echo "MKFS $@"
|
||||||
|
@rm -f $@
|
||||||
|
@truncate --size 40M $@
|
||||||
|
@mkfs.fat -F32 $@
|
||||||
|
|
||||||
|
@mcopy -i $@ kernel-pocketpc.gz ::Image.gz
|
||||||
|
@mcopy -i $@ dtbs/pocketpc/sun50i-a64-pocket-pc.dtb ::sun50i-a64-pocketpc.dtb
|
||||||
|
@mcopy -i $@ initramfs-sourceparts-pocketpc.gz ::initramfs.gz
|
||||||
|
@mcopy -i $@ sourceparts-pocketpc.scr ::boot.scr
|
||||||
|
|
||||||
pine64-pinebookpro.img: fat-pine64-pinebookpro.img u-boot-rk3399.bin
|
pine64-pinebookpro.img: fat-pine64-pinebookpro.img u-boot-rk3399.bin
|
||||||
rm -f $@
|
rm -f $@
|
||||||
truncate --size 50M $@
|
truncate --size 50M $@
|
||||||
@ -118,6 +138,18 @@ initramfs-%.gz: initramfs-%.cpio
|
|||||||
@echo "GZ $@"
|
@echo "GZ $@"
|
||||||
@gzip < $< > $@
|
@gzip < $< > $@
|
||||||
|
|
||||||
|
kernel-pocketpc.gz: src/linux_config_sunxi src/linux-pocketpc
|
||||||
|
@echo "MAKE kernel-pocketpc.gz"
|
||||||
|
@mkdir -p build/linux-pocketpc
|
||||||
|
@mkdir -p dtbs/pocketpc
|
||||||
|
@cp src/linux_config_pocketpc build/linux-pocketpc/.config
|
||||||
|
@$(MAKE) -C src/linux-pocketpc O=../../build/linux-pocketpc $(CROSS_FLAGS) olddefconfig
|
||||||
|
@$(MAKE) -C src/linux-pocketpc O=../../build/linux-pocketpc $(CROSS_FLAGS)
|
||||||
|
@cp build/linux-pocketpc/arch/arm64/boot/Image.gz kernel-pocketpc.gz
|
||||||
|
@cp build/linux-pocketpc/arch/arm64/boot/dts/allwinner/*.dtb dtbs/pocketpc/
|
||||||
|
|
||||||
|
dtbs/pocketpc/sun50i-a64-pocketp-c.dtb: kernel-pocketpc.gz
|
||||||
|
|
||||||
kernel-sunxi.gz: src/linux_config_sunxi src/linux-sunxi
|
kernel-sunxi.gz: src/linux_config_sunxi src/linux-sunxi
|
||||||
@echo "MAKE kernel-sunxi.gz"
|
@echo "MAKE kernel-sunxi.gz"
|
||||||
@mkdir -p build/linux-sunxi
|
@mkdir -p build/linux-sunxi
|
||||||
@ -189,6 +221,13 @@ u-boot-sunxi-with-spl.bin: build/atf/sun50i_a64/bl31.bin src/u-boot
|
|||||||
@BL31=../../../build/atf/sun50i_a64/bl31.bin $(MAKE) -C src/u-boot O=../../build/u-boot/sun50i_a64 $(CROSS_FLAGS_BOOT) ARCH=arm all
|
@BL31=../../../build/atf/sun50i_a64/bl31.bin $(MAKE) -C src/u-boot O=../../build/u-boot/sun50i_a64 $(CROSS_FLAGS_BOOT) ARCH=arm all
|
||||||
@cp build/u-boot/sun50i_a64/u-boot-sunxi-with-spl.bin "$@"
|
@cp build/u-boot/sun50i_a64/u-boot-sunxi-with-spl.bin "$@"
|
||||||
|
|
||||||
|
u-boot-sunxi-with-spl-pocketpc.bin: build/atf/sun50i_a64/bl31.bin src/u-boot-pocketpc
|
||||||
|
@echo "MAKE $@"
|
||||||
|
@mkdir -p build/u-boot-pocketpc/sun50i_a64
|
||||||
|
@BL31=../../../build/atf/sun50i_a64/bl31.bin $(MAKE) -C src/u-boot-pocketpc O=../../build/u-boot-pocketpc/sun50i_a64 $(CROSS_FLAGS_BOOT) pocket_pc_defconfig
|
||||||
|
@BL31=../../../build/atf/sun50i_a64/bl31.bin $(MAKE) -C src/u-boot-pocketpc O=../../build/u-boot-pocketpc/sun50i_a64 $(CROSS_FLAGS_BOOT) ARCH=arm all
|
||||||
|
@cp build/u-boot-pocketpc/sun50i_a64/u-boot-sunxi-with-spl.bin "$@"
|
||||||
|
|
||||||
build/atf/rk3399/bl31.elf: src/arm-trusted-firmware
|
build/atf/rk3399/bl31.elf: src/arm-trusted-firmware
|
||||||
@echo "MAKE $@"
|
@echo "MAKE $@"
|
||||||
@mkdir -p build/atf/rk3399
|
@mkdir -p build/atf/rk3399
|
||||||
@ -220,6 +259,13 @@ src/linux-sunxi:
|
|||||||
@wget https://github.com/megous/linux/archive/orange-pi-5.9-20201019-1553.tar.gz
|
@wget https://github.com/megous/linux/archive/orange-pi-5.9-20201019-1553.tar.gz
|
||||||
@tar -xf orange-pi-5.9-20201019-1553.tar.gz --strip-components 1 -C src/linux-sunxi
|
@tar -xf orange-pi-5.9-20201019-1553.tar.gz --strip-components 1 -C src/linux-sunxi
|
||||||
|
|
||||||
|
src/linux-pocketpc:
|
||||||
|
@echo "WGET linux-pocketpc"
|
||||||
|
@mkdir src/linux-pocketpc
|
||||||
|
@wget https://github.com/PopcornComputer/PocketPC-Linux/archive/81a7953afc5cd1001b727701dc99625ec656160a.tar.gz
|
||||||
|
@tar -xf 81a7953afc5cd1001b727701dc99625ec656160a.tar.gz --strip-components 1 -C src/linux-pocketpc
|
||||||
|
@cd src/linux-pocketpc && patch -p1 < ../pocket-pc-usb.patch
|
||||||
|
|
||||||
src/linux-librem5:
|
src/linux-librem5:
|
||||||
@echo "WGET linux-librem5"
|
@echo "WGET linux-librem5"
|
||||||
@mkdir src/linux-librem5
|
@mkdir src/linux-librem5
|
||||||
@ -251,6 +297,12 @@ src/u-boot-librem5:
|
|||||||
@wget https://source.puri.sm/Librem5/u-boot-builder/-/archive/3b1c7d957f46c87c6cdd71cd8dab7c84aca26570/u-boot-builder-3b1c7d957f46c87c6cdd71cd8dab7c84aca26570.tar.gz
|
@wget https://source.puri.sm/Librem5/u-boot-builder/-/archive/3b1c7d957f46c87c6cdd71cd8dab7c84aca26570/u-boot-builder-3b1c7d957f46c87c6cdd71cd8dab7c84aca26570.tar.gz
|
||||||
@tar -xf u-boot-builder-3b1c7d957f46c87c6cdd71cd8dab7c84aca26570.tar.gz --strip-components 1 -C src/u-boot-librem5
|
@tar -xf u-boot-builder-3b1c7d957f46c87c6cdd71cd8dab7c84aca26570.tar.gz --strip-components 1 -C src/u-boot-librem5
|
||||||
|
|
||||||
|
src/u-boot-pocketpc:
|
||||||
|
@echo "WGET u-boot-pocketpc"
|
||||||
|
@mkdir src/u-boot-pocketpc
|
||||||
|
@wget https://github.com/PopcornComputer/PocketPC-Uboot/archive/49694d39d856c9ab537c4f2ff1d0167f4e21d19b.tar.gz
|
||||||
|
@tar -xf 49694d39d856c9ab537c4f2ff1d0167f4e21d19b.tar.gz --strip-components 1 -C src/u-boot-pocketpc
|
||||||
|
|
||||||
src/busybox:
|
src/busybox:
|
||||||
@echo "WGET busybox"
|
@echo "WGET busybox"
|
||||||
@mkdir src/busybox
|
@mkdir src/busybox
|
||||||
|
BIN
splash/sourceparts-pocketpc-error.ppm
Normal file
BIN
splash/sourceparts-pocketpc-error.ppm
Normal file
Binary file not shown.
BIN
splash/sourceparts-pocketpc.ppm
Normal file
BIN
splash/sourceparts-pocketpc.ppm
Normal file
Binary file not shown.
BIN
splash/sourceparts-pocketpc.xcf
Normal file
BIN
splash/sourceparts-pocketpc.xcf
Normal file
Binary file not shown.
7
src/info-sourceparts-pocketpc.sh
Normal file
7
src/info-sourceparts-pocketpc.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PLATFORM=sourceparts-pocketpc
|
||||||
|
MANUFACTURER=Sourceparts
|
||||||
|
PRODUCT=PocketPC
|
||||||
|
EMMC=/dev/mmcblk2
|
||||||
|
SD=/dev/mmcblk0
|
||||||
|
SERIAL_CON=ttyS0
|
||||||
|
SERIAL_BAUD=115200
|
4978
src/linux_config_pocketpc
Normal file
4978
src/linux_config_pocketpc
Normal file
File diff suppressed because it is too large
Load Diff
13
src/pocket-pc-usb.patch
Normal file
13
src/pocket-pc-usb.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pocket-pc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pocket-pc.dts
|
||||||
|
index d309fc49a50f..194a0ecb7895 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pocket-pc.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pocket-pc.dts
|
||||||
|
@@ -472,7 +472,7 @@ &uart3 {
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_otg {
|
||||||
|
- dr_mode = "otg";
|
||||||
|
+ dr_mode = "peripheral";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
14
src/sourceparts-pocketpc.txt
Normal file
14
src/sourceparts-pocketpc.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
setenv kernel_addr_z 0x44080000
|
||||||
|
|
||||||
|
setenv bootargs loglevel=0 silent console=tty0 vt.global_cursor_default=0
|
||||||
|
|
||||||
|
if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_z} /Image.gz; then
|
||||||
|
unzip ${kernel_addr_z} ${kernel_addr_r}
|
||||||
|
if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /sun50i-a64-pocketpc.dtb; then
|
||||||
|
if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /initramfs.gz; then
|
||||||
|
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
|
||||||
|
else
|
||||||
|
booti ${kernel_addr_r} - ${fdt_addr_r};
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user