classabbyamp 9ab1405894
*: remove unnecessary execute permissions
* INSTALL scripts don't need to be executable
* anything installed by vbin is set to 755
* many of these files were otherwise marked executable in the template
  (vinstall, chmod, etc)
* some had no business being executable, like the smattering of patches
  and other files
* remove files from chroot-distcc no longer used in the template
  (46ce787b63d467d9b8e5ef8821e2ddefea4b980a)
2024-08-02 13:24:47 -04:00

56 lines
1.3 KiB
Bash

#!/bin/sh
# LED GPIO Reference
#
# gpio [set|clear] 115 # RED
# gpio [set|clear] 114 # GREEN
# gpio [set|clear] 116 # BLUE
kver=${2}
. /etc/default/pinephone-uboot-config
# Add bootargs for state of volume keys (for extra boot options based on initramfs)
test $ROCKER_ARGS && ROCKER_TEST=$(cat <<EOF
if test "\${volume_key}" = "up"; then
setenv bootargs \${bootargs} pp.volup
fi
if test "\${volume_key}" = "down"; then
setenv bootargs \${bootargs} pp.voldown
fi
EOF
)
cat > /boot/boot.txt <<EOF
setenv bootargs ${CMDLINE}
${ROCKER_TEST}
gpio clear 115
gpio clear 114
gpio clear 116
echo "Loading Kernel..."
if load \${devtype} \${devnum}:\${bootpart} \${kernel_addr_r} /vmlinux-${kver}; then
gpio set 116
echo "Loading Device Tree..."
if load \${devtype} \${devnum}:\${bootpart} \${fdt_addr_r} /dtbs/dtbs-${kver}/\${fdtfile}; then
echo "Device Tree Loaded"
fdt addr \${fdt_addr_r}
fdt resize
echo "Booting..."
gpio clear 116
gpio set 114
if load \${devtype} \${devnum}:\${bootpart} \${ramdisk_addr_r} /initramfs-${kver}.img; then
booti \${kernel_addr_r} \${ramdisk_addr_r}:\${filesize} \${fdt_addr_r};
else
booti \${kernel_addr_r} - \${fdt_addr_r};
fi;
fi;
fi
EOF
exec mkimage -A arm64 -O linux -T script -C none -n "U-Boot boot script" -d /boot/boot.txt /boot/boot.scr