Skip to content
Permalink
Browse files

projects/Amlogic-ng: introduce new project

  • Loading branch information...
Team CoreELEC
Team CoreELEC committed Apr 11, 2019
1 parent 3e2347d commit 86eefc24706e1a13c0a01dd935a0010841f8fce6
Showing with 7,317 additions and 0 deletions.
  1. +56 −0 projects/Amlogic-ng/bootloader/Odroid_N2_boot.ini
  2. +11 −0 projects/Amlogic-ng/bootloader/canupdate.sh
  3. +138 −0 projects/Amlogic-ng/bootloader/config.ini
  4. +34 −0 projects/Amlogic-ng/bootloader/mkbootimg
  5. +53 −0 projects/Amlogic-ng/bootloader/mkimage
  6. +7 −0 projects/Amlogic-ng/bootloader/release
  7. +132 −0 projects/Amlogic-ng/bootloader/update.sh
  8. +34 −0 projects/Amlogic-ng/filesystem/etc/lirc/lircd.conf.d/odroid-amremote.conf
  9. +7 −0 projects/Amlogic-ng/filesystem/usr/bin/cputemp
  10. +1 −0 projects/Amlogic-ng/filesystem/usr/bin/gputemp
  11. +16 −0 projects/Amlogic-ng/filesystem/usr/lib/kodi/aml-hdmimonitor.sh
  12. +1 −0 projects/Amlogic-ng/filesystem/usr/lib/modprobe.d/mali.conf
  13. +1 −0 projects/Amlogic-ng/filesystem/usr/lib/modules-load.d/amlvideodri.conf
  14. +2 −0 projects/Amlogic-ng/filesystem/usr/lib/systemd/sleep.conf.d/sleep.conf
  15. +9 −0 projects/Amlogic-ng/filesystem/usr/lib/systemd/system/fstrim.service
  16. +10 −0 projects/Amlogic-ng/filesystem/usr/lib/systemd/system/kodi-aml-hdmimonitor.service
  17. +21 −0 projects/Amlogic-ng/filesystem/usr/lib/systemd/system/serial-console.service
  18. +1 −0 projects/Amlogic-ng/filesystem/usr/lib/udev/rules.d/99-spidev.rules
  19. +165 −0 projects/Amlogic-ng/filesystem/usr/sbin/installtoemmc
  20. +54 −0 projects/Amlogic-ng/filesystem/usr/share/alsa/cards/AML-AUGESOUND.conf
  21. +58 −0 projects/Amlogic-ng/initramfs/platform_init
  22. +41 −0 projects/Amlogic-ng/kodi/appliance.xml
  23. +6,185 −0 projects/Amlogic-ng/linux/linux.aarch64.conf
  24. +160 −0 projects/Amlogic-ng/options
  25. +37 −0 projects/Amlogic-ng/packages/opengl-meson/package.mk
  26. +29 −0 projects/Amlogic-ng/packages/u-boot-Odroid_N2/package.mk
  27. +54 −0 projects/Amlogic-ng/packages/u-boot/package.mk
@@ -0,0 +1,56 @@
ODROIDN2-UBOOT-CONFIG

#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------

setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "console=ttyS0,115200 console=tty0"
setenv hdmimode "1080p60hz"
setenv bmp_width "1920"
setenv bmp_height "1080"
setenv vout_mode "hdmi"
setenv hdmioutput "1"
setenv vpu "1"
setenv coreelec "quiet"
setenv hdmi_cec "1"
setenv maxcpus "6"
setenv max_freq_a73 "1800"
setenv max_freq_a53 "1896"
setenv rtc_shield "0"
setenv emmc_timeout "0"
setenv wol "1"

setenv loadaddr 0x11000000
setenv dtb_mem_addr 0x1000000
setenv uenv_addr 0x13000000

fatload mmc ${mmc_dev}:1 ${loadaddr} kernel.img
fatload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img

if fatload mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi

if test "${emmc_timeout}" = "1"; then showlogo ${hdmimode} ${bmp_width} ${bmp_height} timeout-logo-${bmp_height}.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi

setenv device "no_console_suspend logo=osd0,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable voutmode=${vout_mode} hdmimode=${hdmimode} cvbsmode=nocvbs mac=${ethaddr} consoleblank=0 max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} enable_wol=${wol}"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec3f"; fi
setenv bootargs "${condev} ${bootrootfs} ${device} ${cec} ${coreelec}"

# Device tree modifications
bootm start
bootm loados
bootm fdt
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
if test "${rtc_shield}" = "1"; then fdt set "/i2c@c1108500/pcf8563@51" status okay; else fdt set "/i2c@c1108500/pcf8563@51" status disabled; fi
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep

