-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg: pine64: device-pine64-pinetab: make u-boot optional
This moves the u-boot configuration to the device meta-package so that uboot-pinephone can be uninstalled for use with tow-boot.
- Loading branch information
Showing
4 changed files
with
81 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
# Maintainer: Danct12 <[email protected]> | ||
pkgname=device-pine64-pinetab | ||
pkgver=0.2 | ||
pkgrel=3 | ||
pkgrel=4 | ||
pkgdesc="PineTab device package" | ||
arch=(aarch64) | ||
url="https://github.com/dreemurrs-embedded/Pine64-Arch" | ||
license=('MIT') | ||
install="$pkgname.install" | ||
backup=("boot/boot.txt") | ||
depends=(linux-megi | ||
uboot-pinephone | ||
rtl8723bt-firmware | ||
ov5640-firmware | ||
uboot-tools # we need this for mkscr | ||
alsa-ucm-pinetab) | ||
optdepends=('uboot-pinephone: requierd if not using tow-boot') | ||
source=(pinetab-suspend-hook.sh | ||
phoc.ini | ||
machine-info | ||
pulseaudio-pinetweaks.conf | ||
gsk-renderer-gl.sh) | ||
gsk-renderer-gl.sh | ||
boot.txt | ||
mkscr) | ||
|
||
package() { | ||
# Current workaround for suspend | ||
|
@@ -29,10 +34,15 @@ package() { | |
install -Dm644 "$srcdir"/pulseaudio-pinetweaks.conf "$pkgdir"/etc/pulse/daemon.conf.d/pinetweaks.conf | ||
|
||
install -Dm755 "$srcdir"/gsk-renderer-gl.sh -t "$pkgdir"/etc/profile.d/ | ||
|
||
# u-boot startup script | ||
install -Dm644 -t "${pkgdir}"/boot boot.txt mkscr | ||
} | ||
|
||
md5sums=('b0912b95d7d810a0f161d9bd79fc162b' | ||
'ecd8742a921d805e6756abc522da1dba' | ||
'340993065eb26f928700733369be2d9b' | ||
'1504e684e5a2aec439e0674cdfc9d3c1' | ||
'df623da01912f5ce89c178639fc22656') | ||
'df623da01912f5ce89c178639fc22656' | ||
'69400a6dfe94221172b2a00f18b1a8bd' | ||
'021623a04afd29ac3f368977140cfbfd') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
gpio set 98 # Enable vibrator | ||
|
||
if test ${devnum} -eq 0; then | ||
echo "Booting from SD" | ||
setenv linux_mmcdev 0 | ||
else | ||
echo "Booting from eMMC" | ||
setenv linux_mmcdev 2 | ||
fi | ||
|
||
# If we have at least 2 partitions, then the 1st one is /boot, and / is #2 | ||
if part size mmc ${devnum} 2 none; then | ||
setenv rootpart 2 | ||
else | ||
setenv rootpart 1 | ||
setenv bootdir "/boot" | ||
fi | ||
|
||
setenv bootargs loglevel=4 console=${console} console=tty0 root=/dev/mmcblk${linux_mmcdev}p${rootpart} rw rootwait quiet bootsplash.bootfile=bootsplash-themes/danctnix/bootsplash | ||
|
||
echo "Loading kernel..." | ||
load mmc ${devnum}:1 ${ramdisk_addr_r} ${bootdir}/Image.gz | ||
|
||
echo "Uncompressing kernel..." | ||
unzip ${ramdisk_addr_r} ${kernel_addr_r} | ||
|
||
echo "Loading initramfs..." | ||
load mmc ${devnum}:1 ${ramdisk_addr_r} ${bootdir}/initramfs-linux.img | ||
setenv ramdisk_size ${filesize} | ||
|
||
echo "Loading dtb..." | ||
load mmc ${devnum}:1 ${fdt_addr_r} ${bootdir}/dtbs/${fdtfile} | ||
|
||
echo Resizing FDT | ||
fdt addr ${fdt_addr_r} | ||
fdt resize | ||
|
||
echo Adding FTD RAM clock | ||
fdt mknode / memory | ||
fdt set /memory ram_freq ${ram_freq} | ||
fdt list /memory | ||
|
||
echo Loading user script | ||
setenv user_scriptaddr 0x61dbc200 | ||
load mmc ${devnum}:1 ${user_scriptaddr} ${bootdir}/user.scr | ||
if test $? -eq 0; then source ${user_scriptaddr}; else echo No user script found; fi | ||
|
||
echo "Booting..." | ||
gpio clear 98 # Disable vibrator | ||
booti ${kernel_addr_r} ${ramdisk_addr_r}:0x${ramdisk_size} ${fdt_addr_r} |
8 changes: 8 additions & 0 deletions
8
PKGBUILDS/pine64/device-pine64-pinetab/device-pine64-pinetab.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
post_upgrade() { | ||
echo "Generating U-Boot script" | ||
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d /boot/boot.txt /boot/boot.scr | ||
} | ||
|
||
post_install() { | ||
post_upgrade | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -x /usr/bin/mkimage ]]; then | ||
echo "mkimage not found. Please install uboot-tools:" | ||
echo " pacman -S uboot-tools" | ||
exit 1 | ||
fi | ||
|
||
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr |