Merge pull request #2220 from adamg88/odroidn2
Amlogic: add support for ODROID-N2/N2+
This commit is contained in:
commit
5a407961d8
27 changed files with 371 additions and 268 deletions
|
@ -51,7 +51,7 @@ case ${device} in
|
|||
width="60"
|
||||
opengl='(?<=Title_F=\").*?(?=\")'
|
||||
;;
|
||||
"Hardkernel ODROID-GO-Ultra"|"Powkiddy RGB10 MAX 3")
|
||||
"Hardkernel ODROID-GO-Ultra"|"Powkiddy RGB10 MAX 3"|"Hardkernel ODROID-N2*")
|
||||
param_device="s922x"
|
||||
height="20"
|
||||
width="60"
|
||||
|
|
12
packages/hardware/quirks/devices/Hardkernel ODROID-N2/001-device_config
Executable file
12
packages/hardware/quirks/devices/Hardkernel ODROID-N2/001-device_config
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
|
||||
# Device Features
|
||||
DEVICE_VOLUMECTL="true"
|
||||
DEVICE_VOLUME="100"
|
||||
DEVICE_POWER_LED="false"
|
||||
DEVICE_BRIGHTNESS="hardware"
|
||||
DEVICE_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone0/temp" "/sys/devices/virtual/thermal/thermal_zone3/temp" "/sys/devices/virtual/thermal/thermal_zone2/temp")
|
||||
EOF
|
|
@ -0,0 +1 @@
|
|||
echo none > /sys/class/leds/n2\:blue/trigger
|
25
packages/hardware/quirks/devices/Hardkernel ODROID-N2/050-audio_path
Executable file
25
packages/hardware/quirks/devices/Hardkernel ODROID-N2/050-audio_path
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
cat <<EOF >/storage/.config/profile.d/002-audio_path
|
||||
DEVICE_PLAYBACK_PATH_SPK="SPK"
|
||||
DEVICE_PLAYBACK_PATH_HP="HP"
|
||||
DEVICE_PLAYBACK_PATH="Playback Mux"
|
||||
DEVICE_PIPEWIRE_PROFILE="pro-audio"
|
||||
EOF
|
||||
|
||||
amixer -c 0 -q sset 'FRDDR_A SINK 1 SEL' 'OUT 1'
|
||||
amixer -c 0 -q sset 'FRDDR_A SRC 1 EN' 'on'
|
||||
amixer -c 0 -q sset 'TDMOUT_B SRC SEL' 'IN 0'
|
||||
amixer -c 0 -q sset 'TOHDMITX I2S SRC' 'I2S B'
|
||||
amixer -c 0 -q sset 'TOHDMITX' 'on'
|
||||
amixer -c 0 -q sset 'FRDDR_B SINK 1 SEL' 'OUT 2'
|
||||
amixer -c 0 -q sset 'FRDDR_B SRC 1 EN' 'on'
|
||||
amixer -c 0 -q sset 'TDMOUT_C SRC SEL' 'IN 1'
|
||||
amixer -c 0 -q sset 'TOACODEC SRC' 'I2S C'
|
||||
amixer -c 0 -q sset 'TOACODEC OUT EN' 'on'
|
||||
amixer -c 0 -q sset 'TOACODEC Lane Select' '0'
|
||||
amixer -c 0 -q sset 'ACODEC' '255'
|
||||
amixer -c 0 -q sset 'FRDDR_C SINK 1 SEL' 'OUT 3'
|
||||
amixer -c 0 -q sset 'FRDDR_C SRC 1 EN' 'on'
|
1
packages/hardware/quirks/devices/Hardkernel ODROID-N2Plus
Symbolic link
1
packages/hardware/quirks/devices/Hardkernel ODROID-N2Plus
Symbolic link
|
@ -0,0 +1 @@
|
|||
Hardkernel ODROID-N2
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ CONFIG_CRC32=y
|
|||
CONFIG_CP=y
|
||||
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_CP_REFLINK is not set
|
||||
# CONFIG_CUT is not set
|
||||
CONFIG_CUT=y
|
||||
# CONFIG_FEATURE_CUT_REGEX is not set
|
||||
# CONFIG_DATE is not set
|
||||
# CONFIG_FEATURE_DATE_ISOFMT is not set
|
||||
|
|
13
projects/Amlogic/bootloader/boot.ini
Normal file
13
projects/Amlogic/bootloader/boot.ini
Normal file
|
@ -0,0 +1,13 @@
|
|||
JELOS-UBOOT-CONFIG
|
||||
|
||||
setenv dtb_loadaddr "0x10000000"
|
||||
setenv loadaddr "0x1B00000"
|
||||
|
||||
setenv bootargs "boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ @EXTRA_CMDLINE@"
|
||||
|
||||
load mmc ${devno}:1 ${loadaddr} KERNEL
|
||||
load mmc ${devno}:1 ${dtb_loadaddr} ${fdtfile}
|
||||
|
||||
fdt addr ${dtb_loadaddr}
|
||||
|
||||
booti ${loadaddr} - ${dtb_loadaddr}
|
|
@ -1,9 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# Allow upgrades between arm and aarch64
|
||||
if [ "$1" = "@PROJECT@.arm" -o "$1" = "@PROJECT@.aarch64" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
4
projects/Amlogic/bootloader/extlinux/extlinux.conf
Normal file
4
projects/Amlogic/bootloader/extlinux/extlinux.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
LABEL JELOS
|
||||
LINUX /KERNEL
|
||||
FDTDIR /
|
||||
APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ @EXTRA_CMDLINE@
|
|
@ -1,60 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
PKG_UBOOT="$(get_build_dir u-boot)"
|
||||
source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options
|
||||
FIP_DIR="${ROOT}/build.${DISTRO}-${DEVICE}.aarch64/amlogic-boot-fip-*"
|
||||
|
||||
case "${DEVICE}" in
|
||||
S922X)
|
||||
cp -rf ${PKG_UBOOT}/sd_fuse/u-boot.bin ${INSTALL}/usr/share/bootloader/
|
||||
;;
|
||||
*)
|
||||
echo "uboot: encrypting u-boot.bin with fip..."
|
||||
cp -av build/u-boot.bin ${FIP_DIR}/
|
||||
cd ${FIP_DIR}
|
||||
./build-fip.sh ${BOOT_FIP} u-boot.bin ${INSTALL}/usr/share/bootloader/
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${BIOS_BIN}" == true ]
|
||||
then
|
||||
echo "uboot: copy bios bin to ${INSTALL}/usr/share/bootloader..."
|
||||
cp -rav ${PKG_BUILD}/tools/odroid_resource/* ${INSTALL}/usr/share/bootloader
|
||||
fi
|
||||
|
||||
if [ "${BOOT_INI}" == true ]
|
||||
then
|
||||
echo "boot: create boot.ini..."
|
||||
cat >${INSTALL}/usr/share/bootloader/boot.ini <<EOF
|
||||
JELOS-UBOOT-CONFIG
|
||||
|
||||
setenv dtb_loadaddr "0x10000000"
|
||||
setenv loadaddr "0x1B00000"
|
||||
|
||||
setenv bootargs "boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ ${EXTRA_CMDLINE}"
|
||||
|
||||
load mmc \${devno}:1 \${loadaddr} KERNEL
|
||||
load mmc \${devno}:1 \${dtb_loadaddr} \${fdtfile}
|
||||
|
||||
fdt addr \${dtb_loadaddr}
|
||||
|
||||
booti \${loadaddr} - \${dtb_loadaddr}
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "${EXT_LINUX_CONF}" == true ]
|
||||
then
|
||||
echo "boot: create extlinux.conf..."
|
||||
mkdir -p "${INSTALL}/usr/share/bootloader/extlinux"
|
||||
|
||||
FDTMODE="FDT /${DEVICE_DTB}.dtb"
|
||||
|
||||
cat << EOF > "${INSTALL}/usr/share/bootloader/extlinux/extlinux.conf"
|
||||
LABEL ${DISTRO}
|
||||
LINUX /${KERNEL_NAME}
|
||||
${FDTMODE}
|
||||
APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
fi
|
|
@ -1,80 +1,59 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options
|
||||
mkimage_uboot() {
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/${SUBDEVICE}_u-boot" ]; then
|
||||
echo "image: writing u-boot to $(basename ${DISK})..."
|
||||
dd if="${RELEASE_DIR}/3rdparty/bootloader/${SUBDEVICE}_u-boot" of="${DISK}" bs=512 seek=1 conv=sync,noerror,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
}
|
||||
|
||||
#Write u-boot.bin to image
|
||||
case "${PKG_SOC}" in
|
||||
s922x)
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/u-boot.bin" ]; then
|
||||
echo "image: burn uboot.bin to image... (${PKG_SOC})"
|
||||
dd if="${RELEASE_DIR}/3rdparty/bootloader/u-boot.bin" of="${DISK}" bs=512 seek=1 conv=sync,noerror,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
mkimage_bootini() {
|
||||
echo "image: copying boot.ini..."
|
||||
cp -p "${RELEASE_DIR}/3rdparty/bootloader/boot.ini" "${LE_TMP}/boot.ini"
|
||||
sed -e "s/@BOOT_UUID@/${UUID_SYSTEM}/" \
|
||||
-e "s/@DISK_UUID@/${UUID_STORAGE}/" \
|
||||
-e "s/@EXTRA_CMDLINE@/${EXTRA_CMDLINE}/" \
|
||||
-i "${LE_TMP}/boot.ini"
|
||||
mcopy "${LE_TMP}/boot.ini" ::
|
||||
}
|
||||
|
||||
mkimage_extlinux() {
|
||||
echo "image: copying exlinux.conf..."
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
cp -p "${RELEASE_DIR}/3rdparty/bootloader/extlinux/extlinux.conf" "${LE_TMP}/extlinux/extlinux.conf"
|
||||
sed -e "s/@BOOT_UUID@/${UUID_SYSTEM}/" \
|
||||
-e "s/@DISK_UUID@/${UUID_STORAGE}/" \
|
||||
-e "s/@EXTRA_CMDLINE@/${EXTRA_CMDLINE}/" \
|
||||
-i "${LE_TMP}/extlinux/extlinux.conf"
|
||||
mcopy "${LE_TMP}/extlinux" ::
|
||||
}
|
||||
|
||||
mkimage_dtb() {
|
||||
echo "image: copying device trees..."
|
||||
for dtb in ${DTB[@]}; do
|
||||
mcopy ${RELEASE_DIR}/3rdparty/bootloader/${dtb}.dtb ::
|
||||
done
|
||||
}
|
||||
|
||||
mkimage_gou_extras() {
|
||||
echo "image: copying ODROIDBIOS.BIN and res..."
|
||||
mcopy ${RELEASE_DIR}/3rdparty/bootloader/ODROIDBIOS.BIN ::
|
||||
mcopy ${RELEASE_DIR}/3rdparty/bootloader/res ::
|
||||
}
|
||||
|
||||
case "${SUBDEVICE}" in
|
||||
Odroid_GOU)
|
||||
DTB=("meson-g12b-odroid-go-ultra" "meson-g12b-powkiddy-rgb10-max-3")
|
||||
mkimage_dtb
|
||||
mkimage_bootini
|
||||
mkimage_gou_extras
|
||||
mkimage_uboot
|
||||
;;
|
||||
Odroid_N2)
|
||||
DTB=("meson-g12b-odroid-n2" "meson-g12b-odroid-n2-plus")
|
||||
mkimage_dtb
|
||||
mkimage_extlinux
|
||||
mkimage_uboot
|
||||
;;
|
||||
esac
|
||||
|
||||
#Copy bios bin
|
||||
if [ "${BIOS_BIN}" == true ]; then
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/ODROIDBIOS.BIN" ]; then
|
||||
echo "image: copy bios bin image..."
|
||||
cp "${RELEASE_DIR}/3rdparty/bootloader/ODROIDBIOS.BIN" "${LE_TMP}/ODROIDBIOS.BIN"
|
||||
mcopy -so "${LE_TMP}/ODROIDBIOS.BIN" ::
|
||||
fi
|
||||
if [ -d "${RELEASE_DIR}/3rdparty/bootloader/res" ]; then
|
||||
cp -r "${RELEASE_DIR}/3rdparty/bootloader/res" "${LE_TMP}/res"
|
||||
mcopy -so "${LE_TMP}/res" ::
|
||||
fi
|
||||
fi
|
||||
|
||||
#Create boot.ini
|
||||
if [ "${BOOT_INI}" == true ]
|
||||
then
|
||||
echo "image: create boot.ini..."
|
||||
cat >"${LE_TMP}/boot.ini" <<EOF
|
||||
JELOS-UBOOT-CONFIG
|
||||
|
||||
setenv dtb_loadaddr "0x10000000"
|
||||
setenv loadaddr "0x1B00000"
|
||||
|
||||
setenv bootargs "boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} ${EXTRA_CMDLINE}"
|
||||
|
||||
load mmc \${devno}:1 \${loadaddr} KERNEL
|
||||
load mmc \${devno}:1 \${dtb_loadaddr} \${fdtfile}
|
||||
|
||||
fdt addr \${dtb_loadaddr}
|
||||
|
||||
booti \${loadaddr} - \${dtb_loadaddr}
|
||||
|
||||
EOF
|
||||
mcopy -so "${LE_TMP}/boot.ini" ::
|
||||
fi
|
||||
|
||||
#Copy device trees to part1
|
||||
for DTB in ${DEVICE_DTB[@]}
|
||||
do
|
||||
if [ -e "${DTB}.dtb" ]
|
||||
then
|
||||
echo "image: copy device trees to image..."
|
||||
mcopy -o "${DTB}.dtb" ::
|
||||
fi
|
||||
done
|
||||
|
||||
#Create extlinux.conf
|
||||
if [ "${EXT_LINUX_CONF}" == true ]
|
||||
then
|
||||
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
|
||||
echo "image: Set FTD to ${DEVICE_DTB}..."
|
||||
FDTMODE="FDT /${DEVICE_DTB}.dtb"
|
||||
|
||||
echo "image: Set extlinux.conf..."
|
||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
||||
LABEL ${DISTRO}
|
||||
LINUX /${KERNEL_NAME}
|
||||
${FDTMODE}
|
||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
|
||||
mcopy -so "${LE_TMP}/extlinux" ::
|
||||
|
||||
fi
|
||||
|
|
|
@ -2,35 +2,4 @@
|
|||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
mkdir -p ${RELEASE_DIR}/3rdparty/bootloader
|
||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||
BOOTLOADER_DIR=$(get_build_dir ${BOOTLOADER})
|
||||
KERNEL_DIR=$(get_build_dir linux)
|
||||
|
||||
case "${PKG_SOC}" in
|
||||
s922x)
|
||||
if [ -f ${INSTALL}/usr/share/bootloader/u-boot.bin ]; then
|
||||
cp -a ${INSTALL}/usr/share/bootloader/u-boot.bin ${RELEASE_DIR}/3rdparty/bootloader
|
||||
fi
|
||||
if [ -f ${INSTALL}/usr/share/bootloader/ODROIDBIOS.BIN ]; then
|
||||
cp -a ${INSTALL}/usr/share/bootloader/ODROIDBIOS.BIN ${RELEASE_DIR}/3rdparty/bootloader
|
||||
fi
|
||||
if [ -d ${INSTALL}/usr/share/bootloader/res ]; then
|
||||
cp -ra ${INSTALL}/usr/share/bootloader/res ${RELEASE_DIR}/3rdparty/bootloader
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
LINUX_DTS_DIR=$(get_build_dir linux)/arch/${TARGET_KERNEL_ARCH}/boot/dts/
|
||||
for dtb in $(find ${LINUX_DTS_DIR} -name "*.dtb") ; do
|
||||
if [ -f $dtb ]; then
|
||||
cp -a $dtb ${RELEASE_DIR}/3rdparty/bootloader
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "${SD_DTB}" ]; then
|
||||
SD_UBOOT_DTB=$(get_build_dir u-boot)/arch/arm/dts/${SD_DTB}.dtb
|
||||
if [ -f $SD_UBOOT_DTB ]; then
|
||||
cp -a $SD_UBOOT_DTB ${RELEASE_DIR}/3rdparty/bootloader
|
||||
fi
|
||||
fi
|
||||
cp -a ${INSTALL}/usr/share/bootloader/* ${RELEASE_DIR}/3rdparty/bootloader
|
||||
|
|
91
projects/Amlogic/bootloader/update.sh
Normal file → Executable file
91
projects/Amlogic/bootloader/update.sh
Normal file → Executable file
|
@ -20,7 +20,6 @@ fi
|
|||
# mount $BOOT_ROOT r/w
|
||||
mount -o remount,rw $BOOT_ROOT
|
||||
|
||||
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case $arg in
|
||||
boot=*)
|
||||
|
@ -54,56 +53,66 @@ for arg in $(cat /proc/cmdline); do
|
|||
esac
|
||||
done
|
||||
|
||||
CONFS=$SYSTEM_ROOT/usr/share/bootloader/extlinux/*.conf
|
||||
DT_ID=$($SYSTEM_ROOT/usr/bin/dtname)
|
||||
|
||||
for all_conf in $CONFS; do
|
||||
conf="$(basename ${all_conf})"
|
||||
echo "Updating ${conf}..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/${conf} $BOOT_ROOT/extlinux/${conf} &>/dev/null
|
||||
sed -e "s/@BOOT_UUID@/$BOOT_UUID/" \
|
||||
-e "s/@DISK_UUID@/$DISK_UUID/" \
|
||||
-i $BOOT_ROOT/extlinux/${conf}
|
||||
if [ -n "$DT_ID" ]; then
|
||||
case $DT_ID in
|
||||
*odroid_go_ultra*|*rgb10-max-3*)
|
||||
SUBDEVICE="Odroid_GOU"
|
||||
;;
|
||||
*odroid-n2*)
|
||||
SUBDEVICE="Odroid_N2"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for all_dtb in $BOOT_ROOT/*.dtb; do
|
||||
dtb=$(basename $all_dtb)
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
||||
echo "Updating $dtb..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.ini ]; then
|
||||
echo "Updating boot.ini..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/boot.ini $BOOT_ROOT/boot.ini &>/dev/null
|
||||
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/extlinux/extlinux.conf ]; then
|
||||
echo "Updating extlinux.conf..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/extlinux.conf $BOOT_ROOT/extlinux
|
||||
sed -e "s/@BOOT_UUID@/$BOOT_UUID/" \
|
||||
-e "s/@DISK_UUID@/$DISK_UUID/" \
|
||||
-i $BOOT_ROOT/boot.ini
|
||||
-e "s/@DISK_UUID@/$DISK_UUID/" \
|
||||
-i $BOOT_ROOT/extlinux/extlinux.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/ODROIDBIOS.BIN ]; then
|
||||
echo "Updating odroidbios.bin..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/ODROIDBIOS.BIN $BOOT_ROOT/ODROIDBIOS.BIN &>/dev/null
|
||||
if [ -f $BOOT_ROOT/boot.ini ]; then
|
||||
if [ -f /usr/share/bootloader/boot.ini ]; then
|
||||
echo "Updating boot.ini"
|
||||
cp -p /usr/share/bootloader/boot.ini $BOOT_ROOT/boot.ini
|
||||
sed -e "s/@BOOT_UUID@/$BOOT_UUID/" \
|
||||
-e "s/@DISK_UUID@/$DISK_UUID/" \
|
||||
-i $BOOT_ROOT/boot.ini
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d $SYSTEM_ROOT/usr/share/bootloader/res ]; then
|
||||
echo "Updating res..."
|
||||
cp -rp $SYSTEM_ROOT/usr/share/bootloader/res $BOOT_ROOT/ &>/dev/null
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_u-boot ]; then
|
||||
echo "Updating u-boot on: $BOOT_DISK..."
|
||||
dd if=$SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_u-boot of=$BOOT_DISK conv=fsync,notrunc bs=512 seek=1 &>/dev/null
|
||||
fi
|
||||
|
||||
# update device tree
|
||||
for all_dtb in $SYSTEM_ROOT/usr/share/bootloader/*.dtb; do
|
||||
dtb="$(basename ${all_dtb})"
|
||||
echo -n "Updating $dtb... "
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT &>/dev/null
|
||||
echo "done"
|
||||
done
|
||||
if [ -f $BOOT_ROOT/ODROIDBIOS.BIN ]; then
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/ODROIDBIOS.BIN ]; then
|
||||
echo "Updating ODROIDBIOS.BIN..."
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/ODROIDBIOS.BIN $BOOT_ROOT
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d $BOOT_ROOT/res ]; then
|
||||
if [ -d $SYSTEM_ROOT/usr/share/bootloader/res ]; then
|
||||
echo "Updating res..."
|
||||
cp -rp $SYSTEM_ROOT/usr/share/bootloader/res $BOOT_ROOT
|
||||
fi
|
||||
fi
|
||||
|
||||
mount -o ro,remount $BOOT_ROOT
|
||||
|
||||
echo "UPDATE" > /storage/.boot.hint
|
||||
|
||||
# update bootloader
|
||||
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot.bin ]; then
|
||||
echo -n "Updating uboot.bin... "
|
||||
dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot.bin of=$BOOT_DISK conv=fsync,notrunc bs=512 seek=1 &>/dev/null
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
# mount $BOOT_ROOT r/o
|
||||
sync
|
||||
mount -o remount,ro $BOOT_ROOT &>/dev/null
|
||||
|
||||
sync
|
||||
|
|
|
@ -4328,7 +4328,7 @@ CONFIG_DRM_MESON_DW_MIPI_DSI=y
|
|||
# CONFIG_DRM_CIRRUS_QEMU is not set
|
||||
# CONFIG_DRM_GM12U320 is not set
|
||||
# CONFIG_DRM_PANEL_MIPI_DBI is not set
|
||||
CONFIG_DRM_SIMPLEDRM=y
|
||||
# CONFIG_DRM_SIMPLEDRM is not set
|
||||
# CONFIG_TINYDRM_HX8357D is not set
|
||||
# CONFIG_TINYDRM_ILI9163 is not set
|
||||
# CONFIG_TINYDRM_ILI9225 is not set
|
||||
|
@ -4403,6 +4403,7 @@ CONFIG_FB_MODE_HELPERS=y
|
|||
# CONFIG_FB_VIRTUAL is not set
|
||||
# CONFIG_FB_METRONOME is not set
|
||||
# CONFIG_FB_MB862XX is not set
|
||||
# CONFIG_FB_SIMPLE is not set
|
||||
# CONFIG_FB_SSD1307 is not set
|
||||
# CONFIG_FB_SM712 is not set
|
||||
# end of Frame buffer Devices
|
||||
|
|
|
@ -30,21 +30,12 @@
|
|||
KERNEL_TARGET="Image"
|
||||
BOOTLOADER="u-boot"
|
||||
PARTITION_TABLE="msdos"
|
||||
DEVICE_DTB=("meson-g12b-odroid-go-ultra" "meson-g12b-powkiddy-rgb10-max-3")
|
||||
UBOOT_DTB="${DEVICE_DTB[0]}"
|
||||
UBOOT_CONFIG="odroidgou_defconfig"
|
||||
PKG_SOC="s922x"
|
||||
BOOT_FIP="odroid-go-ultra"
|
||||
BOOT_INI=true
|
||||
BIOS_BIN=true
|
||||
EXT_LINUX_CONF=false
|
||||
|
||||
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
|
||||
KERNEL_MAKE_EXTRACMD+=""
|
||||
KERNEL_MAKE_EXTRACMD=" $(for DTB in "${DEVICE_DTB[@]}"; do echo -n "amlogic/${DTB}.dtb "; done)"
|
||||
KERNEL_MAKE_EXTRACMD+="dtbs"
|
||||
|
||||
# Define the CPU
|
||||
HW_CPU="Amlogic S922x"
|
||||
HW_CPU="Amlogic S922X"
|
||||
|
||||
# Mali GPU family
|
||||
MALI_FAMILY="g52"
|
||||
|
@ -69,7 +60,7 @@
|
|||
WINDOWMANAGER="weston11"
|
||||
|
||||
# kernel serial console
|
||||
EXTRA_CMDLINE="rootwait quiet console=ttyAML0,115200 console=tty0 no_console_suspend net.ifnames=0 consoleblank=0"
|
||||
EXTRA_CMDLINE="rootwait quiet systemd.debug_shell=ttyAML0 console=ttyAML0,115200n8 console=tty0 no_console_suspend net.ifnames=0 consoleblank=0 video=HDMI-A-1:1920x1080@60"
|
||||
|
||||
# additional packages to install
|
||||
# ADDITIONAL_PACKAGES=""
|
||||
|
@ -158,3 +149,6 @@
|
|||
|
||||
# htop tool (yes / no)
|
||||
HTOP_TOOL="yes"
|
||||
|
||||
# JELOS Subdevices
|
||||
SUBDEVICES="Odroid_GOU Odroid_N2"
|
||||
|
|
0
projects/Amlogic/options
Executable file → Normal file
0
projects/Amlogic/options
Executable file → Normal file
|
@ -0,0 +1,74 @@
|
|||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -1,71 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-3.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12a-radxa-zero.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-go-ultra.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-powkiddy-rgb10-max-3.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p200.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p201.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-hub.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-play2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-libretech-ac.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-libretech-pc.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-kii-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-vero4k-plus.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-jethome-jethub-j80.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-minix-neo-u9h.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-gbit.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-h96-max.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-gbit.dtb
|
||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb
|
32
projects/Amlogic/packages/u-boot-Odroid_GOU/package.mk
Normal file
32
projects/Amlogic/packages/u-boot-Odroid_GOU/package.mk
Normal file
|
@ -0,0 +1,32 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="u-boot-Odroid_GOU"
|
||||
PKG_VERSION="9235942906216dc529c1e96f67dd2364a94d0738"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
||||
PKG_URL="https://github.com/hardkernel/u-boot/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host"
|
||||
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
configure_package() {
|
||||
PKG_UBOOT_CONFIG="odroidgou_defconfig"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
|
||||
export PATH=${TOOLCHAIN}/lib/gcc-linaro-aarch64-elf/bin/:${TOOLCHAIN}/lib/gcc-linaro-arm-eabi/bin/:${PATH}
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make ${PKG_UBOOT_CONFIG}
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="${HOST_CC}" HOSTSTRIP="true"
|
||||
|
||||
# repack odroidbios.bin for jelos
|
||||
${TOOLCHAIN}/sbin/fsck.cramfs --extract=jelos tools/odroid_resource/ODROIDBIOS.BIN
|
||||
sed -e "s/ODROIDGOU/JELOS/" -i jelos/boot.ini
|
||||
${TOOLCHAIN}/sbin/mkfs.cramfs -N little jelos tools/odroid_resource/ODROIDBIOS.BIN
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nothing
|
||||
}
|
34
projects/Amlogic/packages/u-boot-Odroid_N2/package.mk
Normal file
34
projects/Amlogic/packages/u-boot-Odroid_N2/package.mk
Normal file
|
@ -0,0 +1,34 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="u-boot-Odroid_N2"
|
||||
PKG_VERSION="v2023.10"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
||||
PKG_URL="https://github.com/u-boot/u-boot/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain amlogic-boot-fip"
|
||||
PKG_DEPENDS_UNPACK="amlogic-boot-fip"
|
||||
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
configure_package() {
|
||||
PKG_UBOOT_CONFIG="odroid-n2_defconfig"
|
||||
PKG_UBOOT_FIP="odroid-n2"
|
||||
FIP_DIR="$(get_build_dir amlogic-boot-fip)"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
|
||||
setup_pkg_config_host
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm make mrproper
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm make HOSTCC="${HOST_CC}" HOSTCFLAGS="-I${TOOLCHAIN}/include" HOSTLDFLAGS="${HOST_LDFLAGS}" ${PKG_UBOOT_CONFIG}
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm _python_sysroot="${TOOLCHAIN}" _python_prefix=/ _python_exec_prefix=/ make HOSTCC="${HOST_CC}" HOSTCFLAGS="-I${TOOLCHAIN}/include" HOSTLDFLAGS="${HOST_LDFLAGS}" HOSTSTRIP="true" CONFIG_MKIMAGE_DTC_PATH="scripts/dtc/dtc"
|
||||
|
||||
cp -av ${PKG_BUILD}/u-boot.bin ${FIP_DIR}/${PKG_UBOOT_FIP}
|
||||
cd ${FIP_DIR}
|
||||
./build-fip.sh ${PKG_UBOOT_FIP} ${FIP_DIR}/${PKG_UBOOT_FIP}/u-boot.bin ${PKG_BUILD}
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nothing
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
--- a/board/amlogic/odroid-n2/odroid-n2.c
|
||||
+++ b/board/amlogic/odroid-n2/odroid-n2.c
|
||||
@@ -63,7 +63,7 @@ static void odroid_set_fdtfile(char *soc, char *variant)
|
||||
{
|
||||
char s[128];
|
||||
|
||||
- snprintf(s, sizeof(s), "amlogic/meson-%s-odroid-%s.dtb", soc, variant);
|
||||
+ snprintf(s, sizeof(s), "meson-%s-odroid-%s.dtb", soc, variant);
|
||||
env_set("fdtfile", s);
|
||||
}
|
||||
|
||||
--
|
|
@ -0,0 +1,10 @@
|
|||
--- a/configs/odroid-n2_defconfig
|
||||
+++ b/configs/odroid-n2_defconfig
|
||||
@@ -18,6 +18,7 @@
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_REMAKE_ELF=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
+CONFIG_BOOTDELAY=0
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_MISC_INIT_R=y
|
||||
CONFIG_SYS_MAXARGS=32
|
|
@ -1,52 +1,54 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="u-boot"
|
||||
PKG_VERSION="9235942906216dc529c1e96f67dd2364a94d0738"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
||||
PKG_URL="https://github.com/hardkernel/u-boot/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
PKG_PATCH_DIRS+="${DEVICE}*"
|
||||
|
||||
PKG_NEED_UNPACK="$PROJECT_DIR/$PROJECT/bootloader"
|
||||
|
||||
for PKG_SUBDEVICE in $SUBDEVICES; do
|
||||
PKG_DEPENDS_TARGET+=" u-boot-${PKG_SUBDEVICE}"
|
||||
PKG_NEED_UNPACK+=" $(get_pkg_directory u-boot-${PKG_SUBDEVICE}) ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options"
|
||||
done
|
||||
|
||||
make_target() {
|
||||
. ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options
|
||||
if [ -z "${UBOOT_CONFIG}" ]; then
|
||||
echo "UBOOT_CONFIG must be set to build an image"
|
||||
else
|
||||
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
|
||||
echo "Building for MBR (${UBOOT_DTB})..."
|
||||
export PATH=${TOOLCHAIN}/lib/gcc-linaro-aarch64-elf/bin/:${TOOLCHAIN}/lib/gcc-linaro-arm-eabi/bin/:${PATH}
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make ${UBOOT_CONFIG}
|
||||
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="${HOST_CC}" HOSTSTRIP="true"
|
||||
|
||||
# repack odroidbios.bin for jelos
|
||||
${TOOLCHAIN}/sbin/fsck.cramfs --extract=jelos tools/odroid_resource/ODROIDBIOS.BIN
|
||||
sed -e "s/ODROIDGOU/JELOS/" -i jelos/boot.ini
|
||||
${TOOLCHAIN}/sbin/mkfs.cramfs -N little jelos tools/odroid_resource/ODROIDBIOS.BIN
|
||||
fi
|
||||
: # nothing
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/share/bootloader
|
||||
mkdir -p ${INSTALL}/usr/share/bootloader/fip
|
||||
# Only install u-boot.img et al when building a board specific image
|
||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||
find_file_path bootloader/install && . ${FOUND_PATH}
|
||||
fi
|
||||
mkdir -p $INSTALL/usr/share/bootloader
|
||||
|
||||
# Always install the update script
|
||||
find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
|
||||
# Always install the update script
|
||||
find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
|
||||
# Always install the canupdate script
|
||||
if find_file_path bootloader/canupdate.sh; then
|
||||
cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
|
||||
sed -e "s/@PROJECT@/${DEVICE:-${PROJECT}}/g" \
|
||||
-i ${INSTALL}/usr/share/bootloader/canupdate.sh
|
||||
if find_file_path bootloader/boot.ini; then
|
||||
cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
sed -e "s/@EXTRA_CMDLINE@/${EXTRA_CMDLINE}/" \
|
||||
-i "${INSTALL}/usr/share/bootloader/boot.ini"
|
||||
fi
|
||||
|
||||
if find_dir_path bootloader/extlinux; then
|
||||
cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
sed -e "s/@EXTRA_CMDLINE@/${EXTRA_CMDLINE}/" \
|
||||
-i "${INSTALL}/usr/share/bootloader/extlinux/extlinux.conf"
|
||||
fi
|
||||
|
||||
for PKG_SUBDEVICE in $SUBDEVICES; do
|
||||
unset PKG_UBOOTBIN
|
||||
if [ "${PKG_SUBDEVICE}" = "Odroid_GOU" ]; then
|
||||
PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/sd_fuse/u-boot.bin
|
||||
cp -av $(get_build_dir u-boot-${PKG_SUBDEVICE})/tools/odroid_resource/* ${INSTALL}/usr/share/bootloader
|
||||
else
|
||||
PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/u-boot.bin
|
||||
fi
|
||||
if [ ${PKG_UBOOTBIN} ]; then
|
||||
cp -av ${PKG_UBOOTBIN} $INSTALL/usr/share/bootloader/${PKG_SUBDEVICE}_u-boot
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue