iMX8: initial project

This commit is contained in:
Lukas Rusak 2019-07-04 10:20:57 -07:00
parent ea3df74224
commit 0a2a5e4835
7 changed files with 6372 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
[ -n "$ATF_PLATFORM" ] && cp -av $(get_install_dir atf)/usr/share/bootloader/bl31.bin .
cp -av $(get_build_dir firmware-imx)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(get_build_dir $BOOTLOADER)/
cp -av $(get_build_dir firmware-imx)/firmware/ddr/synopsys/lpddr4*.bin $(get_build_dir $BOOTLOADER)/

View File

@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
cp -av flash.bin $INSTALL/usr/share/bootloader/

View File

@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
if [ -f "$RELEASE_DIR/3rdparty/bootloader/flash.bin" ]; then
echo "Writing flash.bin to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/flash.bin" of="$DISK" bs=1024 seek=33 conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
fi

View File

@ -0,0 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
mkdir -p $RELEASE_DIR/3rdparty/bootloader
if [ -n "$UBOOT_SYSTEM" ]; then
cp -a $(get_build_dir $BOOTLOADER)/flash.bin $RELEASE_DIR/3rdparty/bootloader/
fi
cp -a $(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts/freescale/*.dtb $RELEASE_DIR/3rdparty/bootloader

View File

@ -0,0 +1,40 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
[ -z "$SYSTEM_ROOT" ] && SYSTEM_ROOT=""
[ -z "$BOOT_ROOT" ] && BOOT_ROOT="/flash"
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
if [ -z "$BOOT_DISK" ]; then
case $BOOT_PART in
/dev/sd[a-z][0-9]*)
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
;;
/dev/mmcblk*)
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
;;
esac
fi
# mount $BOOT_ROOT r/w
mount -o remount,rw $BOOT_ROOT
# update Device Tree Blobs
for all_dtb in /flash/*.dtb; do
dtb=$(basename $all_dtb)
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
echo "*** updating Device Tree Blob: $dtb ..."
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
fi
done
# update bootloader files
if [ -f $SYSTEM_ROOT/usr/share/bootloader/flash.bin ]; then
echo "*** updating u-boot image on: $BOOT_DISK ..."
dd if=$SYSTEM_ROOT/usr/share/bootloader/flash.bin of="$BOOT_DISK" bs=1024 seek=33 conv=fsync &>/dev/null
fi
# mount $BOOT_ROOT r/o
sync
mount -o remount,ro $BOOT_ROOT

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
################################################################################
# setup device defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
aarch64)
TARGET_CPU="cortex-a53"
TARGET_CPU_FLAGS="+crc+fp+simd"
TARGET_FEATURES="64bit"
;;
arm)
TARGET_KERNEL_ARCH="arm64"
TARGET_PATCH_ARCH="aarch64"
TARGET_FLOAT=hard
TARGET_CPU="cortex-a53"
TARGET_CPU_FLAGS="+crc"
TARGET_FPU="neon-fp-armv8"
TARGET_FEATURES="32bit"
;;
esac
# Kernel target
KERNEL_TARGET="Image"
# kernel serial console
EXTRA_CMDLINE="console=ttymxc0,115200 console=tty0"
# debug tty path
DEBUG_TTY="/dev/ttymxc0"
# ATF platform
ATF_PLATFORM="imx8mq"
# uboot firmware
UBOOT_FIRMWARE="atf firmware-imx"
# uboot target
UBOOT_TARGET="flash.bin"
# Set the addon project
ADDON_PROJECT="ARMv8"