Merge branch 'main' of 192.168.1.238:vision/sl100_sdk into main
This commit is contained in:
26
target/allwinner/v851s-fastboot_h13_pv/BoardConfig.mk
Executable file
26
target/allwinner/v851s-fastboot_h13_pv/BoardConfig.mk
Executable file
@@ -0,0 +1,26 @@
|
||||
-include target/allwinner/v851s-common/BoardConfigCommon.mk
|
||||
|
||||
TARGET_ROOTFS_IMAGES_USE_EXT4 := true
|
||||
TARGET_NORROOTFS_IMAGES_USE_SQUASHFS := true
|
||||
BOARD_ROOTFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_ROOTFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_OVERLAYFS_IMAGE_USE_EXT4 :=true
|
||||
TARGET_OVERLAYFS_IMAGE_USE_SQUASHFS :=true
|
||||
BOARD_OVERLAYFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_OVERLAYFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_DATAFS_IMAGE_USE_EXT4 :=true
|
||||
TARGET_DATAFS_IMAGE_USE_SQUASHFS :=true
|
||||
TARGET_DATAFS_IMAGE_USE_VFAT :=true
|
||||
BOARD_DATAFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_DATAFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_VERSION_MANUFACTURER_URL := www.allwinnertech.com
|
||||
TARGET_VERSION_MANUFACTURER := allwinnertech
|
||||
TARGET_VERSION_PRODUCT := v2.1
|
||||
TARGET_VERSION_HWREV := v1.0
|
||||
|
||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
||||
|
||||
TARGET_CHIP := sun8iw21p1
|
||||
31
target/allwinner/v851s-fastboot_h13_pv/Makefile
Executable file
31
target/allwinner/v851s-fastboot_h13_pv/Makefile
Executable file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright (C) 2013-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=v851s-fastboot_h13_pv
|
||||
BOARDNAME:=v851s-fastboot_h13_pv
|
||||
FEATURES:=fpu usb ext4 display rtc
|
||||
CPU_TYPE:=cortex-a7
|
||||
CPU_SUBTYPE:=neon
|
||||
MAINTAINER:=Allwinner
|
||||
|
||||
KERNEL_PATCHVER:=4.9
|
||||
UBOOT_PATCHVER:=2018
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
include $(BUILD_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES +=
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_LOG_LIB_GLOG -Wno-unused-but-set-variable \
|
||||
-Wno-unused-variable -Wno-unused-function -Wno-unused-label -Wno-unused-const-variable -Wno-comment \
|
||||
-Wno-unused-value
|
||||
#-DUSE_STD_LOG
|
||||
TARGET_CXXFLAGS += -std=c++11 -fno-rtti
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
18
target/allwinner/v851s-fastboot_h13_pv/TinaProducts.mk
Executable file
18
target/allwinner/v851s-fastboot_h13_pv/TinaProducts.mk
Executable file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (C) 2013 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/v851s_fastboot_h13_pv.mk
|
||||
414
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/asound.conf
Executable file
414
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/asound.conf
Executable file
@@ -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,80 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# load modules....
|
||||
#
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
start() {
|
||||
printf "load modules\n"
|
||||
|
||||
echo "load sample_virvi2vo ---- "
|
||||
#/usr/bin/sample_virvi2vo -path /usr/bin/sample_virvi2vo_v851s_sc1721v.conf &
|
||||
|
||||
#echo "------ insmod scsi modules start --------"
|
||||
#insmod $MODULES_DIR/scsi_mod.ko
|
||||
#insmod $MODULES_DIR/sd_mod.ko
|
||||
|
||||
#wifi
|
||||
echo "------ insmod xr806 modules start --------"
|
||||
#insmod $MODULES_DIR/xr806.ko
|
||||
#insmod $MODULES_DIR/vipcore.ko
|
||||
#input
|
||||
#insmod $MODULES_DIR/input-core.ko
|
||||
insmod $MODULES_DIR/evdev.ko
|
||||
|
||||
echo "------insmod audio modules start-----"
|
||||
#audio
|
||||
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
|
||||
|
||||
echo "------ insmod gpio_keys modules start --------"
|
||||
#gpio key
|
||||
#insmod $MODULES_DIR/gpio_keys.ko
|
||||
|
||||
echo "------ insmod sunxi_gpadc modules start --------"
|
||||
#l-sen
|
||||
#insmod $MODULES_DIR/sunxi_gpadc.ko
|
||||
|
||||
echo "------ insmod cst9220 modules start --------"
|
||||
#ctp
|
||||
#insmod $MODULES_DIR/gslX680new.ko
|
||||
#insmod $MODULES_DIR/cst9220.ko
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "unload modules\n"
|
||||
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -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,98 @@
|
||||
#!/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
|
||||
|
||||
@@ -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
|
||||
|
||||
39
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/inittab
Executable file
39
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/inittab
Executable file
@@ -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
|
||||
45
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/profile
Executable file
45
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/profile
Executable file
@@ -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
|
||||
105
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/udhcpd.conf
Executable file
105
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/etc/udhcpd.conf
Executable file
@@ -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"
|
||||
}
|
||||
563
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/files/pseudo_init
Executable file
563
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/files/pseudo_init
Executable file
@@ -0,0 +1,563 @@
|
||||
#!/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
|
||||
}
|
||||
|
||||
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
|
||||
29
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/mnt/ts.conf
Executable file
29
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/mnt/ts.conf
Executable file
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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.
BIN
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/usr/bin/ramparser
Executable file
BIN
target/allwinner/v851s-fastboot_h13_pv/busybox-init-base-files/usr/bin/ramparser
Executable file
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
|
||||
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
|
||||
MODULES_DIR="/lib/modules/`uname -r`"
|
||||
|
||||
run(){
|
||||
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 "enable android usb"
|
||||
|
||||
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 "0x100d" > /sys/kernel/config/usb_gadget/g1/idProduct
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
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_akegadget/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/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
|
||||
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/
|
||||
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "disable android usb"
|
||||
|
||||
killall adbd 2>/dev/null
|
||||
|
||||
echo > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
|
||||
rm -f /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
|
||||
|
||||
rmmod $MODULES_DIR/sunxi_usbc.ko
|
||||
rmmod $MODULES_DIR/sunxi_usb_udc.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,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
pwd=$(dirname $0)
|
||||
|
||||
echo $pwd $1
|
||||
|
||||
mkdir -vp $1/squashfs
|
||||
mkdir -vp $1/home
|
||||
mkdir -vp $1/data
|
||||
mkdir -vp $1/mnt/extsd
|
||||
mkdir -vp $1/mnt/sdcard
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
pwd=$(dirname $0)
|
||||
|
||||
mkdir -p $1/etc
|
||||
mkdir -p $1/etc/init.d
|
||||
mkdir -p $1/usr/bin
|
||||
#if [ -f ${pwd}/profile ]; then
|
||||
# cp -f ${pwd}/profile $1/etc/profile
|
||||
#else
|
||||
# echo "fatal error! ${pwd}/profile is not exist!"
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
#$pwd/import_udhcpd.sh $1
|
||||
#$pwd/import_timezone.sh $1
|
||||
#$pwd/import_cron.sh $1
|
||||
$pwd/mk_extra_dir.sh $1
|
||||
#$pwd/export_extra_env.sh $1
|
||||
#$pwd/gen_nfsmount.sh $1
|
||||
#$pwd/install_init_script.sh $1
|
||||
|
||||
#install -m 777 $pwd/preinit $1/etc/preinit
|
||||
#$pwd/gen_inittab.sh $1
|
||||
|
||||
exit 0
|
||||
4538
target/allwinner/v851s-fastboot_h13_pv/defconfig
Executable file
4538
target/allwinner/v851s-fastboot_h13_pv/defconfig
Executable file
File diff suppressed because it is too large
Load Diff
405
target/allwinner/v851s-fastboot_h13_pv/modules.mk
Executable file
405
target/allwinner/v851s-fastboot_h13_pv/modules.mk
Executable file
@@ -0,0 +1,405 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 Allwinner
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /build/LICENSE for more information.
|
||||
|
||||
define KernelPackage/vin-v4l2
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=Video input support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-core.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-dma-contig.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-memops.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-v4l2.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/platform/sunxi-vin/vin_io.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/media/platform/sunxi-vin/modules/sensor/gc2083_mipi.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/media/platform/sunxi-vin/modules/sensor_power/sensor_power.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/platform/sunxi-vin/vin_v4l2.ko
|
||||
AUTOLOAD:=$(call AutoProbe,videobuf2-core videobuf2-dma-contig videobuf2-memops videobuf2-v4l2 vin_io vin_v4l2)
|
||||
endef
|
||||
|
||||
define KernelPackage/vin-v4l2/description
|
||||
Kernel modules for video input support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,vin-v4l2))
|
||||
|
||||
define KernelPackage/EISE-ISE
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=Video ISE&EISE support (staging)
|
||||
DEPENDS:=
|
||||
# FILES:=$(LINUX_DIR)/drivers/media/platform/sunxi-ise/sunxi_ise.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/media/platform/sunxi-eise/sunxi_eise.ko
|
||||
AUTOLOAD:=$(call AutoProbe,sunxi_ise sunxi_eise)
|
||||
endef
|
||||
|
||||
define KernelPackage/EISE-ISE/description
|
||||
Kernel modules for video ISE&EISE support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,EISE-ISE))
|
||||
|
||||
|
||||
define KernelPackage/sunxi_nna_vip
|
||||
SUBMENU:=$(NNA_VIPCORE_MENU)
|
||||
TITLE:=nna vipcore modules
|
||||
DEPENDS:=
|
||||
KCONFIG:=
|
||||
DEFAULT:=n
|
||||
FILES+=$(LINUX_DIR)/drivers/char/sunxi_nna_vip/vipcore.ko
|
||||
AUTOLOAD:=$(call AutoProbe,vipcore)
|
||||
endef
|
||||
|
||||
define KernelPackage/sunxi_nna_vip/description
|
||||
sunxi_nna_vip Kernel modules, e.g. nna support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sunxi_nna_vip))
|
||||
|
||||
define KernelPackage/sunxi_nna_galcore
|
||||
SUBMENU:=$(NNA_GALCORE_MENU)
|
||||
TITLE:=nna galcore modules
|
||||
DEPENDS:=
|
||||
KCONFIG:=
|
||||
DEFAULT:=n
|
||||
FILES+=$(LINUX_DIR)/drivers/char/sunxi_nna_galcore/galcore.ko
|
||||
AUTOLOAD:=$(call AutoProbe,galcore)
|
||||
endef
|
||||
|
||||
define KernelPackage/sunxi_nna_galcore/description
|
||||
sunxi_nna_galcore Kernel modules, e.g. nna support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sunxi_nna_galcore))
|
||||
|
||||
define KernelPackage/mmc
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=mmc support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/drivers/mmc/core/mmc_core.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/mmc/host/sunxi_mmc_host.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/mmc/card/mmc_block.ko
|
||||
AUTOLOAD:=$(call AutoProbe, mmc_core sunxi_mmc_host, mmc_block)
|
||||
endef
|
||||
|
||||
define KernelPackage/mmc/description
|
||||
Kernel modules for mmc support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mmc))
|
||||
|
||||
define KernelPackage/usb
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=usb support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/host/sunxi_hci.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-hcd.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/common/usb-common.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/sunxi_usb/sunxi_usbc.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/sunxi_usb/sunxi_usb_udc.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/libcomposite.ko
|
||||
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/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)/fs/configfs/configfs.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
|
||||
|
||||
define KernelPackage/usb/description
|
||||
Kernel modules for usb support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb))
|
||||
|
||||
|
||||
define KernelPackage/usb-disk
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=usb Support U disk (staging)
|
||||
DEPENDS:= +kmod-usb
|
||||
FILES:=$(LINUX_DIR)/drivers/scsi/scsi_mod.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/scsi/sd_mod.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/usb-storage.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/uas.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-realtek.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-datafab.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-freecom.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-isd200.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-usbat.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-sddr09.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-sddr55.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-jumpshot.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-alauda.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-karma.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-cypress.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/storage/ums-eneub6250.ko
|
||||
AUTOLOAD:=$(call AutoProbe, scsi_mod.ko sd_mod.ko usb-storage.ko uas.ko ums-realtek.ko ums-datafab.ko ums-freecom.ko ums-isd200.ko ums-usbat.ko ums-sddr09.ko ums-sddr55.ko ums-jumpshot.ko ums-alauda.ko ums-karma.ko ums-cypress.ko ums-eneub6250.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-disk/description
|
||||
Kernel modules for usb disk support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-disk))
|
||||
|
||||
|
||||
define KernelPackage/audio
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=audio support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/sound/soundcore.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/snd-soc-core.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_pcm.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_aaudio.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_machine.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_internal_codec.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_component_rxsync.ko
|
||||
FILES+=$(LINUX_DIR)/sound/soc/sunxi_v2/snd_soc_sunxi_daudio.ko
|
||||
FILES+=$(LINUX_DIR)/sound/core/snd-pcm-dmaengine.ko
|
||||
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)
|
||||
endef
|
||||
|
||||
define KernelPackage/audio/description
|
||||
Kernel modules for audio support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,audio))
|
||||
|
||||
define KernelPackage/g2d
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=G2D support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/drivers/char/sunxi_g2d/g2d_sunxi.ko
|
||||
AUTOLOAD:=$(call AutoProbe, g2d)
|
||||
endef
|
||||
|
||||
define KernelPackage/g2d/description
|
||||
Kernel modules for G2D support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,g2d))
|
||||
|
||||
define KernelPackage/fb-disp
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=lcd support (staging)
|
||||
DEPENDS:=
|
||||
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/video/fbdev/sunxi/disp2/disp/disp.ko
|
||||
AUTOLOAD:=$(call AutoProbe, fb.ko disp.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/fb-disp/description
|
||||
Kernel modules for fb disp devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fb-disp))
|
||||
|
||||
define KernelPackage/uvc
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=uvc support (staging)
|
||||
DEPENDS:=+kmod-usb
|
||||
FILES:=$(LINUX_DIR)/drivers/media/v4l2-core/videobuf2-vmalloc.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uvc.ko
|
||||
AUTOLOAD:=$(call AutoProbe, videobuf2-vmalloc.ko usb_f_uvc.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/uvc/description
|
||||
Kernel modules for uvc support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,uvc))
|
||||
|
||||
define KernelPackage/rt-media
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=rt-media support (staging)
|
||||
DEPENDS:=
|
||||
FILES+=$(LINUX_DIR)/drivers/media/rt-media/rt-media.ko
|
||||
AUTOLOAD:=$(call AutoProbe, rt-media.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/rt-media/description
|
||||
Kernel modules for rt-media support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rt-media))
|
||||
|
||||
#define KernelPackage/sunxi-rf-wlan
|
||||
# SUBMENU:=$(WIRELESS_MENU)
|
||||
# TITLE:=sunxi rfkill wlan support (staging)
|
||||
# DEPENDS:=
|
||||
# KCONFIG:= CONFIG_RFKILL \
|
||||
# CONFIG_SUNXI_RFKILL
|
||||
# FILES:=$(LINUX_DIR)/drivers/misc/sunxi-rf/sunxi-wlan.ko
|
||||
# AUTOLOAD:=$(call AutoProbe, sunxi-rf-wlan)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/sunxi-rf-wlan/description
|
||||
# Kernel modules for sunx-wlan support
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,sunxi-rf-wlan))
|
||||
#
|
||||
#define KernelPackage/sunxi-rf-bluetooth
|
||||
# SUBMENU:=$(WIRELESS_MENU)
|
||||
# TITLE:=sunxi rfkill bluetooth support (staging)
|
||||
# DEPENDS:=
|
||||
# KCONFIG:= CONFIG_RFKILL \
|
||||
# CONFIG_SUNXI_RFKILL
|
||||
# FILES:=$(LINUX_DIR)/drivers/misc/sunxi-rf/sunxi-bluetooth.ko
|
||||
# AUTOLOAD:=$(call AutoProbe, sunxi-rf-bluetooth)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/sunxi-rf-bluetooth/description
|
||||
# Kernel modules for sunx-bluetooth support
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,sunxi-rf-bluetooth))
|
||||
#
|
||||
#define KernelPackage/net-xr819
|
||||
# SUBMENU:=$(WIRELESS_MENU)
|
||||
# TITLE:=xr819 support (staging)
|
||||
# DEPENDS:= +kmod-sunxi-rf-wlan +kmod-cfg80211
|
||||
# FILES:=$(LINUX_DIR)/drivers/net/wireless/xr819/wlan/xradio_core.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/net/wireless/xr819/wlan/xradio_wlan.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/net/wireless/xr819/umac/xradio_mac.ko
|
||||
# AUTOLOAD:=$(call AutoProbe, xradio_mac xradio_core xradio_wlan)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/net-xr819/description
|
||||
# Kernel modules for xr819 support
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,net-xr819))
|
||||
#
|
||||
#define KernelPackage/touchscreen-ft6236
|
||||
# SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
# TITLE:= FT6236 I2C touchscreen
|
||||
# DEPENDS:= +kmod-input-core
|
||||
# KCONFIG:= CONFIG_INPUT_TOUCHSCREEN \
|
||||
# CONFIG_TOUCHSCREEN_PROPERTIES \
|
||||
# CONFIG_TOUCHSCREEN_FT6236
|
||||
# FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ft6236.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko
|
||||
# AUTOLOAD:=$(call AutoProbe,of_touchscreen ft6236)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/touchscreen-ft6236/description
|
||||
# Enable support for Focaltech 6236 touchscreen port.
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,touchscreen-ft6236))
|
||||
#
|
||||
#define KernelPackage/sunxi-gpadc
|
||||
# SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
# TITLE:= FT6236 I2C touchscreen
|
||||
# DEPENDS:= +kmod-input-core +kmod-input-evdev
|
||||
# KCONFIG:= CONFIG_INPUT_TOUCHSCREEN \
|
||||
# CONFIG_TOUCHSCREEN_PROPERTIES \
|
||||
# CONFIG_TOUCHSCREEN_FT6236
|
||||
# FILES:=$(LINUX_DIR)/drivers/input/sensor/sunxi_gpadc.ko
|
||||
# AUTOLOAD:=$(call AutoProbe,sunxi_gpadc.ko)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/sunxi-gpadc/description
|
||||
# Enable support for Focaltech 6236 touchscreen port.
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,sunxi-gpadc))
|
||||
#
|
||||
#define KernelPackage/iio-mpu6xxx-i2c
|
||||
# SUBMENU:=$(IIO_MENU)
|
||||
# TITLE:=MPU6050/6500/9150 inertial measurement sensor (I2C)
|
||||
# DEPENDS:=+kmod-i2c-core +kmod-iio-core
|
||||
# KCONFIG:=CONFIG_INV_MPU6050_I2C \
|
||||
# CONFIG_INV_MPU6050_IIO
|
||||
# FILES:=$(LINUX_DIR)/drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko \
|
||||
# $(LINUX_DIR)/drivers/iio/imu/inv_mpu6050/inv-mpu6050-i2c.ko
|
||||
# AUTOLOAD:=$(call AutoProbe,inv-mpu6050 inv-mpu6050-i2c)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/iio-mpu6xxx-i2c/description
|
||||
# This driver supports the Invensense MPU6050/6500/9150 and ICM20608
|
||||
# motion tracking devices over I2C.
|
||||
# This driver can be built as a module. The module will be called
|
||||
# inv-mpu6050-i2c.
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,iio-mpu6xxx-i2c))
|
||||
#
|
||||
#define KernelPackage/iio-mpu6xxx-spi
|
||||
# SUBMENU:=$(IIO_MENU)
|
||||
# TITLE:=MPU6050/6500/9150 inertial measurement sensor (SPI)
|
||||
# DEPENDS:=+kmod-spi-bitbang +kmod-iio-core
|
||||
# KCONFIG:=CONFIG_INV_MPU6050_SPI CONFIG_INV_MPU6050_IIO
|
||||
# FILES:=$(LINUX_DIR)/drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko
|
||||
# FILES+=$(LINUX_DIR)/drivers/iio/imu/inv_mpu6050/inv-mpu6050-spi.ko
|
||||
# AUTOLOAD:=$(call AutoProbe,inv-mpu6050 inv-mpu6050-spi)
|
||||
#endef
|
||||
#
|
||||
#define KernelPackage/iio-mpu6xxx-spi/description
|
||||
# This driver supports the Invensense MPU6050/6500/9150 and ICM20608
|
||||
# motion tracking devices over SPI.
|
||||
# This driver can be built as a module. The module will be called
|
||||
# inv-mpu6050-spi.
|
||||
#endef
|
||||
#
|
||||
#$(eval $(call KernelPackage,iio-mpu6xxx-spi))
|
||||
#
|
||||
|
||||
define KernelPackage/usb-uac1
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=usb support uac1 device (staging)
|
||||
DEPENDS:=+kmod-audio +kmod-usb
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/gadget/function/u_audio.ko
|
||||
FILES+=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_uac1.ko
|
||||
AUTOLOAD:=$(call AutoProbe, u_audio.ko usb_f_uac1.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-uac1/description
|
||||
Kernel modules for usb uac1 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-uac1))
|
||||
|
||||
define KernelPackage/usb-video-class
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Support for the USB Video Class (UVC). (staging)
|
||||
DEPENDS:=+kmod-vin-v4l2 +kmod-usb
|
||||
FILES:=$(LINUX_DIR)/drivers/media/usb/uvc/uvcvideo.ko
|
||||
AUTOLOAD:=$(call AutoProbe, uvc_video.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-video-class/description
|
||||
Kernel modules for usb video class support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-video-class))
|
||||
|
||||
define KernelPackage/snd-usb-audio
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=support for USB audio and USB MIDI devices (staging)
|
||||
DEPENDS:=+kmod-audio +kmod-usb
|
||||
FILES:=$(LINUX_DIR)/sound/core/snd-rawmidi.ko
|
||||
FILES+=$(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko
|
||||
FILES+=$(LINUX_DIR)/sound/core/snd-hwdep.ko
|
||||
FILES+=$(LINUX_DIR)/sound/usb/snd-usb-audio.ko
|
||||
AUTOLOAD:=$(call AutoProbe, uvc_video.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-video-class/description
|
||||
Kernel modules for usb video class support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,snd-usb-audio))
|
||||
123
target/allwinner/v851s-fastboot_h13_pv/swupdate/sw-description
Executable file
123
target/allwinner/v851s-fastboot_h13_pv/swupdate/sw-description
Executable file
@@ -0,0 +1,123 @@
|
||||
software =
|
||||
{
|
||||
version = "0.1.0";
|
||||
description = "Firmware update for Tina Project";
|
||||
|
||||
stable = {
|
||||
|
||||
/* upgrade recovery,uboot,boot0 ==> change swu_mode,boot_partition ==> reboot */
|
||||
upgrade_recovery = {
|
||||
/* upgrade recovery */
|
||||
images: (
|
||||
{
|
||||
filename = "recovery";
|
||||
device = "/dev/by-name/recovery";
|
||||
installed-directly = true;
|
||||
},
|
||||
{
|
||||
filename = "uboot";
|
||||
type = "awuboot";
|
||||
},
|
||||
{
|
||||
filename = "boot0";
|
||||
type = "awboot0";
|
||||
}
|
||||
);
|
||||
/* change swu_mode to upgrade_kernel,boot_partition to recovery & reboot*/
|
||||
bootenv: (
|
||||
{
|
||||
name = "swu_mode";
|
||||
value = "upgrade_kernel";
|
||||
},
|
||||
{
|
||||
name = "boot_partition";
|
||||
value = "recovery";
|
||||
},
|
||||
{
|
||||
name = "swu_next";
|
||||
value = "reboot";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/* upgrade kernel,rootfs ==> change sw_mode */
|
||||
upgrade_kernel = {
|
||||
/* upgrade kernel,rootfs */
|
||||
images: (
|
||||
{
|
||||
filename = "kernel";
|
||||
device = "/dev/by-name/boot";
|
||||
installed-directly = true;
|
||||
},
|
||||
{
|
||||
filename = "rootfs";
|
||||
device = "/dev/by-name/rootfs";
|
||||
installed-directly = true;
|
||||
},
|
||||
{
|
||||
filename = "usr";
|
||||
device = "/dev/by-name/extend";
|
||||
installed-directly = true;
|
||||
}
|
||||
);
|
||||
/* change sw_mode to upgrade_usr,change boot_partition to boot */
|
||||
bootenv: (
|
||||
{
|
||||
name = "swu_mode";
|
||||
value = "upgrade_usr";
|
||||
},
|
||||
{
|
||||
name = "boot_partition";
|
||||
value = "boot";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/* upgrade usr ==> clean ==> reboot */
|
||||
upgrade_usr = {
|
||||
/* upgrade usr */
|
||||
|
||||
/* clean swu_param,swu_software,swu_mode & reboot */
|
||||
bootenv: (
|
||||
{
|
||||
name = "swu_param";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_software";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_mode";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_next";
|
||||
value = "reboot";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/* when not call with -e xxx,xxx just clean */
|
||||
bootenv: (
|
||||
{
|
||||
name = "swu_param";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_software";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_mode";
|
||||
value = "";
|
||||
},
|
||||
{
|
||||
name = "swu_version";
|
||||
value = "";
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
9
target/allwinner/v851s-fastboot_h13_pv/swupdate/sw-subimgs.cfg
Executable file
9
target/allwinner/v851s-fastboot_h13_pv/swupdate/sw-subimgs.cfg
Executable file
@@ -0,0 +1,9 @@
|
||||
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}/boot.img:kernel
|
||||
out/${TARGET_BOARD}/rootfs.img:rootfs
|
||||
out/${TARGET_BOARD}/usr.img:usr
|
||||
)
|
||||
52
target/allwinner/v851s-fastboot_h13_pv/tina_busybox-init-base-files.mk
Executable file
52
target/allwinner/v851s-fastboot_h13_pv/tina_busybox-init-base-files.mk
Executable file
@@ -0,0 +1,52 @@
|
||||
############################################################################################
|
||||
# v851s-fastboot busybox-init-base-files for tina(OpenWrt) Linux
|
||||
#
|
||||
# v851s-fastboot busybox-init-base-files will generate shell script according to some
|
||||
# environmental variables. so tina_busybox-init-base-files.mk is needed.
|
||||
#
|
||||
# Version: v1.0
|
||||
# Date : 2019-3-19
|
||||
# Author : PDC-PD5
|
||||
############################################################################################
|
||||
TARGET_DIR := $(CURDIR)/busybox-init-base-files
|
||||
HOOKS := $(CURDIR)/busybox-init-base-files_generate/rootfs_hook_squash.sh
|
||||
all:
|
||||
@echo ==================================================
|
||||
@echo target/allwinner/v851s-fastboot/tina_busybox-init-basefiles.mk is called to generate shell scripts
|
||||
@echo ==================================================
|
||||
(${HOOKS} ${TARGET_DIR} >/dev/null) || { \
|
||||
echo "Execute the ${HOOKS} is failed"; \
|
||||
exit 1; \
|
||||
}
|
||||
@echo generate shell scripts done!
|
||||
|
||||
clean:
|
||||
@echo ==================================================
|
||||
@echo target/allwinner/v851s-fastboot/tina_busybox-init-basefiles.mk is called to clean shell scripts
|
||||
@echo ==================================================
|
||||
# -rm -f ${TARGET_DIR}/etc/TZ
|
||||
# -rm -rf ${TARGET_DIR}/etc/cron.d
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S00appdriver
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S00kfc
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S00part
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S00mpp
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S01logging
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S10udev
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S11dev
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S20urandom
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S40network
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S41netparam
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S50telnet
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S50usb
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/S91vm
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/rcK
|
||||
# -rm -f ${TARGET_DIR}/etc/init.d/run_adbd
|
||||
# -rm -f ${TARGET_DIR}/etc/inittab
|
||||
# -rm -f ${TARGET_DIR}/etc/preinit
|
||||
# -rm -f ${TARGET_DIR}/etc/profile
|
||||
# -rm -rf ${TARGET_DIR}/etc/sysconfig
|
||||
# -rm -f ${TARGET_DIR}/etc/udhcpd.conf
|
||||
# -rm -f ${TARGET_DIR}/usr/bin/nfsmount
|
||||
# -rm -f ${TARGET_DIR}/usr/bin/run-cron
|
||||
# -rm -rf ${TARGET_DIR}/usr/share
|
||||
@echo clean shell scripts done!
|
||||
14
target/allwinner/v851s-fastboot_h13_pv/v851s_fastboot_h13_pv.mk
Executable file
14
target/allwinner/v851s-fastboot_h13_pv/v851s_fastboot_h13_pv.mk
Executable file
@@ -0,0 +1,14 @@
|
||||
$(call inherit-product-if-exists, target/allwinner/v851s-common/v851s-common.mk)
|
||||
|
||||
PRODUCT_PACKAGES +=
|
||||
|
||||
PRODUCT_COPY_FILES +=
|
||||
|
||||
PRODUCT_AAPT_CONFIG := large xlarge hdpi xhdpi
|
||||
PRODUCT_AAPT_PERF_CONFIG := xhdpi
|
||||
PRODUCT_CHARACTERISTICS := musicbox
|
||||
|
||||
PRODUCT_BRAND := allwinner
|
||||
PRODUCT_NAME := v851s_fastboot_h13_pv
|
||||
PRODUCT_DEVICE := v851s-fastboot_h13_pv
|
||||
PRODUCT_MODEL := Allwinner v851s fastboot h13_pv board
|
||||
145
target/allwinner/v851s-fastboot_h13_pv/v851s_fastboot_h13_pvk-setup.sh
Executable file
145
target/allwinner/v851s-fastboot_h13_pv/v851s_fastboot_h13_pvk-setup.sh
Executable file
@@ -0,0 +1,145 @@
|
||||
#
|
||||
# Copyright (C) 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# This file is executed by build/envsetup.sh, and can use anything
|
||||
# defined in envsetup.sh.
|
||||
#
|
||||
# In particular, you can add lunch options with the add_lunch_combo
|
||||
# function: add_lunch_combo generic-eng
|
||||
|
||||
function mkmpp
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make package/allwinner/eyesee-mpp/external/compile $@
|
||||
make package/allwinner/eyesee-mpp/system/public/compile $@
|
||||
make package/allwinner/eyesee-mpp/middleware/compile $@
|
||||
if [ "x$?" == "x0" ];then
|
||||
echo mpp_install
|
||||
make package/install $@
|
||||
else echo mpp_compile_failed,skip_install;
|
||||
fi
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
: <<'COMMENTBLOCK'
|
||||
function mkapp
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make package/allwinner/eyesee-mpp/framework/compile $@
|
||||
if [ "x$?" == "x0" ];then
|
||||
make package/allwinner/eyesee-mpp/custom_aw/compile $@
|
||||
if [ "x$?" == "x0" ];then
|
||||
make package/install $@
|
||||
else echo app_compile_filed;
|
||||
fi
|
||||
else echo frmw_compile_failed;
|
||||
fi
|
||||
|
||||
cd ${curDir}
|
||||
}
|
||||
COMMENTBLOCK
|
||||
|
||||
function mkall()
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make $@
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
function cleanmpp()
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make package/allwinner/eyesee-mpp/middleware/clean $@
|
||||
make package/allwinner/eyesee-mpp/system/public/clean $@
|
||||
make package/allwinner/eyesee-mpp/external/clean $@
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
function cleanapp
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make package/allwinner/eyesee-mpp/framework/clean $@
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
function cleanall()
|
||||
{
|
||||
local curDir=$(pwd)
|
||||
croot
|
||||
make package/clean
|
||||
make target/clean
|
||||
make distclean
|
||||
ckernel && rm -rf user_headers
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
|
||||
cmpp_p ()
|
||||
{
|
||||
local curDir=$(pwd);
|
||||
croot;
|
||||
cd package/allwinner/eyesee-mpp/middleware
|
||||
}
|
||||
|
||||
cmpp_s ()
|
||||
{
|
||||
croot;
|
||||
cd external/eyesee-mpp/middleware/sun8iw21
|
||||
}
|
||||
|
||||
cfw_p ()
|
||||
{
|
||||
croot;
|
||||
cd package/allwinner/eyesee-mpp/framework
|
||||
}
|
||||
|
||||
cfw_s ()
|
||||
{
|
||||
croot;
|
||||
cd external/eyesee-mpp/framework/sun8iw21
|
||||
}
|
||||
|
||||
cisp ()
|
||||
{
|
||||
cmpp_s;
|
||||
cd ./media/LIBRARY/libisp
|
||||
}
|
||||
|
||||
crtmedia_p ()
|
||||
{
|
||||
croot;
|
||||
cd package/allwinner/rt_media
|
||||
}
|
||||
|
||||
crtmedia_s ()
|
||||
{
|
||||
croot;
|
||||
cd external/fast-user-adapter/rt_media
|
||||
}
|
||||
|
||||
mkfrmw ()
|
||||
{
|
||||
local curDir=$(pwd);
|
||||
croot;
|
||||
make package/allwinner/eyesee-mpp/framework/compile $@;
|
||||
cd ${curDir}
|
||||
}
|
||||
|
||||
23
target/allwinner/v851s-fastboot_h13_pv/vendorsetup.sh
Executable file
23
target/allwinner/v851s-fastboot_h13_pv/vendorsetup.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (C) 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# This file is executed by build/envsetup.sh, and can use anything
|
||||
# defined in envsetup.sh.
|
||||
#
|
||||
# In particular, you can add lunch options with the add_lunch_combo
|
||||
# function: add_lunch_combo generic-eng
|
||||
|
||||
add_lunch_combo v851s_fastboot_h13_pv-tina
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
# CONFIG_TARGET_v851s_fastboot_h13_pv is not set
|
||||
# CONFIG_TARGET_v851s_fastboot_sl100_back is not set
|
||||
CONFIG_TARGET_v851s3_fastboot_sl100_front=y
|
||||
CONFIG_TARGET_v851s3_fastboot_sl100_front_=y
|
||||
@@ -1840,7 +1841,7 @@ CONFIG_BUSYBOX_CONFIG_CRONTAB=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_DEVFS is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FBSPLASH is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_LOCK is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_UNLOCK is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASHCP is not set
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
# CONFIG_TARGET_v851s_fastboot_h13_pv is not set
|
||||
# CONFIG_TARGET_v851s_fastboot_sl100_back is not set
|
||||
CONFIG_TARGET_v851s3_fastboot_sl100_front=y
|
||||
CONFIG_TARGET_v851s3_fastboot_sl100_front_=y
|
||||
@@ -1839,7 +1840,7 @@ CONFIG_BUSYBOX_CONFIG_CRONTAB=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_DEVFS is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FBSPLASH is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_LOCK is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASH_UNLOCK is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FLASHCP is not set
|
||||
|
||||
Reference in New Issue
Block a user