mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
Merge pull request #2315 from adamg88/le90_s905
projects/S905: new project
This commit is contained in:
commit
1315e7ae26
27
projects/S905/bootloader/mkimage
Normal file
27
projects/S905/bootloader/mkimage
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# compile and copy amlogic autoscript files to part1
|
||||||
|
for src in $INSTALL_SRC_DIR/*autoscript.src ; do
|
||||||
|
if [ -e "$src" ] ; then
|
||||||
|
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$LE_TMP/$(basename $src .src)" > /dev/null
|
||||||
|
mcopy "$LE_TMP/$(basename $src .src)" ::
|
||||||
|
fi
|
||||||
|
done
|
Binary file not shown.
Binary file not shown.
75
projects/S905/filesystem/usr/lib/libreelec/remote-config
Executable file
75
projects/S905/filesystem/usr/lib/libreelec/remote-config
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
SOURCEREMOTECONF=""
|
||||||
|
REMAP="no"
|
||||||
|
|
||||||
|
if [ -f /storage/.config/remote.conf ]; then
|
||||||
|
SOURCEREMOTECONF="/storage/.config"
|
||||||
|
REMAP="yes"
|
||||||
|
elif [ -f /flash/remote.conf ]; then
|
||||||
|
SOURCEREMOTECONF="/flash"
|
||||||
|
REMAP="yes"
|
||||||
|
elif [ -f /etc/amremote/remote.conf ]; then
|
||||||
|
SOURCEREMOTECONF="/etc/amremote"
|
||||||
|
elif ! grep -q /dev/system /proc/mounts ; then
|
||||||
|
mount -o rw,remount /flash
|
||||||
|
mkdir -p /tmp/system
|
||||||
|
mount -o ro /dev/system /tmp/system
|
||||||
|
for f in /tmp/system/etc/remote*.conf; do
|
||||||
|
cp $f /flash
|
||||||
|
SOURCEREMOTECONF="/flash"
|
||||||
|
done
|
||||||
|
for f in /tmp/system/remote*.conf; do
|
||||||
|
cp $f /flash
|
||||||
|
SOURCEREMOTECONF="/flash"
|
||||||
|
done
|
||||||
|
umount /tmp/system
|
||||||
|
REMAP="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SOURCEREMOTECONF" ]; then
|
||||||
|
cp $SOURCEREMOTECONF/remote*.conf /tmp
|
||||||
|
if [ "$REMAP" = "yes" ]; then
|
||||||
|
sed -i 's/ 15[^0-9]*$/ 1/
|
||||||
|
s/ 63[^0-9]*$/ 90/
|
||||||
|
s/ 97[^0-9]*$/ 28/
|
||||||
|
s/ 102[^0-9]*$/ 172/
|
||||||
|
s/ 125[^0-9]*$/ 46/
|
||||||
|
s/ 142[^0-9]*$/ 116/
|
||||||
|
s/ 143[^0-9]*$/ 116/
|
||||||
|
s/ 158[^0-9]*$/ 1/
|
||||||
|
s/ 183[^0-9]*$/ 59/
|
||||||
|
s/ 184[^0-9]*$/ 399/
|
||||||
|
s/ 185[^0-9]*$/ 400/
|
||||||
|
s/ 186[^0-9]*$/ 60/
|
||||||
|
s/ 232[^0-9]*$/ 28/
|
||||||
|
s/ 240[^0-9]*$/ 164/
|
||||||
|
s/ 241[^0-9]*$/ 163/
|
||||||
|
s/ 242[^0-9]*$/ 165/
|
||||||
|
s/ 244[^0-9]*$/ 208/
|
||||||
|
s/ 245[^0-9]*$/ 168/
|
||||||
|
s/ 264[^0-9]*$/ 63/
|
||||||
|
s/ 704[^0-9]*$/ 116/' /tmp/remote*.conf
|
||||||
|
fi
|
||||||
|
for f in /tmp/remote*.conf; do
|
||||||
|
/usr/bin/remotecfg $f
|
||||||
|
done
|
||||||
|
fi
|
1
projects/S905/filesystem/usr/lib/modprobe.d/mali.conf
Normal file
1
projects/S905/filesystem/usr/lib/modprobe.d/mali.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
options mali mali_shared_mem_size=0x40000000
|
@ -0,0 +1,3 @@
|
|||||||
|
[Sleep]
|
||||||
|
SuspendMode=false
|
||||||
|
HibernateMode=false
|
@ -0,0 +1,21 @@
|
|||||||
|
[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
|
@ -0,0 +1,54 @@
|
|||||||
|
#
|
||||||
|
# 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 ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
93
projects/S905/filesystem/usr/share/bootloader/update.sh
Executable file
93
projects/S905/filesystem/usr/share/bootloader/update.sh
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
[ -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
|
||||||
|
|
||||||
|
for arg in $(cat /proc/cmdline); do
|
||||||
|
case $arg in
|
||||||
|
boot=*)
|
||||||
|
echo "*** updating BOOT partition label ..."
|
||||||
|
boot="${arg#*=}"
|
||||||
|
case $boot in
|
||||||
|
/dev/mmc*)
|
||||||
|
LD_LIBRARY_PATH="$SYSTEM_ROOT/lib" $SYSTEM_ROOT/usr/sbin/fatlabel $boot "LIBREELEC"
|
||||||
|
;;
|
||||||
|
LABEL=*)
|
||||||
|
LD_LIBRARY_PATH="$SYSTEM_ROOT/lib" $SYSTEM_ROOT/usr/sbin/fatlabel $($SYSTEM_ROOT/usr/sbin/findfs $boot) "LIBREELEC"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -f "/proc/device-tree/le-dt-id" ] ; then
|
||||||
|
LE_DT_ID=$(cat /proc/device-tree/le-dt-id)
|
||||||
|
else
|
||||||
|
echo "*** remember to update your device tree! ***"
|
||||||
|
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/$LE_DT_ID.dtb" ] ; then
|
||||||
|
UPDATE_DTB_SOURCE="$SYSTEM_ROOT/usr/share/bootloader/$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=*)
|
||||||
|
mount -o rw,remount $BOOT_ROOT
|
||||||
|
cp -f $UPDATE_DTB_SOURCE "$BOOT_ROOT/dtb.img"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
disk=*)
|
||||||
|
echo "*** updating DISK partition label ..."
|
||||||
|
disk="${arg#*=}"
|
||||||
|
case $disk in
|
||||||
|
/dev/mmc*)
|
||||||
|
LD_LIBRARY_PATH="$SYSTEM_ROOT/lib" $SYSTEM_ROOT/usr/sbin/e2label $disk "STORAGE"
|
||||||
|
;;
|
||||||
|
LABEL=*)
|
||||||
|
LD_LIBRARY_PATH="$SYSTEM_ROOT/lib" $SYSTEM_ROOT/usr/sbin/e2label $($SYSTEM_ROOT/usr/sbin/findfs $disk) "STORAGE"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
112
projects/S905/initramfs/platform_init
Executable file
112
projects/S905/initramfs/platform_init
Executable file
@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
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=LIBREELEC disk=LABEL=STORAGE"
|
||||||
|
else
|
||||||
|
cmdline="$cmdline BOOT_IMAGE=/dev/boot boot=/dev/system disk=/dev/data"
|
||||||
|
fi
|
||||||
|
echo "$cmdline" > /proc/cmdline
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
for part in /sys/block/*/queue/add_random; do
|
||||||
|
echo 0 > "$part"
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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
|
16
projects/S905/install/aml_autoscript.src
Normal file
16
projects/S905/install/aml_autoscript.src
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
defenv
|
||||||
|
setenv bootfromrecovery 0
|
||||||
|
setenv bootfromnand 0
|
||||||
|
setenv upgrade_step 2
|
||||||
|
setenv start_autoscript 'if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi;'
|
||||||
|
setenv start_mmc_autoscript 'if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;'
|
||||||
|
setenv start_usb_autoscript 'if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 1 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 2 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 3 1020000 s905_autoscript; then autoscr 1020000; fi;'
|
||||||
|
setenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; else store dtb read $dtb_mem_addr; fi'
|
||||||
|
setenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo usb dtb.img loaded; else store dtb read $dtb_mem_addr; fi'
|
||||||
|
setenv librefromsd 'if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi'
|
||||||
|
setenv librefromusb 'if usb start 0; then if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi; fi'
|
||||||
|
setenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run start_autoscript; run librefromsd; run librefromusb; fi; run storeboot'
|
||||||
|
saveenv
|
||||||
|
run storeargs
|
||||||
|
run librefromsd
|
||||||
|
run librefromusb
|
6
projects/S905/install/s905_autoscript.src
Normal file
6
projects/S905/install/s905_autoscript.src
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
setenv bootargs ${bootargs} bootfromext
|
||||||
|
if fatload mmc 0 ${loadaddr} kernel.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;
|
||||||
|
if fatload usb 0 ${loadaddr} kernel.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;
|
||||||
|
if fatload usb 1 ${loadaddr} kernel.img; then if fatload usb 1 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;
|
||||||
|
if fatload usb 2 ${loadaddr} kernel.img; then if fatload usb 2 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;
|
||||||
|
if fatload usb 3 ${loadaddr} kernel.img; then if fatload usb 3 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;
|
3548
projects/S905/linux/linux.aarch64.conf
Normal file
3548
projects/S905/linux/linux.aarch64.conf
Normal file
File diff suppressed because it is too large
Load Diff
133
projects/S905/options
Normal file
133
projects/S905/options
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
################################################################################
|
||||||
|
# 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 neon"
|
||||||
|
;;
|
||||||
|
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 neon"
|
||||||
|
;;
|
||||||
|
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=""
|
||||||
|
|
||||||
|
# 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 (ratpoison / fluxbox / none)
|
||||||
|
WINDOWMANAGER="none"
|
||||||
|
|
||||||
|
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
|
||||||
|
# Space separated list is supported,
|
||||||
|
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
|
||||||
|
GRAPHIC_DRIVERS=""
|
||||||
|
|
||||||
|
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)
|
||||||
|
KODIPLAYER_DRIVER="libamcodec"
|
||||||
|
|
||||||
|
# Modules to install in initramfs for early boot
|
||||||
|
INITRAMFS_MODULES="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="RTL8192CU RTL8192DU RTL8192EU RTL8812AU gpu-aml \
|
||||||
|
ap6xxx mt7601u mt7603u qca9377 RTL8188EU RTL8189ES RTL8189FS RTL8723BS RTL8723DS RTL8822BU ssv6xxx"
|
||||||
|
|
||||||
|
# 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 brcmfmac_sdio-firmware-aml rtl8723bs_bt qca9377-firmware"
|
||||||
|
|
||||||
|
# build and install ATV IR remote support (yes / no)
|
||||||
|
ATVCLIENT_SUPPORT="no"
|
||||||
|
|
||||||
|
# Amlogic IR remote support (yes / no)
|
||||||
|
AMREMOTE_SUPPORT="yes"
|
||||||
|
|
||||||
|
# build and install iSCSI support - iscsistart (yes / no)
|
||||||
|
ISCSI_SUPPORT="no"
|
||||||
|
|
||||||
|
# build with installer (yes / no)
|
||||||
|
INSTALLER_SUPPORT="no"
|
31
projects/S905/packages/u-boot/config/fw_env.config
Normal file
31
projects/S905/packages/u-boot/config/fw_env.config
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Configuration file for fw_(printenv/setenv) utility.
|
||||||
|
# Up to two entries are valid, in this case the redundant
|
||||||
|
# environment sector is assumed present.
|
||||||
|
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
|
||||||
|
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
|
||||||
|
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
|
||||||
|
|
||||||
|
# NOR example
|
||||||
|
# MTD device name Device offset Env. size Flash sector size Number of sectors
|
||||||
|
#/dev/mtd1 0x0000 0x4000 0x4000
|
||||||
|
#/dev/mtd2 0x0000 0x4000 0x4000
|
||||||
|
|
||||||
|
# MTD SPI-dataflash example
|
||||||
|
# MTD device name Device offset Env. size Flash sector size Number of sectors
|
||||||
|
#/dev/mtd5 0x4200 0x4200
|
||||||
|
#/dev/mtd6 0x4200 0x4200
|
||||||
|
|
||||||
|
# NAND example
|
||||||
|
#/dev/mtd0 0x4000 0x4000 0x20000 2
|
||||||
|
|
||||||
|
# Block device example
|
||||||
|
#/dev/mmcblk0 0xc0000 0x20000
|
||||||
|
|
||||||
|
# VFAT example
|
||||||
|
#/boot/uboot.env 0x0000 0x4000
|
||||||
|
|
||||||
|
# Amlogic NAND
|
||||||
|
/dev/nand_env 0x000000 0x10000 0x10000
|
||||||
|
|
||||||
|
# Amlogic eMMC
|
||||||
|
/dev/env 0x000000 0x10000 0x10000
|
72
projects/S905/packages/u-boot/package.mk
Normal file
72
projects/S905/packages/u-boot/package.mk
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
PKG_NAME="u-boot"
|
||||||
|
PKG_VERSION="2016.03"
|
||||||
|
PKG_SHA256="e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
||||||
|
PKG_URL="ftp://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2"
|
||||||
|
PKG_SOURCE_DIR="u-boot-$PKG_VERSION"
|
||||||
|
PKG_DEPENDS_TARGET="toolchain dtc:host u-boot:host"
|
||||||
|
PKG_LICENSE="GPL"
|
||||||
|
PKG_SECTION="tools"
|
||||||
|
PKG_SHORTDESC="u-boot: Universal Bootloader project"
|
||||||
|
PKG_LONGDESC="U-Boot bootloader utility tools. This package includes the mkimage program, which allows generation of U-Boot images in various formats, and the fw_printenv and fw_setenv programs to read and modify U-Boot's environment and other tools."
|
||||||
|
PKG_IS_KERNEL_PKG="yes"
|
||||||
|
|
||||||
|
make_host() {
|
||||||
|
make dummy_defconfig
|
||||||
|
make tools-only
|
||||||
|
}
|
||||||
|
|
||||||
|
make_target() {
|
||||||
|
CROSS_COMPILE="$TARGET_PREFIX" LDFLAGS="" ARCH=arm make dummy_defconfig
|
||||||
|
CROSS_COMPILE="$TARGET_PREFIX" LDFLAGS="" ARCH=arm make env
|
||||||
|
CROSS_COMPILE="$TARGET_PREFIX" LDFLAGS="" ARCH=arm make cross_tools
|
||||||
|
}
|
||||||
|
|
||||||
|
makeinstall_host() {
|
||||||
|
mkdir -p $TOOLCHAIN/bin
|
||||||
|
cp tools/mkimage $TOOLCHAIN/bin
|
||||||
|
}
|
||||||
|
|
||||||
|
makeinstall_target() {
|
||||||
|
mkdir -p $INSTALL/etc
|
||||||
|
cp $PKG_DIR/config/fw_env.config $INSTALL/etc/fw_env.config
|
||||||
|
|
||||||
|
mkdir -p $INSTALL/usr/sbin
|
||||||
|
cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_printenv
|
||||||
|
cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_setenv
|
||||||
|
cp tools/dumpimage $INSTALL/usr/sbin/dumpimage
|
||||||
|
cp tools/fdtgrep $INSTALL/usr/sbin/fdtgrep
|
||||||
|
cp tools/gen_eth_addr $INSTALL/usr/sbin/gen_eth_addr
|
||||||
|
cp tools/img2srec $INSTALL/usr/sbin/img2srec
|
||||||
|
cp tools/mkenvimage $INSTALL/usr/sbin/mkenvimage
|
||||||
|
cp tools/mkimage $INSTALL/usr/sbin/mkimage
|
||||||
|
cp tools/proftool $INSTALL/usr/sbin/proftool
|
||||||
|
cp tools/relocate-rela $INSTALL/usr/sbin/relocate-rela
|
||||||
|
|
||||||
|
mkdir -p $INSTALL/usr/share/bootloader
|
||||||
|
# Always install the update script
|
||||||
|
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/update.sh ]; then
|
||||||
|
cp -av $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/update.sh $INSTALL/usr/share/bootloader
|
||||||
|
elif [ -f $PROJECT_DIR/$PROJECT/bootloader/update.sh ]; then
|
||||||
|
cp -av $PROJECT_DIR/$PROJECT/bootloader/update.sh $INSTALL/usr/share/bootloader
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
--- a/configs/dummy_defconfig
|
||||||
|
+++ b/configs/dummy_defconfig
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+
|
@ -0,0 +1,23 @@
|
|||||||
|
--- u-boot-tools-2016.01/tools/env/fw_env.c.orig 2016-01-12 15:06:54.000000000 +0100
|
||||||
|
+++ u-boot-tools-2016.01/tools/env/fw_env.c 2016-03-22 09:47:07.014381827 +0100
|
||||||
|
@@ -1453,6 +1453,7 @@
|
||||||
|
int rc;
|
||||||
|
char dump[128];
|
||||||
|
char *devname;
|
||||||
|
+ int fd_test;
|
||||||
|
|
||||||
|
fp = fopen (fname, "r");
|
||||||
|
if (fp == NULL)
|
||||||
|
@@ -1473,6 +1474,12 @@
|
||||||
|
if (rc < 3)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
+ fd_test = open (devname, O_RDWR);
|
||||||
|
+ if (fd_test < 0)
|
||||||
|
+ continue;
|
||||||
|
+ if (close (fd_test))
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
DEVNAME(i) = devname;
|
||||||
|
|
||||||
|
if (rc < 4)
|
@ -0,0 +1,52 @@
|
|||||||
|
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
|
||||||
|
index 8b0317a..575f12a 100644
|
||||||
|
--- a/tools/env/fw_env.c
|
||||||
|
+++ b/tools/env/fw_env.c
|
||||||
|
@@ -888,12 +888,13 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (lseek (fd, blockstart, SEEK_SET) == -1) {
|
||||||
|
- fprintf (stderr,
|
||||||
|
- "Seek error on %s: %s\n",
|
||||||
|
- DEVNAME (dev), strerror (errno));
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
+ if (blockstart != 0)
|
||||||
|
+ if (lseek (fd, blockstart, SEEK_SET) == -1) {
|
||||||
|
+ fprintf (stderr,
|
||||||
|
+ "Seek error on %s: %s\n",
|
||||||
|
+ DEVNAME (dev), strerror (errno));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "Write 0x%x bytes at 0x%llx\n", erasesize,
|
||||||
|
@@ -1025,25 +1026,8 @@ static int flash_read (int fd)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (S_ISCHR(st.st_mode)) {
|
||||||
|
- rc = ioctl(fd, MEMGETINFO, &mtdinfo);
|
||||||
|
- if (rc < 0) {
|
||||||
|
- fprintf(stderr, "Cannot get MTD information for %s\n",
|
||||||
|
- DEVNAME(dev_current));
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
- if (mtdinfo.type != MTD_NORFLASH &&
|
||||||
|
- mtdinfo.type != MTD_NANDFLASH &&
|
||||||
|
- mtdinfo.type != MTD_DATAFLASH &&
|
||||||
|
- mtdinfo.type != MTD_UBIVOLUME) {
|
||||||
|
- fprintf (stderr, "Unsupported flash type %u on %s\n",
|
||||||
|
- mtdinfo.type, DEVNAME(dev_current));
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
- memset(&mtdinfo, 0, sizeof(mtdinfo));
|
||||||
|
- mtdinfo.type = MTD_ABSENT;
|
||||||
|
- }
|
||||||
|
+ memset(&mtdinfo, 0, sizeof(mtdinfo));
|
||||||
|
+ mtdinfo.type = MTD_ABSENT;
|
||||||
|
|
||||||
|
DEVTYPE(dev_current) = mtdinfo.type;
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/kernel/power/main.c b/kernel/power/main.c
|
||||||
|
index dd56bc8..6e73ad4 100644
|
||||||
|
--- a/kernel/power/main.c
|
||||||
|
+++ b/kernel/power/main.c
|
||||||
|
@@ -362,6 +362,9 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
|
||||||
|
error = 0;
|
||||||
|
request_suspend_state(state);
|
||||||
|
}
|
||||||
|
+ if (state == PM_SUSPEND_MEM) {
|
||||||
|
+ msleep_interruptible(5000);
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
error = pm_suspend(state);
|
||||||
|
#endif
|
@ -0,0 +1,64 @@
|
|||||||
|
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);
|
@ -0,0 +1,64 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From 561186ae0cd8814a8d518eed424ae453a1dae1d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: kszaq <kszaquitto@gmail.com>
|
||||||
|
Date: Mon, 27 Jun 2016 01:37:55 +0200
|
||||||
|
Subject: [PATCH] drivers/of: put extended cmdline at the end
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/of/fdt.c | 16 ++++------------
|
||||||
|
1 file changed, 4 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||||
|
index 2e9f7d96617..a29163d21f4 100644
|
||||||
|
--- a/drivers/of/fdt.c
|
||||||
|
+++ b/drivers/of/fdt.c
|
||||||
|
@@ -894,20 +894,12 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
||||||
|
p = (char *)of_get_flat_dt_prop(node, "bootargs", &l);
|
||||||
|
|
||||||
|
if (p != NULL && l > 0) {
|
||||||
|
- if (concat_cmdline) {
|
||||||
|
- int cmdline_len;
|
||||||
|
- int copy_len;
|
||||||
|
- strlcat(cmdline, " ", COMMAND_LINE_SIZE);
|
||||||
|
- cmdline_len = strlen(cmdline);
|
||||||
|
- copy_len = COMMAND_LINE_SIZE - cmdline_len - 1;
|
||||||
|
- copy_len = min((int)l, copy_len);
|
||||||
|
- strncpy(cmdline + cmdline_len, p, copy_len);
|
||||||
|
- cmdline[cmdline_len + copy_len] = '\0';
|
||||||
|
- } else {
|
||||||
|
- strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
|
||||||
|
- }
|
||||||
|
+ strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (concat_cmdline)
|
||||||
|
+ strlcat(cmdline, config_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
+
|
||||||
|
pr_debug("Command line is: %s\n", (char*)data);
|
||||||
|
|
||||||
|
/* break now */
|
@ -325,6 +325,13 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]
|
|||||||
KERNEL_NAME="KERNEL"
|
KERNEL_NAME="KERNEL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# INSTALL_SRC_DIR can be board specific
|
||||||
|
if [ -n "$DEVICE" -a -d "$PROJECT_DIR/$PROJECT/devices/$DEVICE/install" ]; then
|
||||||
|
INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/devices/$DEVICE/install"
|
||||||
|
else
|
||||||
|
INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/install"
|
||||||
|
fi
|
||||||
|
|
||||||
# variables used in image script must be passed
|
# variables used in image script must be passed
|
||||||
env \
|
env \
|
||||||
PATH="$PATH:/sbin" \
|
PATH="$PATH:/sbin" \
|
||||||
@ -337,8 +344,10 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]
|
|||||||
DISTRO="$DISTRO" \
|
DISTRO="$DISTRO" \
|
||||||
TARGET_IMG="$TARGET_IMG" \
|
TARGET_IMG="$TARGET_IMG" \
|
||||||
IMAGE_NAME="$IMAGE_NAME" \
|
IMAGE_NAME="$IMAGE_NAME" \
|
||||||
|
INSTALL_SRC_DIR="$INSTALL_SRC_DIR" \
|
||||||
BOOTLOADER="$BOOTLOADER" \
|
BOOTLOADER="$BOOTLOADER" \
|
||||||
KERNEL_NAME="$KERNEL_NAME" \
|
KERNEL_NAME="$KERNEL_NAME" \
|
||||||
|
TARGET_KERNEL_ARCH="$TARGET_KERNEL_ARCH" \
|
||||||
RELEASE_DIR=$RELEASE_DIR \
|
RELEASE_DIR=$RELEASE_DIR \
|
||||||
UUID_STORAGE="$(uuidgen)" \
|
UUID_STORAGE="$(uuidgen)" \
|
||||||
UBOOT_SYSTEM="$UBOOT_SYSTEM" \
|
UBOOT_SYSTEM="$UBOOT_SYSTEM" \
|
||||||
@ -356,7 +365,6 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]
|
|||||||
if [ "$1" = "amlpkg" ]; then
|
if [ "$1" = "amlpkg" ]; then
|
||||||
echo "Creating Amlogic ZIP update package"
|
echo "Creating Amlogic ZIP update package"
|
||||||
|
|
||||||
INSTALL_SRC_DIR="$PROJECT_DIR/$PROJECT/install"
|
|
||||||
AML_PKG_DIR="$RELEASE_DIR/ampl-pkg"
|
AML_PKG_DIR="$RELEASE_DIR/ampl-pkg"
|
||||||
|
|
||||||
# create package directory
|
# create package directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user