projects: remove Amlogic_legacy project

This commit is contained in:
kszaq 2019-04-25 21:04:51 +02:00 committed by MilhouseVH
parent 61e8300e84
commit 68a053bf5d
76 changed files with 0 additions and 7153 deletions

View File

@ -1,30 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
# compile and copy amlogic autoscript files to part1
mcopy $RELEASE_DIR/3rdparty/bootloader/*autoscript :: 2>&1 > /dev/null || true
# 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 [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/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/boot.ini" ]; then
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/" \
-i "$LE_TMP/boot.ini"
mcopy "$LE_TMP/boot.ini" ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi

View File

@ -1,7 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
mkdir -p $RELEASE_DIR/3rdparty/bootloader
cp -a $INSTALL/usr/share/bootloader/* $RELEASE_DIR/3rdparty/bootloader

View File

@ -1,121 +0,0 @@
#!/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 "$UPDATE_DIR" ] && UPDATE_DIR="/storage/.update"
UPDATE_DTB_IMG="$UPDATE_DIR/dtb.img"
UPDATE_DTB="$(ls -1 "$UPDATE_DIR"/*.dtb 2>/dev/null | head -n 1)"
[ -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 -o rw,remount $BOOT_ROOT
for arg in $(cat /proc/cmdline); do
case $arg in
boot=*)
boot="${arg#*=}"
case $boot in
/dev/mmc*)
BOOT_UUID="$(blkid $boot | sed 's/.* UUID="//;s/".*//g')"
;;
UUID=*|LABEL=*)
BOOT_UUID="$(blkid | sed 's/"//g' | grep -m 1 -i " $boot " | sed 's/.* UUID=//;s/ .*//g')"
;;
esac
if [ -f "/proc/device-tree/le-dt-id" ] ; then
LE_DT_ID=$(cat /proc/device-tree/le-dt-id)
fi
if [ -f "$UPDATE_DTB_IMG" ] ; then
UPDATE_DTB_SOURCE="$UPDATE_DTB_IMG"
elif [ -f "$UPDATE_DTB" ] ; then
UPDATE_DTB_SOURCE="$UPDATE_DTB"
elif [ -n "$LE_DT_ID" -a -f "$SYSTEM_ROOT/usr/share/bootloader/device_trees/$LE_DT_ID.dtb" ] ; then
UPDATE_DTB_SOURCE="$SYSTEM_ROOT/usr/share/bootloader/device_trees/$LE_DT_ID.dtb"
fi
if [ -f "$UPDATE_DTB_SOURCE" ] ; then
echo "Updating device tree from $UPDATE_DTB_SOURCE..."
case $boot in
/dev/system)
dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none
dd if="$UPDATE_DTB_SOURCE" of=/dev/dtb bs=256k status=none
;;
/dev/mmc*|LABEL=*|UUID=*)
cp -f "$UPDATE_DTB_SOURCE" "$BOOT_ROOT/dtb.img"
;;
esac
fi
for all_dtb in /flash/*.dtb ; do
if [ -f $all_dtb ] ; then
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
fi
done
;;
disk=*)
disk="${arg#*=}"
case $disk in
/dev/mmc*)
DISK_UUID="$(blkid $disk | sed 's/.* UUID="//;s/".*//g')"
;;
UUID=*|LABEL=*)
DISK_UUID="$(blkid | sed 's/"//g' | grep -m 1 -i " $disk " | sed 's/.* UUID=//;s/ .*//g')"
;;
esac
;;
esac
done
if [ -d $BOOT_ROOT/device_trees ]; then
rm $BOOT_ROOT/device_trees/*.dtb
cp -p $SYSTEM_ROOT/usr/share/bootloader/*.dtb $BOOT_ROOT/device_trees/
fi
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
sed -e "s/@BOOT_UUID@/$BOOT_UUID/" \
-e "s/@DISK_UUID@/$DISK_UUID/" \
-i $BOOT_ROOT/boot.ini
if [ -f $SYSTEM_ROOT/usr/share/bootloader/config.ini ]; then
if [ ! -f $BOOT_ROOT/config.ini ]; then
echo "Creating config.ini..."
cp -p $SYSTEM_ROOT/usr/share/bootloader/config.ini $BOOT_ROOT/config.ini
fi
fi
fi
if [ -f $SYSTEM_ROOT/usr/share/bootloader/boot-logo.bmp.gz ]; then
echo "Updating boot logo..."
cp -p $SYSTEM_ROOT/usr/share/bootloader/boot-logo.bmp.gz $BOOT_ROOT
fi
if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot -a ! -e /dev/system -a ! -e /dev/boot ]; then
echo "Updating u-boot on: $BOOT_DISK..."
dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot of=$BOOT_DISK conv=fsync bs=1 count=112 status=none
dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot of=$BOOT_DISK conv=fsync bs=512 skip=1 seek=1 status=none
fi
mount -o ro,remount $BOOT_ROOT

View File

@ -1,40 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
KHADAS-UBOOT-CONFIG
setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
setenv khadas "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "console=${condev} ${bootrootfs} ${khadas} ${cec} ${libreelec}"
# 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
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep
# Boot the board
bootm go

View File

@ -1,57 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# config.ini
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Console Setup
# on serial port:
# condev='ttyS0,115200'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Video
# Setup the video output
# hdmimode='480i60hz'
# hdmimode='480p60hz'
# hdmimode='576i50hz'
# hdmimode='576p50hz'
# 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'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# libreelec='quiet'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec='0'
# hdmi_cec='1'
#
#------------------------------------------------------------------------------------------------------

View File

@ -1,33 +0,0 @@
# u-boot version to use (default)
UBOOT_VERSION="vendor"
# Configuration for u-boot
UBOOT_CONFIG="kvim_defconfig"
# Target Configfile for u-boot
UBOOT_CONFIGFILE="boot.ini"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxl_p212_2g_kvim.dtb"
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# 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="$ADDITIONAL_DRIVERS ap6xxx-aml"
# 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="$FIRMWARE brcmfmac_sdio-firmware-all-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"
# add OOTB support for Khadas VIM IR remote
IR_REMOTE_KEYMAPS="$IR_REMOTE_KEYMAPS khadas_vim"

View File

@ -1,40 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
KHADAS-UBOOT-CONFIG
setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
setenv khadas "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "console=${condev} ${bootrootfs} ${khadas} ${cec} ${libreelec}"
# 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
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep
# Boot the board
bootm go

View File

@ -1,57 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# config.ini
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Console Setup
# on serial port:
# condev='ttyS0,115200'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Video
# Setup the video output
# hdmimode='480i60hz'
# hdmimode='480p60hz'
# hdmimode='576i50hz'
# hdmimode='576p50hz'
# 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'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# libreelec='quiet'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec='0'
# hdmi_cec='1'
#
#------------------------------------------------------------------------------------------------------

View File

@ -1,9 +0,0 @@
[Unit]
Description=Set minimum frequency to 1GHz for both CPU clusters
[Service]
Type=simple
ExecStart=-/usr/bin/sh -c 'echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq; echo 1000000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq'
[Install]
WantedBy=basic.target

View File

@ -1,36 +0,0 @@
# u-boot version to use (default)
UBOOT_VERSION="vendor"
# Configuration for u-boot
UBOOT_CONFIG="kvim2_defconfig"
# Target Configfile for u-boot
UBOOT_CONFIGFILE="boot.ini"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxm_kvim2.dtb"
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)
OPENGLES="opengl-meson-t82x"
# Amlogic Meson SOC family (8 / 6 / gxbb)
MESON_FAMILY="gxm"
# 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="$ADDITIONAL_DRIVERS ap6xxx-aml"
# 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="$FIRMWARE brcmfmac_sdio-firmware-all-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -1,40 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
LIBRETECH-UBOOT-CONFIG
setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
setenv libretech "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "console=${condev} ${bootrootfs} ${libretech} ${cec} ${libreelec}"
# 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
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep
# Boot the board
bootm go

View File

@ -1,70 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# 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'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# libreelec='quiet'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# Enable|Disable HDMI CEC Control
# hdmi_cec='0'
# hdmi_cec='1'
#
#------------------------------------------------------------------------------------------------------

View File

@ -1,19 +0,0 @@
# u-boot version to use (default)
UBOOT_VERSION="vendor"
# Configuration for u-boot
UBOOT_CONFIG="libretech_cc_defconfig"
# Target Configfile for u-boot
UBOOT_CONFIGFILE="boot.ini"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxl_p212_1g_lepotato.dtb gxl_p212_2g_lepotato.dtb"
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -1,43 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
ODROIDC2-UBOOT-CONFIG
setenv bootrootfs "BOOT_IMAGE=KERNEL boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv maxcpus "4"
setenv max_freq "1536"
setenv rtc_shield "0"
setenv kernel_addr 0x11000000
setenv dtb_addr 0x1000000
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${kernel_addr} KERNEL
fatload mmc 0:1 ${dtb_addr} meson64_odroidc2.dtb
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
fdt addr ${dtb_addr}
fdt resize
setenv odroidp1 "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs"
setenv odroidp2 "mac=${ethaddr} consoleblank=0 max_freq=${max_freq} maxcpus=${maxcpus}"
setenv odroid "${odroidp1} ${odroidp2}"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; 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
if test "${rtc_shield}" = "0"; then fdt set "/i2c@c1108500/pcf8563@51" status disabled; fi
setenv bootargs "console=${condev} ${bootrootfs} ${odroid} ${cec} ${libreelec} "
booti ${kernel_addr} - ${dtb_addr}

View File

@ -1,112 +0,0 @@
#------------------------------------------------------------------------------------------------------
#
# 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'
#
#------------------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------
#
# LibreELEC variables
#
# Setup the LibreELEC options
# valid values are: textmode debugging progress nofsck nosplash noram overlay quiet ssh
#
# libreelec='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'
#
#------------------------------------------------------------------------------------------------------

View File

@ -1,34 +0,0 @@
begin remote
name odroid_amremote
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9000 4500
one 563 1687
zero 563 562
ptrail 563
repeat 9000 2250
pre_data_bits 16
pre_data 0x4DB2
gap 0
suppress_repeat 1
begin codes
KEY_POWER 0x3BC4
KEY_MUTE 0x11EE
KEY_HOME 0x41BE
KEY_OK 0x738C
KEY_LEFT 0x9966
KEY_RIGHT 0x837C
KEY_UP 0x53AC
KEY_DOWN 0x4BB4
KEY_BACK 0x59A6
KEY_MENU 0xA35C
KEY_VOLUMEDOWN 0x817E
KEY_VOLUMEUP 0x01FE
end codes
end remote

View File

@ -1 +0,0 @@
KERNEL=="spidev*", SUBSYSTEMS=="spidev", SYMLINK+="spidev0.0"

View File

@ -1,7 +0,0 @@
# Allow upgrades between aarch64 and arm
PROJECT="Odroid_C2"
if [ "$1" = "${PROJECT}.aarch64" ] || [ "$1" = "${PROJECT}.arm" ]; then
exit 0
else
exit 1
fi

View File

@ -1,30 +0,0 @@
# 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=""
# Build Android kernel image using mkbootimg
BUILD_ANDROID_BOOTIMG=""
# Additional options to be passed to Android mkbootimg
ANDROID_BOOTIMG_OPTIONS=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD="dtbs"
# kernel image name
KERNEL_NAME="KERNEL"
# Amlogic IR remote support (yes / no)
AMREMOTE_SUPPORT="no"
# add OOTB support for Odroid IR remote
IR_REMOTE_KEYMAPS="$IR_REMOTE_KEYMAPS odroid"

View File

@ -1,21 +0,0 @@
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# 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="$ADDITIONAL_DRIVERS ap6xxx-aml mt7601u-aml mt7603u-aml \
qca9377-aml RTL8189ES-aml RTL8189FS-aml RTL8723BS-aml \
RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml wetekdvb \
avl6862-aml"
# 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="$FIRMWARE brcmfmac_sdio-firmware-all-aml rtl8723bs_bt qca9377-firmware-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -1,9 +0,0 @@
[Unit]
Description=Set minimum frequency to 1GHz for both CPU clusters
[Service]
Type=simple
ExecStart=-/usr/bin/sh -c 'echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq; echo 1000000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq'
[Install]
WantedBy=basic.target

View File

@ -1,30 +0,0 @@
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxm_q200_2g.dtb gxm_q201_1g.dtb gxm_q201_2g.dtb"
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)
OPENGLES="opengl-meson-t82x"
# Amlogic Meson SOC family (8 / 6 / gxbb)
MESON_FAMILY="gxm"
# 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="$ADDITIONAL_DRIVERS ap6xxx-aml mt7601u-aml mt7603u-aml \
qca9377-aml RTL8189ES-aml RTL8189FS-aml \
RTL8723BS-aml RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml \
avl6862-aml"
# 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="$FIRMWARE brcmfmac_sdio-firmware-all-aml rtl8723bs_bt qca9377-firmware-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -1,43 +0,0 @@
#
# Configuration for Amlogic M8 Audio
#
AML-M8AUDIO.pcm.default {
@args [ CARD ]
@args.CARD { type string }
type hw
card $CARD
device 0
format S32_LE
}
<confdir:pcm/hdmi.conf>
AML-M8AUDIO.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
device 1
format S16_LE
}
hooks.0 {
type ctl_elems
hook_args [
{
interface MIXER
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View File

@ -1,7 +0,0 @@
# Allow upgrades between aarch64 and arm
PROJECT="WeTek_Hub"
if [ "$1" = "${PROJECT}.aarch64" ] || [ "$1" = "${PROJECT}.arm" ]; then
exit 0
else
exit 1
fi

View File

@ -1,32 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
[ -z "$SYSTEM_ROOT" ] && SYSTEM_ROOT=""
[ -z "$BOOT_ROOT" ] && BOOT_ROOT="/flash"
IMAGE_KERNEL="/flash/kernel.img"
# parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
BOOT_IMAGE=*)
IMAGE_KERNEL="${arg#*=}"
;;
esac
done
# mount $BOOT_ROOT r/w
mount -o remount,rw $BOOT_ROOT
if [ -b $IMAGE_KERNEL ]; then
dd if="$SYSTEM_ROOT/usr/share/bootloader/dtb.img" of="/dev/dtb" bs=262144 2>&1
else
cp -p $SYSTEM_ROOT/usr/share/bootloader/dtb.img $BOOT_ROOT
fi
# mount $BOOT_ROOT r/o
sync
mount -o remount,ro $BOOT_ROOT

View File

@ -1,39 +0,0 @@
show_progress(0.500000, 3);
set_bootloader_env("upgrade_step", "3");
ui_print("Wiping Userdata");
format("ext4", "EMMC", "/dev/block/data", "0", "/data");
ui_print("Writing kernel image");
assert(package_extract_file("KERNEL", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
ui_print("Writing device tree image");
write_dtb_image(package_extract_file("dtb.img"));
show_progress(0.020000, 0);
ui_print("Wiping System");
format("ext4", "EMMC", "/dev/block/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/system", "/system");
ui_print("Writing system files");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(0.300000, 60);
ui_print("Writing recovery");
write_raw_image(package_extract_file("recovery.img"), "recovery");
show_progress(0.018000, 0);
ui_print("Writing bootloader");
write_raw_image(package_extract_file("bootloader.img"), "bootloader");
ui_print("Writing logo");
write_raw_image(package_extract_file("logo.img"), "logo");
set_bootloader_env("upgrade_check", "defenv_reserv; setenv upgrade_step 2; saveenv;");
show_progress(0.100000, 0);
ui_print("LibreELEC Installed Successfully");

View File

@ -1,16 +0,0 @@
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200_1G_wetek_hub.dtb"
# 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="$ADDITIONAL_DRIVERS brcmap6xxx-aml"
# 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="$FIRMWARE brcmfmac_sdio-firmware-aml"
# add OOTB support for Wetek Hub IR remote
IR_REMOTE_KEYMAPS="$IR_REMOTE_KEYMAPS wetek_hub"

View File

@ -1,43 +0,0 @@
#
# Configuration for Amlogic M8 Audio
#
AML-M8AUDIO.pcm.default {
@args [ CARD ]
@args.CARD { type string }
type hw
card $CARD
device 0
format S32_LE
}
<confdir:pcm/hdmi.conf>
AML-M8AUDIO.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
device 1
format S16_LE
}
hooks.0 {
type ctl_elems
hook_args [
{
interface MIXER
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View File

@ -1,7 +0,0 @@
# Allow upgrades between aarch64 and arm
PROJECT="WeTek_Play_2"
if [ "$1" = "${PROJECT}.aarch64" ] || [ "$1" = "${PROJECT}.arm" ]; then
exit 0
else
exit 1
fi

View File

@ -1,32 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
[ -z "$SYSTEM_ROOT" ] && SYSTEM_ROOT=""
[ -z "$BOOT_ROOT" ] && BOOT_ROOT="/flash"
IMAGE_KERNEL="/flash/kernel.img"
# parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
BOOT_IMAGE=*)
IMAGE_KERNEL="${arg#*=}"
;;
esac
done
# mount $BOOT_ROOT r/w
mount -o remount,rw $BOOT_ROOT
if [ -b $IMAGE_KERNEL ]; then
dd if="$SYSTEM_ROOT/usr/share/bootloader/dtb.img" of="/dev/dtb" bs=262144 2>&1
else
cp -p $SYSTEM_ROOT/usr/share/bootloader/dtb.img $BOOT_ROOT
fi
# mount $BOOT_ROOT r/o
sync
mount -o remount,ro $BOOT_ROOT

View File

@ -1,39 +0,0 @@
show_progress(0.500000, 3);
set_bootloader_env("upgrade_step", "3");
ui_print("Wiping Userdata");
format("ext4", "EMMC", "/dev/block/data", "0", "/data");
ui_print("Writing kernel image");
assert(package_extract_file("KERNEL", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
ui_print("Writing device tree image");
write_dtb_image(package_extract_file("dtb.img"));
show_progress(0.020000, 0);
ui_print("Wiping System");
format("ext4", "EMMC", "/dev/block/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/system", "/system");
ui_print("Writing system files");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(0.300000, 60);
ui_print("Writing recovery");
write_raw_image(package_extract_file("recovery.img"), "recovery");
show_progress(0.018000, 0);
ui_print("Writing bootloader");
write_raw_image(package_extract_file("bootloader.img"), "bootloader");
ui_print("Writing logo");
write_raw_image(package_extract_file("logo.img"), "logo");
set_bootloader_env("upgrade_check", "defenv_reserv; setenv upgrade_step 2; saveenv;");
show_progress(0.100000, 0);
ui_print("LibreELEC Installed Successfully");

View File

@ -1,17 +0,0 @@
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200_2G_wetek_play_2.dtb"
# 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="$ADDITIONAL_DRIVERS brcmap6xxx-aml wetekdvb"
# 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="$FIRMWARE brcmfmac_sdio-firmware-aml"
# add OOTB support for Wetek Play 2 IR remote
IR_REMOTE_KEYMAPS="$IR_REMOTE_KEYMAPS wetek_play_2"

View File

@ -1,8 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"

View File

@ -1 +0,0 @@
cputemp

View File

@ -1 +0,0 @@
options mali mali_shared_mem_size=0x40000000

View File

@ -1,3 +0,0 @@
[Sleep]
SuspendMode=false
HibernateMode=false

View File

@ -1,9 +0,0 @@
[Unit]
Description=Apply TRIM on all trimmable mounts
[Service]
Type=simple
ExecStart=-/usr/sbin/fstrim -a -v
[Install]
WantedBy=basic.target

View File

@ -1,21 +0,0 @@
[Unit]
Description=Debug Shell on /dev/ttyS0
DefaultDependencies=no
ConditionKernelCommandLine=console=ttyS0,115200
[Service]
WorkingDirectory=/storage
Environment="ENV=/etc/profile"
ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"'
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/ttyS0
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -1,54 +0,0 @@
#
# Configuration for Amlogic M8 Audio
#
AML-M8AUDIO.pcm.default {
@args [ CARD ]
@args.CARD { type string }
type softvol
slave.pcm {
type plug
slave {
pcm {
type hw
card $CARD
device 0
}
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
<confdir:pcm/hdmi.conf>
AML-M8AUDIO.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
device 1
format S16_LE
}
hooks.0 {
type ctl_elems
hook_args [
{
interface MIXER
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View File

@ -1 +0,0 @@
BTTTY="/dev/ttyS1"

View File

@ -1,96 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
display_mode=$(cat /sys/class/display/mode)
for arg in $(cat /proc/cmdline); do
case ${arg} in
bootfrom*)
bootfromext=1
;;
BOOT_IMAGE=*)
BOOT_IMAGE=${arg#*=}
;;
boot=*)
boot=${arg#*=}
;;
disk=*)
disk=${arg#*=}
;;
hdmimode=*)
hdmimode=${arg#*=}
;;
esac
done
# Add information where to run LibreELEC from
if [ -z "$BOOT_IMAGE" -o -z "$boot" -o -z "$disk" ]; then
cmdline=$(cat /proc/cmdline)
if [ -n "$bootfromext" ]; then
cmdline="$cmdline BOOT_IMAGE=kernel.img boot=LABEL=@BOOT_LABEL@ disk=LABEL=@DISK_LABEL@"
else
cmdline="$cmdline BOOT_IMAGE=/dev/boot boot=/dev/system disk=/dev/data"
fi
echo "$cmdline" > /proc/cmdline
fi
# Set colorspace to avoid no HDMI signal with non-4K output modes
echo 422,8bit > /sys/class/amhdmitx/amhdmitx0/attr
# Enable HDMI output if cable is connected and not already enabled by u-boot
if [ "$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)" != "0" ] && [ "$display_mode" != "$hdmimode" ]; then
echo "$hdmimode" > /sys/class/display/mode
display_mode="$hdmimode"
fi
# Set framebuffer geometry to match the resolution
case $display_mode in
480*) X=720 Y=480 ;;
576*) X=720 Y=576 ;;
720p*) X=1280 Y=720 ;;
*) X=1920 Y=1080 ;;
esac
fbset -fb /dev/fb0 -g $X $Y 1920 2160 32
fbset -fb /dev/fb1 -g 32 32 32 32 32
echo 0 > /sys/class/graphics/fb0/free_scale
echo 0 > /sys/class/graphics/fb1/free_scale
echo 1 > /sys/class/video/disable_video
# Enable scaling for 4K output
case $display_mode in
4k*|smpte*|2160*)
echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis
echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis
echo 1920 > /sys/class/graphics/fb0/scale_width
echo 1080 > /sys/class/graphics/fb0/scale_height
echo 0x10001 > /sys/class/graphics/fb0/free_scale
;;
esac
# Include deinterlacer into default VFM map
echo rm default > /sys/class/vfm/map
echo add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map
# Enable framebuffer device
echo 0 > /sys/class/graphics/fb0/blank
# Blank fb1 to prevent static noise
echo 1 > /sys/class/graphics/fb1/blank
# set smp_affinity
# Binary Hex
# CPU 0 0001 1
# CPU 1 0010 2
# CPU 2 0100 4
# CPU 3 1000 8
echo 2 > /proc/irq/231/smp_affinity # hdmi_aocec
echo 4 > /proc/irq/63/smp_affinity # dwc_otg, dwc_otg_hcd:usb1
echo 8 > /proc/irq/62/smp_affinity # dwc_otg, dwc_otg_hcd:usb2, dwc_otg_pcd
# DEC_CONTROL_FLAG_DISABLE_FAST_POC
echo 4 > /sys/module/amvdec_h264/parameters/dec_control
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

File diff suppressed because it is too large Load Diff

View File

@ -1,155 +0,0 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
aarch64)
# 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"
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
# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)
BOOTLOADER="u-boot"
# u-boot version to use (default)
UBOOT_VERSION="vendor"
# Kernel target
KERNEL_TARGET="Image.lzo"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200.dtb gxbb_p200_2G.dtb gxl_p212_1g.dtb gxl_p212_2g.dtb gxl_p230_2g.dtb"
# Build Android kernel image using mkbootimg
BUILD_ANDROID_BOOTIMG="yes"
# Additional options to be passed to Android mkbootimg
ANDROID_BOOTIMG_OPTIONS="--base 0x0 --kernel_offset 0x1080000"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET=""
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="amlogic-3.14"
# kernel image name
KERNEL_NAME="kernel.img"
################################################################################
# setup build defaults
################################################################################
# Project CFLAGS
PROJECT_CFLAGS=""
# 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 (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="font softcursor bitblit fbcon dwc_otg"
# 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="gpu-aml RTL8192CU RTL8192DU RTL8192EU RTL8812AU RTL8188EU-aml"
# 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"
# Amlogic IR remote support (yes / no)
AMREMOTE_SUPPORT="no"
# build and install iSCSI support - iscsistart (yes / no)
ISCSI_SUPPORT="no"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"
# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons
# Space separated list is supported,
DRIVER_ADDONS=""
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES="u-boot-tools-aml dtc"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"
# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons
# Space separated list is supported,
DRIVER_ADDONS="crazycat_aml"

View File

@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="android-headers"
PKG_VERSION="25"
PKG_SHA256="1e0ecdf56c33aaa523109254e2c475878d8cfc5795ebd4bb5ecbaf80926f4fe9"
PKG_LICENSE="Apache"
PKG_SITE="https://android.googlesource.com/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Android Platform Headers from AOSP releases."
PKG_TOOLCHAIN="manual"

View File

@ -1,20 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="autoscript-amlogic"
PKG_VERSION=""
PKG_LICENSE="GPL"
PKG_DEPENDS_TARGET="toolchain u-boot-tools-aml:host"
PKG_LONGDESC="Autoscript package for Amlogic devices"
PKG_TOOLCHAIN="manual"
make_target() {
for src in $PKG_DIR/scripts/*autoscript.src ; do
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$(basename $src .src)" > /dev/null
done
}
makeinstall_target() {
mkdir -p $INSTALL/usr/share/bootloader
cp -a $PKG_BUILD/*autoscript $INSTALL/usr/share/bootloader/
}

View File

@ -1,12 +0,0 @@
defenv
setenv bootfromnand 0
setenv upgrade_step 2
setenv libreelec 'run librefromsd; run librefromusb'
setenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'
setenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'
setenv librefromsd 'mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi'
setenv librefromusb 'usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi'
setenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run libreelec; fi; run storeboot'
saveenv
run storeargs
run libreelec

View File

@ -1,72 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="device-trees-amlogic"
PKG_VERSION="30c9d42"
PKG_SHA256="bcbcd81abab242afaf439ff4d3b92039f2dba97ce0986285627e19e58f1c47d4"
PKG_LICENSE="GPL"
PKG_URL="https://github.com/LibreELEC/device-trees-amlogic/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Device trees for Amlogic devices."
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
make_target() {
# Enter kernel directory
pushd $BUILD/linux-$(kernel_version) > /dev/null
# Device trees already present in kernel tree we want to include
EXTRA_TREES=( \
gxbb_p201 gxbb_p200_1G_wetek_hub gxbb_p200_2G_wetek_play_2 \
gxl_p212_1g gxl_p212_2g gxl_p281_1g gxl_p212_1g_lepotato gxl_p212_2g_lepotato \
gxm_q200_2g gxm_q201_1g gxm_q201_2g \
)
# Add trees to the list
for f in ${EXTRA_TREES[@]}; do
DTB_LIST="$DTB_LIST $f.dtb"
done
# Copy all device trees to kernel source folder and create a list
cp -f $PKG_BUILD/*.dts* arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/
for f in $PKG_BUILD/*.dts; do
DTB_NAME="$(basename $f .dts).dtb"
DTB_LIST="$DTB_LIST $DTB_NAME"
done
# Filter device tree list depending on project
case "$DEVICE" in
S905)
for f in ${DTB_LIST[@]}; do
[[ "$f" == gxbb* ]] || [[ "$f" == gxl* ]] && DTB_LIST_FILTERED="$DTB_LIST_FILTERED $f"
done
;;
S912)
for f in ${DTB_LIST[@]}; do
[[ "$f" == gxm* ]] && DTB_LIST_FILTERED="$DTB_LIST_FILTERED $f"
done
;;
*)
for f in ${DTB_LIST[@]}; do
if listcontains "$KERNEL_UBOOT_EXTRA_TARGET" "$f"; then
DTB_LIST_FILTERED="$DTB_LIST_FILTERED $f"
fi
done
;;
esac
# Compile device trees
kernel_make $DTB_LIST_FILTERED
mv arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb $PKG_BUILD
popd > /dev/null
}
makeinstall_target() {
case "$DEVICE" in
S905|S912)
mkdir -p $INSTALL/usr/share/bootloader/device_trees
cp -a $PKG_BUILD/*.dtb $INSTALL/usr/share/bootloader/device_trees
;;
esac
}

View File

@ -1,20 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libhybris"
PKG_VERSION="070c3ab"
PKG_SHA256="070dcf48aa424c1c56c1d95f5116051a22a76bd5ac0c877febf04b63d9559ea2"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/libhybris/libhybris"
PKG_URL="https://github.com/libhybris/libhybris/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_DIR="$PKG_NAME-$PKG_VERSION*/hybris"
PKG_DEPENDS_TARGET="toolchain android-headers"
PKG_LONGDESC="Allows to run bionic-based HW adaptations in glibc systems - libs."
PKG_TOOLCHAIN="autotools"
PKG_CONFIGURE_OPTS_TARGET="--enable-arch=$TARGET_ARCH \
--with-default-egl-platform=fbdev \
--with-android-headers=$BUILD/android-headers-25 \
--with-default-hybris-ld-library-path=/system/lib \
--enable-mali-quirks"