# Boot the board
bootm go
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2019-present Team CoreELEC (https://coreelec.tv)

case $1 in
@PROJECT@|Amlogic*)
exit 0
;;
*)
exit 1
;;
esac
@@ -0,0 +1,138 @@
#------------------------------------------------------------------------------------------------------
#
# config.ini
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Console Setup
# on serial port:
# condev='ttyS0,115200'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Video
# Setup the video output
# hdmimode='480i60hz'
# hdmimode='480i_rpt'
# hdmimode='480p60hz'
# hdmimode='480p_rpt'
# hdmimode='576i50hz'
# hdmimode='576i_rpt'
# hdmimode='576p50hz'
# hdmimode='576p_rpt'
# hdmimode='720p60hz'
# hdmimode='720p50hz'
# hdmimode='1080i60hz'
# hdmimode='1080p60hz'
# hdmimode='1080i50hz'
# hdmimode='1080p50hz'
# hdmimode='1080p30hz'
# hdmimode='1080p25hz'
# hdmimode='1080p24hz'
# hdmimode='2160p60hz'
# hdmimode='2160p50hz'
# hdmimode='2160p30hz'
# hdmimode='2160p25hz'
# hdmimode='2160p24hz'
# hdmimode='2160p60hz420'
# hdmimode='2160p50hz420'
# hdmimode='smpte60hz'
# hdmimode='smpte50hz'
# hdmimode='smpte30hz'
# hdmimode='smpte25hz'
# hdmimode='smpte24hz'
# hdmimode='smpte60hz420'
# hdmimode='smpte50hz420'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# HDMI/DVI Mode Configuration
# This will enforce the signal type of display
# vout_mode='hdmi'
# vout_mode='dvi'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# CoreELEC variables
#
# Setup the CoreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# coreelec='quiet'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec='0'
# hdmi_cec='1'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# Enable|Disable RTC Shield
# rtc_shield='0'
# rtc_shield='1'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# CPU Frequency / Cores control
#
# WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry:
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# maxcpus='1'
# maxcpus='2'
# maxcpus='3'
# maxcpus='4'
#
# MAX Frequency
# 2.016GHz
# max_freq='2016'
# 1.944GHz
# max_freq='1944'
# 1.920GHz
# max_freq='1920'
# 1.896GHz
# max_freq='1896
# 1.752GHz
# max_freq='1752'
# 1.680GHz
# max_freq='1680'
# 1.656GHz
# max_freq='1656'
# 1.536GHz
# max_freq='1536'
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# WOL setting for Odroid N2
# wol=1
#
#------------------------------------------------------------------------------------------------------

#------------------------------------------------------------------------------------------------------
#
# EMMC timeout for Odroid N2
# You can enable a boot delay of 30s before the kernel is loaded. This way you can boot LePotato from
# SD card and you have time to insert the emmc module, otherwise it would boot Android from emmc
# automatically. This is especially useful if you want to install CoreELEC to emmc.
# emmc_timeout=1
#
#------------------------------------------------------------------------------------------------------
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)

DTBIMG_PATH="arch/$TARGET_KERNEL_ARCH/boot"
DTB_PATH="${DTBIMG_PATH}/dts/amlogic"
ANDROID_BOOTIMG_SECOND=""

SUBDEVICES+=" Generic"
for device in $SUBDEVICES; do
DTB_BLOBS_PATH=${DTB_PATH}/${device}
mkdir -p ${DTB_BLOBS_PATH}
if [ "$device" = "Generic" ]; then
for dtblob in $KERNEL_UBOOT_EXTRA_TARGET; do
cp ${DTB_PATH}/$dtblob ${DTB_BLOBS_PATH} 2>/dev/null || :
done
else
cp ${DTB_PATH}/*${device,,}.dtb ${DTB_BLOBS_PATH} 2>/dev/null || :
fi
DTB_BLOBS=($(ls ${DTB_BLOBS_PATH}/*.dtb 2>/dev/null || true))
DTB_BLOBS_COUNT=${#DTB_BLOBS[@]}
DTB_BLOB_OUTPUT=${DTBIMG_PATH}/${device}_dtb.img
if [ "$DTB_BLOBS_COUNT" -gt 1 ]; then
$TOOLCHAIN/bin/dtbTool -o ${DTB_BLOB_OUTPUT} -p scripts/dtc/ ${DTB_BLOBS_PATH}
elif [ "$DTB_BLOBS_COUNT" -eq 1 ]; then
cp -PR $DTB_BLOBS $DTB_BLOB_OUTPUT
fi
done

if [ -f ${DTBIMG_PATH}/Generic_dtb.img ]; then
ANDROID_BOOTIMG_SECOND="--second ${DTBIMG_PATH}/Generic_dtb.img"
fi

LDFLAGS="" mkbootimg --kernel arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET --ramdisk $BUILD/image/initramfs.cpio \
$ANDROID_BOOTIMG_SECOND $ANDROID_BOOTIMG_OPTIONS --output arch/$TARGET_KERNEL_ARCH/boot/boot.img
@@ -0,0 +1,53 @@
#!/bin/bash

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)

# copy amlogic autoscript files to part1 for Generic img only
if [ "${SUBDEVICE}" == "Generic" ]; then
for f in $RELEASE_DIR/3rdparty/bootloader/*autoscript; do
[ -e "$f" ] && mcopy "$f" ::
done
fi

# copy device trees to part1
for dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do
[ -e "$dtb" ] && mcopy -s "$dtb" ::
done

if [ "${SUBDEVICE}" != "Generic" ]; then
if [ -f "$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img "::/dtb.img"
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
fi

if [ -f "$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini" ]; then
cp -p "$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini" "$LE_TMP/boot.ini"
sed -e "s/@BOOT_UUID@/$UUID_SYSTEM/" \
-e "s/@DISK_UUID@/$UUID_STORAGE/" \
-i "$LE_TMP/boot.ini"
mcopy "$LE_TMP/boot.ini" ::
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi
fi

if [ "${SUBDEVICE}" == "Odroid_C2" ]; then
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot-logo.bmp.gz" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot-logo.bmp.gz ::
fi
fi

if [ "${SUBDEVICE}" == "LePotato" -o "${SUBDEVICE}" == "Odroid_N2" ]; then
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz ::
fi
fi
fi
@@ -0,0 +1,7 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)

mkdir -p $RELEASE_DIR/3rdparty/bootloader
cp -a $INSTALL/usr/share/bootloader/* $RELEASE_DIR/3rdparty/bootloader
Oops, something went wrong.

0 comments on commit 86eefc2

Please sign in to comment.
You can’t perform that action at this time.