mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
Merge pull request #4989 from chewitt/imx6
iMX6: repackage cubox/udoo/wandboard images to use FDTDIR
This commit is contained in:
commit
fb5a2cf4c5
6
projects/NXP/devices/iMX6/bootloader/canupdate.sh
Normal file
6
projects/NXP/devices/iMX6/bootloader/canupdate.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
[ "$1" = "iMX6.arm" ] && exit 0 || exit 1
|
@ -2,11 +2,25 @@
|
|||||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.img" ]; then
|
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.img" ]; then
|
||||||
echo "Writing u-boot.img to $(basename $DISK)"
|
echo "image: writing u-boot.img to $(basename $DISK)"
|
||||||
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.img" of="$DISK" bs=1K seek=69 conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.img" of="$DISK" bs=1K seek=69 conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$RELEASE_DIR/3rdparty/bootloader/SPL" ]; then
|
if [ -f "$RELEASE_DIR/3rdparty/bootloader/SPL" ]; then
|
||||||
echo "Writing SPL to $(basename $DISK)"
|
echo "image: writing SPL to $(basename $DISK)"
|
||||||
dd if="$RELEASE_DIR/3rdparty/bootloader/SPL" of="$DISK" bs=1K seek=1 conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
dd if="$RELEASE_DIR/3rdparty/bootloader/SPL" of="$DISK" bs=1K seek=1 conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "image: copying device trees"
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader"/imx6d*${UBOOT_SYSTEM}*.dtb ::
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader"/imx6q*${UBOOT_SYSTEM}*.dtb ::
|
||||||
|
|
||||||
|
echo "image: copying exlinux.conf"
|
||||||
|
mkdir -p "${LE_TMP}/extlinux"
|
||||||
|
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
||||||
|
LABEL ${DISTRO}
|
||||||
|
LINUX /${KERNEL_NAME}
|
||||||
|
FDTDIR /
|
||||||
|
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}
|
||||||
|
EOF
|
||||||
|
mcopy -s -o "${LE_TMP}/extlinux" ::
|
||||||
|
@ -20,23 +20,21 @@ fi
|
|||||||
# mount $BOOT_ROOT r/w
|
# mount $BOOT_ROOT r/w
|
||||||
mount -o remount,rw $BOOT_ROOT
|
mount -o remount,rw $BOOT_ROOT
|
||||||
|
|
||||||
# update Device Tree Blobs
|
# update extlinux device trees
|
||||||
for all_dtb in /flash/*.dtb; do
|
for dtbfile in $BOOT_ROOT/*.dtb; do
|
||||||
dtb=$(basename $all_dtb)
|
dtb=$(basename $dtbfile)
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
echo "Updating $dtb"
|
||||||
echo "*** updating Device Tree Blob: $dtb ..."
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# update bootloader files
|
# update bootloader files
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot.img ]; then
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot.img ]; then
|
||||||
echo "*** updating u-boot image on: $BOOT_DISK ..."
|
echo "Updating u-boot image on $BOOT_DISK"
|
||||||
dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot.img of="$BOOT_DISK" bs=1K seek=69 conv=fsync &>/dev/null
|
dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot.img of="$BOOT_DISK" bs=1K seek=69 conv=fsync &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/SPL ]; then
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/SPL ]; then
|
||||||
echo "*** updating u-boot SPL Blob on: $BOOT_DISK ..."
|
echo "Updating u-boot SPL on $BOOT_DISK"
|
||||||
dd if=$SYSTEM_ROOT/usr/share/bootloader/SPL of="$BOOT_DISK" bs=1k seek=1 conv=fsync &>/dev/null
|
dd if=$SYSTEM_ROOT/usr/share/bootloader/SPL of="$BOOT_DISK" bs=1k seek=1 conv=fsync &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
[ "$1" = "imx6.arm" ] && exit 0 || exit 1
|
|
@ -196,28 +196,16 @@ devices = \
|
|||||||
},
|
},
|
||||||
'NXP': {
|
'NXP': {
|
||||||
'iMX6': {
|
'iMX6': {
|
||||||
'cubox-dl': {
|
'cubox': {
|
||||||
'dtb': 'imx6dl-cubox-i.dtb',
|
'dtb': '',
|
||||||
'config': 'mx6cuboxi_defconfig'
|
'config': 'mx6cuboxi_defconfig'
|
||||||
},
|
},
|
||||||
'cubox-q': {
|
'udoo': {
|
||||||
'dtb': 'imx6q-cubox-i.dtb',
|
'dtb': '',
|
||||||
'config': 'mx6cuboxi_defconfig'
|
|
||||||
},
|
|
||||||
'udoo-dl': {
|
|
||||||
'dtb': 'imx6dl-udoo.dtb',
|
|
||||||
'config': 'udoo_defconfig'
|
'config': 'udoo_defconfig'
|
||||||
},
|
},
|
||||||
'udoo-q': {
|
'wandboard': {
|
||||||
'dtb': 'imx6q-udoo.dtb',
|
'dtb': '',
|
||||||
'config': 'udoo_defconfig'
|
|
||||||
},
|
|
||||||
'wandboard-dl': {
|
|
||||||
'dtb': 'imx6dl-wandboard.dtb',
|
|
||||||
'config': 'wandboard_defconfig'
|
|
||||||
},
|
|
||||||
'wandboard-q': {
|
|
||||||
'dtb': 'imx6q-wandboard.dtb',
|
|
||||||
'config': 'wandboard_defconfig'
|
'config': 'wandboard_defconfig'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user