mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 22:47:51 +00:00
Allwinner: Add workaround to install script
Not all builds provide bootloader binary. Copy U-Boot from running system instead.
This commit is contained in:
parent
23e0d69dda
commit
feed0c53ee
@ -11,11 +11,6 @@ UUID_STORAGE="$(uuidgen)"
|
|||||||
BOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')
|
BOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')
|
||||||
DISK=""
|
DISK=""
|
||||||
|
|
||||||
if [ ! -f /usr/share/bootloader/u-boot-sunxi-with-spl.bin ]; then
|
|
||||||
echo "U-Boot not found. Please update current installation with board specific update or image first."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for TYPE in /sys/class/block/mmcblk*/device/type; do
|
for TYPE in /sys/class/block/mmcblk*/device/type; do
|
||||||
if grep -q "MMC" "${TYPE}"; then
|
if grep -q "MMC" "${TYPE}"; then
|
||||||
DISK="/dev/$(echo "${TYPE}" | awk -F/ '{print $5}')"
|
DISK="/dev/$(echo "${TYPE}" | awk -F/ '{print $5}')"
|
||||||
@ -77,7 +72,7 @@ mkfs.ext4 -L STORAGE -U ${UUID_STORAGE} ${DISK}p2 > /dev/null 2>&1
|
|||||||
sync
|
sync
|
||||||
|
|
||||||
echo "Installing bootloader"
|
echo "Installing bootloader"
|
||||||
dd if=/usr/share/bootloader/u-boot-sunxi-with-spl.bin of="${DISK}" bs=1k seek=8 conv=fsync > /dev/null 2>&1
|
dd if="${BOOT}" skip=8 of="${DISK}" bs=1k seek=8 count=768 conv=fsync > /dev/null 2>&1
|
||||||
|
|
||||||
echo "Copying system files"
|
echo "Copying system files"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user