增加ota文件系统编译方法;(注意每次swupdate_make_recovery_img需要删除根目录和./lichee/linux下的.config和.config.old)
This commit is contained in:
@@ -0,0 +1,414 @@
|
||||
|
||||
hook_args.HookArgsDefault [
|
||||
{
|
||||
name "LINEOUT Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "SPK Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "LINEOUT Output Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ" #value=1, "single" value=0
|
||||
}
|
||||
# {
|
||||
# name "LINEOUT volume"
|
||||
# preserve true
|
||||
# optional true
|
||||
# value 31
|
||||
# }
|
||||
{
|
||||
name "MIC1 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC1 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ" #value=0, "single" value=1
|
||||
}
|
||||
# {
|
||||
# name "MIC1 gain volume"
|
||||
# preserve true
|
||||
# optional true
|
||||
# value 31
|
||||
# }
|
||||
]
|
||||
|
||||
hook_args.HookArgsPlayback [
|
||||
{
|
||||
name "LINEOUT Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "SPK Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "LINEOUT Output Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
# {
|
||||
# name "LINEOUT volume"
|
||||
# preserve true
|
||||
# optional true
|
||||
# value 31
|
||||
# }
|
||||
]
|
||||
|
||||
hook_args.HookArgsCapture [
|
||||
{
|
||||
name "MIC1 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC1 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
# {
|
||||
# name "MIC1 gain volume"
|
||||
# preserve true
|
||||
# optional true
|
||||
# value 31
|
||||
# }
|
||||
]
|
||||
pcm.!default {
|
||||
type hooks
|
||||
slave {
|
||||
pcm {
|
||||
type asym
|
||||
playback.pcm "hw:{CARD=audiocodec, DEV=0}"
|
||||
capture.pcm "hw:0,0"
|
||||
}
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args HookArgsDefault
|
||||
}
|
||||
}
|
||||
|
||||
pcm.PlaybackRateDmix {
|
||||
@args [ SAMPLERATE CHNNUM PERIODSIZE ]
|
||||
@args.SAMPLERATE {
|
||||
type integer
|
||||
default 16000
|
||||
}
|
||||
@args.CHNNUM {
|
||||
type integer
|
||||
default 1
|
||||
}
|
||||
@args.PERIODSIZE {
|
||||
type integer
|
||||
default 960 #1024
|
||||
}
|
||||
type plug
|
||||
slave.pcm {
|
||||
type softvol
|
||||
slave.pcm {
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type dmix
|
||||
ipc_key 1111
|
||||
ipc_perm 0666
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
format S16_LE
|
||||
rate $SAMPLERATE
|
||||
channels $CHNNUM
|
||||
period_size $PERIODSIZE
|
||||
periods 8
|
||||
}
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args HookArgsPlayback
|
||||
}
|
||||
}
|
||||
control {
|
||||
name "Soft Volume Master"
|
||||
card audiocodec
|
||||
count 1
|
||||
}
|
||||
min_dB -26.0
|
||||
max_dB 25.0
|
||||
resolution 256
|
||||
}
|
||||
rate_converter "linear" #"speexrate"
|
||||
}
|
||||
|
||||
#pcm.resample rely on alsa-plugin and libspeexdsp. Select them in menuconfig if we want to use plugin pcm.resample.
|
||||
pcm.resample {
|
||||
type plug
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
format S16_LE
|
||||
rate 16000
|
||||
channels 1
|
||||
}
|
||||
rate_converter "speexrate"
|
||||
}
|
||||
|
||||
pcm.CaptureMic Capture1MicHard
|
||||
|
||||
# I2SRTX's I2S_SAMPLERATE and I2S_CHNNUM must be same to PlaybackRateDmix's SAMPLERATE and CHNNUM!
|
||||
pcm.I2SRTX {
|
||||
@args [ I2S_SAMPLERATE I2S_CHNNUM ]
|
||||
@args.I2S_SAMPLERATE {
|
||||
type integer
|
||||
default 16000
|
||||
}
|
||||
@args.I2S_CHNNUM {
|
||||
type integer
|
||||
default 1
|
||||
}
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type plug
|
||||
slave {
|
||||
pcm "hw:snddaudio0,0"
|
||||
channels $I2S_CHNNUM
|
||||
rate $I2S_SAMPLERATE
|
||||
}
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
name "loopback debug"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#pcm.CaptureI2SRX {
|
||||
# type hooks
|
||||
# slave.pcm "hw:snddaudio0,0"
|
||||
# hooks.0 {
|
||||
# type ctl_elems
|
||||
# hook_args [
|
||||
# {
|
||||
# name "loopback debug"
|
||||
# preserve true
|
||||
# optional true
|
||||
# value 1
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
#}
|
||||
|
||||
#pcm_slave.slaveCap {
|
||||
# @args [ PCMID CHNNUM ]
|
||||
# @args.PCMID {
|
||||
# type string
|
||||
# }
|
||||
# @args.CHNNUM {
|
||||
# type integer
|
||||
# }
|
||||
# pcm $PCMID
|
||||
# channels $CHNNUM
|
||||
#}
|
||||
|
||||
#pcm_slave.slaveMultiCapture {
|
||||
# pcm {
|
||||
# type multi
|
||||
# slaves {
|
||||
# a "slaveCap:CaptureMic,1"
|
||||
# b "slaveCap:CaptureI2SRX,1"
|
||||
# }
|
||||
# bindings {
|
||||
# 0 {slave a channel 0}
|
||||
# 1 {slave b channel 0}
|
||||
# }
|
||||
# }
|
||||
#}
|
||||
|
||||
#pcm.CaptureDouble {
|
||||
# type plug
|
||||
# slave slaveMultiCapture
|
||||
# ttable.0.0 1
|
||||
# ttable.1.1 1
|
||||
#}
|
||||
|
||||
#we define pcm capture plugin naming convention:
|
||||
#pcm.Capture<n>Mic:<SampleRate>, <n>: the number of MIC. It can auto convert to indicated channels. <SampleRate>: set sample rate to Hardware PCM.
|
||||
#pcm.Capture<n>MicPlusAec, if enable aec, add PlusAec. It forbids to auto convert to multi channels because of aec.
|
||||
# ref to GenerateCaptureIdentifier() in [audio_hw.c]
|
||||
#e.g.:
|
||||
#pcm.Capture1Mic:16000
|
||||
#pcm.Capture1MicPlusAec
|
||||
#pcm.Capture2Mic:16000
|
||||
#pcm.Capture2MicPlusAec
|
||||
pcm.Capture1Mic {
|
||||
@args [ SAMPLERATE ]
|
||||
@args.SAMPLERATE {
|
||||
type integer
|
||||
default 16000
|
||||
}
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type plug
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
channels 1
|
||||
rate $SAMPLERATE
|
||||
}
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args HookArgsCapture
|
||||
}
|
||||
}
|
||||
|
||||
pcm.Capture1MicHard {
|
||||
type hooks
|
||||
slave.pcm "hw:0,0"
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args HookArgsCapture
|
||||
}
|
||||
}
|
||||
pcm.Capture1MicPlusAec {
|
||||
type route
|
||||
slave.pcm {
|
||||
type multi
|
||||
slaves {
|
||||
a {pcm Capture1MicHard channels 1}
|
||||
b {pcm I2SRTX channels 1}
|
||||
}
|
||||
bindings {
|
||||
0 {slave a channel 0}
|
||||
1 {slave b channel 0}
|
||||
}
|
||||
}
|
||||
ttable.0.0 1
|
||||
ttable.1.1 1
|
||||
}
|
||||
|
||||
pcm.Capture2Mic {
|
||||
@args [ SAMPLERATE ]
|
||||
@args.SAMPLERATE {
|
||||
type integer
|
||||
default 16000
|
||||
}
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type plug
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
channels 2
|
||||
rate $SAMPLERATE
|
||||
}
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
name "MIC1 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC1 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
{
|
||||
name "MIC2 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC2 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
pcm.Capture2MicHard {
|
||||
type hooks
|
||||
slave.pcm "hw:0,0"
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
name "MIC1 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC1 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
{
|
||||
name "MIC2 Switch"
|
||||
preserve true
|
||||
optional true
|
||||
value 1
|
||||
}
|
||||
{
|
||||
name "MIC2 Input Select"
|
||||
preserve true
|
||||
optional true
|
||||
value "differ"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
pcm.Capture2MicPlusAec {
|
||||
type route
|
||||
slave.pcm {
|
||||
type multi
|
||||
slaves {
|
||||
a {pcm Capture2MicHard channels 2}
|
||||
b {pcm I2SRTX channels 1}
|
||||
}
|
||||
bindings {
|
||||
0 {slave a channel 0}
|
||||
1 {slave a channel 1}
|
||||
2 {slave b channel 0}
|
||||
}
|
||||
}
|
||||
ttable.0.0 1
|
||||
ttable.1.1 1
|
||||
ttable.2.2 1
|
||||
}
|
||||
|
||||
pcm.eq {
|
||||
type awequal
|
||||
slave.pcm "hw:0,0"
|
||||
config_file "/etc/awequal.conf"
|
||||
tuning_support true
|
||||
verbose true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# 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 omitted, this value is assumed to
|
||||
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
|
||||
# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.
|
||||
|
||||
# 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
|
||||
|
||||
# On a block device a negative offset is treated as a backwards offset from the
|
||||
# end of the device/partition, rather than a forwards offset from the start.
|
||||
|
||||
# Block device example
|
||||
#/dev/mmcblk0 0xc0000 0x20000
|
||||
#/dev/mmcblk0 -0x20000 0x20000
|
||||
|
||||
# VFAT example
|
||||
#/boot/uboot.env 0x0000 0x4000
|
||||
|
||||
# UBI volume
|
||||
#/dev/ubi0_0 0x0 0x1f000 0x1f000
|
||||
#/dev/ubi0_1 0x0 0x1f000 0x1f000
|
||||
|
||||
# UBI volume by name
|
||||
#/dev/ubi0:env 0x0 0x1f000 0x1f000
|
||||
#/dev/ubi0:env-redund 0x0 0x1f000 0x1f000
|
||||
|
||||
# Allwinner Tina
|
||||
/dev/by-name/env 0x0000 0x1000
|
||||
/dev/by-name/env-redund 0x0000 0x1000
|
||||
|
||||
# Allwinner Tina UBI volume
|
||||
# /dev/ubi0:env 0x0 0x20000 0x20000
|
||||
# /dev/ubi0:env-redund 0x0 0x20000 0x20000
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# udev This is a minimal non-LSB version of a UDEV startup script. It
|
||||
# was derived by stripping down the udev-058 LSB version for use
|
||||
# with buildroot on embedded hardware using Linux 2.6.34+ kernels.
|
||||
#
|
||||
# You may need to customize this for your system's resource limits
|
||||
# (including startup time!) and administration. For example, if
|
||||
# your early userspace has a custom initramfs or initrd you might
|
||||
# need /dev much earlier; or without hotpluggable busses (like USB,
|
||||
# PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
|
||||
#
|
||||
# This script assumes your system boots right into the eventual root
|
||||
# filesystem, and that init runs this udev script before any programs
|
||||
# needing more device nodes than the bare-bones set -- /dev/console,
|
||||
# /dev/zero, /dev/null -- that's needed to boot and run this script.
|
||||
#
|
||||
|
||||
# Check for missing binaries
|
||||
UDEV_BIN=/sbin/udevd
|
||||
test -x $UDEV_BIN || exit 5
|
||||
|
||||
# Check for config file and read it
|
||||
UDEV_CONFIG=/etc/udev/udev.conf
|
||||
test -r $UDEV_CONFIG || exit 6
|
||||
. $UDEV_CONFIG
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Populating ${udev_root:-/dev} using udev: "
|
||||
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
$UDEV_BIN -d || (echo "FAIL" && exit 1)
|
||||
udevadm trigger --type=subsystems --action=add
|
||||
udevadm trigger --type=devices --action=add
|
||||
udevadm settle --timeout=30 || echo "udevadm settle failed"
|
||||
echo "done"
|
||||
;;
|
||||
stop)
|
||||
# Stop execution of events
|
||||
udevadm control --stop-exec-queue
|
||||
killall udevd
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start wifi_deamon....
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting wifi_deamon....: "
|
||||
#wifi_daemon
|
||||
#sleep 0.2
|
||||
#wifi -o sta
|
||||
#wifi -a enable
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping wifi_deamon: "
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Load fat modules....
|
||||
#
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
start() {
|
||||
printf "Load fat modules\n"
|
||||
insmod $MODULES_DIR/fat.ko
|
||||
insmod $MODULES_DIR/vfat.ko
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Unload fat modules\n"
|
||||
rmmod $MODULES_DIR/fat.ko
|
||||
rmmod $MODULES_DIR/vfat.ko
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Load mmc modules....
|
||||
#
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
start() {
|
||||
printf "Load mmc modules\n"
|
||||
#insmod $MODULES_DIR/mmc_core.ko
|
||||
#insmod $MODULES_DIR/mmc_block.ko
|
||||
#insmod $MODULES_DIR/sunxi_mmc_host.ko
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Unload mmc modules\n"
|
||||
#rmmod $MODULES_DIR/mmc_core.ko
|
||||
#rmmod $MODULES_DIR/block.ko
|
||||
#rmmod $MODULES_DIR/sunxi_mmc_host.ko
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,117 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "------run rc.final file-----"
|
||||
#echo "insmod wifi modules"
|
||||
#insmod /lib/modules/3.4.39/8723ds.ko
|
||||
#insmod /lib/modules/3.4.39/bcmdhd.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_mac.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_core.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_wlan.ko
|
||||
|
||||
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
|
||||
ulimit -c unlimited
|
||||
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
|
||||
|
||||
for i in /etc/init.d/S??* ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
LOOP_CNT=0
|
||||
SD_DEV=
|
||||
while [ 1 ];do
|
||||
if [ $LOOP_CNT -eq 3 ];then
|
||||
echo wait SD Card ready timeout
|
||||
break;
|
||||
fi
|
||||
if [ -b /dev/mmcblk1p1 ];then
|
||||
SD_DEV=/dev/mmcblk1p1
|
||||
break;
|
||||
elif [ -b /dev/mmcblk1 ];then
|
||||
SD_DEV=/dev/mmcblk1
|
||||
break;
|
||||
elif [ -b /dev/mmcblk0p1 ];then
|
||||
SD_DEV=/dev/mmcblk0p1
|
||||
break;
|
||||
elif [ -b /dev/mmcblk0 ];then
|
||||
SD_DEV=/dev/mmcblk0
|
||||
break;
|
||||
else
|
||||
echo SD Card not ready, wait
|
||||
fi
|
||||
LOOP_CNT=$(($LOOP_CNT+1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# repair sd card file
|
||||
if [ "x$SD_DEV" != "x" ]; then
|
||||
echo SD Card is ready
|
||||
|
||||
if [ -f /usr/bin/fsck_msdos ]; then
|
||||
/usr/bin/fsck_msdos -pfS $SD_DEV
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
|
||||
! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
|
||||
/bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
if [ -n "$(grep '/mnt/extsd' /proc/mounts)" ]; then
|
||||
echo "start mv stream..."
|
||||
ls /tmp/
|
||||
rm -rf /mnt/extsd/stream*.h264
|
||||
rm -rf /mnt/extsd/data*.jpg
|
||||
mv /tmp/stream*.h264 /mnt/extsd/
|
||||
mv /tmp/data*.jpg /mnt/extsd/
|
||||
echo "---/mnt/extsd/---"
|
||||
ls /mnt/extsd/
|
||||
fi
|
||||
|
||||
echo "run_usb_adb start!"
|
||||
run_usb_adb
|
||||
|
||||
#echo "sample_virvi2vo start!"
|
||||
|
||||
#/usr/bin/sample_virvi2vo -path /usr/bin/sample_virvi2vo_v851s_sc1721v_dual.conf &
|
||||
#catch jpg 0
|
||||
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -trd 1 -snd 1 -s1 800x608 -f1 0 -pf1 4 -vn1 1
|
||||
|
||||
#catch jpg 1
|
||||
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -snd 1 -s1 800x608 -f1 0 -pf1 4 -trd 1 -vn1 1 -vn2 5
|
||||
|
||||
#set ir
|
||||
echo 6 > /sys/class/pwm/pwmchip0/export
|
||||
echo 50000 > /sys/class/pwm/pwmchip0/pwm6/period
|
||||
echo 30000 > /sys/class/pwm/pwmchip0/pwm6/duty_cycle
|
||||
|
||||
#disable ir
|
||||
echo 0 > /sys/class/pwm/pwmchip0/pwm6/enable
|
||||
#enable ir
|
||||
#echo 1 > /sys/class/pwm/pwmchip0/pwm6/enable
|
||||
|
||||
#/usr/bin/rt_media-uvc -D 0 -b 0 -d 2 &
|
||||
|
||||
#run_otg
|
||||
|
||||
#sleep 2
|
||||
|
||||
#/usr/bin/rt_media-uvc -D 0 -d 2 &
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "------run rc.final file-----"
|
||||
#echo "insmod wifi modules"
|
||||
#insmod /lib/modules/3.4.39/8723ds.ko
|
||||
#insmod /lib/modules/3.4.39/bcmdhd.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_mac.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_core.ko
|
||||
#insmod /lib/modules/3.4.39/xradio_wlan.ko
|
||||
|
||||
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
|
||||
ulimit -c unlimited
|
||||
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
|
||||
|
||||
for i in /etc/init.d/S??* ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#LOOP_CNT=0
|
||||
#SD_DEV=
|
||||
#while [ 1 ];do
|
||||
# if [ $LOOP_CNT -eq 3 ];then
|
||||
# echo wait SD Card ready timeout
|
||||
# break;
|
||||
# fi
|
||||
# if [ -b /dev/mmcblk1p1 ];then
|
||||
# SD_DEV=/dev/mmcblk1p1
|
||||
# break;
|
||||
# elif [ -b /dev/mmcblk1 ];then
|
||||
# SD_DEV=/dev/mmcblk1
|
||||
# break;
|
||||
# elif [ -b /dev/mmcblk0p1 ];then
|
||||
# SD_DEV=/dev/mmcblk0p1
|
||||
# break;
|
||||
# elif [ -b /dev/mmcblk0 ];then
|
||||
# SD_DEV=/dev/mmcblk0
|
||||
# break;
|
||||
# else
|
||||
# echo SD Card not ready, wait
|
||||
# fi
|
||||
# LOOP_CNT=$(($LOOP_CNT+1))
|
||||
# sleep 1
|
||||
#done
|
||||
#
|
||||
# repair sd card file
|
||||
#if [ "x$SD_DEV" != "x" ]; then
|
||||
# echo SD Card is ready
|
||||
#
|
||||
# if [ -f /usr/bin/fsck_msdos ]; then
|
||||
# /usr/bin/fsck_msdos -pfS $SD_DEV
|
||||
# fi
|
||||
#fi
|
||||
|
||||
#if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
|
||||
# ! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
|
||||
# /bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
|
||||
#fi
|
||||
|
||||
#sleep 1
|
||||
#echo "start mv stream..."
|
||||
#ls /tmp/
|
||||
#rm -rf /mnt/extsd/stream*.h264
|
||||
#rm -rf /mnt/extsd/data*.jpg
|
||||
#mv /tmp/stream*.h264 /mnt/extsd/
|
||||
#mv /tmp/data*.jpg /mnt/extsd/
|
||||
#echo "---/mnt/extsd/---"
|
||||
#ls /mnt/extsd/
|
||||
|
||||
echo 160 > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio160/direction
|
||||
echo 0 > /sys/class/gpio/gpio160/value
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export
|
||||
echo 100000 > /sys/class/pwm/pwmchip0/pwm0/period
|
||||
echo 40000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
|
||||
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
|
||||
|
||||
echo 1 > /sys/class/gpio/gpio160/value
|
||||
|
||||
run_usb_adb
|
||||
|
||||
setusbconfig rndis
|
||||
|
||||
ifconfig usb0 up
|
||||
|
||||
ifconfig usb0 192.168.2.100
|
||||
|
||||
# /mnt/UDISK/rt_media-uvc &
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "------run rc.modules file-----"
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
#disp
|
||||
#echo "------insmod display modules start-----"
|
||||
#insmod /lib/modules/4.9.191/fb.ko
|
||||
#insmod /lib/modules/4.9.191/disp.ko
|
||||
#wifi
|
||||
#echo "------insmod wifi modules xr806 start-----"
|
||||
#insmod /lib/modules/4.9.191/xr806.ko
|
||||
#insmod /lib/modules/4.9.191/vipcore.ko
|
||||
#input
|
||||
#echo "------insmod input modules start-----"
|
||||
#insmod /lib/modules/4.9.191/input-core.ko
|
||||
#insmod /lib/modules/4.9.191/evdev.ko
|
||||
|
||||
#audio
|
||||
echo "------insmod audio modules start-----"
|
||||
insmod $MODULES_DIR/soundcore.ko
|
||||
insmod $MODULES_DIR/snd.ko
|
||||
insmod $MODULES_DIR/snd-timer.ko
|
||||
insmod $MODULES_DIR/snd-pcm.ko
|
||||
insmod $MODULES_DIR/snd-pcm-dmaengine.ko
|
||||
insmod $MODULES_DIR/snd-soc-core.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_pcm.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_component_rxsync.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_aaudio.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_daudio.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_internal_codec.ko
|
||||
insmod $MODULES_DIR/snd_soc_sunxi_machine.ko
|
||||
echo "------insmod audio modules end-----"
|
||||
insmod $MODULES_DIR/rt-media.ko
|
||||
insmod $MODULES_DIR/cst9220.ko
|
||||
|
||||
#ctp
|
||||
#echo "------insmod ctp modules gslx680 start-----"
|
||||
#insmod /lib/modules/4.9.191/gslX680new.ko
|
||||
#l-sen
|
||||
#echo "------insmod l-sen modules gpadc start-----"
|
||||
#insmod /lib/modules/4.9.191/sunxi_gpadc.ko
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "------run rc.preboot file-----"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# Stop all init scripts in /etc/init.d
|
||||
# executing them in reversed numerical order.
|
||||
#
|
||||
|
||||
for i in $(ls -r /etc/init.d/S??*) ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set stop
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i stop
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
::sysinit:/etc/preinit
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -t tmpfs tmpfs /run
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts
|
||||
::sysinit:/bin/mkdir -p /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
#::sysinit:/etc/init.d/rcS
|
||||
::sysinit:/etc/init.d/rcS boot
|
||||
|
||||
# Put a getty on the serial port
|
||||
/dev/console::respawn:-/bin/sh
|
||||
#ttyS0::respawn:/sbin/getty -n -L ttyS0 115200 vt100 -n -l /bin/sh # GENERIC_SERIAL
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
echo "------run profile file-----"
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
|
||||
fgrep -sq '/ overlay ro,' /proc/mounts && {
|
||||
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
|
||||
echo 'Please try to remove files from /overlay/upper/... and reboot!'
|
||||
}
|
||||
|
||||
export PATH="%PATH%"
|
||||
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
||||
export HOME=${HOME:-/root}
|
||||
export PS1='\u@\h:\w\$ '
|
||||
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
|
||||
ulimit -c unlimited
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
|
||||
[ -x /bin/more ] || alias more=less
|
||||
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
||||
|
||||
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
||||
|
||||
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
[ -n "$FAILSAFE" ] || {
|
||||
for FILE in /etc/profile.d/*.sh; do
|
||||
[ -e "$FILE" ] && . "$FILE"
|
||||
done
|
||||
unset FILE
|
||||
}
|
||||
[ -x /bin/ll ] || alias ll='ls -al'
|
||||
|
||||
#export TSLIB_ROOT=/usr/local/tslib
|
||||
export TSLIB_TSDEVICE=/dev/input/event2
|
||||
export TSLIB_TSEVENTTYPE=input
|
||||
export TSLIB_CONFFILE=/mnt/ts.conf
|
||||
#export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
|
||||
#export TSLIB_CALIBFILE=/etc/pointercal
|
||||
export TSLIB_CALIBFILE=/mnt/pointercal
|
||||
|
||||
export TSLIB_PLUGINDIR=/usr/lib/ts
|
||||
export TSLIB_CONSOLEDEVICE=none
|
||||
export TSLIB_FBDEVICE=/dev/fb0
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
||||
ACTION=="add", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
||||
ACTION=="remove", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
||||
@@ -0,0 +1,3 @@
|
||||
KERNEL=="sda[0-9]", SUBSYSTEM=="block", SUBSYSTEM=="usb", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
||||
ACTION=="add|change", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
||||
ACTION=="remove", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "hotplug usb $(date)"#>>/run/udev.log
|
||||
echo "[$#] $0, $1, $2"#>>/run/udev.log
|
||||
if [ "$#" != "2" ];then
|
||||
echo " !! param err." #>> /run/udev.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$2" == "remove" ];then
|
||||
echo " <==umount"#>> /run/udev.log
|
||||
umount /mnt/exUDISK
|
||||
fi
|
||||
|
||||
if [ "$2" == "add" ];then
|
||||
echo " <==mount"#>> /run/udev.log
|
||||
mount -t vfat /dev/sda1 /mnt/exUDISK
|
||||
fi
|
||||
@@ -0,0 +1,105 @@
|
||||
# Sample udhcpd configuration file (/etc/udhcpd.conf)
|
||||
# Values shown are defaults
|
||||
|
||||
# The start and end of the IP lease block
|
||||
start 172.168.10.100
|
||||
end 172.168.10.254
|
||||
|
||||
# The interface that udhcpd will use
|
||||
#interface wlan0
|
||||
interface usb0
|
||||
|
||||
# The maximum number of leases (includes addresses reserved
|
||||
# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected
|
||||
# if it's bigger than IP lease block, but it ok to make it
|
||||
# smaller than lease block.
|
||||
#max_leases 254
|
||||
|
||||
# The time period at which udhcpd will write out a dhcpd.leases
|
||||
# file. If this is 0, udhcpd will never automatically write a
|
||||
# lease file. Specified in seconds.
|
||||
#auto_time 7200
|
||||
|
||||
# The amount of time that an IP will be reserved (leased to nobody)
|
||||
# if a DHCP decline message is received (seconds)
|
||||
#decline_time 3600
|
||||
|
||||
# The amount of time that an IP will be reserved
|
||||
# if an ARP conflict occurs (seconds)
|
||||
#conflict_time 3600
|
||||
|
||||
# How long an offered address is reserved (seconds)
|
||||
#offer_time 60
|
||||
|
||||
# If client asks for lease below this value, it will be rounded up
|
||||
# to this value (seconds)
|
||||
#min_lease 60
|
||||
|
||||
# The location of the leases file
|
||||
#lease_file /var/lib/misc/udhcpd.leases
|
||||
|
||||
# The location of the pid file
|
||||
#pidfile /var/run/udhcpd.pid
|
||||
|
||||
# Every time udhcpd writes a leases file, the below script will be called
|
||||
#notify_file # default: no script
|
||||
#notify_file dumpleases # useful for debugging
|
||||
|
||||
# The following are bootp specific options
|
||||
# next server to use in bootstrap
|
||||
#siaddr 192.168.0.22 # default: 0.0.0.0 (none)
|
||||
# tftp server name
|
||||
#sname zorak # default: none
|
||||
# tftp file to download (e.g. kernel image)
|
||||
#boot_file /var/nfs_root # default: none
|
||||
|
||||
# Static leases map
|
||||
#static_lease 00:60:08:11:CE:4E 192.168.0.54
|
||||
#static_lease 00:60:08:11:CE:3E 192.168.0.44
|
||||
|
||||
# The remainder of options are DHCP options and can be specified with the
|
||||
# keyword 'opt' or 'option'. If an option can take multiple items, such
|
||||
# as the dns option, they can be listed on the same line, or multiple
|
||||
# lines.
|
||||
# Examples:
|
||||
opt dns 172.168.10.2 172.168.10.10
|
||||
option subnet 255.255.255.0
|
||||
opt router 172.168.10.1
|
||||
opt wins 172.168.10.1
|
||||
option dns 129.219.13.81 # appended to above DNS servers for a total of 3
|
||||
option domain local
|
||||
option lease 864000 # default: 10 days
|
||||
# Arbitrary option in hex form:
|
||||
option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4"
|
||||
|
||||
# Currently supported options (for more info, see options.c):
|
||||
#opt lease NUM
|
||||
#opt subnet IP
|
||||
#opt broadcast IP
|
||||
#opt router IP_LIST
|
||||
#opt ipttl NUM
|
||||
#opt mtu NUM
|
||||
#opt hostname STRING # client's hostname
|
||||
#opt domain STRING # client's domain suffix
|
||||
#opt search STRING_LIST # search domains
|
||||
#opt nisdomain STRING
|
||||
#opt timezone NUM # (localtime - UTC_time) in seconds. signed
|
||||
#opt tftp STRING # tftp server name
|
||||
#opt bootfile STRING # tftp file to download (e.g. kernel image)
|
||||
#opt bootsize NUM # size of that file
|
||||
#opt rootpath STRING # (NFS) path to mount as root fs
|
||||
#opt wpad STRING
|
||||
#opt serverid IP # default: server's IP
|
||||
#opt message STRING # error message (udhcpd sends it on success too)
|
||||
# Options specifying server(s)
|
||||
#opt dns IP_LIST
|
||||
#opt wins IP_LIST
|
||||
#opt nissrv IP_LIST
|
||||
#opt ntpsrv IP_LIST
|
||||
#opt lprsrv IP_LIST
|
||||
#opt swapsrv IP
|
||||
# Obsolete options, no longer supported
|
||||
#opt logsrv IP_LIST # 704/UDP log server (not syslog!)
|
||||
#opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!)
|
||||
#opt cookiesrv IP_LIST # RFC 865 "quote of the day" server, rarely (never?) used
|
||||
#opt timesrv IP_LIST # RFC 868 time server, rarely (never?) used
|
||||
@@ -0,0 +1,7 @@
|
||||
ctrl_interface=/var/log/wpa_supplicant
|
||||
update_config=1
|
||||
|
||||
network={
|
||||
ssid="AWTest"
|
||||
psk="1qaz@WSX"
|
||||
}
|
||||
@@ -0,0 +1,577 @@
|
||||
#!/bin/sh
|
||||
|
||||
MOUNT_ETC=0
|
||||
MOUNT_OVERLAY=1
|
||||
|
||||
################################## functions ##################################
|
||||
|
||||
#mkfs_jffs2() <device in /dev/by-name>
|
||||
mkfs_jffs2() {
|
||||
! [ -x /usr/sbin/mkfs.jffs2 ] \
|
||||
&& ! [ -x /sbin/mkfs.jffs2 ] \
|
||||
&& echo "Not Found /usr/sbin/mkfs.jffs2 or /sbin/mkfs.jffs2" \
|
||||
&& return 1
|
||||
|
||||
# format to jffs2
|
||||
local erase_block=$(/bin/cat /proc/mtd \
|
||||
| /bin/grep "$(basename $1)" \
|
||||
| /usr/bin/awk '{print $3}')
|
||||
/bin/mkdir -p /tmp/jffs2.dir/tmp
|
||||
mkfs.jffs2 -p -e 0x${erase_block} -d /tmp/jffs2.dir \
|
||||
-o /tmp/jffs2.img >/dev/null || return 1
|
||||
/bin/dd if=/tmp/jffs2.img of=$1 || return 1
|
||||
/bin/rm -rf /tmp/jffs2.img /tmp/jffs2.dir
|
||||
return 0
|
||||
}
|
||||
|
||||
mkfs_ubifs() {
|
||||
mkfs.ubifs -x lzo -y "$1"
|
||||
}
|
||||
|
||||
mount_etc() {
|
||||
local etc_update=0
|
||||
# if enable ota, do update
|
||||
[ -f /etc/init.d/rc.ota-upgrade ] \
|
||||
&& source /etc/init.d/ota-upgrade
|
||||
|
||||
local root_dev="$(readlink /dev/by-name/rootfs)"
|
||||
|
||||
# if mount failed, format.
|
||||
case "${root_dev}" in
|
||||
/dev/mtdblock*)
|
||||
/bin/mount -t jffs2 /dev/by-name/rootfs_data /etc \
|
||||
&& [ -e /etc/etc_complete -a ! -e /etc/etc_need_update ] \
|
||||
&& return
|
||||
# /etc/etc_complete and /etc/etc_need_update both exist, that means we just need to update
|
||||
[ -e /etc/etc_complete -a -e /etc/etc_need_update ] && /bin/echo "do etc update" && etc_update=1
|
||||
/bin/umount /etc
|
||||
|
||||
[ x$etc_update = x"1" ] || {
|
||||
# not update, format first
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/rootfs_data to jffs2 ..."
|
||||
mkfs_jffs2 "/dev/by-name/rootfs_data" || return 1
|
||||
}
|
||||
mount -t jffs2 /dev/by-name/rootfs_data /mnt
|
||||
;;
|
||||
/dev/ubi*)
|
||||
/bin/mount -t ubifs /dev/by-name/rootfs_data /etc \
|
||||
&& [ -e /etc/etc_complete -a ! -e /etc/etc_need_update ] \
|
||||
&& return
|
||||
# /etc/etc_complete and /etc/etc_need_update both exist, that means we just need to update
|
||||
[ -e /etc/etc_complete -a -e /etc/etc_need_update ] && /bin/echo "do etc update" && etc_update=1
|
||||
|
||||
/bin/umount /etc
|
||||
[ x$etc_update = x"1" ] || {
|
||||
# not update, format first
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/rootfs_data to ubifs ..."
|
||||
mkfs_ubifs "/dev/by-name/rootfs_data" || return 1
|
||||
}
|
||||
/bin/mount -t ubifs /dev/by-name/rootfs_data /mnt
|
||||
;;
|
||||
*)
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/rootfs_data &>/dev/null
|
||||
/bin/mount -t ext4 -o sync,data=journal /dev/by-name/rootfs_data /etc \
|
||||
&& [ -e /etc/etc_complete -a ! -e /etc/etc_need_update ] \
|
||||
&& return
|
||||
# /etc/etc_complete and /etc/etc_need_update both exist, that means we just need to update
|
||||
[ -e /etc/etc_complete -a -e /etc/etc_need_update ] && /bin/echo "do etc update" && etc_update=1
|
||||
|
||||
/bin/umount /etc
|
||||
[ x$etc_update = x"1" ] || {
|
||||
# not update, format first
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/rootfs_data to ext4 ..."
|
||||
mkfs.ext4 -m 0 /dev/by-name/rootfs_data >/dev/null || return 1
|
||||
}
|
||||
/bin/mount -t ext4 -o sync,data=journal /dev/by-name/rootfs_data /mnt
|
||||
;;
|
||||
esac
|
||||
mkdir -p /tmp/etc
|
||||
/bin/cp -af /etc/* /tmp/etc/
|
||||
# keep the wifi config
|
||||
[ -e /mnt/wifi/wpa_supplicant.conf ] && {
|
||||
/bin/echo "keep the wifi config"
|
||||
/bin/cp /mnt/wifi/wpa_supplicant.conf /tmp/etc/wifi/
|
||||
}
|
||||
/bin/cp -af /tmp/etc/* /mnt/
|
||||
rm -rf /tmp/etc
|
||||
sync
|
||||
[ ! -e /mnt/etc_complete ] && touch /mnt/etc_complete
|
||||
[ -e /mnt/etc_need_update ] && /bin/echo "etc update done" && rm -f /mnt/etc_need_update
|
||||
sync
|
||||
/bin/mount -o move /mnt /etc
|
||||
|
||||
}
|
||||
|
||||
mount_usr(){
|
||||
|
||||
local extend_name=$(fw_printenv -n extend_partition)
|
||||
if [ $extend_name == extendB ]; then
|
||||
extend_name="extend_backup"
|
||||
else
|
||||
extend_name="extend"
|
||||
fi
|
||||
local extend_partition="/dev/by-name/${extend_name}"
|
||||
|
||||
[ -L ${extend_partition} ] ||
|
||||
if [ ${extend_partition} == "/dev/by-name/extend" ]; then
|
||||
[ -L /dev/by-name/extend_backup ] || return
|
||||
else
|
||||
[ -L /dev/by-name/extend ] || return
|
||||
fi
|
||||
|
||||
/bin/mkdir -p /tmp/usr
|
||||
/bin/mount ${extend_partition} /tmp/usr >/dev/null || {
|
||||
if [ ${extend_partition} == "/dev/by-name/extend" ]; then
|
||||
echo "****** 111 mount /dev/by-name/extend_backup /usr *******"
|
||||
/bin/mount /dev/by-name/extend_backup /tmp/usr > /dev/null
|
||||
return
|
||||
else
|
||||
echo "********** 222 mount /dev/by-name/extend /usr ********"
|
||||
/bin/mount /dev/by-name/extend /tmp/usr > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
echo "*******333 mount ${extend_partition} /usr ******"
|
||||
! [ -d /tmp/usr/bin ] \
|
||||
&& umount /tmp/usr \
|
||||
&& rm -rf /tmp/usr \
|
||||
&& return
|
||||
|
||||
/bin/mount -o move /tmp/usr /usr \
|
||||
&& rm -rf /tmp/usr
|
||||
|
||||
}
|
||||
|
||||
mount_sec_storage(){
|
||||
[ -e /dev/by-name/sec_storage ] || return
|
||||
|
||||
local root_dev="$(readlink /dev/by-name/rootfs)"
|
||||
|
||||
# mount sec_storage
|
||||
if [ -h /dev/by-name/sec_storage -a -d /data/tee ]; then
|
||||
case "${root_dev}" in
|
||||
/dev/mtdblock*)
|
||||
/bin/busybox mount -t jffs2 /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
if [ "$?" -ne "0" ]; then
|
||||
mkfs_jffs2 "/dev/by-name/sec_storage"
|
||||
/bin/busybox mount -t jffs2 /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
/dev/ubi*)
|
||||
/bin/busybox mount -t ubifs /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
if [ "$?" -ne "0" ]; then
|
||||
mkfs_ubifs "/dev/by-name/sec_storage"
|
||||
/bin/busybox mount -t ubifs /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/sec_storage &>/dev/null
|
||||
/bin/busybox mount -t ext4 /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
if [ "$?" -ne "0" ]; then
|
||||
mkfs.ext4 /dev/by-name/sec_storage >/dev/null
|
||||
/bin/busybox mount -t ext4 /dev/by-name/sec_storage /data/tee 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
mount_single_app(){
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/app &>/dev/null
|
||||
/bin/mount /dev/by-name/app /mnt/app
|
||||
}
|
||||
|
||||
mount_dual_app(){
|
||||
local appAB=$(fw_printenv -n appAB)
|
||||
local first_app=app
|
||||
local second_app=app_sub
|
||||
local applimit=$(fw_printenv -n applimit)
|
||||
[ x"$applimit" != x"" -a "$applimit" -ne 0 ] && {
|
||||
local appcount=$(fw_printenv -n appcount)
|
||||
let appcount+=1
|
||||
[ "$appcount" -gt "$applimit" ] && {
|
||||
echo "Warning: applimit ($applimit) exceeded. Switch app partition."
|
||||
if [ x"$appAB" = x"A" ]; then
|
||||
appAB=B
|
||||
elif [ x"$appAB" = x"B" ]; then
|
||||
appAB=A
|
||||
else
|
||||
echo "check appAB error: appAB=$appAB"
|
||||
appAB=A
|
||||
fi
|
||||
fw_setenv appAB $appAB
|
||||
echo "Switch appAB to $appAB"
|
||||
appcount=1
|
||||
}
|
||||
fw_setenv appcount $appcount
|
||||
}
|
||||
echo "appAB=$appAB"
|
||||
if [ x"$appAB" = x"A" ]; then
|
||||
first_app=app
|
||||
second_app=app_sub
|
||||
elif [ x"$appAB" = x"B" ]; then
|
||||
first_app=app_sub
|
||||
second_app=app
|
||||
else
|
||||
echo "check appAB error: appAB=$appAB"
|
||||
fi
|
||||
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/$first_app &> /dev/null
|
||||
/bin/mount -t ext4 /dev/by-name/$first_app /mnt/app \
|
||||
&& echo "mount $first_app success" \
|
||||
&& return
|
||||
|
||||
echo "mount $first_app fail, now try mount $second_app"
|
||||
|
||||
#mount first_app fail, try second_app
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/$second_app &> /dev/null
|
||||
/bin/mount -t ext4 /dev/by-name/$second_app /mnt/app \
|
||||
&& echo "mount $second_app success" \
|
||||
&& return
|
||||
|
||||
echo "mount app fail"
|
||||
}
|
||||
|
||||
mount_app() {
|
||||
[ -L /dev/by-name/app ] || return
|
||||
|
||||
if [ -L /dev/by-name/app_sub ]; then
|
||||
mount_dual_app
|
||||
else
|
||||
mount_single_app
|
||||
fi
|
||||
}
|
||||
|
||||
mount_overlay() {
|
||||
|
||||
local root_dev="$(readlink /dev/by-name/rootfs)"
|
||||
local mount_partition_dir
|
||||
case "$1" in
|
||||
UDISK)
|
||||
mount_partition_dir="/mnt/UDISK"
|
||||
;;
|
||||
rootfs_data)
|
||||
mount_partition_dir="/overlay"
|
||||
;;
|
||||
*)
|
||||
echo "error: please choose rootfs_data or UDISK"
|
||||
return 1
|
||||
esac
|
||||
|
||||
case "${root_dev}" in
|
||||
/dev/mtdblock*)
|
||||
/bin/mount -t jffs2 /dev/by-name/$1 ${mount_partition_dir} || {
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/$1 to jffs2 ..."
|
||||
mkfs_jffs2 "/dev/by-name/$1" || return 1
|
||||
mount -t jffs2 /dev/by-name/$1 ${mount_partition_dir}
|
||||
}
|
||||
;;
|
||||
/dev/ubi*)
|
||||
/bin/mount -t ubifs /dev/by-name/$1 ${mount_partition_dir} || {
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/$1 to ubifs ..."
|
||||
mkfs_ubifs "/dev/by-name/$1" || return 1
|
||||
/bin/mount -t ubifs /dev/by-name/$1 ${mount_partition_dir}
|
||||
}
|
||||
;;
|
||||
*)
|
||||
/usr/sbin/fsck.ext4 -y /dev/by-name/$1 &>/dev/null
|
||||
/bin/mount -t ext4 -o sync,data=journal /dev/by-name/$1 ${mount_partition_dir} || {
|
||||
/bin/echo "Mount Failed: formating /dev/by-name/$1 to ext4 ..."
|
||||
mkfs.ext4 -m 0 /dev/by-name/$1 >/dev/null || return 1
|
||||
/bin/mount -t ext4 -o sync,data=journal /dev/by-name/$1 ${mount_partition_dir}
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
||||
fgrep -sq overlay /proc/filesystems || {
|
||||
/bin/echo "skip mount overlayfs as kernel not support"
|
||||
return
|
||||
}
|
||||
# only for recovery,copy boot_partition(boot) wifi information to boot_partition(recovery)
|
||||
local system=$(fw_printenv -n boot_partition)
|
||||
|
||||
if [ x"$system" = x"recovery" ]; then
|
||||
[ -e /overlay/upper/etc/wifi/wpa_supplicant ] && {
|
||||
cp -fpr /overlay/upper/etc/wifi/* /etc/wifi/
|
||||
}
|
||||
fi
|
||||
|
||||
#When /dev/root is readonly, such as squashfs or ext4 ro, we try to mount overlayfs.Otherwise, don't mount overlayfs
|
||||
fgrep -sq '/dev/root / squashfs ro' /proc/mounts || fgrep -sq '/dev/root / ext4 ro' /proc/mounts || {
|
||||
/bin/echo "skip mount overlayfs as now rootfs not squashfs or readonly ext4"
|
||||
return
|
||||
}
|
||||
# First, try to mount without a workdir, for overlayfs v22 and before.
|
||||
# If it fails, it means that we are probably using a v23 and
|
||||
# later versions that require a workdir
|
||||
# mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay /mnt || {
|
||||
# mkdir -p /overlay/upper /overlay/workdir
|
||||
# mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/workdir /mnt
|
||||
# }
|
||||
|
||||
local overlay_need_workdir=1
|
||||
# overlayfs in linux-3.4 and linux-3.10 is v22 and before, should mount without a workdir
|
||||
fgrep -sq 'Linux version 3' /proc/version && overlay_need_workdir=0
|
||||
|
||||
local mount_overlay_dir="/overlay"
|
||||
[ x"${mount_partition_dir}" = x"/mnt/UDISK" ] && {
|
||||
mkdir -p /mnt/UDISK/overlay
|
||||
mount_overlay_dir="/mnt/UDISK/overlay"
|
||||
}
|
||||
|
||||
if [ x"$overlay_need_workdir" = x"0" ]; then
|
||||
mount -n -t overlayfs overlayfs:${mount_overlay_dir} -o rw,noatime,lowerdir=/,upperdir=${mount_overlay_dir} /mnt
|
||||
else
|
||||
mkdir -p ${mount_overlay_dir}/upper ${mount_overlay_dir}/workdir
|
||||
mount -n -t overlay overlayfs:${mount_overlay_dir} -o rw,noatime,lowerdir=/,upperdir=${mount_overlay_dir}/upper,workdir=${mount_overlay_dir}/workdir /mnt
|
||||
fi
|
||||
|
||||
mount -n /proc -o noatime,move /mnt/proc
|
||||
pivot_root /mnt /mnt/rom
|
||||
mount -n /rom/dev -o noatime,move /dev
|
||||
mount -n /rom/tmp -o noatime,move /tmp
|
||||
mount -n /rom/sys -o noatime,move /sys
|
||||
mount -n /rom$mount_partition_dir -o noatime,move $mount_partition_dir
|
||||
fgrep -sq '/rom/usr' /proc/mounts && {
|
||||
mount -n /rom/usr -o noatime,move /usr
|
||||
if [ x"$overlay_need_workdir" = x"0" ]; then
|
||||
mkdir -p $mount_overlay_dir/usr
|
||||
mount -n -t overlayfs overlayfs:${mount_overlay_dir} -o rw,noatime,lowerdir=/usr,upperdir=${mount_overlay_dir}/usr /usr
|
||||
else
|
||||
mkdir -p ${mount_overlay_dir}/upper/usr ${mount_overlay_dir}/workdir/usr
|
||||
mount -n -t overlay overlayfs:${mount_overlay_dir} -o rw,noatime,lowerdir=/usr,upperdir=${mount_overlay_dir}/upper/usr,workdir=${mount_overlay_dir}/workdir/usr /usr
|
||||
fi
|
||||
}
|
||||
|
||||
[ x"$1" = x"UDISK" ] && rm -rf /overlay
|
||||
}
|
||||
|
||||
mount_appImg() {
|
||||
if[ -e /dev/by-name/sec_storage ];then
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
mount_recoveryImg() {
|
||||
if[ -e /dev/by-name/sec_storage ];then
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
set_parts_by_name() {
|
||||
# create by-name
|
||||
local parts part
|
||||
/bin/mkdir -p /dev/by-name
|
||||
parts=$partitions
|
||||
for part in $(/bin/echo ${parts} | /bin/sed 's/:/ /g')
|
||||
do
|
||||
[ ! -e /dev/${part#*@} ] && [ -x /sbin/mdev ] && mdev -s #for initramfs
|
||||
/bin/ln -fs "/dev/${part#*@}" "/dev/by-name/${part%@*}"
|
||||
done
|
||||
}
|
||||
|
||||
etc_part=/dev/nande
|
||||
|
||||
#hardcode rootfs_data partition as nande
|
||||
mount_etc_hardcode() {
|
||||
|
||||
# fix fs
|
||||
/usr/sbin/fsck.ext4 -y $etc_part &>/dev/null
|
||||
|
||||
/bin/mount -t ext4 $etc_part /etc \
|
||||
&& [ -e /etc/etc_complete ] \
|
||||
&& return
|
||||
|
||||
/bin/echo "mount Failed or etc_complete not exist"
|
||||
/bin/echo "now format $etc_part to ext4 ..."
|
||||
/bin/umount /etc
|
||||
mkfs.ext4 -m 0 $etc_part >/dev/null || return 1
|
||||
/bin/mount -t ext4 -o sync,data=journal $etc_part /mnt
|
||||
|
||||
/bin/cp -af /etc/* /mnt/
|
||||
sync
|
||||
/bin/mount -o move /mnt /etc
|
||||
|
||||
#prepare by-name in /etc for next boot
|
||||
set_parts_by_name
|
||||
cp -fpr /dev/by-name /etc
|
||||
sync
|
||||
#now rootfs_data is ready, next boot can mount it as etc
|
||||
touch /etc/etc_complete
|
||||
sync # this sync not necessary, but sync after modify something is good
|
||||
}
|
||||
|
||||
set_parts_by_name_hardcode() {
|
||||
|
||||
#UDISK is the last partition, when UDISK is there, the /etc/by-name is ready
|
||||
[ -e /etc/by-name/UDISK ] && {
|
||||
#set_part_by_name may cost more than 100ms, now just copy it from /etc
|
||||
cp -fpr /etc/by-name /dev/
|
||||
return
|
||||
}
|
||||
|
||||
#should not go here. now just show warning and do set_parts_by_name
|
||||
echo "warning: no /etc/by-name/UDISK, please check it"
|
||||
set_parts_by_name
|
||||
}
|
||||
|
||||
check_update_system_state() {
|
||||
swu_mode=`fw_printenv | grep swu_mode | awk -F '=' '{print $2}'`
|
||||
echo "swu_mode:$swu_mode"
|
||||
if [ $swu_mode == ]; then
|
||||
echo "Not thing todo"
|
||||
else
|
||||
# update_flash_flag && boot_partition_flag
|
||||
# bit3~7: reserve
|
||||
# bit2 : extend(/usr) 1:extend 0:extend_back
|
||||
# bit1 : rootfs 1:rootfs 0:rootfs_backup
|
||||
# bit0 : kernel 1:kernel 0:kernel_back
|
||||
|
||||
dd if=/dev/mtdblock0 of=/tmp/boot0_flag skip=61439 ibs=1 bs=1 count=1 1>/dev/null 2>&1
|
||||
boot_flash_flag=0x`xxd /tmp/boot0_flag | awk -F ' ' '{print $2}'`
|
||||
boot_partition_flag=0x`fw_printenv | grep update_partition_flag | awk 'BEGIN{FS="="} {print $2}'`
|
||||
echo "boot_flash_flag:$boot_flash_flag, boot_partition_flag:$boot_partition_flag"
|
||||
if [ $boot_flash_flag == $boot_partition_flag ]; then
|
||||
|
||||
boot_flash_flag_tmp=$((boot_flash_flag&0x7))
|
||||
echo "boot_flash_flag_tmp:$boot_flash_flag_tmp"
|
||||
# The system has been updated, but env has not been updated
|
||||
case $boot_flash_flag_tmp in
|
||||
0)
|
||||
fw_setenv boot_partition bootB
|
||||
fw_setenv root_partition rootfsB
|
||||
fw_setenv extend_parttion extendB
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
|
||||
1)
|
||||
fw_setenv boot_partition bootA
|
||||
fw_setenv root_partition rootfsB
|
||||
fw_setenv extend_parttion extendB
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
2)
|
||||
fw_setenv boot_partition bootB
|
||||
fw_setenv root_partition rootfsA
|
||||
fw_setenv extend_parttion extendB
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
3)
|
||||
|
||||
fw_setenv boot_partition bootB
|
||||
fw_setenv root_partition rootfsB
|
||||
fw_setenv extend_parttion extendA
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
4)
|
||||
|
||||
fw_setenv boot_partition bootA
|
||||
fw_setenv root_partition rootfsA
|
||||
fw_setenv extend_parttion extendB
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
5)
|
||||
fw_setenv boot_partition bootA
|
||||
fw_setenv root_partition rootfsB
|
||||
fw_setenv extend_parttion extendA
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
6)
|
||||
fw_setenv boot_partition bootB
|
||||
fw_setenv root_partition rootfsA
|
||||
fw_setenv extend_parttion extendA
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
7)
|
||||
fw_setenv boot_partition bootA
|
||||
fw_setenv root_partition rootfsA
|
||||
fw_setenv extend_parttion extendA
|
||||
fw_setenv swu_mode
|
||||
;;
|
||||
*)
|
||||
echo "not match boot_flash_flag_tmp"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
echo "update system fail, not clean swu_mode"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
/bin/mount -t proc /proc /proc
|
||||
/bin/mount -t tmpfs tmpfs /tmp
|
||||
/bin/mount -t sysfs sys /sys
|
||||
# /bin/mount -t devtmpfs none /dev
|
||||
#/bin/mount -t jffs2 /dev/mtdblock3 /home
|
||||
#/bin/mount -t jffs2 /dev/mtdblock6 /home
|
||||
|
||||
# /bin/mount -t jffs2 /dev/mtdblock4 /home
|
||||
|
||||
# cur_time=`cat /proc/uptime`
|
||||
# echo "mount /data partition [${cur_time}]"
|
||||
|
||||
|
||||
# cur_time=`cat /proc/uptime`
|
||||
#echo "initialization led pwm [${cur_time}]"
|
||||
#echo 6 > /sys/class/pwm/pwmchip0/export
|
||||
#echo 50000 > /sys/class/pwm/pwmchip0/pwm6/period
|
||||
#echo 30000 > /sys/class/pwm/pwmchip0/pwm6/duty_cycle
|
||||
# echo "initialization led gpio [${cur_time}]"
|
||||
#echo 134 > /sys/class/gpio/export
|
||||
#echo out > /sys/class/gpio/gpio134/direction
|
||||
|
||||
# cur_time=`cat /proc/uptime`
|
||||
# echo "enable ir led [${cur_time}]"
|
||||
#echo 1 > /sys/class/pwm/pwmchip0/pwm6/enable
|
||||
#echo 0 > /sys/class/gpio/gpio134/value
|
||||
|
||||
# cur_time=`cat /proc/uptime`
|
||||
# echo "start demo_video_in [${cur_time}]"
|
||||
#demo_video_in -n 40 -s0 800x600 -f0 0 -pf 4 -trd 1 -snd 1 -s1 800x600 -f1 0 -pf1 4 -vn1 1
|
||||
#demo_video_in -n 40 -s0 800x600 -f0 0 -pf 4 -snd 1 -s1 800x600 -f1 0 -pf1 4 -trd 1 -vn1 1 -vn2 5
|
||||
|
||||
# cur_time=`cat /proc/uptime`
|
||||
# echo "start uvc out [${cur_time}]"
|
||||
# /bin/setusbconfig uvc
|
||||
#/bin/setusbconfig uvc
|
||||
# /usr/bin/setusbconfig uvc
|
||||
#/usr/bin/rt_media-uvc -D 0 -d 2 -B 10 &
|
||||
|
||||
#sleep 2
|
||||
#/bin/rt_media-uvc -D 1 -d 2 -B 10 &
|
||||
# sleep 3
|
||||
|
||||
fgrep -sq pstore /proc/filesystems && {
|
||||
/bin/mount -t pstore pstore /sys/fs/pstore
|
||||
}
|
||||
|
||||
#fw_setenv, fw_printenv need /var/lock
|
||||
mkdir -p /var/lock
|
||||
|
||||
#common but slow
|
||||
set_parts_by_name
|
||||
|
||||
mount_sec_storage
|
||||
|
||||
# OTA's configuration is not turned on by default exit returns,
|
||||
# which does not affect the startup speed
|
||||
check_update_system_state
|
||||
|
||||
mount_usr
|
||||
[ x"$MOUNT_ETC" = x"1" ] && mount_etc
|
||||
[ x"$MOUNT_OVERLAY" = x"1" ] && mount_overlay rootfs_data #choose rootfs_data or UDISK
|
||||
mount_app
|
||||
|
||||
#hardcode but fast
|
||||
#mount_etc_hardcode
|
||||
#set_parts_by_name_hardcode
|
||||
#mount_usr
|
||||
|
||||
exec /sbin/init
|
||||
@@ -0,0 +1,29 @@
|
||||
# Uncomment if you wish to use the one-wire linux input layer S70/A70...
|
||||
# module_raw one_wire_ts_input
|
||||
|
||||
# Uncomment if you wish to use the linux input layer event interface
|
||||
module_raw input
|
||||
|
||||
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
|
||||
# module_raw collie
|
||||
|
||||
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
|
||||
# module_raw corgi
|
||||
|
||||
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
|
||||
# module_raw ucb1x00
|
||||
|
||||
# Uncomment if you're using an HP iPaq h3600 or similar
|
||||
# module_raw h3600
|
||||
|
||||
# Uncomment if you're using a Hitachi Webpad
|
||||
# module_raw mk712
|
||||
|
||||
# Uncomment if you're using an IBM Arctic II
|
||||
# module_raw arctic2
|
||||
|
||||
module pthres pmin=1
|
||||
module variance delta=30
|
||||
module dejitter delta=100
|
||||
module linear
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
: <<'COMMENTBLOCK'
|
||||
# remove
|
||||
if [ "${ACTION}" == "remove" ]; then
|
||||
MOUNTPOINT="$(grep -w "^/dev/${MDEV}" /proc/mounts | awk '{print $2}')"
|
||||
[ -n "${MOUNTPOINT}" ] \
|
||||
&& /bin/umount -l ${MOUNTPOINT} 2>/dev/null 1>/dev/null
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# add
|
||||
if [ "${ACTION}" == "add" ]; then
|
||||
case ${MDEV} in
|
||||
mmcblk[0-9])
|
||||
[ -d "/sys/block/${MDEV}/${MDEV}p1" ] && exit 0
|
||||
MOUNTPOINT=/mnt/SDCARD
|
||||
;;
|
||||
mmcblk[0-9]p[0-9])
|
||||
MOUNTPOINT=/mnt/SDCARD
|
||||
;;
|
||||
sd[a-z])
|
||||
[ -d "/sys/block/${MDEV}/${MDEV}1" ] && exit 0
|
||||
MOUNTPOINT=/mnt/exUDISK
|
||||
;;
|
||||
sd[a-z][0-9])
|
||||
MOUNTPOINT=/mnt/exUDISK
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
for fstype in vfat ext4
|
||||
do
|
||||
[ "${fstype}" = "ext4" -a -x "/usr/sbin/e2fsck" ] \
|
||||
&& e2fsck -p /dev/${MDEV} >/dev/null
|
||||
/bin/mount -t ${fstype} -o utf8 /dev/${MDEV} ${MOUNTPOINT} && exit 0
|
||||
done
|
||||
[ ! -b "/dev/${MDEV}" -a -f "/sys/block/${MDEV%p*}/${MDEV}/uevent" ] \
|
||||
&& echo add > /sys/block/${MDEV%p*}/${MDEV}/uevent
|
||||
fi
|
||||
COMMENTBLOCK
|
||||
exit 0
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
#insmod $MODULES_DIR/sunxi_usb_udc.ko
|
||||
#insmod $MODULES_DIR/sunxi_usbc.ko
|
||||
|
||||
mount -t configfs none /sys/kernel/config
|
||||
mkdir /sys/kernel/config/usb_gadget/g1
|
||||
echo "0x1f3a" > /sys/kernel/config/usb_gadget/g1/idVendor
|
||||
echo "0x100f" > /sys/kernel/config/usb_gadget/g1/idProduct
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
echo "20080411" > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber
|
||||
echo "Android" > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer
|
||||
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0
|
||||
mkdir -p /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p
|
||||
echo 1280 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/wWidth
|
||||
echo 720 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/wHeight
|
||||
echo 333333 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwFrameInterval
|
||||
echo 333333 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwDefaultFrameInterval
|
||||
echo 442368000 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMinBitRate
|
||||
echo 442368000 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMaxBitRate
|
||||
echo 1843200 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/fs
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/hs
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/fs/
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/ss/
|
||||
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1
|
||||
echo 0xc0 > /sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes
|
||||
echo 500 > /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
|
||||
mkdir /dev/usb-ffs
|
||||
mkdir /dev/usb-ffs/adb
|
||||
mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb/
|
||||
udc=`ls /sys/class/udc`
|
||||
isudc=0
|
||||
start(){
|
||||
while [ 1 ]
|
||||
do
|
||||
sleep 1
|
||||
otg_role=`cat /sys/devices/platform/soc/usbc0/otg_role`
|
||||
if [ "$otg_role" = "usb_device" ]
|
||||
then
|
||||
if [ $isudc == 0 ]
|
||||
then
|
||||
echo $udc > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
isudc=1
|
||||
fi
|
||||
else
|
||||
isudc=0
|
||||
fi
|
||||
done
|
||||
}
|
||||
start &
|
||||
|
||||
echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
echo 0x100d > /sys/kernel/config/usb_gadget/g1/idProduct
|
||||
rm /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
|
||||
rm /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
|
||||
ls /sys/class/udc | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
insmod $MODULES_DIR/configfs.ko
|
||||
insmod $MODULES_DIR/videobuf2-vmalloc.ko
|
||||
insmod $MODULES_DIR/usb-common.ko
|
||||
insmod $MODULES_DIR/usbcore.ko
|
||||
insmod $MODULES_DIR/sunxi_hci.ko
|
||||
insmod $MODULES_DIR/ehci-hcd.ko
|
||||
insmod $MODULES_DIR/ohci-hcd.ko
|
||||
insmod $MODULES_DIR/udc-core.ko
|
||||
insmod $MODULES_DIR/libcomposite.ko
|
||||
insmod $MODULES_DIR/sunxi_usb_udc.ko
|
||||
insmod $MODULES_DIR/usb_f_fs.ko
|
||||
insmod $MODULES_DIR/usb_f_mass_storage.ko
|
||||
insmod $MODULES_DIR/usb_f_hid.ko
|
||||
insmod $MODULES_DIR/usb_f_uvc.ko
|
||||
insmod $MODULES_DIR/sunxi_usbc.ko
|
||||
|
||||
if [ -f /lib/modules/4.9.191/videobuf2-vmalloc.ko ];then
|
||||
insmod $MODULES_DIR/videobuf2-vmalloc.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/usb_f_uvc.ko ];then
|
||||
insmod $MODULES_DIR/usb_f_uvc.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/u_audio.ko ];then
|
||||
insmod $MODULES_DIR/u_audio.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/usb_f_uac1.ko ];then
|
||||
insmod $MODULES_DIR/usb_f_uac1.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/uvcvideo.ko ];then
|
||||
insmod $MODULES_DIR/uvcvideo.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/snd-hwdep.ko ];then
|
||||
insmod $MODULES_DIR/snd-hwdep.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/snd-rawmidi.ko ];then
|
||||
insmod $MODULES_DIR/snd-rawmidi.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/snd-usbmidi-lib.ko ];then
|
||||
insmod $MODULES_DIR/snd-usbmidi-lib.ko
|
||||
fi
|
||||
if [ -f /lib/modules/4.9.191/snd-usb-audio.ko ];then
|
||||
insmod $MODULES_DIR/snd-usb-audio.ko
|
||||
fi
|
||||
|
||||
cat /sys/devices/platform/soc/usbc0/usb_device
|
||||
setusbconfig adb
|
||||
adbd > /dev/null &
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
insmod $MODULES_DIR/configfs.ko
|
||||
insmod $MODULES_DIR/usb-common.ko
|
||||
insmod $MODULES_DIR/usbcore.ko
|
||||
insmod $MODULES_DIR/sunxi_hci.ko
|
||||
insmod $MODULES_DIR/ehci-hcd.ko
|
||||
insmod $MODULES_DIR/ohci-hcd.ko
|
||||
insmod $MODULES_DIR/udc-core.ko
|
||||
insmod $MODULES_DIR/libcomposite.ko
|
||||
insmod $MODULES_DIR/sunxi_usb_udc.ko
|
||||
insmod $MODULES_DIR/usb_f_fs.ko
|
||||
insmod $MODULES_DIR/usb_f_mass_storage.ko
|
||||
insmod $MODULES_DIR/usb_f_hid.ko
|
||||
insmod $MODULES_DIR/sunxi_usbc.ko
|
||||
|
||||
insmod $MODULES_DIR/scsi_mod.ko
|
||||
insmod $MODULES_DIR/sd_mod.ko
|
||||
insmod $MODULES_DIR/usb-storage.ko
|
||||
insmod $MODULES_DIR/uas.ko
|
||||
insmod $MODULES_DIR/ums-realtek.ko
|
||||
insmod $MODULES_DIR/ums-datafab.ko
|
||||
insmod $MODULES_DIR/ums-freecom.ko
|
||||
insmod $MODULES_DIR/ums-isd200.ko
|
||||
insmod $MODULES_DIR/ums-usbat.ko
|
||||
insmod $MODULES_DIR/ums-sddr09.ko
|
||||
insmod $MODULES_DIR/ums-sddr55.ko
|
||||
insmod $MODULES_DIR/ums-jumpshot.ko
|
||||
insmod $MODULES_DIR/ums-alauda.ko
|
||||
insmod $MODULES_DIR/ums-karma.ko
|
||||
insmod $MODULES_DIR/ums-cypress.ko
|
||||
insmod $MODULES_DIR/ums-eneub6250.ko
|
||||
|
||||
cat /sys/devices/platform/soc/usbc0/usb_host
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
#!/bin/sh
|
||||
|
||||
name=`basename $0`
|
||||
|
||||
usage() {
|
||||
echo "$name Usage:"
|
||||
echo ""
|
||||
echo "$name [function]"
|
||||
echo "function: mtp, support MTP function"
|
||||
echo " adb, support adb function"
|
||||
echo " uvc, support uvc function"
|
||||
echo " uvc,uac1 support uvc and uac1 function"
|
||||
echo " rndis support rndis function"
|
||||
echo "example:"
|
||||
echo "$name uvc"
|
||||
echo ""
|
||||
}
|
||||
|
||||
enable_adb() {
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/ffs.adb ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
|
||||
}
|
||||
echo "Tina ADB" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/ffs.adb/ /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.adb
|
||||
|
||||
[ -d /dev/usb-ffs/adb ] || {
|
||||
mkdir -p /dev/usb-ffs
|
||||
mkdir /dev/usb-ffs/adb
|
||||
mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb/
|
||||
}
|
||||
}
|
||||
|
||||
enable_mtp() {
|
||||
mtp_name=mtp.gs0
|
||||
mtp_ffs=false
|
||||
kv=`uname -r`
|
||||
kv=${kv:0:1}
|
||||
if [ "x$kv" = "x5" ]; then
|
||||
mtp_ffs=true
|
||||
mtp_name=ffs.mtp
|
||||
fi
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/$mtp_name ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/$mtp_name
|
||||
}
|
||||
if [ "x$mtp_ffs" = "xtrue" ]; then
|
||||
[ -d /dev/usb-ffs/mtp ] || {
|
||||
mkdir -p /dev/usb-ffs
|
||||
mkdir /dev/usb-ffs/mtp
|
||||
mount -o rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1 -t functionfs mtp /dev/usb-ffs/mtp/
|
||||
}
|
||||
fi
|
||||
echo "Tina MTP" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
echo 1 > /sys/kernel/config/usb_gadget/g1/os_desc/use
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/$mtp_name/ /sys/kernel/config/usb_gadget/g1/configs/c.1/$mtp_name
|
||||
if [ "x$mtp_ffs" = "xtrue" ]; then
|
||||
MtpTools -f connect
|
||||
sleep .500
|
||||
fi
|
||||
}
|
||||
|
||||
uvc_create_frame()
|
||||
{
|
||||
format=$1
|
||||
name=$2
|
||||
width=$3
|
||||
height=$4
|
||||
frameindex=$5
|
||||
|
||||
dir=streaming/$format/$name/${height}p
|
||||
mkdir -p $dir
|
||||
echo $width > $dir/wWidth
|
||||
echo $height > $dir/wHeight
|
||||
echo $(($width * $height * 2 )) > $dir/dwMaxVideoFrameBufferSize
|
||||
#20,30fps
|
||||
#cat <<EOF > $dir/dwFrameInterval
|
||||
#500000
|
||||
#333333
|
||||
#EOF
|
||||
|
||||
#30fps
|
||||
echo 333333 > $dir/dwFrameInterval
|
||||
echo 333333 > $dir/dwDefaultFrameInterval
|
||||
echo $(($width * $height * 2 * 30 * 8)) > $dir/dwMinBitRate
|
||||
echo $(($width * $height * 2 * 30 * 8)) > $dir/dwMaxBitRate
|
||||
echo $frameindex > $dir/bFrameIndex
|
||||
}
|
||||
|
||||
enable_uvc()
|
||||
{
|
||||
cd /sys/kernel/config/usb_gadget/g1/functions
|
||||
mkdir uvc.usb0
|
||||
cd uvc.usb0
|
||||
|
||||
uvc_create_frame mjpeg m 1920 1080 1
|
||||
uvc_create_frame mjpeg m 1280 720 2
|
||||
uvc_create_frame mjpeg m 640 480 3
|
||||
uvc_create_frame uncompressed u 320 240 1
|
||||
uvc_create_frame h264 h 1920 1080 1
|
||||
uvc_create_frame h264 h 1280 720 2
|
||||
|
||||
mkdir -p streaming/header/h
|
||||
|
||||
ln -s streaming/mjpeg/m/ streaming/header/h/
|
||||
ln -s streaming/uncompressed/u/ streaming/header/h/
|
||||
ln -s streaming/h264/h/ streaming/header/h/
|
||||
|
||||
ln -s streaming/header/h/ streaming/class/fs
|
||||
ln -s streaming/header/h/ streaming/class/hs
|
||||
|
||||
mkdir -p control/header/h
|
||||
|
||||
ln -s control/header/h/ control/class/fs/
|
||||
ln -s control/header/h/ control/class/ss/
|
||||
|
||||
#echo 3072 > streaming_maxpacket
|
||||
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/
|
||||
}
|
||||
|
||||
udc_controller=`ls /sys/class/udc`
|
||||
|
||||
set_usb_function() {
|
||||
# 1:function
|
||||
# 2:idVendor
|
||||
# 3:idProduct
|
||||
#
|
||||
|
||||
[ -d /sys/kernel/config/usb_gadget ] || {
|
||||
mount -t configfs none /sys/kernel/config
|
||||
mkdir /sys/kernel/config/usb_gadget/g1
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
echo "Allwinner Technology Inc." > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer
|
||||
echo "Tina" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
}
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/configs/c.1 ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1
|
||||
echo 0xc0 > /sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes
|
||||
echo 500 > /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
|
||||
}
|
||||
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.adb
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.mtp
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/mtp.gs0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/f1
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/uac1.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/accessory.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/hid.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/hid.usb1
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/loopback.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/gser.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/printer.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/fs
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/hs
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/fs/
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/ss/
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/
|
||||
rm -rf /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/uncompressed/
|
||||
|
||||
echo $2 > /sys/kernel/config/usb_gadget/g1/idVendor
|
||||
echo $3 > /sys/kernel/config/usb_gadget/g1/idProduct
|
||||
|
||||
if [ $1 == "none" ]; then
|
||||
return
|
||||
elif [ $1 == "mtp" ]; then
|
||||
enable_mtp
|
||||
elif [ $1 == "adb" ]; then
|
||||
enable_adb
|
||||
elif [ $1 == "mass_storage" ]; then
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0 ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0
|
||||
echo Tina > /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/inquiry_string
|
||||
}
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/f1
|
||||
|
||||
#echo "/dev/by-name/UDISK" > /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/file
|
||||
elif [ $1 == "uac1" ]; then
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0 ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0
|
||||
}
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_chmask
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_chmask
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_srate
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_srate
|
||||
echo "Tina UAC1" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/uac1.usb0
|
||||
elif [ $1 == "uvc" ]; then
|
||||
echo N > /sys/module/usb_f_uvc/parameters/bulk_streaming_ep
|
||||
[ $4 == "bulk" ] && {
|
||||
echo Y > /sys/module/usb_f_uvc/parameters/bulk_streaming_ep
|
||||
}
|
||||
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
|
||||
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
|
||||
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
|
||||
echo "Tina UVC" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
|
||||
#echo 0x150 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h/bcdUVC
|
||||
|
||||
enable_uvc
|
||||
elif [ $1 == "uvc,uac1" ]; then
|
||||
echo Y > /sys/module/usb_f_uvc/parameters/bulk_streaming_ep
|
||||
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
|
||||
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
|
||||
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
|
||||
echo "Tina UVC" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
|
||||
enable_uvc
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0 ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0
|
||||
}
|
||||
# enable PC capture only ISOC(IN)
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_chmask
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_chmask
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_srate
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_srate
|
||||
echo "Tina UVC UAC1" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/uac1.usb0
|
||||
elif [ $1 == "adb,uvc" -o $1 == "uvc,adb" ]; then
|
||||
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
|
||||
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
|
||||
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
|
||||
echo "Tina ADB&UVC" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
|
||||
enable_uvc
|
||||
enable_adb
|
||||
elif [ $1 == "adb,uac1" -o $1 == "uac1,adb" ]; then
|
||||
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
|
||||
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
|
||||
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0 ] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0
|
||||
}
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_chmask
|
||||
echo 0x1 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_chmask
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/p_srate
|
||||
echo 16000 > /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/c_srate
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uac1.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/uac1.usb0
|
||||
|
||||
enable_adb
|
||||
echo "Tina ADB&UAC1" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
elif [ $1 == "rndis" ]; then
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0
|
||||
echo "Tina RNDIS" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.usb0
|
||||
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
elif [ $1 == "adb,rndis" ]; then
|
||||
[ -d /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0] || {
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0
|
||||
}
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.usb0
|
||||
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
enable_adb
|
||||
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
|
||||
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
|
||||
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
|
||||
echo "Tina ADB,RNDIS" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
|
||||
fi
|
||||
|
||||
echo $udc_controller > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Lack of arg!"
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
# idVendor, idProduct only for test
|
||||
if [ $1 == "none" ]; then
|
||||
set_usb_function none 0x1f3a 0x1001
|
||||
return
|
||||
fi
|
||||
if [ $1 == "adb" ]; then
|
||||
set_usb_function adb 0x18d1 0xD002
|
||||
return
|
||||
fi
|
||||
if [ $1 == "mtp" ]; then
|
||||
set_usb_function mtp 0x045E 0x00C9
|
||||
return
|
||||
fi
|
||||
if [ $1 == "uac1" ]; then
|
||||
if [ $# == 3 ]; then
|
||||
set_usb_function uac1 $2 $3
|
||||
else
|
||||
set_usb_function uac1 0x1d61 0x0101
|
||||
fi
|
||||
return
|
||||
fi
|
||||
if [ $1 == "mass_storage" ]; then
|
||||
set_usb_function mass_storage 0x1f3a 0x1000
|
||||
return
|
||||
fi
|
||||
if [ $1 == "uvc" ]; then
|
||||
if [ $2 == "bulk" ]; then
|
||||
set_usb_function uvc 0x09a1 0x0026 bulk
|
||||
else
|
||||
set_usb_function uvc 0x09a1 0x0026
|
||||
fi
|
||||
return
|
||||
fi
|
||||
if [ $1 == "uac1,uvc" -o $1 == "uvc,uac1" ]; then
|
||||
#set_usb_function uvc,uac1 0x1943 0x2263
|
||||
#set_usb_function uvc,uac1 0x09a1 0x0026
|
||||
if [ $# == 3 ]; then
|
||||
set_usb_function uvc,uac1 $2 $3
|
||||
else
|
||||
set_usb_function uvc,uac1 0x09a1 0x002A
|
||||
fi
|
||||
return
|
||||
fi
|
||||
if [ $1 == "adb,uvc" -o $1 == "uvc,adb" ]; then
|
||||
set_usb_function adb,uvc 0x18d1 0xD002
|
||||
return
|
||||
fi
|
||||
if [ $1 == "adb,uac1" -o $1 == "uac1,adb" ]; then
|
||||
if [ $# == 3 ];then
|
||||
set_usb_function adb,uac1 $2 $3
|
||||
else
|
||||
set_usb_function adb,uac1 0x18d1 0xD002
|
||||
fi
|
||||
return
|
||||
fi
|
||||
if [ $1 == "rndis" ]; then
|
||||
# MODULES_DIR="/lib/modules/`uname -r`"
|
||||
# insmod $MODULES_DIR/sunxi_usb_udc.ko
|
||||
if [ $# == 3 ]; then
|
||||
set_usb_function rndis $2 $3
|
||||
else
|
||||
set_usb_function rndis 0x0525 0xa4a2
|
||||
fi
|
||||
fi
|
||||
if [ $1 == "adb,rndis" ]; then
|
||||
# MODULES_DIR="/lib/modules/`uname -r`"
|
||||
# insmod $MODULES_DIR/sunxi_usb_udc.ko
|
||||
if [ $# == 3 ]; then
|
||||
set_usb_function adb,rndis $2 $3
|
||||
else
|
||||
set_usb_function adb,rndis 0x0525 0xa4a2
|
||||
fi
|
||||
fi
|
||||
@@ -1466,7 +1466,7 @@ CONFIG_BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FACTOR is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FALSE is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FOLD is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FSYNC is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FSYNC=y
|
||||
# CONFIG_BUSYBOX_CONFIG_HEAD is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_HOSTID is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_ID is not set
|
||||
@@ -1754,7 +1754,7 @@ CONFIG_BUSYBOX_CONFIG_FLOCK=y
|
||||
CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_HD is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_XXD is not set
|
||||
CONFIG_BUSYBOX_CONFIG_XXD=y
|
||||
CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
|
||||
@@ -2424,6 +2424,11 @@ CONFIG_rt_media_demo=y
|
||||
# CONFIG_PACKAGE_demo_codec_parallel is not set
|
||||
# CONFIG_PACKAGE_demo_video_muxer is not set
|
||||
|
||||
#
|
||||
# rt_media-uvc
|
||||
#
|
||||
CONFIG_PACKAGE_rt_media-uvc=y
|
||||
|
||||
#
|
||||
# smart_card
|
||||
#
|
||||
@@ -2489,7 +2494,7 @@ CONFIG_PACKAGE_libawnn_full=y
|
||||
# CONFIG_PACKAGE_mtop is not set
|
||||
# CONFIG_PACKAGE_nativepower is not set
|
||||
# CONFIG_PACKAGE_nativepower_utils is not set
|
||||
# CONFIG_PACKAGE_ota-burnboot is not set
|
||||
CONFIG_PACKAGE_ota-burnboot=y
|
||||
# CONFIG_PACKAGE_ota-fastboot is not set
|
||||
# CONFIG_PACKAGE_powerkey is not set
|
||||
# CONFIG_PACKAGE_pqd is not set
|
||||
@@ -2499,12 +2504,185 @@ CONFIG_PACKAGE_libawnn_full=y
|
||||
# CONFIG_PACKAGE_recovery-mode is not set
|
||||
# CONFIG_PACKAGE_resample is not set
|
||||
# CONFIG_PACKAGE_resnet50-demo is not set
|
||||
CONFIG_PACKAGE_rt_media-uvc=y
|
||||
# CONFIG_PACKAGE_snapcast is not set
|
||||
# CONFIG_PACKAGE_stress-ng is not set
|
||||
# CONFIG_PACKAGE_sunxiCamera is not set
|
||||
# CONFIG_PACKAGE_sunxiCamera_demo is not set
|
||||
# CONFIG_PACKAGE_swupdate is not set
|
||||
CONFIG_PACKAGE_swupdate=y
|
||||
CONFIG_SWUPDATE_CUSTOM=y
|
||||
CONFIG_SWUPDATE_DEFAULT_HAVE_DOT_CONFIG=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_CURL is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_CURL_SSL is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SYSTEMD is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_SCRIPTS=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_HW_COMPATIBILITY is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_SW_VERSIONS_FILE="/etc/sw-versions"
|
||||
CONFIG_SWUPDATE_DEFAULT_SOCKET_CTRL_PATH=""
|
||||
CONFIG_SWUPDATE_DEFAULT_SOCKET_PROGRESS_PATH=""
|
||||
CONFIG_SWUPDATE_DEFAULT_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
|
||||
# CONFIG_SWUPDATE_DEFAULT_MTD is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_LUA is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_FEATURE_SYSLOG is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_CROSS_COMPILE=""
|
||||
CONFIG_SWUPDATE_DEFAULT_SYSROOT=""
|
||||
CONFIG_SWUPDATE_DEFAULT_EXTRA_CFLAGS=""
|
||||
CONFIG_SWUPDATE_DEFAULT_EXTRA_LDFLAGS=""
|
||||
CONFIG_SWUPDATE_DEFAULT_EXTRA_LDLIBS=""
|
||||
# CONFIG_SWUPDATE_DEFAULT_DEBUG is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_WERROR is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_NOCLEANUP is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_BOOTLOADER_EBG is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_UBOOT=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_BOOTLOADER_NONE is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_BOOTLOADER_GRUB is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_UBOOT_FWENV="/etc/fw_env.config"
|
||||
# CONFIG_SWUPDATE_DEFAULT_UBOOT_NEWAPI is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SSL_IMPL_NONE is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_SSL_IMPL_OPENSSL=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_SSL_IMPL_MBEDTLS is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_DOWNLOAD is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_DOWNLOAD_SSL is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_CHANNEL_CURL is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_HASH_VERIFY is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SIGNED_IMAGES is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_ENCRYPTED_IMAGES is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SURICATTA is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_WEBSERVER is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_GUNZIP=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_ZSTD is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_LIBCONFIG=y
|
||||
CONFIG_SWUPDATE_DEFAULT_PARSERROOT=""
|
||||
# CONFIG_SWUPDATE_DEFAULT_JSON is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SETSWDESCRIPTION is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_UBIVOL is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_UBIVIDOFFSET=2048
|
||||
CONFIG_SWUPDATE_DEFAULT_RAW=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_RDIFFHANDLER is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_SHELLSCRIPTHANDLER=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_ARCHIVE is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_REMOTE_HANDLER is not set
|
||||
# CONFIG_SWUPDATE_DEFAULT_SWUFORWARDER_HANDLER is not set
|
||||
CONFIG_SWUPDATE_DEFAULT_BOOTLOADERHANDLER=y
|
||||
CONFIG_SWUPDATE_DEFAULT_AWBOOT_HANDLER=y
|
||||
# CONFIG_SWUPDATE_DEFAULT_UCFWHANDLER is not set
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LINUX=y
|
||||
# CONFIG_SWUPDATE_CONFIG_HAVE_FREEBSD is not set
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_DOT_CONFIG=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LUA=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBCONFIG=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBARCHIVE=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBCURL=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBGPIOD=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBMTD=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBUBI=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBUBOOTENV=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBEBGENV=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBZEROMQ=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_ZLIB=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_ZSTD=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBSSL=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBCRYPTO=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_MBEDTLS=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_JSON_C=y
|
||||
CONFIG_SWUPDATE_CONFIG_HAVE_LIBWEBSOCKETS=y
|
||||
# CONFIG_SWUPDATE_CONFIG_HAVE_URIPARSER is not set
|
||||
|
||||
#
|
||||
# Swupdate Settings
|
||||
#
|
||||
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
# CONFIG_SWUPDATE_CONFIG_CURL is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_CURL_SSL is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_SYSTEMD is not set
|
||||
CONFIG_SWUPDATE_CONFIG_SCRIPTS=y
|
||||
# CONFIG_SWUPDATE_CONFIG_HW_COMPATIBILITY is not set
|
||||
CONFIG_SWUPDATE_CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
|
||||
|
||||
#
|
||||
# Socket Paths
|
||||
#
|
||||
CONFIG_SWUPDATE_CONFIG_SOCKET_CTRL_PATH=""
|
||||
CONFIG_SWUPDATE_CONFIG_SOCKET_PROGRESS_PATH=""
|
||||
CONFIG_SWUPDATE_CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
|
||||
# CONFIG_SWUPDATE_CONFIG_MTD is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_LUA is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_FEATURE_SYSLOG is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
#
|
||||
CONFIG_SWUPDATE_CONFIG_CROSS_COMPILE=""
|
||||
CONFIG_SWUPDATE_CONFIG_SYSROOT=""
|
||||
CONFIG_SWUPDATE_CONFIG_EXTRA_CFLAGS=""
|
||||
CONFIG_SWUPDATE_CONFIG_EXTRA_LDFLAGS=""
|
||||
CONFIG_SWUPDATE_CONFIG_EXTRA_LDLIBS=""
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_SWUPDATE_CONFIG_DEBUG is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_WERROR is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_NOCLEANUP is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_BOOTLOADER_EBG is not set
|
||||
CONFIG_SWUPDATE_CONFIG_UBOOT=y
|
||||
# CONFIG_SWUPDATE_CONFIG_BOOTLOADER_NONE is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_BOOTLOADER_GRUB is not set
|
||||
CONFIG_SWUPDATE_CONFIG_UBOOT_FWENV="/etc/fw_env.config"
|
||||
# CONFIG_SWUPDATE_CONFIG_UBOOT_NEWAPI is not set
|
||||
CONFIG_SWUPDATE_CONFIG_SSL_IMPL_NONE=y
|
||||
# CONFIG_SWUPDATE_CONFIG_SSL_IMPL_OPENSSL is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_SSL_IMPL_MBEDTLS is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_DOWNLOAD is not set
|
||||
|
||||
#
|
||||
# Hash checking needs an SSL implementation
|
||||
#
|
||||
|
||||
#
|
||||
# Image signature verification needs an SSL implementation
|
||||
#
|
||||
|
||||
#
|
||||
# Image encryption needs an SSL implementation
|
||||
#
|
||||
# CONFIG_SWUPDATE_CONFIG_SURICATTA is not set
|
||||
# CONFIG_WEBSERVER is not set
|
||||
CONFIG_SWUPDATE_CONFIG_GUNZIP=y
|
||||
# CONFIG_SWUPDATE_CONFIG_ZSTD is not set
|
||||
|
||||
#
|
||||
# Parser Features
|
||||
#
|
||||
CONFIG_SWUPDATE_CONFIG_LIBCONFIG=y
|
||||
CONFIG_SWUPDATE_CONFIG_PARSERROOT=""
|
||||
# CONFIG_SWUPDATE_CONFIG_JSON is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_SETSWDESCRIPTION is not set
|
||||
|
||||
#
|
||||
# Image Handlers
|
||||
#
|
||||
CONFIG_SWUPDATE_CONFIG_RAW=y
|
||||
# CONFIG_SWUPDATE_CONFIG_RDIFFHANDLER is not set
|
||||
CONFIG_SWUPDATE_CONFIG_SHELLSCRIPTHANDLER=y
|
||||
# CONFIG_SWUPDATE_CONFIG_ARCHIVE is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_REMOTE_HANDLER is not set
|
||||
|
||||
#
|
||||
# swuforward handler needs json-c and curl
|
||||
#
|
||||
CONFIG_SWUPDATE_CONFIG_BOOTLOADERHANDLER=y
|
||||
CONFIG_SWUPDATE_CONFIG_AWBOOT_HANDLER=y
|
||||
# CONFIG_SWUPDATE_CONFIG_UCFWHANDLER is not set
|
||||
|
||||
#
|
||||
# Reduce size
|
||||
#
|
||||
# CONFIG_SWUPDATE_CONFIG_REMOVE_CLIENT is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_REMOVE_PROGRESS is not set
|
||||
# CONFIG_SWUPDATE_CONFIG_REMOVE_AUTORUN is not set
|
||||
# CONFIG_PACKAGE_tconfigs is not set
|
||||
# CONFIG_PACKAGE_thermal_pwm is not set
|
||||
# CONFIG_PACKAGE_tina-app-upgrade is not set
|
||||
@@ -3017,7 +3195,12 @@ CONFIG_PACKAGE_kmod-usb=y
|
||||
# CONFIG_PACKAGE_kmod-fb-sys-fops is not set
|
||||
# CONFIG_PACKAGE_kmod-fbcon is not set
|
||||
# CONFIG_PACKAGE_kmod-ge8300-km-opencl is not set
|
||||
# CONFIG_PACKAGE_kmod-video-core is not set
|
||||
CONFIG_PACKAGE_kmod-video-core=y
|
||||
# CONFIG_PACKAGE_kmod-video-cpia2 is not set
|
||||
# CONFIG_PACKAGE_kmod-video-gspca-core is not set
|
||||
# CONFIG_PACKAGE_kmod-video-pwc is not set
|
||||
# CONFIG_PACKAGE_kmod-video-uvc is not set
|
||||
CONFIG_PACKAGE_kmod-video-videobuf2=y
|
||||
CONFIG_PACKAGE_kmod-vin-v4l2=y
|
||||
|
||||
#
|
||||
@@ -3511,7 +3694,7 @@ CONFIG_PACKAGE_libblkid=y
|
||||
# CONFIG_PACKAGE_libcap-ng is not set
|
||||
# CONFIG_PACKAGE_libcares is not set
|
||||
# CONFIG_PACKAGE_libcharset is not set
|
||||
# CONFIG_PACKAGE_libconfig is not set
|
||||
CONFIG_PACKAGE_libconfig=y
|
||||
# CONFIG_PACKAGE_libcroco is not set
|
||||
# CONFIG_PACKAGE_libcurl is not set
|
||||
# CONFIG_PACKAGE_libdaemon is not set
|
||||
@@ -4521,7 +4704,7 @@ CONFIG_STRACE_NONE=y
|
||||
# CONFIG_PACKAGE_tinyalsa-utils is not set
|
||||
# CONFIG_PACKAGE_uart_led is not set
|
||||
# CONFIG_PACKAGE_uart_test is not set
|
||||
# CONFIG_PACKAGE_uboot-envtools is not set
|
||||
CONFIG_PACKAGE_uboot-envtools=y
|
||||
# CONFIG_PACKAGE_ugps is not set
|
||||
# CONFIG_PACKAGE_usb-modeswitch is not set
|
||||
# CONFIG_PACKAGE_usbreset is not set
|
||||
|
||||
4492
target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota
Executable file
4492
target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota
Executable file
File diff suppressed because it is too large
Load Diff
@@ -104,12 +104,12 @@ define KernelPackage/usb
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_fs.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_mass_storage.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_hid.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uvc.ko
|
||||
#FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uvc.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/udc/udc-core.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/u_audio.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uac1.ko
|
||||
#FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/u_audio.ko
|
||||
#FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uac1.ko
|
||||
FILES+=$(LINUX_DIR)/fs/configfs/configfs.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-vmalloc.ko
|
||||
#FILES+=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-vmalloc.ko
|
||||
AUTOLOAD:=$(call AutoProbe, usbcore.ko ohci-hcd.ko sunxi_hci.ko ehci-hcd.ko usb-common.ko sunxi_usbc.ko sunxi_usb_udc.ko libcomposite.ko usb_f_fs.ko usb_f_mass_storage.ko usb_f_hid.ko udc-core.ko configfs.ko)
|
||||
endef
|
||||
|
||||
@@ -166,9 +166,10 @@ define KernelPackage/audio
|
||||
FILES+=$(LINUX_DIR)/sound/core/snd.ko
|
||||
FILES+=$(LINUX_DIR)/sound/core/snd-pcm.ko
|
||||
FILES+=$(LINUX_DIR)/sound/core/snd-timer.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/u_audio.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uac1.ko
|
||||
AUTOLOAD:=$(call AutoProbe, soundcore.ko snd-soc-core.ko snd_soc_sunxi_pcm.ko snd_soc_sunxi_aaudio.ko snd_soc_sunxi_machine.ko snd_soc_sunxi_internal_codec.ko snd_soc_sunxi_component_rxsync.ko snd_soc_sunxi_daudio.ko snd-pcm-dmaengine.ko snd.ko snd-pcm.ko snd-timer.ko u_audio.ko usb_f_uac1.ko)
|
||||
#FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/u_audio.ko
|
||||
#FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uac1.ko
|
||||
#AUTOLOAD:=$(call AutoProbe, soundcore.ko snd-soc-core.ko snd_soc_sunxi_pcm.ko snd_soc_sunxi_aaudio.ko snd_soc_sunxi_machine.ko snd_soc_sunxi_internal_codec.ko snd_soc_sunxi_component_rxsync.ko snd_soc_sunxi_daudio.ko snd-pcm-dmaengine.ko snd.ko snd-pcm.ko snd-timer.ko u_audio.ko usb_f_uac1.ko)
|
||||
AUTOLOAD:=$(call AutoProbe, soundcore.ko snd-soc-core.ko snd_soc_sunxi_pcm.ko snd_soc_sunxi_aaudio.ko snd_soc_sunxi_machine.ko snd_soc_sunxi_internal_codec.ko snd_soc_sunxi_component_rxsync.ko snd_soc_sunxi_daudio.ko snd-pcm-dmaengine.ko snd.ko snd-pcm.ko snd-timer.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/audio/description
|
||||
|
||||
@@ -9,7 +9,7 @@ software =
|
||||
upgrade_recovery = {
|
||||
/* upgrade recovery */
|
||||
images: (
|
||||
{
|
||||
/*{
|
||||
filename = "recovery";
|
||||
device = "/dev/by-name/recovery";
|
||||
installed-directly = true;
|
||||
@@ -21,7 +21,7 @@ software =
|
||||
{
|
||||
filename = "boot0";
|
||||
type = "awboot0";
|
||||
}
|
||||
}*/
|
||||
);
|
||||
/* change swu_mode to upgrade_kernel,boot_partition to recovery & reboot*/
|
||||
bootenv: (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
swota_file_list=(
|
||||
${TINA_BUILD_TOP=}/target/allwinner/${TARGET_BOARD}/swupdate/sw-description
|
||||
out/${TARGET_BOARD}/boot_initramfs_recovery.img:recovery
|
||||
out/${TARGET_BOARD}/uboot.img:uboot
|
||||
out/${TARGET_BOARD}/boot0.img:boot0
|
||||
#out/${TARGET_BOARD}/uboot.img:uboot
|
||||
#out/${TARGET_BOARD}/boot0.img:boot0
|
||||
out/${TARGET_BOARD}/boot.img:kernel
|
||||
out/${TARGET_BOARD}/rootfs.img:rootfs
|
||||
out/${TARGET_BOARD}/usr.img:usr
|
||||
|
||||
Reference in New Issue
Block a user