View File

@ -1,19 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 906140e..75888ae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,13 +6,7 @@ endif
if HAS_ANDROID_5_0_0
SUBDIRS += libsync
endif
-SUBDIRS += egl glesv1 glesv2 ui sf input camera vibrator media wifi
-
-if HAS_LIBNFC_NXP_HEADERS
-SUBDIRS += libnfc_nxp libnfc_ndef_nxp
-endif
-SUBDIRS += utils tests
-
+SUBDIRS += egl glesv1 glesv2
MAINTAINERCLEANFILES = \
aclocal.m4 compile config.guess config.sub \

View File

@ -1,51 +0,0 @@
From bd11dbc285303c0fe4039b5058360f38c5614cae Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Tue, 16 Jan 2018 23:41:52 +0100
Subject: [PATCH] eglplatform_fbdev: open new framebuffer when creating a
window
Framebuffer device has to be reopened when creating a new window
to adapt its size to display. This is required e.g. after screen
resolution changed.
---
hybris/egl/platforms/fbdev/eglplatform_fbdev.cpp | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/egl/platforms/fbdev/eglplatform_fbdev.cpp b/egl/platforms/fbdev/eglplatform_fbdev.cpp
index c25a2d7..c75073f 100644
--- a/egl/platforms/fbdev/eglplatform_fbdev.cpp
+++ b/egl/platforms/fbdev/eglplatform_fbdev.cpp
@@ -29,13 +29,6 @@ extern "C" void fbdevws_init_module(struct ws_egl_interface *egl_iface)
assert(0);
}
- err = framebuffer_open((hw_module_t *) gralloc, &framebuffer);
- if (err) {
- fprintf(stderr, "ERROR: failed to open framebuffer: (%s)\n",strerror(-err));
- assert(0);
- }
- TRACE("** framebuffer_open: status=(%s) format=x%x", strerror(-err), framebuffer->format);
-
err = gralloc_open((const hw_module_t *) gralloc, &alloc);
if (err) {
fprintf(stderr, "ERROR: failed to open gralloc: (%s)\n",strerror(-err));
@@ -66,6 +59,16 @@ extern "C" EGLNativeWindowType fbdevws_CreateWindow(EGLNativeWindowType win, _EG
assert (gralloc != NULL);
assert (_nativewindow == NULL);
+ if (framebuffer)
+ framebuffer_close(framebuffer);
+
+ int err = framebuffer_open((hw_module_t *) gralloc, &framebuffer);
+ if (err) {
+ fprintf(stderr, "ERROR: failed to open framebuffer: (%s)\n",strerror(-err));
+ assert(0);
+ }
+ TRACE("** framebuffer_open: status=(%s) format=x%x", strerror(-err), framebuffer->format);
+
_nativewindow = new FbDevNativeWindow(alloc, framebuffer);
_nativewindow->common.incRef(&_nativewindow->common);
return (EGLNativeWindowType) static_cast<struct ANativeWindow *>(_nativewindow);
--
2.7.4

View File

@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="opengl-meson-t82x"
PKG_VERSION="915cb48"
PKG_SHA256="9b5f65afa21250b67578c250da030a5829e69131ce91b2f167b01b1ed30be781"
PKG_LICENSE="nonfree"
PKG_SITE="https://github.com/kszaq/opengl-meson-t82x"
PKG_URL="https://github.com/kszaq/opengl-meson-t82x/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain libhybris"
PKG_SOURCE_DIR="$PKG_NAME-$PKG_VERSION*"
PKG_LONGDESC="OpenGL ES pre-compiled libraries for Mali GPUs. The libraries were extracted from Khadas VIM2 Android firmware."
PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p $INSTALL/system
cp -a system/* $INSTALL/system
}
post_install() {
enable_service unbind-console.service
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=Unbind framebuffer console
ConditionPathExists=/sys/class/vtconsole/vtcon1/bind
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'
[Install]
WantedBy=graphical.target

View File

@ -1,76 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="u-boot"
PKG_SITE="https://www.denx.de/wiki/U-Boot"
PKG_DEPENDS_TARGET="toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
case "$DEVICE" in
"Odroid_C2")
PKG_VERSION="095fdbe"
PKG_URL="https://github.com/hardkernel/u-boot/archive/$PKG_VERSION.tar.gz"
PKG_SHA256="25ee7c8208d8a97c831b8dd9222ce8984f4a0b8f95dabf9d513c130d04aa05b5"
;;
"KVIM"*)
PKG_VERSION="ffc14fc"
PKG_URL="https://github.com/khadas/u-boot/archive/$PKG_VERSION.tar.gz"
PKG_SHA256="1326126ca7962d314cb522d95e657dbf71966e74c84fb093181910f9e4f2c1fa"
;;
"LePotato")
PKG_VERSION="a43076c"
PKG_URL="https://github.com/BayLibre/u-boot/archive/$PKG_VERSION.tar.gz"
PKG_SHA256="0ae5fd97ba86fcd6cc7b2722580745a0ddbf651ffa0cc0bd188a05a9b668373f"
;;
*)
PKG_TOOLCHAIN="manual"
;;
esac
PKG_NEED_UNPACK="$PROJECT_DIR/$PROJECT/bootloader"
[ -n "$DEVICE" ] && PKG_NEED_UNPACK+=" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader"
post_unpack() {
sed -i "s|arm-none-eabi-|arm-eabi-|g" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true
}
make_target() {
if [ -n "$PKG_URL" ]; then
[ "${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 $UBOOT_CONFIG
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true"
fi
}
makeinstall_target() {
mkdir -p $INSTALL/usr/share/bootloader
# Only install u-boot.img et al when building a board specific image
find_file_path bootloader/install && . ${FOUND_PATH}
# 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
fi
find_file_path bootloader/boot.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader
find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader
case "$DEVICE" in
"Odroid_C2")
cp -av $PKG_BUILD/u-boot.bin $INSTALL/usr/share/bootloader/u-boot
;;
"KVIM"*|"LePotato")
cp -av $PKG_BUILD/fip/u-boot.bin.sd.bin $INSTALL/usr/share/bootloader/u-boot
;;
esac
}

View File

@ -1,69 +0,0 @@
diff -Naur u-boot-imx6-ad02f49.org/include/linux/compiler-gcc7.h u-boot-imx6-ad02f49/include/linux/compiler-gcc7.h
--- u-boot-imx6-ad02f49.org/include/linux/compiler-gcc7.h 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-imx6-ad02f49/include/linux/compiler-gcc7.h 2017-05-23 10:31:00.177476141 +0200
@@ -0,0 +1,65 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
+#endif
+
+#define __used __attribute__((__used__))
+#define __must_check __attribute__((warn_unused_result))
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+ to them will be unlikely. This means a lot of manual unlikely()s
+ are unnecessary now for any paths leading to the usual suspects
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
+ older compilers]
+
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
+ in the preprocessor, but we can live with this because they're unreleased.
+ Maketime probing would be overkill here.
+
+ gcc also has a __attribute__((__hot__)) to move hot functions into
+ a special section, but I don't see any sense in this right now in
+ the kernel context */
+#define __cold __attribute__((__cold__))
+
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+
+#ifndef __CHECKER__
+# define __compiletime_warning(message) __attribute__((warning(message)))
+# define __compiletime_error(message) __attribute__((error(message)))
+#endif /* __CHECKER__ */
+
+/*
+ * Mark a position in code as unreachable. This can be used to
+ * suppress control flow warnings after asm blocks that transfer
+ * control elsewhere.
+ *
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
+ * this in the preprocessor, but we can live with this because they're
+ * unreleased. Really, we need to have autoconf for the kernel.
+ */
+#define unreachable() __builtin_unreachable()
+
+/* Mark a function definition as prohibited from being cloned. */
+#define __noclone __attribute__((__noclone__))
+
+/*
+ * Tell the optimizer that something else uses this function or variable.
+ */
+#define __visible __attribute__((externally_visible))
+
+/*
+ * GCC 'asm goto' miscompiles certain code sequences:
+ *
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+ *
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+ *
+ * (asm goto is automatically volatile - the naming reflects this.)
+ */
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
+
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+#define __HAVE_BUILTIN_BSWAP32__
+#define __HAVE_BUILTIN_BSWAP64__
+#define __HAVE_BUILTIN_BSWAP16__
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */

View File

@ -1,36 +0,0 @@
diff -Naur a/include/configs/odroidc2.h b/include/configs/odroidc2.h
--- a/include/configs/odroidc2.h 2016-06-17 12:29:58.790889191 -0700
+++ b/include/configs/odroidc2.h 2016-06-17 12:31:40.319838401 -0700
@@ -83,20 +83,12 @@
"loadaddr=0x20000000\0" \
"dtbaddr=0x1000000\0" \
"fdt_high=0x20000000\0" \
- "hdmimode=1080p60hz\0" \
- "cecconfig=cec0xf\0" \
- "bootargs=root=/dev/mmcblk0p2 rw init=/init rootwait " \
- "console=ttyS0,115200 " \
- "hdmimode=1080p60hz hdmitx=cecf " \
- "logo=osd1,loaded,0x3f800000,1080p60hz " \
- "androidboot.hardware=odroidc2 androidboot.serialno=${fbt_id#} " \
- "androidboot.selinux=disabled \0" \
- "bootcmd=cfgload; showlogo ${hdmimode}; movi read dtb 0 ${dtbaddr}; movi read boot 0 ${loadaddr}; booti ${loadaddr} - ${dtbaddr}\0"
+ "bootcmd=cfgload\0"
#define CONFIG_PREBOOT
#define CONFIG_BOOTCOMMAND
-//#define CONFIG_ENV_IS_NOWHERE 1
+#define CONFIG_ENV_IS_NOWHERE 1
#define CONFIG_ENV_SIZE (32 * SZ_1K) /* 32kB */
#define CONFIG_ENV_OFFSET (720 * SZ_1K) /* FIXME: should be
close to U-boot image
@@ -176,7 +168,7 @@
#define CONFIG_LZO 1
/* storage: emmc/nand/sd */
#define CONFIG_ENV_OVERWRITE
-#define CONFIG_ENV_IS_IN_MMC 1
+#define CONFIG_ENV_IS_IN_MMC 0
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_AML_SD_EMMC 1

View File

@ -1,225 +0,0 @@
From c2ebdfc8d2a03f583410db24bb8086044e9c72bb Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Wed, 7 Sep 2016 20:55:24 +0200
Subject: [PATCH] Update CEC wakeup code
This also removes the forced cec config
---
.../cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c | 102 ++++++++++++---------
arch/arm/cpu/armv8/gxb/firmware/scp_task/suspend.c | 2 -
2 files changed, 58 insertions(+), 46 deletions(-)
diff --git a/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
index 969777f..7d397ca 100644
--- a/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
+++ b/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
@@ -41,7 +41,7 @@ static void *cec_memcpy(void *memto, const void *memfrom, unsigned int size)
}
static void waiting_aocec_free(void) {
- unsigned int cnt = 0;
+ unsigned long cnt = 0;
while (readl(P_AO_CEC_RW_REG) & (1<<23))
{
if (8192 <= cnt++)
@@ -146,8 +146,6 @@ void remote_cec_hw_reset(void)
static int cec_triggle_tx(unsigned char *msg, unsigned char len)
{
unsigned int i, cnt = 0;
- cec_dbg_print("cec_triggle_tx len:0x", len);
- cec_dbg_prints("\n");
cec_dbg_prints(" T:");
for (i = 0; i < len; i++) {
@@ -168,6 +166,7 @@ static int cec_triggle_tx(unsigned char *msg, unsigned char len)
cec_dbg_prints("\n");
}
+ _udelay(150);
return 0;
}
@@ -180,7 +179,7 @@ static int cec_triggle_tx(unsigned char *msg, unsigned char len)
#define DEVICE_PURE_CEC_SWITCH 6
#define DEVICE_VIDEO_PROCESSOR 7
-static unsigned char log_addr_to_devtype(unsigned int addr)
+static unsigned char log_addr_to_devtype(unsigned char addr)
{
static unsigned char addr_map[] = {
DEVICE_TV,
@@ -211,7 +210,7 @@ static void cec_report_physical_address(void)
msg[0] = ((cec_msg.log_addr & 0xf) << 4) | CEC_BROADCAST_ADDR;
msg[1] = CEC_OC_REPORT_PHYSICAL_ADDRESS;
msg[2] = (cec_msg.phy_addr >> 8) & 0xff;
- msg[3] = cec_msg.phy_addr & 0xff;
+ msg[3] = (cec_msg.phy_addr >> 0) & 0xff;
msg[4] = log_addr_to_devtype(cec_msg.log_addr);
cec_triggle_tx(msg, 5);
@@ -245,18 +244,44 @@ static void cec_feature_abort(unsigned char reason, unsigned char initiator)
cec_triggle_tx(msg, 4);
}
-static void cec_set_stream_path(void)
+static void cec_menu_status(unsigned char menu_status, unsigned char initiator)
+{
+ unsigned char msg[3];
+ cec_dbg_print("cec_menu_status menu_status:0x", menu_status);
+ cec_dbg_printx(", initiator:0x", initiator, 4);
+ cec_dbg_prints("\n");
+
+ msg[0] = ((cec_msg.log_addr & 0xf) << 4) | (initiator & 0xf);
+ msg[1] = CEC_OC_MENU_STATUS;
+ msg[2] = menu_status;
+
+ cec_triggle_tx(msg, 3);
+}
+
+static void cec_set_stream_path(unsigned char initiator)
{
- unsigned char phy_addr_ab = (cec_msg.phy_addr >> 8) & 0xff;
- unsigned char phy_addr_cd = cec_msg.phy_addr & 0xff;
- cec_dbg_prints("cec_set_stream_path\n");
-
- if ((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) {
- if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
- if ((phy_addr_ab == cec_msg.msg[2]) &&
- (phy_addr_cd == cec_msg.msg[3])) {
- cec_msg.cec_power = 0x1;
- }
+ unsigned int phy_addr = (cec_msg.msg[2] << 8) | cec_msg.msg[3];
+ cec_dbg_printx("cec_set_stream_path initiator:0x", initiator, 4);
+ cec_dbg_printx(", phy_addr:0x", phy_addr, 16);
+ cec_dbg_prints("\n");
+
+ if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
+ if (cec_msg.phy_addr == phy_addr && initiator == CEC_TV_ADDR) {
+ cec_msg.cec_power = 0x1;
+ }
+ }
+}
+
+static void cec_routing_change(unsigned char initiator)
+{
+ unsigned int phy_addr = (cec_msg.msg[4] << 8) | cec_msg.msg[5];
+ cec_dbg_printx("cec_routing_change initiator:0x", initiator, 4);
+ cec_dbg_printx(", phy_addr:0x", phy_addr, 16);
+ cec_dbg_prints("\n");
+
+ if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
+ if (cec_msg.phy_addr == phy_addr && initiator == CEC_TV_ADDR) {
+ cec_msg.cec_power = 0x1;
}
}
}
@@ -266,10 +291,14 @@ static void cec_user_control_pressed(void)
cec_dbg_print("cec_user_control_pressed operation:0x", cec_msg.msg[2]);
cec_dbg_prints("\n");
- if ((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) {
+ if ((hdmi_cec_func_config >> ONE_TOUCH_STANDBY_MASK) & 0x1) {
if ((0x40 == cec_msg.msg[2]) || // Power
(0x6b == cec_msg.msg[2]) || // Power Toggle Function
(0x6d == cec_msg.msg[2]) || // Power On Function
+ (0x0a == cec_msg.msg[2]) || // Setup Menu
+ (0x0b == cec_msg.msg[2]) || // Contents Menu
+ (0x10 == cec_msg.msg[2]) || // Media Top Menu
+ (0x11 == cec_msg.msg[2]) || // Media Context-sensitive Menu
(0x09 == cec_msg.msg[2])) { // Root Menu
cec_msg.cec_power = 0x1;
}
@@ -290,20 +319,6 @@ static void cec_device_vendor_id(void)
cec_triggle_tx(msg, 5);
}
-static void cec_menu_status(unsigned char menu_status, unsigned char initiator)
-{
- unsigned char msg[3];
- cec_dbg_print("cec_menu_status menu_status:0x", menu_status);
- cec_dbg_printx(", initiator:0x", initiator, 4);
- cec_dbg_prints("\n");
-
- msg[0] = ((cec_msg.log_addr & 0xf) << 4) | (initiator & 0xf);
- msg[1] = CEC_OC_MENU_STATUS;
- msg[2] = menu_status;
-
- cec_triggle_tx(msg, 3);
-}
-
static void cec_deck_status(unsigned char initiator)
{
unsigned char msg[3];
@@ -349,7 +364,7 @@ static unsigned int cec_handle_message(void)
unsigned char initiator = (cec_msg.msg[0] >> 4) & 0xf;
unsigned char destination = cec_msg.msg[0] & 0xf;
unsigned char opcode = (cec_msg.msg_len > 1) ? cec_msg.msg[1] : CEC_OC_POLLING_MESSAGE;
- unsigned char directly_addressed = (destination != 0xf && destination == cec_msg.log_addr);
+ unsigned char directly_addressed = (destination != CEC_BROADCAST_ADDR && destination == cec_msg.log_addr);
cec_dbg_printx("cec_handle_message initiator:0x", initiator, 4);
cec_dbg_printx(", destination:0x", destination, 4);
@@ -380,7 +395,10 @@ static unsigned int cec_handle_message(void)
cec_set_osd_name(initiator);
break;
case CEC_OC_SET_STREAM_PATH:
- cec_set_stream_path();
+ cec_set_stream_path(initiator);
+ break;
+ case CEC_OC_ROUTING_CHANGE:
+ cec_routing_change(initiator);
break;
case CEC_OC_GIVE_DEVICE_POWER_STATUS:
if (directly_addressed)
@@ -494,16 +512,7 @@ unsigned int cec_handler(void)
void cec_node_init(void)
{
unsigned int phy_addr = readl(P_AO_DEBUG_REG1) & 0xffff;
- unsigned int log_addr = readl(P_AO_DEBUG_REG3) & 0xf;
- if (!log_addr)
- log_addr = 0xf;
-
- cec_dbg_printx("AO_DEBUG_REG0:0x", readl(P_AO_DEBUG_REG0), 32);
- cec_dbg_printx(", AO_DEBUG_REG1:0x", readl(P_AO_DEBUG_REG1), 32);
- cec_dbg_prints("\n");
- cec_dbg_printx("AO_DEBUG_REG2:0x", readl(P_AO_DEBUG_REG2), 32);
- cec_dbg_printx(", AO_DEBUG_REG3:0x", readl(P_AO_DEBUG_REG3), 32);
- cec_dbg_prints("\n");
+ unsigned char log_addr = readl(P_AO_DEBUG_REG3) & 0xf;
cec_dbg_print("cec_node_init cec_config:0x", hdmi_cec_func_config);
cec_dbg_printx(", log_addr:0x", log_addr, 4);
@@ -515,6 +524,12 @@ void cec_node_init(void)
cec_msg.log_addr = log_addr;
cec_msg.phy_addr = phy_addr;
+ if (!cec_msg.log_addr || !cec_msg.phy_addr) {
+ cec_dbg_prints("WARNING: log/phy_addr is not set, disabling cec wakeup\n");
+ hdmi_cec_func_config = hdmi_cec_func_config & ~(0x1 << CEC_FUNC_MASK);
+ return;
+ }
+
cec_wr_reg(CEC_LOGICAL_ADDR0, 0);
cec_hw_buf_clear();
cec_wr_reg(CEC_LOGICAL_ADDR0, log_addr);
@@ -523,7 +538,6 @@ void cec_node_init(void)
_udelay(100);
cec_report_physical_address();
- _udelay(150);
cec_device_vendor_id();
cec_set_osd_name(CEC_TV_ADDR);
}
diff --git a/arch/arm/cpu/armv8/gxb/firmware/scp_task/suspend.c b/arch/arm/cpu/armv8/gxb/firmware/scp_task/suspend.c
index 8a414da..b16910c 100644
--- a/arch/arm/cpu/armv8/gxb/firmware/scp_task/suspend.c
+++ b/arch/arm/cpu/armv8/gxb/firmware/scp_task/suspend.c
@@ -73,8 +73,6 @@ void enter_suspend(unsigned int suspend_from)
// FIXME : (1) BLUE LED GPIOAO_13 (2) Current issue 12*mA -> 7*mA
#ifdef CONFIG_CEC_WAKEUP
hdmi_cec_func_config = readl(P_AO_DEBUG_REG0) & 0xff;
- if (!hdmi_cec_func_config)
- hdmi_cec_func_config = 0x2f; // Force cec config until kernel is "fixed"
wait_uart_empty();
uart_puts("CEC cfg:0x");
uart_put_hex(hdmi_cec_func_config, 8);

View File

@ -1,54 +0,0 @@
From 4afa1ca1f37bc084c2805f76372dc6a47e2d971a Mon Sep 17 00:00:00 2001
From: Radostan Riedel <raybuntu@googlemail.com>
Date: Sun, 30 Apr 2017 15:48:53 +0200
Subject: [PATCH 1/1] CEC: make wakeup work with LG simplink
---
.../cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
index 7d397cac8b..8a3423b7cc 100644
--- a/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
+++ b/arch/arm/cpu/armv8/gxb/firmware/scp_task/hdmi_cec_arc.c
@@ -359,6 +359,18 @@ static void cec_get_version(unsigned char initiator)
cec_triggle_tx(msg, 3);
}
+void cec_send_simplink_init_ack(void)
+{
+ unsigned char msg[4];
+
+ msg[0] = ((cec_msg.log_addr & 0xf) << 4) | CEC_TV_ADDR;
+ msg[1] = CEC_OC_VENDOR_COMMAND;
+ msg[2] = 0x2;
+ msg[3] = 0x5;
+
+ cec_triggle_tx(msg, 4);
+}
+
static unsigned int cec_handle_message(void)
{
unsigned char initiator = (cec_msg.msg[0] >> 4) & 0xf;
@@ -388,6 +400,18 @@ static unsigned int cec_handle_message(void)
cec_device_vendor_id();
break;
case CEC_OC_VENDOR_COMMAND:
+ if (cec_msg.msg_len < 3)
+ break;
+ if (directly_addressed) {
+ if (cec_msg.msg[2] == 0x1) { // SL INIT
+ cec_send_simplink_init_ack(); // SL INIT ACK
+ }
+ if ((cec_msg.msg[2] == 0x3) || // SL POWER ON
+ (cec_msg.msg[2] == 0x4) || // SL CONNECT REQUEST
+ (cec_msg.msg[2] == 0xb)) { // SL RECONNECT REQUEST
+ cec_msg.cec_power = 0x1;
+ }
+ }
case CEC_OC_VENDOR_COMMAND_WITH_ID:
break;
case CEC_OC_GIVE_OSD_NAME:
--
2.11.0

View File

@ -1,11 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -246,8 +246,6 @@
CROSS_COMPILE ?=
endif
-export CROSS_COMPILE=aarch64-none-elf-
-
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG

View File

@ -1,90 +0,0 @@
From d6fe7444c27b35599f1bbae3ab321507a246dce0 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sat, 7 Feb 2015 22:52:40 +0100
Subject: [PATCH] Add linux/compiler-gcc5.h to fix builds with gcc5
Add linux/compiler-gcc5/h from the kernel sources at:
commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
Author: Steven Noonan <steven@uplinklabs.net>
Date: Sat Oct 25 15:09:42 2014 -0700
compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 include/linux/compiler-gcc5.h
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
new file mode 100644
index 0000000000..c8c5659525
--- /dev/null
+++ b/include/linux/compiler-gcc5.h
@@ -0,0 +1,65 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
+#endif
+
+#define __used __attribute__((__used__))
+#define __must_check __attribute__((warn_unused_result))
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+ to them will be unlikely. This means a lot of manual unlikely()s
+ are unnecessary now for any paths leading to the usual suspects
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
+ older compilers]
+
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
+ in the preprocessor, but we can live with this because they're unreleased.
+ Maketime probing would be overkill here.
+
+ gcc also has a __attribute__((__hot__)) to move hot functions into
+ a special section, but I don't see any sense in this right now in
+ the kernel context */
+#define __cold __attribute__((__cold__))
+
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+
+#ifndef __CHECKER__
+# define __compiletime_warning(message) __attribute__((warning(message)))
+# define __compiletime_error(message) __attribute__((error(message)))
+#endif /* __CHECKER__ */
+
+/*
+ * Mark a position in code as unreachable. This can be used to
+ * suppress control flow warnings after asm blocks that transfer
+ * control elsewhere.
+ *
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
+ * this in the preprocessor, but we can live with this because they're
+ * unreleased. Really, we need to have autoconf for the kernel.
+ */
+#define unreachable() __builtin_unreachable()
+
+/* Mark a function definition as prohibited from being cloned. */
+#define __noclone __attribute__((__noclone__))
+
+/*
+ * Tell the optimizer that something else uses this function or variable.
+ */
+#define __visible __attribute__((externally_visible))
+
+/*
+ * GCC 'asm goto' miscompiles certain code sequences:
+ *
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+ *
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+ *
+ * (asm goto is automatically volatile - the naming reflects this.)
+ */
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
+
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+#define __HAVE_BUILTIN_BSWAP32__
+#define __HAVE_BUILTIN_BSWAP64__
+#define __HAVE_BUILTIN_BSWAP16__
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */

View File

@ -1,242 +0,0 @@
From 2896063602000eb099eb0774d001bbdc76df264a Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Mon, 12 Feb 2018 22:44:10 +0100
Subject: [PATCH] libretech_cc: amend boot procedure for LibreELEC
* make eMMC use MBR instead of AML partition structure
* port eMMC/SD renumbering from Hardkernel to allow booting from either SD or eMMC
* remove NAND driver (not in use)
* remove fastboot, bcb, store interface (not in use and conflicts with eMMC MBR)
* remove preboot steps that are not requried for faster booting
---
board/amlogic/configs/libretech_cc.h | 47 ++++----------------
board/amlogic/libretech_cc/libretech_cc.c | 71 ++++++++++++++-----------------
drivers/mmc/aml_sd_emmc.c | 1 -
3 files changed, 41 insertions(+), 78 deletions(-)
diff --git a/board/amlogic/configs/libretech_cc.h b/board/amlogic/configs/libretech_cc.h
index b3ccfae..84f66ae 100644
--- a/board/amlogic/configs/libretech_cc.h
+++ b/board/amlogic/configs/libretech_cc.h
@@ -45,10 +45,10 @@
#define CONFIG_CEC_OSD_NAME "LibreTech-CC"
#define CONFIG_CEC_WAKEUP
-#define CONFIG_INSTABOOT
+// #define CONFIG_INSTABOOT
#define CONFIG_CMD_CFGLOAD
/* configs for dtb in boot.img */
-//#define DTB_BIND_KERNEL
+#define DTB_BIND_KERNEL
/* SMP Definitinos */
#define CPU_RELEASE_ADDR secondary_boot_func
@@ -62,12 +62,6 @@
/* support ext4*/
#define CONFIG_CMD_EXT4 1
-/* Bootloader Control Block function
- That is used for recovery and the bootloader to talk to each other
- */
-#define CONFIG_BOOTLOADER_CONTROL_BLOCK
-
-
/* Serial config */
#define CONFIG_CONS_INDEX 2
#define CONFIG_BAUDRATE 115200
@@ -209,7 +203,7 @@
"if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi;"\
"\0"\
"init_display="\
- "osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale"\
+ "osd open;osd clear;"\
"\0"\
"cmdline_keys="\
"if keyman init 0x1234; then "\
@@ -236,17 +230,10 @@
"\0"\
#define CONFIG_PREBOOT \
- "run bcb_cmd; "\
- "run factory_reset_poweroff_protect;"\
- "run upgrade_check;"\
- "run init_display;"\
- "run storeargs;"\
- "run upgrade_key;" \
- "run switch_bootmode;" \
- "cfgload;"
-#define CONFIG_BOOTCOMMAND "run storeboot"
-
-//#define CONFIG_ENV_IS_NOWHERE 1
+ "run init_display;"
+#define CONFIG_BOOTCOMMAND "cfgload"
+
+#define CONFIG_ENV_IS_NOWHERE 1
#define CONFIG_ENV_SIZE (64*1024)
#define CONFIG_FIT 1
#define CONFIG_OF_LIBFDT 1
@@ -283,7 +270,7 @@
#define CONFIG_DDR_USE_EXT_VREF 0 //0:disable, 1:enable. ddr use external vref
/* storage: emmc/nand/sd */
-#define CONFIG_STORE_COMPATIBLE 1
+//#define CONFIG_STORE_COMPATIBLE 1
/*
* storage
* |---------|---------|
@@ -298,7 +285,7 @@
/* support for mtd */
//#define CONFIG_AML_MTD 1
/* support for nftl */
-#define CONFIG_AML_NAND 1
+//#define CONFIG_AML_NAND 1
#if defined(CONFIG_AML_NAND) && defined(CONFIG_AML_MTD)
#error CONFIG_AML_NAND/CONFIG_AML_MTD can not support at the sametime;
@@ -389,21 +376,6 @@
#define CONFIG_USB_XHCI_AMLOGIC_GXL 1
#endif //#if defined(CONFIG_CMD_USB)
-//UBOOT fastboot config
-#define CONFIG_CMD_FASTBOOT 1
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
-#define CONFIG_FASTBOOT_FLASH 1
-#define CONFIG_USB_GADGET 1
-#define CONFIG_USBDOWNLOAD_GADGET 1
-#define CONFIG_SYS_CACHELINE_SIZE 64
-#define CONFIG_DEVICE_PRODUCT "libretech-cc"
-
-//UBOOT Facotry usb/sdcard burning config
-#define CONFIG_AML_V2_FACTORY_BURN 1 //support facotry usb burning
-#define CONFIG_AML_FACTORY_BURN_LOCAL_UPGRADE 1 //support factory sdcard burning
-#define CONFIG_POWER_KEY_NOT_SUPPORTED_FOR_BURN 1 //There isn't power-key for factory sdcard burning
-#define CONFIG_SD_BURNING_SUPPORT_UI 1 //Displaying upgrading progress bar when sdcard/udisk burning
-
#define CONFIG_AML_SECURITY_KEY 1
#ifndef DTB_BIND_KERNEL
#define CONFIG_UNIFY_KEY_MANAGE 1
@@ -449,7 +421,6 @@
/*file system*/
#define CONFIG_DOS_PARTITION 1
-#define CONFIG_AML_PARTITION 1
#define CONFIG_MMC 1
#define CONFIG_FS_FAT 1
#define CONFIG_FS_EXT4 1
diff --git a/board/amlogic/libretech_cc/libretech_cc.c b/board/amlogic/libretech_cc/libretech_cc.c
index 33bd007..fa66aaa 100644
--- a/board/amlogic/libretech_cc/libretech_cc.c
+++ b/board/amlogic/libretech_cc/libretech_cc.c
@@ -71,6 +71,23 @@ int dram_init(void)
void secondary_boot_func(void)
{
}
+
+/*
+ * Discover the boot device within MicroSD or eMMC
+ * and return 1 for eMMC, otherwise 0.
+ */
+#define BOOT_DEVICE_RESERVED 0
+#define BOOT_DEVICE_EMMC 1
+#define BOOT_DEVICE_NAND 2
+#define BOOT_DEVICE_SPI 3
+#define BOOT_DEVICE_SD 4
+#define BOOT_DEVICE_USB 5
+
+int get_boot_device(void)
+{
+ return readl(AO_SEC_GP_CFG0) & 0xf;
+}
+
void internalPhyConfig(struct phy_device *phydev)
{
/*Enable Analog and DSP register Bank access by*/
@@ -263,8 +280,21 @@ int board_mmc_init(bd_t *bis)
#else
//board_mmc_register(SDIO_PORT_B);
#endif
- board_mmc_register(SDIO_PORT_B);
- board_mmc_register(SDIO_PORT_C);
+ switch (get_boot_device())
+ {
+ case BOOT_DEVICE_EMMC:
+ board_mmc_register(SDIO_PORT_C); // "mmc0"
+ board_mmc_register(SDIO_PORT_B);
+ break;
+ case BOOT_DEVICE_SD:
+ board_mmc_register(SDIO_PORT_B); // "mmc0"
+ board_mmc_register(SDIO_PORT_C);
+ break;
+ default:
+ printf("No available mmc device! Check boot device!\n");
+ do_reset(NULL, 0, 0, NULL);
+ break;
+ }
// board_mmc_register(SDIO_PORT_B1);
#if defined(CONFIG_ENV_IS_NOWHERE) && defined(CONFIG_AML_SD_EMMC)
/* try emmc here. */
@@ -417,49 +447,12 @@ U_BOOT_CMD(hdmi_init, CONFIG_SYS_MAXARGS, 0, do_hdmi_init,
#endif
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void){
- //update env before anyone using it
- run_command("get_rebootmode; echo reboot_mode=${reboot_mode}; "\
- "if test ${reboot_mode} = factory_reset; then "\
- "defenv_reserv aml_dt;setenv upgrade_step 2;save; fi;", 0);
- run_command("if itest ${upgrade_step} == 1; then "\
- "defenv_reserv; setenv upgrade_step 2; saveenv; fi;", 0);
-
#ifndef CONFIG_AML_IRDETECT_EARLY
/* after */
run_command("cvbs init;hdmitx hpd", 0);
run_command("vout output $outputmode", 0);
#endif
/*add board late init function here*/
-#ifndef DTB_BIND_KERNEL
- int ret;
- ret = run_command("store dtb read $dtb_mem_addr", 1);
- if (ret) {
- printf("%s(): [store dtb read $dtb_mem_addr] fail\n", __func__);
- #ifdef CONFIG_DTB_MEM_ADDR
- char cmd[64];
- printf("load dtb to %x\n", CONFIG_DTB_MEM_ADDR);
- sprintf(cmd, "store dtb read %x", CONFIG_DTB_MEM_ADDR);
- ret = run_command(cmd, 1);
- if (ret) {
- printf("%s(): %s fail\n", __func__, cmd);
- }
- #endif
- }
-#elif defined(CONFIG_DTB_MEM_ADDR)
- {
- char cmd[128];
- int ret;
- if (!getenv("dtb_mem_addr")) {
- sprintf(cmd, "setenv dtb_mem_addr 0x%x", CONFIG_DTB_MEM_ADDR);
- run_command(cmd, 0);
- }
- sprintf(cmd, "imgread dtb boot ${dtb_mem_addr}");
- ret = run_command(cmd, 0);
- if (ret) {
- printf("%s(): cmd[%s] fail, ret=%d\n", __func__, cmd, ret);
- }
- }
-#endif// #ifndef DTB_BIND_KERNEL
#ifdef CONFIG_AML_V2_FACTORY_BURN
if (0x1b8ec003 == readl(P_PREG_STICKY_REG2))
aml_try_factory_usb_burning(1, gd->bd);
diff --git a/drivers/mmc/aml_sd_emmc.c b/drivers/mmc/aml_sd_emmc.c
index 57f949d..6ea60ee 100644
--- a/drivers/mmc/aml_sd_emmc.c
+++ b/drivers/mmc/aml_sd_emmc.c
@@ -786,7 +786,6 @@ void sd_emmc_register(struct aml_card_sd_info * aml_priv)
#endif
cfg->f_min = 400000;
cfg->f_max = 40000000;
- cfg->part_type = PART_TYPE_AML;
cfg->b_max = 256;
mmc_create(cfg,aml_priv);
}
--
2.7.4

View File

@ -1,464 +0,0 @@
From 1eab6c71f578b46bc9f33378252840ed46f9c443 Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Sat, 17 Feb 2018 20:30:08 +0100
Subject: [PATCH] khadas_vim: amend boot procedure for LibreELEC
* make eMMC use MBR instead of AML partition structure
* port eMMC/SD renumbering from Hardkernel to allow booting from either SD or eMMC
* remove NAND driver (not in use)
* remove fastboot, bcb, store interface (not in use and conflicts with eMMC MBR)
* remove preboot steps that are not requried for faster booting
* fix eMMC for KVIM2 when CONFIG_ENV_IS_NOWHERE
---
board/khadas/configs/kvim.h | 39 ++++-----------------
board/khadas/configs/kvim2.h | 37 +++-----------------
board/khadas/kvim/kvim.c | 83 +++++++++++++++++---------------------------
board/khadas/kvim2/kvim2.c | 80 ++++++++++++++++++++++--------------------
drivers/mmc/aml_sd_emmc.c | 1 -
5 files changed, 85 insertions(+), 155 deletions(-)
diff --git a/board/khadas/configs/kvim.h b/board/khadas/configs/kvim.h
index 0189f32..e95fc98 100644
--- a/board/khadas/configs/kvim.h
+++ b/board/khadas/configs/kvim.h
@@ -47,7 +47,7 @@
//#define CONFIG_INSTABOOT
/* configs for dtb in boot.img */
-//#define DTB_BIND_KERNEL
+#define DTB_BIND_KERNEL
/* SMP Definitinos */
#define CPU_RELEASE_ADDR secondary_boot_func
@@ -61,12 +61,6 @@
/* support ext4*/
#define CONFIG_CMD_EXT4 1
-/* Bootloader Control Block function
- That is used for recovery and the bootloader to talk to each other
- */
-#define CONFIG_BOOTLOADER_CONTROL_BLOCK
-
-
/* Serial config */
#define CONFIG_CONS_INDEX 2
#define CONFIG_BAUDRATE 115200
@@ -109,8 +103,6 @@
"init_display=" \
"osd open;" \
"osd clear;" \
- "imgread pic logo bootup ${loadaddr};" \
- "bmp display ${bootup_offset}; bmp scale" \
"\0"\
"bootdisk=ramdisk\0" \
"bootargs=" \
@@ -140,13 +132,11 @@
* - ramdisk: Ubuntu or Linux distro
*/
#define CONFIG_PREBOOT \
- "run init_display;" \
- "run combine_key;" \
- "run upgrade_key;"
+ "run init_display;"
-#define CONFIG_BOOTCOMMAND "cfgload;ext4load mmc 1:5 1080000 Image;ext4load mmc 1:5 10000000 uInitrd;ext4load mmc 1:5 20000000 kvim.dtb;booti 1080000 10000000 20000000"
+#define CONFIG_BOOTCOMMAND "cfgload"
-//#define CONFIG_ENV_IS_NOWHERE 1
+#define CONFIG_ENV_IS_NOWHERE 1
#define CONFIG_ENV_SIZE (64*1024)
#define CONFIG_FIT 1
#define CONFIG_OF_LIBFDT 1
@@ -184,7 +174,7 @@
#define CONFIG_DDR_FUNC_PRINT_WINDOW 0 //0:disable, 1:enable. print ddr training window
/* storage: emmc/nand/sd */
-#define CONFIG_STORE_COMPATIBLE 1
+//#define CONFIG_STORE_COMPATIBLE 1
/*
* storage
* |---------|---------|
@@ -199,7 +189,7 @@
/* support for mtd */
//#define CONFIG_AML_MTD 1
/* support for nftl */
-#define CONFIG_AML_NAND 1
+// #define CONFIG_AML_NAND 1
#if defined(CONFIG_AML_NAND) && defined(CONFIG_AML_MTD)
#error CONFIG_AML_NAND/CONFIG_AML_MTD can not support at the sametime;
@@ -290,22 +280,6 @@
#define CONFIG_USB_XHCI_AMLOGIC_GXL 1
#endif //#if defined(CONFIG_CMD_USB)
-//UBOOT fastboot config
-#define CONFIG_CMD_FASTBOOT 1
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
-#define CONFIG_FASTBOOT_FLASH 1
-#define CONFIG_USB_GADGET 1
-#define CONFIG_USBDOWNLOAD_GADGET 1
-#define CONFIG_SYS_CACHELINE_SIZE 64
-#define CONFIG_FASTBOOT_MAX_DOWN_SIZE 0x8000000
-#define CONFIG_DEVICE_PRODUCT "p212"
-
-//UBOOT Facotry usb/sdcard burning config
-#define CONFIG_AML_V2_FACTORY_BURN 1 //support facotry usb burning
-#define CONFIG_AML_FACTORY_BURN_LOCAL_UPGRADE 1 //support factory sdcard burning
-#define CONFIG_POWER_KEY_NOT_SUPPORTED_FOR_BURN 1 //There isn't power-key for factory sdcard burning
-#define CONFIG_SD_BURNING_SUPPORT_UI 1 //Displaying upgrading progress bar when sdcard/udisk burning
-
#define CONFIG_AML_SECURITY_KEY 1
#ifndef DTB_BIND_KERNEL
#define CONFIG_UNIFY_KEY_MANAGE 1
@@ -352,7 +326,6 @@
/*file system*/
#define CONFIG_DOS_PARTITION 1
-#define CONFIG_AML_PARTITION 1
#define CONFIG_MMC 1
#define CONFIG_FS_FAT 1
#define CONFIG_FS_EXT4 1
diff --git a/board/khadas/configs/kvim2.h b/board/khadas/configs/kvim2.h
index 2b5f832..699b0ec 100644
--- a/board/khadas/configs/kvim2.h
+++ b/board/khadas/configs/kvim2.h
@@ -54,11 +54,6 @@
/* support ext4*/
#define CONFIG_CMD_EXT4 1
-/* Bootloader Control Block function
- That is used for recovery and the bootloader to talk to each other
- */
-#define CONFIG_BOOTLOADER_CONTROL_BLOCK
-
#define CONFIG_CMD_SARADC 1
#define CONFIG_PHY_REALTEK 1
@@ -108,8 +103,6 @@
"init_display=" \
"osd open;" \
"osd clear;" \
- "imgread pic logo bootup ${loadaddr};" \
- "bmp display ${bootup_offset}; bmp scale" \
"\0"\
"bootdisk=ramdisk\0" \
"initargs=" \
@@ -159,14 +152,11 @@
#define CONFIG_PREBOOT \
"run init_display;"\
- "run combine_key;" \
- "run storeargs;"\
"run wol_init;" \
- "run upgrade_key;" \
"run vim2_check;"
-#define CONFIG_BOOTCOMMAND "cfgload;ext4load mmc 1:5 1080000 Image;ext4load mmc 1:5 10000000 uInitrd;ext4load mmc 1:5 20000000 kvim2.dtb;booti 1080000 10000000 20000000"
+#define CONFIG_BOOTCOMMAND "cfgload"
-//#define CONFIG_ENV_IS_NOWHERE 1
+#define CONFIG_ENV_IS_NOWHERE 1
#define CONFIG_ENV_SIZE (64*1024)
#define CONFIG_FIT 1
#define CONFIG_OF_LIBFDT 1
@@ -207,7 +197,7 @@
#define CONFIG_DDR_PLL_BYPASS 0 //0:disable, 1:enable. ddr pll bypass function
/* storage: emmc/nand/sd */
-#define CONFIG_STORE_COMPATIBLE 1
+//#define CONFIG_STORE_COMPATIBLE 1
/*
* storage
* |---------|---------|
@@ -283,7 +273,7 @@
/*SPI*/
//#define CONFIG_SPI_BOOT 1
-#define CONFIG_AMLOGIC_SPI_FLASH 1
+//#define CONFIG_AMLOGIC_SPI_FLASH 1
#ifdef CONFIG_AMLOGIC_SPI_FLASH
#undef CONFIG_ENV_IS_NOWHERE
#define CONFIG_SPI_FLASH_WINBOND
@@ -329,24 +319,8 @@
#define CONFIG_USB_XHCI_AMLOGIC_GXL 1
#endif //#if defined(CONFIG_CMD_USB)
-//UBOOT fastboot config
-#define CONFIG_CMD_FASTBOOT 1
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
-#define CONFIG_FASTBOOT_FLASH 1
-#define CONFIG_USB_GADGET 1
-#define CONFIG_USBDOWNLOAD_GADGET 1
-#define CONFIG_SYS_CACHELINE_SIZE 64
-#define CONFIG_FASTBOOT_MAX_DOWN_SIZE 0x8000000
-#define CONFIG_DEVICE_PRODUCT "q200"
-
-//UBOOT Facotry usb/sdcard burning config
-#define CONFIG_AML_V2_FACTORY_BURN 1 //support facotry usb burning
-#define CONFIG_AML_FACTORY_BURN_LOCAL_UPGRADE 1 //support factory sdcard burning
-#define CONFIG_POWER_KEY_NOT_SUPPORTED_FOR_BURN 1 //There isn't power-key for factory sdcard burning
-#define CONFIG_SD_BURNING_SUPPORT_UI 1 //Displaying upgrading progress bar when sdcard/udisk burning
-
#define CONFIG_AML_SECURITY_KEY 1
-#define CONFIG_UNIFY_KEY_MANAGE 1
+//#define CONFIG_UNIFY_KEY_MANAGE 1
/* net */
#define CONFIG_CMD_NET 1
@@ -388,7 +362,6 @@
/*file system*/
#define CONFIG_DOS_PARTITION 1
-#define CONFIG_AML_PARTITION 1
#define CONFIG_MMC 1
#define CONFIG_FS_FAT 1
#define CONFIG_FS_EXT4 1
diff --git a/board/khadas/kvim/kvim.c b/board/khadas/kvim/kvim.c
index b1fdb96..41a056a 100644
--- a/board/khadas/kvim/kvim.c
+++ b/board/khadas/kvim/kvim.c
@@ -71,6 +71,23 @@ int dram_init(void)
void secondary_boot_func(void)
{
}
+
+/*
+ * Discover the boot device within MicroSD or eMMC
+ * and return 1 for eMMC, otherwise 0.
+ */
+#define BOOT_DEVICE_RESERVED 0
+#define BOOT_DEVICE_EMMC 1
+#define BOOT_DEVICE_NAND 2
+#define BOOT_DEVICE_SPI 3
+#define BOOT_DEVICE_SD 4
+#define BOOT_DEVICE_USB 5
+
+int get_boot_device(void)
+{
+ return readl(AO_SEC_GP_CFG0) & 0xf;
+}
+
void internalPhyConfig(struct phy_device *phydev)
{
/*Enable Analog and DSP register Bank access by*/
@@ -263,8 +280,21 @@ int board_mmc_init(bd_t *bis)
#else
//board_mmc_register(SDIO_PORT_B);
#endif
- board_mmc_register(SDIO_PORT_B);
- board_mmc_register(SDIO_PORT_C);
+ switch (get_boot_device())
+ {
+ case BOOT_DEVICE_EMMC:
+ board_mmc_register(SDIO_PORT_C); // "mmc0"
+ board_mmc_register(SDIO_PORT_B);
+ break;
+ case BOOT_DEVICE_SD:
+ board_mmc_register(SDIO_PORT_B); // "mmc0"
+ board_mmc_register(SDIO_PORT_C);
+ break;
+ default:
+ printf("No available mmc device! Check boot device!\n");
+ do_reset(NULL, 0, 0, NULL);
+ break;
+ }
// board_mmc_register(SDIO_PORT_B1);
#if defined(CONFIG_ENV_IS_NOWHERE) && defined(CONFIG_AML_SD_EMMC)
/* try emmc here. */
@@ -413,58 +443,9 @@ U_BOOT_CMD(hdmi_init, CONFIG_SYS_MAXARGS, 0, do_hdmi_init,
#endif
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void){
- /* ENV need update in following cases:
- * - Bootloader upgrade
- * - New ROM upgrade(the built-in bootloader might be changed)
- */
- run_command("get_rebootmode;" \
- "echo reboot_mode=${reboot_mode};" \
- "if test ${reboot_mode} = factory_reset; then " \
- "defenv_reserv aml_dt;" \
- "setenv upgrade_step 2;" \
- "save;" \
- "fi;", 0);
- run_command("if itest ${upgrade_step} == 1; then " \
- "defenv_reserv;" \
- "setenv upgrade_step 2;" \
- "saveenv;" \
- "fi;", 0);
-
/* HDMI setup */
run_command("hdmitx hpd", 0);
run_command("vout output $outputmode", 0);
- /* Load DTB */
-#ifndef DTB_BIND_KERNEL
- int ret;
- ret = run_command("store dtb read $dtb_mem_addr", 1);
- if (ret) {
- printf("%s(): [store dtb read $dtb_mem_addr] fail\n", __func__);
- #ifdef CONFIG_DTB_MEM_ADDR
- char cmd[64];
- printf("load dtb to %x\n", CONFIG_DTB_MEM_ADDR);
- sprintf(cmd, "store dtb read %x", CONFIG_DTB_MEM_ADDR);
- ret = run_command(cmd, 1);
- if (ret) {
- printf("%s(): %s fail\n", __func__, cmd);
- }
- #endif
- }
-#elif defined(CONFIG_DTB_MEM_ADDR)
- {
- char cmd[128];
- int ret;
- if (!getenv("dtb_mem_addr")) {
- sprintf(cmd, "setenv dtb_mem_addr 0x%x", CONFIG_DTB_MEM_ADDR);
- run_command(cmd, 0);
- }
- sprintf(cmd, "imgread dtb boot ${dtb_mem_addr}");
- ret = run_command(cmd, 0);
- if (ret) {
- printf("%s(): cmd[%s] fail, ret=%d\n", __func__, cmd, ret);
- }
- }
-#endif// #ifndef DTB_BIND_KERNEL
-
/* Khadas VIM check */
run_command("saradc open 1;" \
"if saradc get_in_range 0x1a0 0x220; then " \
diff --git a/board/khadas/kvim2/kvim2.c b/board/khadas/kvim2/kvim2.c
index 99a6181..3b9febf 100644
--- a/board/khadas/kvim2/kvim2.c
+++ b/board/khadas/kvim2/kvim2.c
@@ -68,6 +68,23 @@ int dram_init(void)
void secondary_boot_func(void)
{
}
+
+/*
+ * Discover the boot device within MicroSD or eMMC
+ * and return 1 for eMMC, otherwise 0.
+ */
+#define BOOT_DEVICE_RESERVED 0
+#define BOOT_DEVICE_EMMC 1
+#define BOOT_DEVICE_NAND 2
+#define BOOT_DEVICE_SPI 3
+#define BOOT_DEVICE_SD 4
+#define BOOT_DEVICE_USB 5
+
+int get_boot_device(void)
+{
+ return readl(AO_SEC_GP_CFG0) & 0xf;
+}
+
void internalPhyConfig(struct phy_device *phydev)
{
/*Enable Analog and DSP register Bank access by*/
@@ -299,14 +316,36 @@ static void board_mmc_register(unsigned port)
}
int board_mmc_init(bd_t *bis)
{
+ __maybe_unused struct mmc *mmc;
#ifdef CONFIG_VLSI_EMULATOR
//board_mmc_register(SDIO_PORT_A);
#else
//board_mmc_register(SDIO_PORT_B);
#endif
- board_mmc_register(SDIO_PORT_B);
- board_mmc_register(SDIO_PORT_C);
+ switch (get_boot_device())
+ {
+ case BOOT_DEVICE_EMMC:
+ board_mmc_register(SDIO_PORT_C); // "mmc0"
+ board_mmc_register(SDIO_PORT_B);
+ break;
+ case BOOT_DEVICE_SD:
+ board_mmc_register(SDIO_PORT_B); // "mmc0"
+ board_mmc_register(SDIO_PORT_C);
+ break;
+ default:
+ printf("No available mmc device! Check boot device!\n");
+ do_reset(NULL, 0, 0, NULL);
+ break;
+ }
// board_mmc_register(SDIO_PORT_B1);
+#if defined(CONFIG_ENV_IS_NOWHERE) && defined(CONFIG_AML_SD_EMMC)
+ /* try emmc here. */
+ mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
+ if (!mmc)
+ printf("%s() %d: No MMC found\n", __func__, __LINE__);
+ else if (mmc_init(mmc))
+ printf("%s() %d: MMC init failed\n", __func__, __LINE__);
+#endif
return 0;
}
@@ -446,34 +485,13 @@ U_BOOT_CMD(hdmi_init, CONFIG_SYS_MAXARGS, 0, do_hdmi_init,
#endif
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void){
- int ret;
-
- //update env before anyone using it
- run_command("get_rebootmode; echo reboot_mode=${reboot_mode}; "\
- "if test ${reboot_mode} = factory_reset; then "\
- "defenv_reserv aml_dt;setenv upgrade_step 2;save; fi;", 0);
- run_command("if itest ${upgrade_step} == 1; then "\
- "defenv_reserv; setenv upgrade_step 2; saveenv; fi;", 0);
#ifndef CONFIG_AML_IRDETECT_EARLY
/* after */
- run_command("cvbs init;hdmitx hpd", 0);
+ run_command("hdmitx hpd", 0);
run_command("vout output $outputmode", 0);
#endif
/*add board late init function here*/
- ret = run_command("store dtb read $dtb_mem_addr", 1);
- if (ret) {
- printf("%s(): [store dtb read $dtb_mem_addr] fail\n", __func__);
- #ifdef CONFIG_DTB_MEM_ADDR
- char cmd[64];
- printf("load dtb to %x\n", CONFIG_DTB_MEM_ADDR);
- sprintf(cmd, "store dtb read %x", CONFIG_DTB_MEM_ADDR);
- ret = run_command(cmd, 1);
- if (ret) {
- printf("%s(): %s fail\n", __func__, cmd);
- }
- #endif
- }
#ifdef CONFIG_AML_V2_FACTORY_BURN
if (0x1b8ec003 == readl(P_PREG_STICKY_REG2))
aml_try_factory_usb_burning(1, gd->bd);
@@ -489,20 +507,6 @@ int board_late_init(void){
/* load uboot pq value */
vpp_pq_load();
- ret = run_command("store dtb read $dtb_mem_addr", 1);
- if (ret) {
- printf("%s(): [store dtb read $dtb_mem_addr] fail\n", __func__);
-#ifdef CONFIG_DTB_MEM_ADDR
- char cmd[64];
- printf("load dtb to %x\n", CONFIG_DTB_MEM_ADDR);
- sprintf(cmd, "store dtb read %x", CONFIG_DTB_MEM_ADDR);
- ret = run_command(cmd, 1);
- if (ret) {
- printf("%s(): %s fail\n", __func__, cmd);
- }
-#endif
-}
-
return 0;
}
#endif
diff --git a/drivers/mmc/aml_sd_emmc.c b/drivers/mmc/aml_sd_emmc.c
index 4d3a84f..f8aa8f7 100644
--- a/drivers/mmc/aml_sd_emmc.c
+++ b/drivers/mmc/aml_sd_emmc.c
@@ -787,7 +787,6 @@ void sd_emmc_register(struct aml_card_sd_info * aml_priv)
#endif
cfg->f_min = 400000;
cfg->f_max = 40000000;
- cfg->part_type = PART_TYPE_AML;
cfg->b_max = 256;
mmc_create(cfg,aml_priv);
}
--
2.7.4

View File

@ -1,64 +0,0 @@
diff --git a/drivers/amlogic/display/logo/logo.c b/drivers/amlogic/display/logo/logo.c
index 9266be3..e3e9685 100644
--- a/drivers/amlogic/display/logo/logo.c
+++ b/drivers/amlogic/display/logo/logo.c
@@ -117,16 +117,10 @@ int set_osd_freescaler(int index, enum vmode_e new_mode)
static int refresh_mode_and_logo(bool first)
{
enum vmode_e cur_mode = VMODE_MAX;
- int hdp_state = get_hpd_state();
if (!first && osd_get_logo_index() != logo_info.index)
return -1;
- if (hdp_state)
- cur_mode = hdmimode;
- else
- cur_mode = cvbsmode;
-
if (first) {
last_mode = get_logo_vmode();
@@ -193,6 +187,8 @@ static int logo_info_init(char *para)
}
return 0;
}
+ else if (vmode_name_to_mode(para) < VMODE_MAX)
+ set_vout_init_vmode(para);
return 0;
}
diff --git a/drivers/amlogic/display/vout/vout_serve.c b/drivers/amlogic/display/vout/vout_serve.c
index fae61b3..9196c2c 100644
--- a/drivers/amlogic/display/vout/vout_serve.c
+++ b/drivers/amlogic/display/vout/vout_serve.c
@@ -666,6 +666,17 @@ static int __init get_vout_init_mode(char *str)
}
__setup("vout=", get_vout_init_mode);
+void set_vout_init_vmode(char *str)
+{
+ char str2[1024];
+ strcpy(str2, str);
+ strcat(str2, ",en"); // logo was already displayed by uboot
+ get_vout_init_mode(str2);
+ pr_err("set_vout_init_vmode: %s\n", str2);
+
+}
+EXPORT_SYMBOL(set_vout_init_vmode);
+
MODULE_AUTHOR("Platform-BJ <platform.bj@amlogic.com>");
MODULE_DESCRIPTION("VOUT Server Module");
MODULE_LICENSE("GPL");
diff --git a/include/linux/amlogic/vout/vout_notify.h b/include/linux/amlogic/vout/vout_notify.h
index 2e4922a..659da93 100644
--- a/include/linux/amlogic/vout/vout_notify.h
+++ b/include/linux/amlogic/vout/vout_notify.h
@@ -102,6 +102,7 @@ extern enum vmode_e validate_vmode2(char *);
extern void set_vout2_mode_internal(char *name);
extern enum vmode_e get_logo_vmode(void);
extern int set_logo_vmode(enum vmode_e);
+extern void set_vout_init_vmode(char *);
extern int vout2_suspend(void);
extern int vout2_resume(void);

View File

@ -1,64 +0,0 @@
From 8e1f02601a22dd09c80cad3f0010a2208859d4ff Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Mon, 15 Aug 2016 02:45:14 +0200
Subject: [PATCH] proc: make cmdline writable
---
fs/proc/cmdline.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
index cbd82df..24cb197 100644
--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -3,9 +3,14 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
+#include <asm/uaccess.h> /* copy_from_user */
+
+char proc_cmdline[COMMAND_LINE_SIZE];
+
static int cmdline_proc_show(struct seq_file *m, void *v)
{
- seq_printf(m, "%s\n", saved_command_line);
+ seq_printf(m, "%s\n", proc_cmdline);
return 0;
}
@@ -14,15 +19,31 @@ static int cmdline_proc_open(struct inode *inode, struct file *file)
return single_open(file, cmdline_proc_show, NULL);
}
+static int cmdline_proc_write(struct file *file, const char __user *buf,
+ size_t len, loff_t *ppos)
+{
+ char str[COMMAND_LINE_SIZE];
+ if (copy_from_user(str, buf, len)) {
+ printk( KERN_INFO "[cmdline] copy_from_user failed.\n");
+ return -EFAULT;
+ }
+ str[len] = '\0';
+ strlcpy(proc_cmdline, str, min((int)len, COMMAND_LINE_SIZE));
+
+ return len;
+}
+
static const struct file_operations cmdline_proc_fops = {
.open = cmdline_proc_open,
.read = seq_read,
+ .write = cmdline_proc_write,
.llseek = seq_lseek,
.release = single_release,
};
static int __init proc_cmdline_init(void)
{
+ strcpy(proc_cmdline, saved_command_line);
proc_create("cmdline", 0, NULL, &cmdline_proc_fops);
return 0;
}
--
1.8.3.1