mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Odroid_C2: initial project
This commit is contained in:
parent
eb052860c1
commit
ac6d9a598c
175
projects/Odroid_C2/bootloader/boot.ini
Normal file
175
projects/Odroid_C2/bootloader/boot.ini
Normal file
@ -0,0 +1,175 @@
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# boot.ini identification
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
ODROIDC2-UBOOT-CONFIG
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Boot Specific Stuff
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Console Setup
|
||||
# setenv condev "console=ttyS0,115200n8" # on serial port
|
||||
# setenv condev "console=tty0" # on display (HDMI)
|
||||
# setenv condev "console=tty0 console=ttyS0,115200n8" # on both
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv console "console=tty0"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Video
|
||||
# Setup the video output
|
||||
# 480 Lines (720x480)
|
||||
# setenv video_output "480i60hz" # Interlaced 60Hz
|
||||
# setenv video_output "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
|
||||
# setenv video_output "480p60hz" # 480 Progressive 60Hz
|
||||
# setenv video_output "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz
|
||||
# 576 Lines (720x576)
|
||||
# setenv video_output "576i50hz" # Interlaced 50Hz
|
||||
# setenv video_output "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
|
||||
# setenv video_output "576p50hz" # Progressive 50Hz
|
||||
# setenv video_output "576p_rpt" # Progressive for Rear Projection Televisions 50Hz
|
||||
# 720 Lines (1280x720)
|
||||
# setenv video_output "720p50hz" # Progressive 50Hz
|
||||
# setenv video_output "720p60hz" # Progressive 60Hz
|
||||
# 1080 Lines (1920x1080)
|
||||
# setenv video_output "1080i60hz" # Interlaced 60Hz
|
||||
# setenv video_output "1080p60hz" # Progressive 60Hz
|
||||
# setenv video_output "1080i50hz" # Interlaced 50Hz
|
||||
# setenv video_output "1080p50hz" # Progressive 50Hz
|
||||
# setenv video_output "1080p24hz" # Progressive 24Hz
|
||||
# 4K (3840x2160)
|
||||
# setenv video_output "2160p30hz" # Progressive 30Hz
|
||||
# setenv video_output "2160p25hz" # Progressive 25Hz
|
||||
# setenv video_output "2160p24hz" # Progressive 24Hz
|
||||
# setenv video_output "smpte24hz" # Progressive 24Hz SMPTE
|
||||
# setenv video_output "2160p50hz" # Progressive 50Hz
|
||||
# setenv video_output "2160p60hz" # Progressive 60Hz
|
||||
# setenv video_output "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
|
||||
# setenv video_output "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
|
||||
# VESA modes
|
||||
# setenv video_output "640x480p60hz"
|
||||
# setenv video_output "800x480p60hz"
|
||||
# setenv video_output "800x600p60hz"
|
||||
# setenv video_output "1024x600p60hz"
|
||||
# setenv video_output "1024x768p60hz"
|
||||
# setenv video_output "1280x800p60hz"
|
||||
# setenv video_output "1280x1024p60hz"
|
||||
# setenv video_output "1360x768p60hz"
|
||||
# setenv video_output "1366x768p60hz"
|
||||
# setenv video_output "1440x900p60hz"
|
||||
# setenv video_output "1600x900p60hz"
|
||||
# setenv video_output "1680x1050p60hz"
|
||||
# setenv video_output "1920x1200p60hz"
|
||||
#
|
||||
# Setup the HDMI video mode (Must be one or the other)
|
||||
# setenv video_mode "dvi" # DVI
|
||||
# setenv video_mode "vga" # VGA
|
||||
#
|
||||
# Setup the HDMI BPP Mode
|
||||
# setenv video_bpp "32" # 32-bit
|
||||
# setenv video_bpp "24" # 24-bit
|
||||
# setenv video_bpp "16" # 16-bit
|
||||
#
|
||||
# Enable|Disable HDMI Hotplug Detection
|
||||
# setenv hdmihotplug "0" # Disabled
|
||||
# setenv hdmihotplug "1" # Enabled
|
||||
#
|
||||
# Enable|Disable HDMI (Saves RAM)
|
||||
# setenv hdmioutput "0" # Disabled
|
||||
# setenv hdmioutput "1" # Enabled
|
||||
#
|
||||
# Enable|Disable VPU (Saves RAM)
|
||||
# setenv vpu "0" # Disabled
|
||||
# setenv vpu "1" # Enabled
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv video_output "1080p60hz"
|
||||
setenv video_mode "hdmi"
|
||||
setenv video_bpp "32"
|
||||
setenv hdmihotplug "1"
|
||||
setenv hdmioutput "1"
|
||||
setenv vpu "1"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# LibreELEC variables
|
||||
#
|
||||
# Setup the LibreELEC options
|
||||
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv libreelec "quiet"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# UHS Card Configuration
|
||||
# Uncomment the line below to __DISABLE__ UHS-1 MicroSD support
|
||||
# This might break boot for some brand models of cards.
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
# setenv disableuhs "disableuhs"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Enable|Disable HDMI CEC Control
|
||||
# setenv hdmi_cec "0" # Disabled
|
||||
# setenv hdmi_cec "1" # Enabled
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv hdmi_cec "1"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# PCM5102 I2S Audio DAC (HiFi Shield)
|
||||
# PCM5102 is an I2S Audio DAC Addon board for ODROID-C1+
|
||||
#
|
||||
# Enable|Disable Audio DAC
|
||||
# setenv audio_dac "0" # Disabled
|
||||
# setenv audio_dac "1" # Enabled
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv audio_dac "0"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Odroid C1 specific
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv odroidp1 "no_console_suspend hdmimode=${video_output} m_bpp=${video_bpp} vout=${video_mode}"
|
||||
setenv odroidp2 "${disableuhs} consoleblank=0"
|
||||
setenv odroid "${odroidp1} ${odroidp2}"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# U-Boot bootcmd command
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
setenv kernel "fatload mmc 0:1 0x11000000 KERNEL"
|
||||
setenv dtb "fatload mmc 0:1 0x1000000 meson64_odroidc2.dtb"
|
||||
setenv bootseq "booti 0x11000000 - 0x1000000"
|
||||
setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"
|
||||
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Kernel boot
|
||||
#
|
||||
#------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Prepare to boot
|
||||
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cecf"; fi
|
||||
if test "${hdmi_hotplug}" = "0"; then setenv hpd "disablehpd=true"; fi
|
||||
if test "${audio_dac}" = "1"; then setenv dac "enabledac"; fi
|
||||
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
|
||||
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
|
||||
|
||||
# Populate the final bootcmd
|
||||
setenv bootargs "${console} ${bootrootfs} ${odroid} ${cec} ${hpd} ${dac} ${libreelec}"
|
||||
|
||||
# Boot the board
|
||||
run bootcmd
|
12
projects/Odroid_C2/filesystem/etc/asound.conf
Normal file
12
projects/Odroid_C2/filesystem/etc/asound.conf
Normal file
@ -0,0 +1,12 @@
|
||||
pcm.!default {
|
||||
type plug
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
format S16_LE
|
||||
}
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 0
|
||||
}
|
@ -0,0 +1 @@
|
||||
mali
|
@ -0,0 +1 @@
|
||||
meson-ir
|
@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Debug Shell on /dev/console
|
||||
DefaultDependencies=no
|
||||
ConditionKernelCommandLine=console
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/storage
|
||||
Environment="ENV=/etc/profile"
|
||||
ExecStart=/bin/sh
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/console
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
# bash ignores SIGTERM
|
||||
KillSignal=SIGHUP
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
@ -0,0 +1,8 @@
|
||||
KERNEL=="mali",SUBSYSTEM=="misc",MODE="0777"
|
||||
KERNEL=="mali0",SUBSYSTEM=="misc",MODE="0777"
|
||||
KERNEL=="ump",SUBSYSTEM=="ump",MODE="0777"
|
||||
KERNEL=="ttySAC0", SYMLINK+="ttyACM99"
|
||||
KERNEL=="event*", SUBSYSTEM=="input", MODE="0777"
|
||||
KERNEL=="CEC", MODE="0777"
|
||||
KERNEL=="amvideo", MODE="0666"
|
||||
KERNEL=="amstream*", MODE="0666"
|
54
projects/Odroid_C2/initramfs/platform_init
Normal file
54
projects/Odroid_C2/initramfs/platform_init
Normal file
@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
for x in $(cat /proc/cmdline); do
|
||||
case ${x} in
|
||||
m_bpp=*) export bpp=${x#*=} ;;
|
||||
hdmimode=*) export mode=${x#*=} ;;
|
||||
esac
|
||||
done
|
||||
|
||||
common_display_setup() {
|
||||
M="0 0 $(($X - 1)) $(($Y - 1))"
|
||||
Y_VIRT=$(($Y * 2))
|
||||
fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
|
||||
fbset -fb /dev/fb1 -g 32 32 32 32 32
|
||||
echo $mode > /sys/class/display/mode
|
||||
echo 0 > /sys/class/graphics/fb0/free_scale
|
||||
echo 1 > /sys/class/graphics/fb0/freescale_mode
|
||||
echo $M > /sys/class/graphics/fb0/free_scale_axis
|
||||
echo $M > /sys/class/graphics/fb0/window_axis
|
||||
echo 0 > /sys/class/graphics/fb1/free_scale
|
||||
echo 1 > /sys/class/video/disable_video
|
||||
|
||||
if [ "$bpp" = "32" ]; then
|
||||
echo d01068b4 0x7fc0 > /sys/kernel/debug/aml_reg/paddr
|
||||
fi
|
||||
}
|
||||
|
||||
case $mode in
|
||||
480*) export X=720 Y=480 ;;
|
||||
576*) export X=720 Y=576 ;;
|
||||
720p*) export X=1280 Y=720 ;;
|
||||
1080*) export X=1920 Y=1080 ;;
|
||||
2160p*) export X=3840 Y=2160 ;;
|
||||
smpte24hz*) export X=3840 Y=2160 ;;
|
||||
640x480p60hz*) export X=640 Y=480 ;;
|
||||
800x480p60hz*) export X=800 Y=480 ;;
|
||||
800x600p60hz*) export X=800 Y=600 ;;
|
||||
1024x600p60hz*) export X=1024 Y=600 ;;
|
||||
1024x768p60hz*) export X=1024 Y=768 ;;
|
||||
1280x800p60hz*) export X=1280 Y=800 ;;
|
||||
1280x1024p60hz*) export X=1280 Y=1024 ;;
|
||||
1360x768p60hz*) export X=1360 Y=768 ;;
|
||||
1366x768p60hz*) export X=1366 Y=768 ;;
|
||||
1440x900p60hz*) export X=1440 Y=900 ;;
|
||||
1600x900p60hz*) export X=1600 Y=900 ;;
|
||||
1680x1050p60hz*) export X=1680 Y=1050 ;;
|
||||
1920x1200p60hz*) export X=1920 Y=1200 ;;
|
||||
esac
|
||||
|
||||
common_display_setup
|
||||
|
||||
# Console unblack
|
||||
echo 0 > /sys/class/graphics/fb0/blank
|
||||
echo 0 > /sys/class/graphics/fb1/blank
|
3805
projects/Odroid_C2/linux/linux.aarch64.conf
Normal file
3805
projects/Odroid_C2/linux/linux.aarch64.conf
Normal file
File diff suppressed because it is too large
Load Diff
144
projects/Odroid_C2/options
Normal file
144
projects/Odroid_C2/options
Normal file
@ -0,0 +1,144 @@
|
||||
################################################################################
|
||||
# setup system defaults
|
||||
################################################################################
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
arm64)
|
||||
# TARGET_CPU:
|
||||
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
|
||||
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
|
||||
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
|
||||
# arm720t arm740t strongarm strongarm110 strongarm1100
|
||||
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
|
||||
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
|
||||
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
|
||||
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
|
||||
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
|
||||
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
|
||||
TARGET_CPU="cortex-a53"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
|
||||
BOOTLOADER="u-boot"
|
||||
|
||||
# u-boot version to use (default)
|
||||
UBOOT_VERSION="hardkernel"
|
||||
|
||||
# Configuration for u-boot
|
||||
UBOOT_CONFIG="odroidc2_defconfig"
|
||||
|
||||
# Target Configfile for u-boot
|
||||
UBOOT_CONFIGFILE="boot.ini"
|
||||
|
||||
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# Kernel extra targets to build
|
||||
KERNEL_UBOOT_EXTRA_TARGET=""
|
||||
|
||||
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
|
||||
KERNEL_MAKE_EXTRACMD="dtbs"
|
||||
|
||||
# Kernel to use. values can be:
|
||||
# default: default mainline kernel
|
||||
LINUX="hardkernel"
|
||||
|
||||
################################################################################
|
||||
# setup build defaults
|
||||
################################################################################
|
||||
|
||||
# Build optimizations (size/normal)
|
||||
OPTIMIZATIONS="size"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS=""
|
||||
|
||||
# LTO (Link Time Optimization) support
|
||||
LTO_SUPPORT="yes"
|
||||
|
||||
# GOLD (Google Linker) support
|
||||
GOLD_SUPPORT="yes"
|
||||
|
||||
# SquashFS compression method (gzip / lzo / xz)
|
||||
SQUASHFS_COMPRESSION="lzo"
|
||||
|
||||
################################################################################
|
||||
# setup project defaults
|
||||
################################################################################
|
||||
|
||||
# build and install ALSA Audio support (yes / no)
|
||||
ALSA_SUPPORT="yes"
|
||||
|
||||
# OpenGL(X) implementation to use (no / Mesa)
|
||||
OPENGL="no"
|
||||
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)
|
||||
OPENGLES="opengl-meson"
|
||||
|
||||
# Amlogic Meson SOC family (8 / 6 / gxbb)
|
||||
MESON_FAMILY="gxbb"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
UVESAFB_SUPPORT="no"
|
||||
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
|
||||
# Space separated list is supported,
|
||||
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
|
||||
GRAPHIC_DRIVERS=""
|
||||
|
||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)
|
||||
KODIPLAYER_DRIVER="libamcodec"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
INITRAMFS_MODULES=""
|
||||
|
||||
# additional drivers to install:
|
||||
# for a list of additinoal drivers see packages/linux-drivers
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8188EU RTL8192EU RTL8812AU"
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
FIRMWARE="misc-firmware wlan-firmware dvb-firmware"
|
||||
|
||||
# build and install ATV IR remote support (yes / no)
|
||||
ATVCLIENT_SUPPORT="no"
|
||||
|
||||
# build and install IRServer IR/LCD support (yes / no)
|
||||
IRSERVER_SUPPORT="no"
|
||||
|
||||
# Amlogic IR remote support (yes / no)
|
||||
AMREMOTE_SUPPORT="no"
|
||||
|
||||
# Odroid IR remote support (yes / no)
|
||||
ODROIDREMOTE_SUPPORT="yes"
|
||||
|
||||
# build with swap support (yes / no)
|
||||
SWAP_SUPPORT="no"
|
||||
|
||||
# swap support enabled per default (yes / no)
|
||||
SWAP_ENABLED_DEFAULT="no"
|
||||
|
||||
# swapfile size if SWAP_SUPPORT=yes in MB
|
||||
SWAPFILESIZE="128"
|
||||
|
||||
# build with installer (yes / no)
|
||||
INSTALLER_SUPPORT="no"
|
||||
|
||||
# kernel image name
|
||||
KERNEL_NAME="KERNEL"
|
||||
|
||||
# set the addon dirs
|
||||
ADDON_PATH="$ADDON_VERSION/$PROJECT/$TARGET_ARCH"
|
||||
ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH"
|
Loading…
x
Reference in New Issue
Block a user