File tree 4 files changed +81
-4
lines changed
PKGBUILDS/pine64/device-pine64-pinetab
4 files changed +81
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Maintainer: Danct12 <[email protected] >
2
2
pkgname=device-pine64-pinetab
3
3
pkgver=0.2
4
- pkgrel=3
4
+ pkgrel=4
5
5
pkgdesc=" PineTab device package"
6
6
arch=(aarch64)
7
7
url=" https://github.com/dreemurrs-embedded/Pine64-Arch"
8
8
license=(' MIT' )
9
+ install=" $pkgname .install"
10
+ backup=(" boot/boot.txt" )
9
11
depends=(linux-megi
10
- uboot-pinephone
11
12
rtl8723bt-firmware
12
13
ov5640-firmware
14
+ uboot-tools # we need this for mkscr
13
15
alsa-ucm-pinetab)
16
+ optdepends=(' uboot-pinephone: required if not using tow-boot' )
14
17
source=(pinetab-suspend-hook.sh
15
18
phoc.ini
16
19
machine-info
17
20
pulseaudio-pinetweaks.conf
18
- gsk-renderer-gl.sh)
21
+ gsk-renderer-gl.sh
22
+ boot.txt
23
+ mkscr)
19
24
20
25
package () {
21
26
# Current workaround for suspend
@@ -29,10 +34,15 @@ package() {
29
34
install -Dm644 " $srcdir " /pulseaudio-pinetweaks.conf " $pkgdir " /etc/pulse/daemon.conf.d/pinetweaks.conf
30
35
31
36
install -Dm755 " $srcdir " /gsk-renderer-gl.sh -t " $pkgdir " /etc/profile.d/
37
+
38
+ # u-boot startup script
39
+ install -Dm644 -t " ${pkgdir} " /boot boot.txt mkscr
32
40
}
33
41
34
42
md5sums=(' b0912b95d7d810a0f161d9bd79fc162b'
35
43
' ecd8742a921d805e6756abc522da1dba'
36
44
' 340993065eb26f928700733369be2d9b'
37
45
' 1504e684e5a2aec439e0674cdfc9d3c1'
38
- ' df623da01912f5ce89c178639fc22656' )
46
+ ' df623da01912f5ce89c178639fc22656'
47
+ ' 69400a6dfe94221172b2a00f18b1a8bd'
48
+ ' 021623a04afd29ac3f368977140cfbfd' )
Original file line number Diff line number Diff line change
1
+ gpio set 98 # Enable vibrator
2
+
3
+ if test ${devnum} -eq 0; then
4
+ echo "Booting from SD"
5
+ setenv linux_mmcdev 0
6
+ else
7
+ echo "Booting from eMMC"
8
+ setenv linux_mmcdev 2
9
+ fi
10
+
11
+ # If we have at least 2 partitions, then the 1st one is /boot, and / is #2
12
+ if part size mmc ${devnum} 2 none; then
13
+ setenv rootpart 2
14
+ else
15
+ setenv rootpart 1
16
+ setenv bootdir "/boot"
17
+ fi
18
+
19
+ setenv bootargs loglevel=4 console=${console} console=tty0 root=/dev/mmcblk${linux_mmcdev}p${rootpart} rw rootwait quiet bootsplash.bootfile=bootsplash-themes/danctnix/bootsplash
20
+
21
+ echo "Loading kernel..."
22
+ load mmc ${devnum}:1 ${ramdisk_addr_r} ${bootdir}/Image.gz
23
+
24
+ echo "Uncompressing kernel..."
25
+ unzip ${ramdisk_addr_r} ${kernel_addr_r}
26
+
27
+ echo "Loading initramfs..."
28
+ load mmc ${devnum}:1 ${ramdisk_addr_r} ${bootdir}/initramfs-linux.img
29
+ setenv ramdisk_size ${filesize}
30
+
31
+ echo "Loading dtb..."
32
+ load mmc ${devnum}:1 ${fdt_addr_r} ${bootdir}/dtbs/${fdtfile}
33
+
34
+ echo Resizing FDT
35
+ fdt addr ${fdt_addr_r}
36
+ fdt resize
37
+
38
+ echo Adding FTD RAM clock
39
+ fdt mknode / memory
40
+ fdt set /memory ram_freq ${ram_freq}
41
+ fdt list /memory
42
+
43
+ echo Loading user script
44
+ setenv user_scriptaddr 0x61dbc200
45
+ load mmc ${devnum}:1 ${user_scriptaddr} ${bootdir}/user.scr
46
+ if test $? -eq 0; then source ${user_scriptaddr}; else echo No user script found; fi
47
+
48
+ echo "Booting..."
49
+ gpio clear 98 # Disable vibrator
50
+ booti ${kernel_addr_r} ${ramdisk_addr_r}:0x${ramdisk_size} ${fdt_addr_r}
Original file line number Diff line number Diff line change
1
+ post_upgrade() {
2
+ echo "Generating U-Boot script"
3
+ mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d /boot/boot.txt /boot/boot.scr
4
+ }
5
+
6
+ post_install() {
7
+ post_upgrade
8
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ ! -x /usr/bin/mkimage ]]; then
4
+ echo " mkimage not found. Please install uboot-tools:"
5
+ echo " pacman -S uboot-tools"
6
+ exit 1
7
+ fi
8
+
9
+ mkimage -A arm -O linux -T script -C none -n " U-Boot boot script" -d boot.txt boot.scr
You can’t perform that action at this time.
0 commit comments