add(system): Add new borad H13_PV.
This commit is contained in:
parent
461754dd60
commit
af06caa161
|
@ -24,6 +24,7 @@ declare -A board_name_map=(
|
|||
["v851s_fastboot_sc1725v01_nor"]="v851-e907-sc1725v01-board"
|
||||
["v851s_fastboot_sl100_back"]="v851-e907-sl100_back-board"
|
||||
["v851s3_fastboot_sl100_front"]="v851s3-e907-sl100-front-board"
|
||||
["v851s_fastboot_h13_pv"]="v851s3-e907-h13-pv-board"
|
||||
)
|
||||
|
||||
function get_melis_board_name() {
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
LICHEE_CHIP:=sun8iw21p1
|
||||
LICHEE_PRODUCT:=
|
||||
LICHEE_BOARD:=
|
||||
LICHEE_FLASH:=
|
||||
LICHEE_ARCH:=arm
|
||||
LICHEE_BRANDY_VER:=2.0
|
||||
LICHEE_BRANDY_DEFCONF:=sun8iw21p1_fastboot_defconfig
|
||||
LICHEE_BRANDY_SPL:=spl
|
||||
LICHEE_KERN_VER:=4.9
|
||||
LICHEE_KERN_DEFCONF:=sun8iw21p1smp_defconfig
|
||||
LICHEE_BUILDING_SYSTEM:=
|
||||
LICHEE_BR_VER:=
|
||||
LICHEE_BR_DEFCONF:=
|
||||
LICHEE_COMPILER_TAR:=gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz
|
||||
LICHEE_ROOTFS:=target-arm-fast-linaro-5.3.tar.bz2
|
||||
LICHEE_COMPRESS:=gzip
|
|
@ -0,0 +1,17 @@
|
|||
LICHEE_CHIP:=sun8iw21p1
|
||||
LICHEE_PRODUCT:=
|
||||
LICHEE_BOARD:=
|
||||
LICHEE_ARCH:=arm
|
||||
LICHEE_FLASH:=nor
|
||||
LICHEE_BRANDY_VER:=2.0
|
||||
LICHEE_BRANDY_DEFCONF:=sun8iw21p1_fastboot_defconfig
|
||||
LICHEE_BRANDY_SPL:=spl
|
||||
LICHEE_KERN_VER:=4.9
|
||||
LICHEE_KERN_DEFCONF:=config-4.9
|
||||
LICHEE_BUILDING_SYSTEM:=
|
||||
LICHEE_BR_VER:=
|
||||
LICHEE_BR_DEFCONF:=
|
||||
LICHEE_COMPILER_TAR:=gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz
|
||||
LICHEE_ROOTFS:=target-arm-fast-linaro-5.3.tar.bz2
|
||||
LICHEE_COMPRESS:=gzip
|
||||
LICHEE_REDUNDANT_ENV_SIZE:=0x1000
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
;item=Item_TOC_name, Item_filename,
|
||||
;item=scp, scp.fex
|
||||
;item=optee, optee.fex
|
||||
;item=u-boot, u-boot.fex
|
||||
item=dtb, sunxi.fex
|
||||
;item=logo, bootlogo.bmp.lzma
|
||||
;item=shutdowncharge, bempty.bmp.lzma
|
||||
;item=androidcharge, battery_charge.bmp.lzma
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
;item=Item_TOC_name, Item_filename,
|
||||
;item=scp, scp.fex
|
||||
;item=optee, optee.fex
|
||||
;item=u-boot, u-boot-spinor.fex
|
||||
item=dtb, sunxi.fex
|
||||
item=melis-elf, riscv.fex
|
||||
;item=logo, bootlogo.bmp.lzma
|
||||
;item=shutdowncharge, bempty.bmp.lzma
|
||||
;item=androidcharge, battery_charge.bmp.lzma
|
Binary file not shown.
After Width: | Height: | Size: 300 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
root_partition=rootfs
|
||||
boot_partition=boot
|
||||
extend_partition=extend
|
|
@ -0,0 +1,97 @@
|
|||
;/**************************************************************************/
|
||||
;2010-06-09
|
||||
;Sam
|
||||
;image
|
||||
;/**************************************************************************/
|
||||
|
||||
|
||||
[MAIN_TYPE]
|
||||
ITEM_COMMON = "COMMON "
|
||||
ITEM_INFO = "INFO "
|
||||
ITEM_BOOTROM = "BOOTROM "
|
||||
ITEM_FES = "FES "
|
||||
ITEM_FET = "FET "
|
||||
ITEM_FED = "FED "
|
||||
ITEM_FEX = "FEX "
|
||||
ITEM_BOOT = "BOOT "
|
||||
ITEM_ROOTFSFAT12 = "RFSFAT12"
|
||||
ITEM_ROOTFSFAT16 = "RFSFAT16"
|
||||
ITEM_ROOTFSFAT32 = "FFSFAT32"
|
||||
ITEM_USERFSFAT12 = "UFSFAT12"
|
||||
ITEM_USERFSFAT16 = "UFSFAT16"
|
||||
ITEM_USERFSFAT32 = "UFSFAT32"
|
||||
ITEM_PHOENIX_SCRIPT = "PXSCRIPT"
|
||||
ITEM_PHOENIX_TOOLS = "PXTOOLS "
|
||||
ITEM_AUDIO_DSP = "AUDIODSP"
|
||||
ITEM_VIDEO_DSP = "VIDEODSP"
|
||||
ITEM_FONT = "FONT "
|
||||
ITEM_FLASH_DRV = "FLASHDRV"
|
||||
ITEM_OS_CORE = "OS_CORE "
|
||||
ITEM_DRIVER = "DRIVER "
|
||||
ITEM_PIC = "PICTURE "
|
||||
ITEM_AUDIO = "AUDIO "
|
||||
ITEM_VIDEO = "VIDEO "
|
||||
ITEM_APPLICATION = "APP "
|
||||
|
||||
[SUB_TYPE]
|
||||
SUBTYPEdemo1 = "071228HWSXXXX100"
|
||||
;-->071228 2007-12-28
|
||||
;-->HWS hardware scan
|
||||
;-->100 version 1.00
|
||||
|
||||
|
||||
[DIR_DEF]
|
||||
INPUT_DIR = "..\\"
|
||||
|
||||
[FILELIST]
|
||||
;-->constant
|
||||
{filename = "sys_config.fex", maintype = ITEM_COMMON, subtype = "SYS_CONFIG100000",},
|
||||
{filename = "config.fex", maintype = ITEM_COMMON, subtype = "SYS_CONFIG_BIN00",},
|
||||
{filename = "split_xxxx.fex", maintype = ITEM_COMMON, subtype = "SPLIT_0000000000",},
|
||||
{filename = "sys_partition.fex",maintype = ITEM_COMMON, subtype = "SYS_CONFIG000000",},
|
||||
{filename = "sunxi.fex", maintype = ITEM_COMMON, subtype = "DTB_CONFIG000000",},
|
||||
|
||||
;-->boot files
|
||||
{filename = "boot0_sdcard.fex", maintype = "12345678", subtype = "1234567890BOOT_0",},
|
||||
{filename = "boot0_spinor.fex", maintype = "12345678", subtype = "1234567890BNOR_0",},
|
||||
{filename = "u-boot.fex", maintype = "12345678", subtype = "UBOOT_0000000000",},
|
||||
{filename = "u-boot-crash.fex", maintype = "12345678", subtype = "UBOOT_CRASH_0000",},
|
||||
{filename = "toc1.fex", maintype = "12345678", subtype = "TOC1_00000000000",},
|
||||
{filename = "toc0.fex", maintype = "12345678", subtype = "TOC0_00000000000",},
|
||||
{filename = "fes1.fex", maintype = ITEM_FES, subtype = "FES_1-0000000000",},
|
||||
{filename = "boot_package.fex", maintype = "12345678", subtype = "BOOTPKG-00000000",},
|
||||
{filename = "boot_package_nor.fex", maintype = "12345678", subtype = "BOOTPKG-NOR00000",},
|
||||
{filename = "fastbootpkg_cardproduct.fex", maintype = "12345678",subtype = "BOOTPKG-CARDPROD",},
|
||||
|
||||
;-------------------------------usb download part-------------------------------------;
|
||||
;-->usb tools
|
||||
{filename = "usbtool.fex", maintype = "PXTOOLSB", subtype = "xxxxxxxxxxxxxxxx",},
|
||||
{filename = "usbtool_crash.fex",maintype = "PXTOOLCH", subtype = "xxxxxxxxxxxxxxxx",},
|
||||
{filename = "aultools.fex", maintype = "UPFLYTLS", subtype = "xxxxxxxxxxxxxxxx",},
|
||||
{filename = "aultls32.fex", maintype = "UPFLTL32", subtype = "xxxxxxxxxxxxxxxx",},
|
||||
|
||||
;-------------------------------card download part----------------------------------------;
|
||||
;-->card tools
|
||||
{filename = "cardtool.fex", maintype = "12345678", subtype = "1234567890cardtl",},
|
||||
{filename = "cardscript.fex", maintype = "12345678", subtype = "1234567890script",},
|
||||
|
||||
;-->other
|
||||
{filename = "sunxi_gpt.fex", maintype = "12345678", subtype = "1234567890___GPT",},
|
||||
{filename = "sunxi_mbr_nor.fex", maintype = "12345678", subtype = "1234567890___MBR",},
|
||||
{filename = "dlinfo.fex", maintype = "12345678", subtype = "1234567890DLINFO",},
|
||||
{filename = "arisc.fex", maintype = "12345678", subtype = "1234567890ARISC" ,},
|
||||
|
||||
|
||||
[IMAGE_CFG]
|
||||
version = 0x100234
|
||||
pid = 0x00001234
|
||||
vid = 0x00008743
|
||||
hardwareid = 0x100
|
||||
firmwareid = 0x100
|
||||
bootromconfig = "bootrom_071203_00001234.cfg"
|
||||
rootfsconfig = "rootfs.cfg"
|
||||
;;imagename = "ePDKv100_nand.img"
|
||||
filelist = FILELIST
|
||||
imagename = ..\sun4i_test_evb.img
|
||||
encrypt = 0
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
;---------------------------------------------------------------------------------------------------------
|
||||
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
|
||||
;---------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------------------------------------------------
|
||||
; 固件下载参数配置
|
||||
;--------------------------------------------------------------------------------------------------
|
||||
;****************************************************
|
||||
; mbr的大小, 以Kbyte为单位
|
||||
;****************************************************
|
||||
[mbr]
|
||||
size = 4096
|
||||
|
||||
;********************************************************************************************************
|
||||
; 分区配置
|
||||
;
|
||||
;
|
||||
; partition 定义范例:
|
||||
; [partition] ; //表示是一个分区
|
||||
; name = USERFS2 ; //分区名称
|
||||
; size = 16384 ; //分区大小 单位: 扇区.分区表示个数最多2^31 * 512 = 2T
|
||||
; downloadfile = "123.fex" ; //下载文件的路径和名称,可以使用相对路径,相对是指相对于image.cfg文件所在分区。也可以使用绝对路径
|
||||
; keydata = 1 ; //私有数据分区,重新量产数据将不丢失
|
||||
; encrypt = 1 ; //采用加密方式烧录,将提供数据加密,但损失烧录速度
|
||||
; user_type = ? ; //私有用法
|
||||
; verify = 1 ; //要求量产完成后校验是否正确
|
||||
;
|
||||
; 注:1、name唯一, 不允许同名
|
||||
; 2、name最大12个字符
|
||||
; 3、size = 0, 将创建一个无大小的空分区
|
||||
; 4、为了安全和效率考虑,分区大小最好保证为16M字节的整数倍
|
||||
;********************************************************************************************************
|
||||
[partition_start]
|
||||
|
||||
[partition]
|
||||
name = boot-res
|
||||
size = 1024
|
||||
downloadfile = "boot-resource.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = env
|
||||
size = 512
|
||||
downloadfile = "env.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = boot
|
||||
;size = 4096
|
||||
size = 12288
|
||||
downloadfile = "boot.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs
|
||||
size = 18432
|
||||
downloadfile = "rootfs.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs_data
|
||||
size = 102400
|
||||
user_type = 0x8000
|
||||
|
||||
;[partition]
|
||||
; name = recovery
|
||||
; size = 12288
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = misc
|
||||
; size = 512
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = private
|
||||
; size = 512
|
||||
; user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = UDISK
|
||||
user_type = 0x8100
|
|
@ -0,0 +1,130 @@
|
|||
;---------------------------------------------------------------------------------------------------------
|
||||
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
|
||||
;---------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------------------------------------------------
|
||||
; 固件下载参数配置
|
||||
;--------------------------------------------------------------------------------------------------
|
||||
;****************************************************
|
||||
; mbr的大小, 以Kbyte为单位
|
||||
;****************************************************
|
||||
[mbr]
|
||||
size = 16
|
||||
|
||||
;********************************************************************************************************
|
||||
; 分区配置
|
||||
;
|
||||
;
|
||||
; partition 定义范例:
|
||||
; [partition] ; //表示是一个分区
|
||||
; name = USERFS2 ; //分区名称
|
||||
; size = 16384 ; //分区大小 单位: 扇区.分区表示个数最多2^31 * 512 = 2T
|
||||
; downloadfile = "123.fex" ; //下载文件的路径和名称,可以使用相对路径,相对是指相对于image.cfg文件所在分区。也可以使用绝对路径
|
||||
; keydata = 1 ; //私有数据分区,重新量产数据将不丢失
|
||||
; encrypt = 1 ; //采用加密方式烧录,将提供数据加密,但损失烧录速度
|
||||
; user_type = ? ; //私有用法
|
||||
; verify = 1 ; //要求量产完成后校验是否正确
|
||||
;
|
||||
; 注:1、name唯一, 不允许同名
|
||||
; 2、name最大12个字符
|
||||
; 3、size = 0, 将创建一个无大小的空分区
|
||||
; 4、为了安全和效率考虑,分区大小最好保证为16M字节的整数倍
|
||||
;********************************************************************************************************
|
||||
[partition_start]
|
||||
|
||||
[partition]
|
||||
name = env
|
||||
size = 128
|
||||
downloadfile = "env.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = env-redund
|
||||
size = 128
|
||||
downloadfile = "env.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = boot
|
||||
size = 6016
|
||||
downloadfile = "boot.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs
|
||||
size = 4608
|
||||
downloadfile = "rootfs.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = extend
|
||||
size = 11520
|
||||
downloadfile = "usr.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
;[partition]
|
||||
; name = recovery
|
||||
; size = 6400
|
||||
; downloadfile = "recovery.fex"
|
||||
; user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs_data
|
||||
size = 1024
|
||||
user_type = 0x8000
|
||||
|
||||
|
||||
;[partition]
|
||||
; name = env
|
||||
; size = 128
|
||||
; downloadfile = "env.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = boot
|
||||
; size = 5760
|
||||
; downloadfile = "boot.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = boot_backup
|
||||
; size = 5760
|
||||
; downloadfile = "boot.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = rootfs
|
||||
; size = 5120
|
||||
; downloadfile = "rootfs.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = rootfs_backup
|
||||
; size = 5120
|
||||
; downloadfile = "rootfs.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = extend
|
||||
; size = 13056
|
||||
; downloadfile = "usr.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = extend_backup
|
||||
; size = 13056
|
||||
; downloadfile = "usr.fex"
|
||||
; user_type = 0x8000
|
||||
;
|
||||
;;[partition]
|
||||
;; name = recovery
|
||||
;; size = 6400
|
||||
;; downloadfile = "recovery.fex"
|
||||
;; user_type = 0x8000
|
||||
;
|
||||
;[partition]
|
||||
; name = rootfs_data
|
||||
; size = 1024
|
||||
; user_type = 0x8000
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
;---------------------------------------------------------------------------------------------------------
|
||||
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
|
||||
; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态>
|
||||
;---------------------------------------------------------------------------------------------------------
|
||||
|
||||
[product]
|
||||
version = "100"
|
||||
machine = "evb"
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
; system configuration
|
||||
; ?
|
||||
;dcdc1_vol ---set dcdc1 voltage,mV,1600-3400,100mV/step
|
||||
;dcdc2_vol ---set dcdc2 voltage,mV,600-1540,20mV/step
|
||||
;dcdc3_vol ---set dcdc3 voltage,mV,600-1860,20mV/step
|
||||
;dcdc4_vol ---set dcdc4 voltage,mV,600-1540,20mV/step
|
||||
;dcdc5_vol ---set dcdc5 voltage,mV,1000-2550,50mV/step
|
||||
;aldo2_vol ---set aldo2 voltage,mV,700-3300,100mV/step
|
||||
;aldo3_vol ---set aldo3 voltage,mV,700-3300,100mV/step
|
||||
;----------------------------------------------------------------------------------
|
||||
[power_sply]
|
||||
dcdc1_vol = 3000
|
||||
dcdc2_vol = 1200
|
||||
dcdc3_vol = 1200
|
||||
dcdc4_vol = 1200
|
||||
dcdc5_vol = 1500
|
||||
aldo2_vol = 1800
|
||||
aldo3_vol = 3000
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
; 7-6 bit 5-0 bit
|
||||
;power_mode = grain_size|vol 设置系统电压,=0则不设置,范围900~1200mV
|
||||
;grain_size = 电压粒度 0:10mV 1:20mV 2:50mV 3:100mV
|
||||
;vol = 电压系数 =0则不设置
|
||||
;grain_size=0电压公式:sys_vol = 500mV + vol * 10mV
|
||||
;grain_size=1电压公式:sys_vol = 500mV + vol * 20mV
|
||||
;grain_size=2电压公式:sys_vol = 500mV + vol * 50mV
|
||||
;grain_size=3电压公式:sys_vol = 500mV + vol * 100mV
|
||||
;----------------------------------------------------------------------------------
|
||||
[target]
|
||||
storage_type = 3
|
||||
nand_use_ubi = 1
|
||||
power_mode = 0
|
||||
|
||||
[platform]
|
||||
debug_mode = 0
|
||||
|
||||
[card_boot]
|
||||
logical_start = 40960
|
||||
sprite_gpio0 =
|
||||
|
||||
[card0_boot_para]
|
||||
card_ctrl = 0
|
||||
card_high_speed = 1
|
||||
card_line = 4
|
||||
sdc_d1 = port:PF0<2><1><default><default>
|
||||
sdc_d0 = port:PF1<2><1><default><default>
|
||||
sdc_clk = port:PF2<2><1><default><default>
|
||||
sdc_cmd = port:PF3<2><1><default><default>
|
||||
sdc_d3 = port:PF4<2><1><default><default>
|
||||
sdc_d2 = port:PF5<2><1><default><default>
|
||||
|
||||
[card2_boot_para]
|
||||
card_ctrl = 2
|
||||
card_high_speed = 1
|
||||
card_line = 8
|
||||
sdc_clk = port:PC0<3><1><3><default>
|
||||
sdc_cmd = port:PC1<3><1><3><default>
|
||||
sdc_d0 = port:PC2<3><1><3><default>
|
||||
sdc_d1 = port:PC3<3><1><3><default>
|
||||
sdc_d2 = port:PC4<3><1><3><default>
|
||||
sdc_d3 = port:PC5<3><1><3><default>
|
||||
sdc_d4 = port:PC6<3><1><3><default>
|
||||
sdc_d5 = port:PC7<3><1><3><default>
|
||||
sdc_d6 = port:PC8<3><1><3><default>
|
||||
sdc_d7 = port:PC9<3><1><3><default>
|
||||
sdc_emmc_rst = port:PC11<3><1><3><default>
|
||||
sdc_ds = port:PC10<3><2><3><default>
|
||||
|
||||
[spinor_para]
|
||||
;read_mode =4
|
||||
;flash_size =16
|
||||
;delay_cycle =1
|
||||
;frequency =100000000
|
||||
|
||||
spi_sclk = port:PC00<4><0><2><default>
|
||||
spi_cs = port:PC01<4><1><2><default>
|
||||
spi0_mosi = port:PC02<4><0><2><default>
|
||||
spi0_miso = port:PC03<4><0><2><default>
|
||||
spi0_wp = port:PC04<4><0><2><default>
|
||||
spi0_hold = port:PC05<4><0><2><default>
|
||||
|
||||
[twi_para]
|
||||
twi_used = 1
|
||||
twi_port = 4
|
||||
twi_scl = port:PI01<6><1><default><default>
|
||||
twi_sda = port:PI02<6><1><default><default>
|
||||
|
||||
[uart_para]
|
||||
uart_debug_port = 0
|
||||
uart_debug_tx = port:PH09<5><1><default><default>
|
||||
uart_debug_rx = port:PH10<5><1><default><default>
|
||||
|
||||
[jtag_para]
|
||||
jtag_enable = 0
|
||||
jtag_ms = port:PH9<3><default><default><default>
|
||||
jtag_ck = port:PH10<3><default><default><default>
|
||||
jtag_do = port:PH11<3><default><default><default>
|
||||
jtag_di = port:PH12<3><default><default><default>
|
||||
|
||||
;*****************************************************************************
|
||||
;sdram configuration
|
||||
;
|
||||
;*****************************************************************************
|
||||
[dram_para]
|
||||
|
||||
dram_clk = 533
|
||||
dram_type = 2
|
||||
dram_zq = 0x7b7bf9
|
||||
dram_odt_en = 0x0
|
||||
dram_para1 = 0x00d2
|
||||
dram_para2 = 0x0
|
||||
dram_mr0 = 0xe73
|
||||
dram_mr1 = 0x02
|
||||
dram_mr2 = 0x0
|
||||
dram_mr3 = 0x0
|
||||
dram_tpr0 = 0x00471992
|
||||
dram_tpr1 = 0x0131a10c
|
||||
dram_tpr2 = 0x00057041
|
||||
dram_tpr3 = 0xb4787896
|
||||
dram_tpr4 = 0x0
|
||||
dram_tpr5 = 0x48484848
|
||||
dram_tpr6 = 0x48
|
||||
dram_tpr7 = 0x1621121e
|
||||
dram_tpr8 = 0x0
|
||||
dram_tpr9 = 0x0
|
||||
dram_tpr10 = 0x00000000
|
||||
dram_tpr11 = 0x00000022
|
||||
dram_tpr12 = 0x00000077
|
||||
dram_tpr13 = 0x34000100
|
||||
|
||||
|
|
@ -0,0 +1,717 @@
|
|||
/*
|
||||
* Allwinner Technology CO., Ltd. sun8iw19p1 soc board.
|
||||
*
|
||||
* soc board support.
|
||||
*/
|
||||
|
||||
/{
|
||||
model = "sun8iw21";
|
||||
compatible = "allwinner,v851", "arm,sun8iw21p1";
|
||||
|
||||
reg_usb0_vbus: usb0-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
gpio = <&pio PH 2 1 2 0 1>;
|
||||
regulator-name = "usb0-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
firmware {
|
||||
optee {
|
||||
shm_base = <0x418E0000>;
|
||||
shm_size = <0x00020000>;
|
||||
ta_ram_base = <0x41a00000>;
|
||||
ta_ram_size = <0x00100000>;
|
||||
};
|
||||
};
|
||||
|
||||
box_start_os0 {
|
||||
compatible = "allwinner,box_start_os";
|
||||
start_type = <0x1>;
|
||||
irkey_used = <0x0>;
|
||||
pmukey_used = <0x0>;
|
||||
pmukey_num = <0x0>;
|
||||
led_power = <0x0>;
|
||||
led_state = <0x0>;
|
||||
pinctrl-0 = <&standby_blue>;
|
||||
pinctrl-1 = <&standby_red>;
|
||||
};
|
||||
gpu: gpu@1800000 {
|
||||
gpu_idle = <1>;
|
||||
dvfs_status = <1>;
|
||||
operating-points = <
|
||||
/* KHz uV */
|
||||
600000 950000
|
||||
576000 950000
|
||||
540000 950000
|
||||
504000 950000
|
||||
456000 950000
|
||||
420000 950000
|
||||
384000 950000
|
||||
360000 950000
|
||||
336000 950000
|
||||
306000 950000
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&power_sply {
|
||||
dcdc1_vol = <1003300>;
|
||||
dcdc2_vol = <1000900>;
|
||||
dcdc5_vol = <1200>;
|
||||
aldo1_vol = <1001800>;
|
||||
aldo2_vol = <1001800>;
|
||||
aldo3_vol = <1003300>;
|
||||
aldo4_vol = <1003300>;
|
||||
bldo1_vol = <1001800>;
|
||||
bldo2_vol = <1002800>;
|
||||
dldo1_vol = <1003300>;
|
||||
dldo2_vol = <1001200>;
|
||||
};
|
||||
|
||||
&charger0 {
|
||||
pmu_safe_vol = <3500>;
|
||||
};
|
||||
|
||||
&gpio_bias { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
|
||||
device_type = "gpio_bias";
|
||||
pc_bias = <1800>;
|
||||
pi_bias = <1800>;
|
||||
};
|
||||
|
||||
|
||||
&aliases {
|
||||
disp = &disp;
|
||||
lcd0=&lcd0;
|
||||
spi0 = &spi0;
|
||||
spif = &spif;
|
||||
twi4=&twi4;
|
||||
pwm = &pwm;
|
||||
pwm0 = &pwm0;
|
||||
pwm1 = &pwm1;
|
||||
pwm2 = &pwm2;
|
||||
pwm3 = &pwm3;
|
||||
pwm4 = &pwm4;
|
||||
pwm5 = &pwm5;
|
||||
pwm6 = &pwm6;
|
||||
pwm7 = &pwm7;
|
||||
pwm8 = &pwm8;
|
||||
pwm9 = &pwm9;
|
||||
pwm10 = &pwm10;
|
||||
pwm11 = &pwm11;
|
||||
};
|
||||
|
||||
&platform {
|
||||
eraseflag = <1>;
|
||||
debug_mode = <4>;
|
||||
};
|
||||
|
||||
&target {
|
||||
boot_clock = <900>; /*CPU boot frequency, Unit: MHz*/
|
||||
burn_key = <0>;
|
||||
};
|
||||
|
||||
&r_pio{
|
||||
|
||||
s_twi0_pins_a: s_twi0@0 {
|
||||
allwinner,pins = "PL0", "PL1";
|
||||
allwinner,pname = "s_twi0_scl", "s_twi0_sda";
|
||||
allwinner,function = "s_twi0";
|
||||
allwinner,muxsel = <3>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
s_twi0_pins_b: s_twi0@1 {
|
||||
allwinner,pins = "PL0", "PL1";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&pio{
|
||||
spi0_pins_a: spi0@0 {
|
||||
allwinner,pins = "PC0", "PC2", "PC3";
|
||||
allwinner,pname = "spi0_sclk", "spi0_mosi", "spi0_miso";
|
||||
allwinner,function = "spi0";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
spi0_pins_b: spi0@1 {
|
||||
allwinner,pins = "PC1", "PC5", "PC4";
|
||||
allwinner,pname = "spi0_cs0", "spi0_hold", "spi0_wp";
|
||||
allwinner,function = "spi0";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>; // only CS should be pulled up
|
||||
};
|
||||
|
||||
spi0_pins_c: spi0@2 {
|
||||
allwinner,pins = "PC0", "PC1", "PC2", "PC3", "PC4", "PC5";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
spi1_pins_a: spi1@0 {
|
||||
allwinner,pins = "PH6", "PH7", "PH8";
|
||||
allwinner,pname = "spi1_sclk", "spi1_mosi", "spi1_miso";
|
||||
allwinner,function = "spi1";
|
||||
};
|
||||
|
||||
spi1_pins_b: spi1@1 {
|
||||
allwinner,pins = "PH5", "PH9";
|
||||
allwinner,pname = "spi1_cs0", "spi1_cs1";
|
||||
allwinner,function = "spi1";
|
||||
};
|
||||
|
||||
spi1_pins_c: spi1@2 {
|
||||
allwinner,pins = "PH5", "PH6", "PH7", "PH8", "PH9";
|
||||
allwinner,function = "io_disabled";
|
||||
};
|
||||
|
||||
spif_pins_a: spif@0 {
|
||||
allwinner,pins = "PC0", "PC2", "PC3",
|
||||
"PC6", "PC7", "PC8",
|
||||
"PC9", "PC10";
|
||||
allwinner,pname = "spif_clk", "spif_mosi", "spif_miso",
|
||||
"spif_io4", "spif_io5", "spif_io6",
|
||||
"spif_io7", "spif_io8";
|
||||
allwinner,function = "spif";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
spif_pins_b: spif@1 {
|
||||
allwinner,pins = "PC1", "PC4", "PC5";
|
||||
allwinner,pname = "spif_cs0", "spif_wp", "spif_hold";
|
||||
allwinner,function = "spif";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>; // only CS should be pulled up
|
||||
};
|
||||
|
||||
spif_pins_c: spif@2 {
|
||||
allwinner,pins = "PC0", "PC1", "PC2", "PC3", "PC4",
|
||||
"PC5", "PC6", "PC7", "PC8", "PC9", "PC10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,muxsel = <0xf>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi0_pins_a: twi0@0 {
|
||||
allwinner,pins = "PA0", "PA1";
|
||||
allwinner,pname = "twi0_scl", "twi0_sda";
|
||||
allwinner,function = "twi0";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi0_pins_b: twi0@1 {
|
||||
allwinner,pins = "PA0", "PA1";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi1_pins_a: twi1@0 {
|
||||
allwinner,pins = "PA2", "PA3";
|
||||
allwinner,pname = "twi1_scl", "twi1_sda";
|
||||
allwinner,function = "twi1";
|
||||
allwinner,muxsel = <4>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi1_pins_b: twi1@1 {
|
||||
allwinner,pins = "PA2", "PA3";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi2_pins_a: twi2@0 {
|
||||
allwinner,pins = "PE20", "PE21";
|
||||
allwinner,pname = "twi2_scl", "twi2_sda";
|
||||
allwinner,function = "twi2";
|
||||
allwinner,muxsel = <5>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi2_pins_b: twi2@1 {
|
||||
allwinner,pins = "PE20", "PE21";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi3_pins_a: twi3@0 {
|
||||
allwinner,pins = "PA10", "PA11";
|
||||
allwinner,pname = "twi3_scl", "twi3_sda";
|
||||
allwinner,function = "twi3";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
twi3_pins_b: twi3@1 {
|
||||
allwinner,pins = "PA10", "PA11";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
twi4_pins_a: twi4@0 {
|
||||
allwinner,pins = "PI01", "PI02";
|
||||
allwinner,pname = "twi4_scl", "twi4_sda";
|
||||
allwinner,function = "twi4";
|
||||
allwinner,muxsel = <6>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
twi4_pins_b: twi4@1 {
|
||||
allwinner,pins = "PI01", "PI02";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <0>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
sdc0_pins_a: sdc0@0 {
|
||||
allwinner,pins = "PF0", "PF1", "PF2",
|
||||
"PF3", "PF4", "PF5";
|
||||
allwinner,function = "sdc0";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <3>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
sdc1_pins_a: sdc1@0 {
|
||||
allwinner,pins = "PG0", "PG1", "PG2",
|
||||
"PG3", "PG4", "PG5";
|
||||
allwinner,function = "sdc1";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <3>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
sdc2_pins_a: sdc2@0 {
|
||||
allwinner,pins = "PC0", "PC1", "PC2",
|
||||
"PC3", "PC4", "PC5", "PC6",
|
||||
"PC7", "PC8", "PC9", "PC11";
|
||||
allwinner,function = "sdc2";
|
||||
allwinner,muxsel = <3>;
|
||||
allwinner,drive = <2>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
sdc2_pins_b: sdc2@1 {
|
||||
allwinner,pins = "PC0", "PC1", "PC2",
|
||||
"PC3", "PC4", "PC5", "PC6",
|
||||
"PC7", "PC8", "PC9", "PC10", "PC11";
|
||||
allwinner,function = "io_disabled";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <1>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
sdc2_pins_c: sdc2@2 {
|
||||
allwinner,pins = "PC10";
|
||||
allwinner,function = "sdc2";
|
||||
allwinner,muxsel = <3>;
|
||||
allwinner,drive = <2>;
|
||||
allwinner,pull = <2>;
|
||||
};
|
||||
|
||||
pwm6_pin_a: pwm6@0 {
|
||||
pins = "PD7";
|
||||
function = "pwm6";
|
||||
muxsel = <3>;
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pwm6_pin_b: pwm6@1 {
|
||||
pins = "PD7";
|
||||
function = "gpio_in";
|
||||
muxsel = <0>;
|
||||
};
|
||||
|
||||
pwm8_pin_a: pwm8@0 {
|
||||
pins = "PH8";
|
||||
function = "pwm8";
|
||||
muxsel = <2>;
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pwm8_pin_b: pwm8@1 {
|
||||
pins = "PH8";
|
||||
function = "gpio_in";
|
||||
muxsel = <0>;
|
||||
};
|
||||
|
||||
pwm9_pin_a: pwm9@0 {
|
||||
pins = "PD22";
|
||||
function = "pwm9";
|
||||
muxsel = <2>;
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pwm9_pin_b: pwm9@1 {
|
||||
pins = "PD22";
|
||||
function = "gpio_in";
|
||||
muxsel = <0>;
|
||||
};
|
||||
|
||||
standby_red: standby@0 {
|
||||
allwinner,pins = "PH6";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,muxsel = <1>;
|
||||
allwinner,data = <1>;
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
standby_blue: standby@1 {
|
||||
allwinner,pins = "PH7";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,muxsel = <1>;
|
||||
allwinner,data = <0>;
|
||||
allwinner,drive = <2>;
|
||||
allwinner,pull = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&twi4 {
|
||||
clock-frequency = <200000>;
|
||||
pinctrl-0 = <&twi4_pins_a>;
|
||||
pinctrl-1 = <&twi4_pins_b>;
|
||||
no_suspend = <1>;
|
||||
twi_drv_used = <1>;
|
||||
status = "okay";
|
||||
pmu0: pmu@34 {
|
||||
compatible = "x-powers,axp2101";
|
||||
status = "okay";
|
||||
/* interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
* interrupt-parent = <&gic>; */
|
||||
x-powers,drive-vbus-en;
|
||||
|
||||
wakeup-source;
|
||||
|
||||
regulator0: regulators@0 {
|
||||
reg_dcdc1: dcdc1 {
|
||||
regulator-name = "axp2101-dcdc1";
|
||||
};
|
||||
reg_dcdc2: dcdc2 {
|
||||
regulator-name = "axp2101-dcdc2";
|
||||
};
|
||||
reg_dcdc3: dcdc3 {
|
||||
regulator-name = "axp2101-dcdc3";
|
||||
};
|
||||
reg_dcdc4: dcdc4 {
|
||||
regulator-name = "axp2101-dcdc4";
|
||||
};
|
||||
reg_dcdc5: dcdc5 {
|
||||
regulator-name = "axp2101-dcdc5";
|
||||
};
|
||||
reg_dc4ldo2:dc4ldo2 {
|
||||
regulator-name = "axp2101-dc4ldo2";
|
||||
};
|
||||
reg_dldo1: dldo1 {
|
||||
regulator-name = "axp2101-dldo1";
|
||||
};
|
||||
reg_dldo2: dldo2 {
|
||||
regulator-name = "axp2101-dldo2";
|
||||
};
|
||||
reg_aldo1: aldo1 {
|
||||
regulator-name = "axp2101-aldo1";
|
||||
};
|
||||
reg_aldo2: aldo2 {
|
||||
regulator-name = "axp2101-aldo2";
|
||||
};
|
||||
reg_aldo3: aldo3 {
|
||||
regulator-name = "axp2101-aldo3";
|
||||
};
|
||||
reg_aldo4: aldo4 {
|
||||
regulator-name = "axp2101-aldo4";
|
||||
};
|
||||
reg_bldo1: bldo1 {
|
||||
regulator-name = "axp2101-bldo1";
|
||||
};
|
||||
reg_bldo2: bldo2 {
|
||||
regulator-name = "axp2101-bldo2";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm6 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm6_pin_a>;
|
||||
pinctrl-1 = <&pwm6_pin_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm8 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm8_pin_a>;
|
||||
pinctrl-1 = <&pwm8_pin_b>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pwm9 {
|
||||
pinctrl-names = "active", "sleep";
|
||||
pinctrl-0 = <&pwm9_pin_a>;
|
||||
pinctrl-1 = <&pwm9_pin_b>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
clock-frequency = <100000000>;
|
||||
pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
|
||||
pinctrl-1 = <&spi0_pins_c>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
spi_slave_mode = <0>;
|
||||
spi_dbi_enable = <0>;
|
||||
spi0_cs_number = <1>;
|
||||
status = "disabled";
|
||||
|
||||
spi_board0 {
|
||||
device_type = "spi_board0";
|
||||
compatible = "spi-nor";
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read = <1>;
|
||||
/*individual_lock;*/
|
||||
reg = <0x0>;
|
||||
spi-rx-bus-width=<0x04>;
|
||||
spi-tx-bus-width=<0x04>;
|
||||
status="disabled";
|
||||
};
|
||||
|
||||
spi-nand@0 {
|
||||
compatible = "spi-nand";
|
||||
spi-max-frequency=<0x05F5E100>;
|
||||
reg = <0x0>;
|
||||
spi-rx-bus-width=<0x01>;
|
||||
spi-tx-bus-width=<0x01>;
|
||||
status="disabled";
|
||||
};
|
||||
};
|
||||
|
||||
&spif {
|
||||
clock-frequency = <100000000>;
|
||||
pinctrl-0 = <&spif_pins_a &spif_pins_b>;
|
||||
pinctrl-1 = <&spif_pins_c>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
/*spi-supply = <®_dcdc1>;*/
|
||||
status = "disabled";
|
||||
|
||||
spif-nor {
|
||||
device_type = "spi_board0";
|
||||
compatible = "spi-nor";
|
||||
spif-max-frequency = <100000000>;
|
||||
m25p,fast-read = <1>;
|
||||
/*individual_lock;*/
|
||||
reg = <0x0>;
|
||||
spif-rx-bus-width=<0x04>;
|
||||
spif-tx-bus-width=<0x04>;
|
||||
status="disabled";
|
||||
};
|
||||
};
|
||||
|
||||
&card_boot {
|
||||
sprite_gpio0 = <0x54 0x7 0x6 0x1 0xffffffff 0xffffffff 0x1>;
|
||||
};
|
||||
|
||||
&card0_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
|
||||
/* reg = <0x0 0x2 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
|
||||
device_type = "card0_boot_para";
|
||||
card_ctrl = <0x0>;
|
||||
card_high_speed = <0x1>;
|
||||
card_line = <0x4>;
|
||||
pinctrl-0 = <&sdc0_pins_a>;
|
||||
};
|
||||
|
||||
&card2_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
|
||||
/* reg = <0x0 0x3 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
|
||||
device_type = "card2_boot_para";
|
||||
card_ctrl = <0x2>;
|
||||
card_high_speed = <0x1>;
|
||||
card_line = <0x8>;
|
||||
pinctrl-0 = <&sdc2_pins_a &sdc2_pins_c>;
|
||||
sdc_ex_dly_used = <0x2>;
|
||||
sdc_io_1v8 = <0x1>;
|
||||
};
|
||||
|
||||
&nand0 {
|
||||
compatible = "allwinner,sun50iw9-nand";
|
||||
device_type = "nand0";
|
||||
//reg = <0x0 0x04011000 0x0 0x1000>;/* nand0 */
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&nand0_pins_a &nand0_pins_b>;
|
||||
pinctrl-1 = <&nand0_pins_c>;
|
||||
nand0_regulator1 = "vcc-nand";
|
||||
nand0_regulator2 = "none";
|
||||
nand0_cache_level = <0x55aaaa55>;
|
||||
nand0_flush_cache_num = <0x55aaaa55>;
|
||||
nand0_capacity_level = <0x55aaaa55>;
|
||||
nand0_id_number_ctl = <0x55aaaa55>;
|
||||
nand0_print_level = <0x55aaaa55>;
|
||||
nand0_p0 = <0x55aaaa55>;
|
||||
nand0_p1 = <0x55aaaa55>;
|
||||
nand0_p2 = <0x55aaaa55>;
|
||||
nand0_p3 = <0x55aaaa55>;
|
||||
chip_code = "sun50iw9";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dsi4lane_pins_a {
|
||||
allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6";
|
||||
allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6";
|
||||
};
|
||||
|
||||
&dsi4lane_pins_b {
|
||||
allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6";
|
||||
allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6";
|
||||
};
|
||||
|
||||
&lcd0{
|
||||
|
||||
base_config_start = <1>;
|
||||
lcd_used = <1>;
|
||||
|
||||
lcd_driver_name = "t050k589";
|
||||
|
||||
lcd_bl_0_percent = <0>;
|
||||
lcd_bl_40_percent = <23>;
|
||||
lcd_bl_100_percent = <100>;
|
||||
lcd_backlight = <150>;
|
||||
|
||||
lcd_if = <4>;
|
||||
lcd_x = <720>;
|
||||
lcd_y = <1280>;
|
||||
lcd_width = <62>;
|
||||
lcd_height = <110>;
|
||||
lcd_dclk_freq = <60>;
|
||||
|
||||
lcd_pwm_used = <1>;
|
||||
lcd_pwm_ch = <6>;
|
||||
lcd_pwm_freq = <50000>;
|
||||
lcd_pwm_pol = <1>;
|
||||
lcd_pwm_max_limit = <255>;
|
||||
|
||||
lcd_hbp = <32>;
|
||||
lcd_ht = <780>;
|
||||
lcd_hspw = <8>;
|
||||
lcd_vbp = <12>;
|
||||
lcd_vt = <1304>;
|
||||
lcd_vspw = <4>;
|
||||
|
||||
lcd_dsi_if = <0>;
|
||||
lcd_dsi_lane = <2>;
|
||||
lcd_dsi_format = <0>;
|
||||
lcd_dsi_te = <0>;
|
||||
lcd_dsi_eotp = <0>;
|
||||
|
||||
lcd_frm = <0>;
|
||||
lcd_io_phase = <0x0000>;
|
||||
lcd_hv_clk_phase = <0>;
|
||||
lcd_hv_sync_polarity= <0>;
|
||||
lcd_gamma_en = <0>;
|
||||
lcd_bright_curve_en = <0>;
|
||||
lcd_cmap_en = <0>;
|
||||
|
||||
lcdgamma4iep = <22>;
|
||||
|
||||
lcd_gpio_0 = <&pio PD 19 1 0 3 1>;
|
||||
lcd_gpio_1 = <&pio PE 1 1 0 3 1>;
|
||||
pinctrl-0 = <&dsi4lane_pins_a>;
|
||||
pinctrl-1 = <&dsi4lane_pins_b>;
|
||||
base_config_end = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio{
|
||||
rgb24_pins_a: rgb24@0 {
|
||||
allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
|
||||
"PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
|
||||
"PD20", "PD21", "PD22", "PD23", "PD24", "PD25", "PD26", "PD27";
|
||||
allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
|
||||
"PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
|
||||
"PD20", "PD21", "PD22", "PD23", "PD24", "PD25", "PD26", "PD27";
|
||||
allwinner,function = "rgb24";
|
||||
allwinner,muxsel = <2>;
|
||||
allwinner,drive = <3>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
rgb24_pins_b: rgb24@1 {
|
||||
allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
|
||||
"PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
|
||||
"PD20", "PD21", "PD22", "PD23", "PD24", "PD25", "PD26", "PD27";
|
||||
allwinner,pname = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", \
|
||||
"PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", \
|
||||
"PD20", "PD21", "PD22", "PD23", "PD24", "PD25", "PD26", "PD27";
|
||||
allwinner,function = "rgb24_suspend";
|
||||
allwinner,muxsel = <7>;
|
||||
allwinner,drive = <3>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&disp {
|
||||
|
||||
disp_init_enable = <1>;
|
||||
disp_mode = <0>;
|
||||
|
||||
screen0_output_type = <1>;
|
||||
screen0_output_mode = <4>;
|
||||
|
||||
screen1_output_type = <3>;
|
||||
screen1_output_mode = <10>;
|
||||
|
||||
screen1_output_format = <0>;
|
||||
screen1_output_bits = <0>;
|
||||
screen1_output_eotf = <4>;
|
||||
screen1_output_cs = <257>;
|
||||
screen1_output_range = <2>;
|
||||
screen1_output_scan = <0>;
|
||||
screen1_output_aspect_ratio = <8>;
|
||||
|
||||
dev0_output_type = <1>;
|
||||
dev0_output_mode = <4>;
|
||||
dev0_screen_id = <0>;
|
||||
dev0_do_hpd = <0>;
|
||||
|
||||
dev1_output_type = <4>;
|
||||
dev1_output_mode = <10>;
|
||||
dev1_screen_id = <1>;
|
||||
dev1_do_hpd = <1>;
|
||||
|
||||
def_output_dev = <0>;
|
||||
|
||||
fb0_format = <0>;
|
||||
fb0_width = <0>;
|
||||
fb0_height = <0>;
|
||||
|
||||
fb1_format = <0>;
|
||||
fb1_width = <0>;
|
||||
fb1_height = <0>;
|
||||
chn_cfg_mode = <1>;
|
||||
|
||||
disp_para_zone = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#
|
||||
#config file for sun8iw21
|
||||
#
|
||||
SUPPORT_BOARD=qg3101 r853s v851 v853 v853s r853
|
||||
ARCH = arm
|
||||
PLATFORM = sun8iw21p1
|
||||
|
||||
CFG_BOOT0_RUN_ADDR=0x20000
|
||||
CFG_SYS_INIT_RAM_SIZE=0x10000
|
||||
CFG_FES1_RUN_ADDR=0x28000
|
||||
CFG_SBOOT_RUN_ADDR=0x20480
|
||||
CFG_SUNXI_GPIO_V2=y
|
||||
#CFG_SUNXI_FDT=y
|
||||
|
||||
#LOGO
|
||||
CFG_BOOT0_LOGO_TO_KERNEL=y
|
||||
|
||||
#ISP
|
||||
CFG_BOOT0_WIRTE_RTC_TO_ISP=y
|
||||
CFG_ISPFLAG_RTC_INDEX=0x1
|
||||
CFG_ISPFLAG_RTC_VALUE=0x1
|
||||
|
||||
CFG_SUNXI_EFUSE =y
|
||||
|
||||
#E907
|
||||
CFG_RISCV_E907=y
|
||||
CFG_SUNXI_ELF=y
|
||||
CFG_MELISELF_LOAD_ADDR=0x43080000
|
||||
|
||||
#E907 interrupt table info update
|
||||
#CFG_UPDATA_IRQ_TAB=y
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
#
|
||||
#config file for sun8iw21 fastboot
|
||||
#
|
||||
#stroage
|
||||
FILE_EXIST=$(shell if [ -f $(TOPDIR)/board/$(PLATFORM)/common.mk ]; then echo yes; else echo no; fi;)
|
||||
EXT_FILE_EXIST=$(shell if [ -f $(TOPDIR)/board/$(PLATFORM)/common$(LICHEE_BOARD).mk ]; then echo yes; else echo no; fi;)
|
||||
ifeq (x$(EXT_FILE_EXIST),xyes)
|
||||
include $(TOPDIR)/board/$(PLATFORM)/common$(LICHEE_BOARD).mk
|
||||
else ifeq (x$(FILE_EXIST),xyes)
|
||||
include $(TOPDIR)/board/$(PLATFORM)/common.mk
|
||||
else
|
||||
include $(TOPDIR)/board/$(CP_BOARD)/common.mk
|
||||
endif
|
||||
|
||||
MODULE=spinorfastboot
|
||||
CFG_SUNXI_SPINOR =y
|
||||
CFG_SUNXI_SPI =y
|
||||
CFG_SUNXI_SPIF =y
|
||||
CFG_SUNXI_DMA =y
|
||||
CFG_SPI_USE_DMA =y
|
||||
CFG_SPINOR_UBOOT_OFFSET=128
|
||||
|
||||
|
||||
#CFG_SUNXI_FDT=y
|
||||
|
||||
CFG_BOOT0_LOAD_KERNEL=y
|
||||
CFG_KERNEL_BOOTIMAGE=y
|
||||
CFG_KERNEL_CHECKSUM=n #y will check kernel checksum in bimage, but slower
|
||||
CFG_KERNEL_LOAD_ADDR=0x40007800
|
||||
CFG_SUNXI_FDT_ADDR=0x41d00000
|
||||
#CFG_LOAD_DTB_FROM_KERNEL=y
|
||||
CFG_SUNXI_NO_UPDATE_FDT_CHOSEN=y
|
||||
#CFG_SUNXI_SUPPORT_RAMDISK=y
|
||||
#CFG_RAMDISK_ADDR=0x43000000
|
||||
|
||||
CFG_SUNXI_GPT=y
|
||||
CFG_SPINOR_GPT_ARD=4064 # 0 or 40960 sector
|
||||
CFG_SUNXI_ENV=y
|
||||
CFG_SUNXI_ENV_SIZE=0x1000 # linux should be the same with LICHEE_REDUNDANT_ENV_SIZE.
|
||||
CFG_SUNXI_HAVE_REDUNDENV=y
|
||||
|
||||
|
||||
#IR STATE
|
||||
CFG_BOOT0_WRITE_IRSATTE_TO_ISP=y
|
||||
CFG_SUNXI_PHY_KEY=y
|
||||
CFG_GPADC_KEY=y
|
||||
|
||||
CFG_BOOT0_LOAD_FLASH=y
|
||||
CFG_BOOT0_LOAD_ISPPARM=y
|
||||
CFG_ISPPARAM_LOAD_ADDR=0x43BFE000
|
||||
CFG_ISPPARAM_SIZE=0x10 #unit:sector
|
||||
CFG_SPINOR_ISPPARAM_OFFSET=CFG_SPINOR_UBOOT_OFFSET - CFG_ISPPARAM_SIZE - 0x8
|
||||
|
||||
CFG_SET_GPIO_NEW=y
|
||||
|
||||
#ISP
|
||||
CFG_BOOT0_WIRTE_RTC_TO_ISP=y
|
||||
CFG_ISPFLAG_RTC_INDEX=0x1
|
||||
CFG_ISPFLAG_RTC_VALUE=0x1
|
||||
|
||||
CFG_SUNXI_EFUSE =y
|
||||
CFG_MELISELF_LOAD_ADDR=0x43080000
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,481 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Melis3.x SDK Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Kernel Setup
|
||||
#
|
||||
|
||||
#
|
||||
# ARCH Support
|
||||
#
|
||||
CONFIG_RISCV=y
|
||||
|
||||
#
|
||||
# RISC-V ARCH Setup
|
||||
#
|
||||
CONFIG_SUPPORT_FP_KERNEL=y
|
||||
CONFIG_RV32=y
|
||||
CONFIG_RV_MACHINE_MODE=y
|
||||
CONFIG_RV_CLINT=y
|
||||
# CONFIG_CPU_DCACHE_DISABLE is not set
|
||||
CONFIG_ARCH_RISCV_FPU=y
|
||||
# CONFIG_FPU_FLOAT is not set
|
||||
CONFIG_FPU_DOUBLE=y
|
||||
|
||||
#
|
||||
# Sunxi Platform Support
|
||||
#
|
||||
# CONFIG_CPUFREQ_SUPPORT is not set
|
||||
CONFIG_PANIC_CLI=y
|
||||
CONFIG_PANIC_CLI_PWD=y
|
||||
|
||||
#
|
||||
# RTOS Kernel Setup
|
||||
#
|
||||
CONFIG_RTTKERNEL=y
|
||||
|
||||
#
|
||||
# RT-Thread Kernel Setup
|
||||
#
|
||||
CONFIG_RT_NAME_MAX=32
|
||||
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
|
||||
# CONFIG_SMP is not set
|
||||
CONFIG_RT_ALIGN_SIZE=8
|
||||
# CONFIG_RT_THREAD_PRIORITY_8 is not set
|
||||
CONFIG_RT_THREAD_PRIORITY_32=y
|
||||
# CONFIG_RT_THREAD_PRIORITY_256 is not set
|
||||
CONFIG_RT_THREAD_PRIORITY_MAX=32
|
||||
CONFIG_RT_USING_OVERFLOW_CHECK=y
|
||||
CONFIG_RT_USING_HOOK=y
|
||||
CONFIG_RT_USING_IDLE_HOOK=y
|
||||
CONFIG_RT_IDEL_HOOK_LIST_SIZE=4
|
||||
CONFIG_IDLE_THREAD_STACK_SIZE=256
|
||||
CONFIG_RT_USING_TIMER_SOFT=y
|
||||
CONFIG_RT_TIMER_THREAD_PRIO=8
|
||||
CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192
|
||||
CONFIG_RT_DEBUG=y
|
||||
# CONFIG_RT_DEBUG_COLOR is not set
|
||||
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_MEM_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
|
||||
# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
|
||||
|
||||
#
|
||||
# Inter-Thread communication
|
||||
#
|
||||
CONFIG_RT_USING_SEMAPHORE=y
|
||||
CONFIG_RT_USING_MUTEX=y
|
||||
CONFIG_RT_USING_EVENT=y
|
||||
CONFIG_RT_USING_MAILBOX=y
|
||||
CONFIG_RT_USING_MESSAGEQUEUE=y
|
||||
# CONFIG_RT_USING_PIPE is not set
|
||||
# CONFIG_RT_USING_RINGBUFFER is not set
|
||||
CONFIG_RT_USING_WAITQUEUE=y
|
||||
CONFIG_RT_USING_WORKQUEUE=y
|
||||
# CONFIG_RT_USING_COMPLETION is not set
|
||||
# CONFIG_RT_USING_SIGNALS is not set
|
||||
|
||||
#
|
||||
# Memory Management
|
||||
#
|
||||
CONFIG_RT_USING_MEMPOOL=y
|
||||
CONFIG_RT_USING_MEMHEAP=y
|
||||
# CONFIG_RT_USING_NOHEAP is not set
|
||||
CONFIG_RT_USING_SMALL_MEM=y
|
||||
# CONFIG_RT_USING_SLAB is not set
|
||||
# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
|
||||
# CONFIG_RT_USING_MEMTRACE is not set
|
||||
CONFIG_RT_USING_HEAP=y
|
||||
|
||||
#
|
||||
# Kernel Device Object
|
||||
#
|
||||
CONFIG_RT_USING_DEVICE=y
|
||||
CONFIG_RT_USING_DEVICE_OPS=y
|
||||
# CONFIG_RT_USING_INTERRUPT_INFO is not set
|
||||
CONFIG_RT_USING_CONSOLE=y
|
||||
CONFIG_RT_CONSOLEBUF_SIZE=256
|
||||
CONFIG_RT_CONSOLE_DEVICE_NAME="uart"
|
||||
CONFIG_RT_VER_NUM=0x30104
|
||||
CONFIG_RT_USING_TASK_PERF_MONITOR=y
|
||||
# CONFIG_RT_SUPPORT_OPENOCD is not set
|
||||
# CONFIG_RT_JLINK_RTT is not set
|
||||
# CONFIG_SLAB_DEBUG is not set
|
||||
CONFIG_CHECK_PREEMPT_LEVEL_IN_IPC=y
|
||||
# CONFIG_AW_CHECK_MELIS_TASK_EXIT is not set
|
||||
CONFIG_CONSISTENT_CONTEXT_SWITCH=y
|
||||
CONFIG_NEST_INTERRUPT=y
|
||||
CONFIG_HZ=1000
|
||||
# CONFIG_KERNEL_SAMPLE_TEST is not set
|
||||
|
||||
#
|
||||
# Drivers Setup
|
||||
#
|
||||
CONFIG_UART_BAUD_RATE=115200
|
||||
|
||||
#
|
||||
# Melis Source Support
|
||||
#
|
||||
CONFIG_DRIVER_GPIO=y
|
||||
# CONFIG_DRIVER_TWIBUS is not set
|
||||
# CONFIG_DRIVER_SPIBUS is not set
|
||||
# CONFIG_DRIVER_PWM is not set
|
||||
CONFIG_DRIVER_SERIAL=y
|
||||
# CONFIG_DRIVER_DMA is not set
|
||||
CONFIG_DRIVER_CCMU=y
|
||||
# CONFIG_DRIVER_NAND_FLASH is not set
|
||||
|
||||
#
|
||||
# SoC HAL Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Common Option
|
||||
#
|
||||
CONFIG_DRIVER_SYSCONFIG=y
|
||||
CONFIG_DMA_VMAREA_START_ADDRESS=0x80000000
|
||||
# CONFIG_DMA_COHERENT_HEAP is not set
|
||||
|
||||
#
|
||||
# CCMU Devices
|
||||
#
|
||||
CONFIG_DRIVERS_CCMU=y
|
||||
CONFIG_DRIVERS_SUNXI_CLK=y
|
||||
# CONFIG_HAL_TEST_CLK is not set
|
||||
|
||||
#
|
||||
# UART Devices
|
||||
#
|
||||
CONFIG_DRIVERS_UART=y
|
||||
# CONFIG_HAL_TEST_UART is not set
|
||||
# CONFIG_SUNXI_UART_SUPPORT_POLL is not set
|
||||
# CONFIG_SUNXI_UART_REGISTER_UART0 is not set
|
||||
# CONFIG_SUNXI_UART_REGISTER_UART1 is not set
|
||||
# CONFIG_SUNXI_UART_REGISTER_UART2 is not set
|
||||
CONFIG_SUNXI_UART_REGISTER_UART3=y
|
||||
CONFIG_CLI_UART_PORT=3
|
||||
|
||||
#
|
||||
# GPIO Devices
|
||||
#
|
||||
CONFIG_DRIVERS_GPIO=y
|
||||
# CONFIG_HAL_TEST_GPIO is not set
|
||||
|
||||
#
|
||||
# DMA Devices
|
||||
#
|
||||
CONFIG_DRIVERS_DMA=y
|
||||
# CONFIG_HAL_TEST_DMA is not set
|
||||
|
||||
#
|
||||
# TWI Devices
|
||||
#
|
||||
CONFIG_DRIVERS_TWI=y
|
||||
# CONFIG_HAL_TEST_TWI is not set
|
||||
|
||||
#
|
||||
# SPI Devices
|
||||
#
|
||||
# CONFIG_DRIVERS_SPI is not set
|
||||
|
||||
#
|
||||
# PWM Devices
|
||||
#
|
||||
# CONFIG_DRIVERS_PWM is not set
|
||||
|
||||
#
|
||||
# GPADC Devices
|
||||
#
|
||||
# CONFIG_DRIVERS_GPADC is not set
|
||||
|
||||
#
|
||||
# Message Box Devices
|
||||
#
|
||||
CONFIG_DRIVERS_MSGBOX=y
|
||||
# CONFIG_DRIVERS_MSGBOX_SX is not set
|
||||
CONFIG_DRIVERS_MSGBOX_AMP=y
|
||||
# CONFIG_HAL_TEST_MSGBOX is not set
|
||||
|
||||
#
|
||||
# VIN Devices
|
||||
#
|
||||
CONFIG_DRIVERS_VIN=y
|
||||
# CONFIG_ENABLE_AIISP is not set
|
||||
CONFIG_ISP_READ_THRESHOLD=y
|
||||
# CONFIG_ISP_FAST_CONVERGENCE is not set
|
||||
# CONFIG_ISP_ONLY_HARD_LIGHTADC is not set
|
||||
# CONFIG_ISP_HARD_LIGHTADC is not set
|
||||
CONFIG_ISP_NUMBER=2
|
||||
|
||||
#
|
||||
# sensor driver select
|
||||
#
|
||||
# CONFIG_SENSOR_GC1054_MIPI is not set
|
||||
# CONFIG_SENSOR_GC1084_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2053_MIPI is not set
|
||||
# CONFIG_SENSOR_GC2083_MIPI is not set
|
||||
# CONFIG_SENSOR_GC4663_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2355_MIPI is not set
|
||||
# CONFIG_SENSOR_SC2336_MIPI is not set
|
||||
# CONFIG_SENSOR_SC3336_MIPI is not set
|
||||
# CONFIG_SENSOR_SC500AI_MIPI is not set
|
||||
# CONFIG_SENSOR_SC5336_MIPI is not set
|
||||
# CONFIG_SENSOR_TP9950_MIPI is not set
|
||||
# CONFIG_SENSOR_TP9953_DVP is not set
|
||||
# CONFIG_SENSOR_IMX319_MIPI is not set
|
||||
# CONFIG_SENSOR_IMX335_MIPI is not set
|
||||
# CONFIG_SENSOR_SC035HGS_MIPI is not set
|
||||
# CONFIG_SENSOR_TP2815_MIPI is not set
|
||||
# CONFIG_SENSOR_GC0406_MIPI is not set
|
||||
# CONFIG_SENSOR_BF2253L_MIPI is not set
|
||||
# CONFIG_SENSOR_N5_DVP is not set
|
||||
# CONFIG_SENSOR_BF2257CS_MIPI is not set
|
||||
# CONFIG_SENSOR_F355P_MIPI is not set
|
||||
# CONFIG_SENSOR_F355P_DVP is not set
|
||||
# CONFIG_SENSOR_F37P_DVP is not set
|
||||
# CONFIG_SENSOR_F37P_MIPI is not set
|
||||
CONFIG_SENSOR_OV02B10_MIPI=y
|
||||
|
||||
#
|
||||
# Osal Setup
|
||||
#
|
||||
CONFIG_DRIVER_OSAL_CFG=y
|
||||
CONFIG_SYSCONF_BUILDIN=y
|
||||
|
||||
#
|
||||
# Drivers Test Sample
|
||||
#
|
||||
# CONFIG_SUNXI_PWM_TEST is not set
|
||||
# CONFIG_SUNXI_GPIO_TEST is not set
|
||||
# CONFIG_SUNXI_TWI_TEST is not set
|
||||
# CONFIG_SUNXI_RTC_TEST is not set
|
||||
# CONFIG_SUNXI_UART_TEST is not set
|
||||
# CONFIG_SUNXI_STANDBY_TEST is not set
|
||||
|
||||
#
|
||||
# Components Support
|
||||
#
|
||||
|
||||
#
|
||||
# Thirdparty Components Support
|
||||
#
|
||||
|
||||
#
|
||||
# RT-Thread DFS Support
|
||||
#
|
||||
# CONFIG_RT_USING_DFS is not set
|
||||
|
||||
#
|
||||
# OpenAMP Support
|
||||
#
|
||||
CONFIG_SUPPORT_LIBMETAL=y
|
||||
CONFIG_SUPPORT_AMP=y
|
||||
CONFIG_AMP_SLAVE_MODE=y
|
||||
CONFIG_MBOX_CHANNEL=0
|
||||
CONFIG_MBOX_QUEUE_LENGTH=16
|
||||
# CONFIG_RPMSG_DEMO is not set
|
||||
CONFIG_RPMSG_NOTIFY=y
|
||||
# CONFIG_RPMSG_SPEEDTEST is not set
|
||||
CONFIG_AMP_SHARE_IRQ=y
|
||||
CONFIG_RPMSG_CLIENT=y
|
||||
# CONFIG_RPMSG_CLIENT_TEST is not set
|
||||
CONFIG_RPMSG_CLIENT_QUEUE_SIZE=16
|
||||
# CONFIG_RPMSG_CLIENT_DEBUG is not set
|
||||
CONFIG_RPMSG_HEARBEAT=y
|
||||
CONFIG_RPMSG_REMOTE_NAME="e907_rproc"
|
||||
CONFIG_SLAVE_EARLY_BOOT=y
|
||||
CONFIG_RPBUF_DEMO=y
|
||||
# CONFIG_AMP_TRACE_SUPPORT is not set
|
||||
# CONFIG_CXX is not set
|
||||
|
||||
#
|
||||
# Command shell
|
||||
#
|
||||
CONFIG_RT_USING_FINSH=y
|
||||
CONFIG_FINSH_THREAD_NAME="tshell"
|
||||
CONFIG_FINSH_USING_HISTORY=y
|
||||
CONFIG_FINSH_HISTORY_LINES=5
|
||||
CONFIG_FINSH_USING_SYMTAB=y
|
||||
CONFIG_FINSH_USING_DESCRIPTION=y
|
||||
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
|
||||
CONFIG_FINSH_THREAD_PRIORITY=21
|
||||
CONFIG_FINSH_THREAD_STACK_SIZE=16384
|
||||
CONFIG_FINSH_CMD_SIZE=80
|
||||
# CONFIG_FINSH_USING_AUTH is not set
|
||||
CONFIG_FINSH_USING_MSH=y
|
||||
CONFIG_FINSH_USING_MSH_DEFAULT=y
|
||||
# CONFIG_FINSH_USING_MSH_ONLY is not set
|
||||
CONFIG_FINSH_ARG_MAX=10
|
||||
|
||||
#
|
||||
# Commands
|
||||
#
|
||||
CONFIG_COMMAND_FORK=y
|
||||
# CONFIG_COMMAND_MEM_LAYOUT is not set
|
||||
CONFIG_COMMAND_DATE=y
|
||||
# CONFIG_COMMAND_EXIT is not set
|
||||
# CONFIG_COMMAND_UPDATE is not set
|
||||
# CONFIG_COMMAND_INSMOD is not set
|
||||
# CONFIG_COMMAND_MEMTESTER is not set
|
||||
# CONFIG_COMMAND_PQD is not set
|
||||
# CONFIG_COMMAND_MMLK is not set
|
||||
# CONFIG_COMMAND_HELLOWORLD is not set
|
||||
# CONFIG_COMMAND_RTT_VERSION is not set
|
||||
# CONFIG_COMMAND_WATCHDOG is not set
|
||||
# CONFIG_COMMAND_MMC_READ is not set
|
||||
# CONFIG_COMMAND_MMC_WRITE is not set
|
||||
# CONFIG_COMMAND_PRODUCT is not set
|
||||
CONFIG_COMMAND_BACKTRACE=y
|
||||
# CONFIG_COMMAND_REBOOT is not set
|
||||
CONFIG_COMMAND_PANIC=y
|
||||
CONFIG_COMMAND_PRINT_MEM=y
|
||||
CONFIG_COMMAND_WRITE_MEM=y
|
||||
# CONFIG_COMMAND_LISTIRQ is not set
|
||||
# CONFIG_COMMAND_SLABINFO is not set
|
||||
# CONFIG_COMMAND_UNAME is not set
|
||||
# CONFIG_COMMAND_CPUFREQ is not set
|
||||
|
||||
#
|
||||
# Iobox Command
|
||||
#
|
||||
# CONFIG_IOBOX_TAIL is not set
|
||||
# CONFIG_IOBOX_TOUCH is not set
|
||||
# CONFIG_IOBOX_GREP is not set
|
||||
# CONFIG_IOBOX_HEXDUMP is not set
|
||||
# CONFIG_IOBOX_LS is not set
|
||||
# CONFIG_IOBOX_RM is not set
|
||||
# CONFIG_IOBOX_RWCHECK is not set
|
||||
# CONFIG_IOBOX_RWSPEED is not set
|
||||
# CONFIG_IOBOX_RSPEED is not set
|
||||
# CONFIG_IOBOX_WSPEED is not set
|
||||
# CONFIG_IOBOX_MOUNT is not set
|
||||
|
||||
#
|
||||
# archival support
|
||||
#
|
||||
# CONFIG_SUBSYS_ARCHIVAL is not set
|
||||
CONFIG_PTHREAD=y
|
||||
# CONFIG_BENCHMARK is not set
|
||||
# CONFIG_KERNEL_COMPRESS is not set
|
||||
CONFIG_LIBC_MMAP=y
|
||||
|
||||
#
|
||||
# Allwinner Components Support
|
||||
#
|
||||
# CONFIG_SUBSYS_KGDB is not set
|
||||
|
||||
#
|
||||
# AW Multi-Console Compenents
|
||||
#
|
||||
CONFIG_SUBSYS_MULTI_CONSOLE=y
|
||||
# CONFIG_MULTI_CONSOLE_DEBUG is not set
|
||||
# CONFIG_MULTI_CONSOLE_REDIRECT_CMD is not set
|
||||
CONFIG_MULTI_CONSOLE_RPMSG=y
|
||||
|
||||
#
|
||||
# RPBuf framework
|
||||
#
|
||||
CONFIG_COMPONENTS_RPBUF=y
|
||||
CONFIG_COMPONENTS_RPBUF_SERVICE_RPMSG=y
|
||||
CONFIG_COMPONENTS_RPBUF_CONTROLLER=y
|
||||
CONFIG_COMPONENTS_RPBUF_RPMSG_DEMO=y
|
||||
CONFIG_VIRT_LOG=y
|
||||
CONFIG_VIRT_LOG_SIZE=4
|
||||
# CONFIG_SUBSYS_SAMPLES is not set
|
||||
CONFIG_STANDBY=y
|
||||
CONFIG_STANDBY_MSGBOX=y
|
||||
|
||||
#
|
||||
# standby config
|
||||
#
|
||||
CONFIG_STANDBY_MSGBOX_CHANNEL=1
|
||||
CONFIG_STANDBY_MSGBOX_IRQ=144
|
||||
CONFIG_DEBUG_BACKTRACE=y
|
||||
CONFIG_COMPONENTS_WAITQUEUE=y
|
||||
|
||||
#
|
||||
# Libc library
|
||||
#
|
||||
CONFIG_LIBCNEWLIB=y
|
||||
# CONFIG_LIBCNONE is not set
|
||||
CONFIG_ARMCPU_HIGH_VECTOR_ADDRESS=y
|
||||
CONFIG_IOREGS_VBASE=0xf0000000
|
||||
CONFIG_SRAM_VBASE=0xf0000000
|
||||
CONFIG_CLK_TUNING_VBASE=0xffff2000
|
||||
CONFIG_ROOTFS_FATFS=y
|
||||
# CONFIG_CHANGE_COMPRESS_METHOD is not set
|
||||
# CONFIG_DOUBLE_FREE_CHECK is not set
|
||||
# CONFIG_CMSIS is not set
|
||||
|
||||
#
|
||||
# Environment Setup
|
||||
#
|
||||
# CONFIG_SDK_RELEASE is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_MACROS is not set
|
||||
# CONFIG_MODULES is not set
|
||||
CONFIG_MODVERSIONS=y
|
||||
# CONFIG_BOOT_LOGO_BMP is not set
|
||||
# CONFIG_SHOW_FULL_VERSION is not set
|
||||
CONFIG_CROSS_COMPILE="riscv64-unknown-elf-"
|
||||
# CONFIG_INIT_CARD_PRODUCT is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL=1
|
||||
# CONFIG_CC_STACKPROTECTOR_STRONG is not set
|
||||
# CONFIG_LOG_RELEASE is not set
|
||||
# CONFIG_BOOTUP_TURBO is not set
|
||||
# CONFIG_DISABLE_ALL_DEBUGLOG is not set
|
||||
# CONFIG_PRINT_TIMESTAMP is not set
|
||||
CONFIG_DYNAMIC_LOG_LEVEL_SUPPORT=y
|
||||
CONFIG_LOG_LEVEL_STORAGE_NONE=y
|
||||
# CONFIG_LOG_LEVEL_STORAGE_RTC is not set
|
||||
CONFIG_DYNAMIC_LOG_DEFAULT_LEVEL=2
|
||||
# CONFIG_FRAME_POINTER is not set
|
||||
CONFIG_FRAME_WARN=8192
|
||||
CONFIG_UART_CLI_USE_NONE=y
|
||||
# CONFIG_UART_CLI_USE_MUTEX is not set
|
||||
# CONFIG_UART_CLI_USE_SPINLOCK is not set
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_DEBUG=y
|
||||
CONFIG_CC_OPTIMIZE_LEVEL=2
|
||||
# CONFIG_ARM_UNWIND is not set
|
||||
CONFIG_OS_MELIS=y
|
||||
# CONFIG_KALLSYMS is not set
|
||||
# CONFIG_MELIS_GENERATE_HEAD is not set
|
||||
# CONFIG_DISABLE_ALL_UART_LOG is not set
|
||||
|
||||
#
|
||||
# Toolchain Setup
|
||||
#
|
||||
CONFIG_TOOLCHAIN_MACH_FLAGS="-mcmodel=medany -mabi=ilp32d -march=rv32imafdcxthead"
|
||||
CONFIG_TOOLCHAIN_LD_FLAGS="-melf32lriscv"
|
||||
|
||||
#
|
||||
# Platform Setup
|
||||
#
|
||||
# CONFIG_SOC_SUN3IW2P2 is not set
|
||||
# CONFIG_SOC_SUN3IW2P1 is not set
|
||||
# CONFIG_SOC_SUN3IW1P1 is not set
|
||||
# CONFIG_SOC_SUN8IW18P1 is not set
|
||||
# CONFIG_SOC_SUN8IW19P1 is not set
|
||||
# CONFIG_SOC_SUN20IW1P1 is not set
|
||||
CONFIG_SOC_SUN20IW3P1=y
|
||||
# CONFIG_SOC_SUN3I is not set
|
||||
# CONFIG_SOC_SUN8I is not set
|
||||
CONFIG_SOC_SUN20I=y
|
||||
# CONFIG_ARCH_SUN8IW19 is not set
|
||||
CONFIG_SOC_SUN20IW3=y
|
||||
CONFIG_ARCH_SUN20IW3=y
|
||||
CONFIG_DRAM_PHYBASE=0x43c00000
|
||||
CONFIG_DRAM_VIRTBASE=0x43c00000
|
||||
CONFIG_DRAM_SIZE=0x0400000
|
||||
CONFIG_COHERENT_SIZE=0x00c00000
|
||||
CONFIG_COHERENT_START_ADDR=0xa0000000
|
||||
CONFIG_LOAD_DATA_TO_MEM_FROM_STORAGE=y
|
|
@ -0,0 +1,58 @@
|
|||
;---------------------------------------------------------------------------------------------------------
|
||||
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
|
||||
; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态>
|
||||
;---------------------------------------------------------------------------------------------------------
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
;i2c configuration
|
||||
;----------------------------------------------------------------------------------
|
||||
[twi0]
|
||||
twi0_scl = port:PE04<8><1><default><default>
|
||||
twi0_sda = port:PE05<8><1><default><default>
|
||||
|
||||
[twi1]
|
||||
twi1_scl = port:PE02<8><1><default><default>
|
||||
twi1_sda = port:PE03<8><1><default><default>
|
||||
|
||||
;[twi2]
|
||||
;twi2_scl = port:PH05<4><1><default><default>
|
||||
;twi2_sda = port:PH06<4><1><default><default>
|
||||
|
||||
;[twi3]
|
||||
;twi3_scl = port:PI03<4><1><default><default>
|
||||
;twi3_sda = port:PI04<4><1><default><default>
|
||||
|
||||
;[twi4]
|
||||
;twi4_scl = port:PI01<4><1><default><default>
|
||||
;twi4_sda = port:PI02<4><1><default><default>
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
;uart configuration
|
||||
;----------------------------------------------------------------------------------
|
||||
;[uart0]
|
||||
;uart_tx = port:PB08<5><1><default><default>
|
||||
;uart_rx = port:PB09<5><1><default><default>
|
||||
|
||||
;[uart1]
|
||||
;uart_tx = port:PB10<5><1><default><default>
|
||||
;uart_rx = port:PB11<5><1><default><default>
|
||||
|
||||
;[uart2]
|
||||
;uart_tx = port:PH05<5><1><default><default>
|
||||
;uart_rx = port:PH06<5><1><default><default>
|
||||
|
||||
[uart3]
|
||||
uart_tx = port:PE00<7><1><default><default>
|
||||
uart_rx = port:PE01<7><1><default><default>
|
||||
|
||||
[sensor0]
|
||||
used0 = 1
|
||||
reset0 = port:PD20<1><1><default><default>
|
||||
pwdn0 = port:PE10<1><1><default><default>
|
||||
mclk0 = port:PE12<5><1><default><default>
|
||||
|
||||
[sensor1]
|
||||
used1 = 1
|
||||
reset1 = port:PD21<1><1><default><default>
|
||||
pwdn1 = port:PE10<1><1><default><default>
|
||||
mclk1 = port:PE13<5><1><default><default>
|
|
@ -0,0 +1,291 @@
|
|||
/*
|
||||
* The OUTPUT_ARCH command specifies the machine architecture where the
|
||||
* argument is one of the names used in the T-HEAD library.
|
||||
*/
|
||||
OUTPUT_ARCH("riscv")
|
||||
OUTPUT_FORMAT("elf32-littleriscv","elf64-littleriscv","elf32-littleriscv")
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/*DRAM_KERNEL: 4M */
|
||||
DRAM_SEG_KRN (rwx) : ORIGIN = 0x43c00000, LENGTH = 0x00400000
|
||||
}
|
||||
|
||||
PHDRS
|
||||
{
|
||||
sbi PT_LOAD FLAGS(5); /* PF_R|PF_X */
|
||||
boot PT_LOAD FLAGS(5); /* PF_R|PF_X */
|
||||
text PT_LOAD FLAGS(5); /* PF_R|PF_X */
|
||||
rodata PT_LOAD FLAGS(4); /* PF_R */
|
||||
data PT_LOAD FLAGS(6); /* PF_R|PF_W */
|
||||
note PT_NOTE FLAGS(4); /* PF_R */
|
||||
debug PT_NOTE FLAGS(0); /* PF_R */
|
||||
}
|
||||
|
||||
/* This area could be used for idle thead at last.*/
|
||||
__STACKSIZE__ = 4096;
|
||||
|
||||
/* Get Kernel Running Address */
|
||||
__DRAM_KRN_RUN_ADDRESS = ORIGIN(DRAM_SEG_KRN);
|
||||
|
||||
/* 0x9002 is insn "ebreak". */
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = __DRAM_KRN_RUN_ADDRESS;
|
||||
PROVIDE(_firmware_start = .);
|
||||
|
||||
.head.text __DRAM_KRN_RUN_ADDRESS : AT(__DRAM_KRN_RUN_ADDRESS)
|
||||
{
|
||||
. = ALIGN(8);
|
||||
KEEP(*(.start))
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :boot =0x9002
|
||||
|
||||
.dram_seg.text ADDR(.head.text) + SIZEOF(.head.text) : AT(LOADADDR(.head.text) + SIZEOF(.head.text))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE(__code_start = ABSOLUTE(.));
|
||||
*(.init)
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.text*)
|
||||
*(.stub)
|
||||
*(.eh_frame_hdr)
|
||||
*(.eh_frame_entry)
|
||||
*(.gnu.warning)
|
||||
*(.gnu.linkonce.t*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.gcc_except_table)
|
||||
*(.jcr)
|
||||
*(.fini)
|
||||
*(.reuse)
|
||||
KEEP(*(.eh_frame))
|
||||
. = ALIGN(8);
|
||||
PROVIDE(__code_end = ABSOLUTE(.));
|
||||
} > DRAM_SEG_KRN :text =0x9002
|
||||
|
||||
PROVIDE(__readonly_area_start = .);
|
||||
.dram_seg.rodata ADDR(.dram_seg.text) + SIZEOF(.dram_seg.text) : AT(LOADADDR(.dram_seg.text) + SIZEOF(.dram_seg.text))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.rodata*)
|
||||
*(.srodata)
|
||||
*(.srodata.*)
|
||||
*(.srodata*)
|
||||
*(.gnu.linkonce.r*)
|
||||
*(.rel.dyn*)
|
||||
*(.flash)
|
||||
KEEP(*.o(.openocd_support))
|
||||
KEEP(*.o(.ramdisk))
|
||||
KEEP(*.o(.dtbcfgs))
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :rodata =0x9002
|
||||
|
||||
.dram_seg.initcall ADDR(.dram_seg.rodata) + SIZEOF(.dram_seg.rodata) : AT(LOADADDR(.dram_seg.rodata) + SIZEOF(.dram_seg.rodata))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__initcall_start = .;
|
||||
KEEP(*(.initcallearly.init))
|
||||
__initcall0_start = .;
|
||||
KEEP(*(.initcall0.init))
|
||||
KEEP(*(.initcall0s.init))
|
||||
__initcall1_start = .;
|
||||
KEEP(*(.initcall1.init))
|
||||
KEEP(*(.initcall1s.init))
|
||||
__initcall2_start = .;
|
||||
KEEP(*(.initcall2.init))
|
||||
KEEP(*(.initcall2s.init))
|
||||
__initcall3_start = .;
|
||||
KEEP(*(.initcall3.init))
|
||||
KEEP(*(.initcall3s.init))
|
||||
__initcall4_start = .;
|
||||
KEEP(*(.initcall4.init))
|
||||
KEEP(*(.initcall4s.init))
|
||||
__initcall5_start = .;
|
||||
KEEP(*(.initcall5.init))
|
||||
KEEP(*(.initcall5s.init))
|
||||
__initcallrootfs_start = .;
|
||||
KEEP(*(.initcallrootfs.init))
|
||||
KEEP(*(.initcallrootfss.init))
|
||||
__initcall6_start = .;
|
||||
KEEP(*(.initcall6.init))
|
||||
KEEP(*(.initcall6s.init))
|
||||
__initcall7_start = .;
|
||||
KEEP(*(.initcall7.init))
|
||||
KEEP(*(.initcall7s.init))
|
||||
__initcall_end = .;
|
||||
__con_initcall_start = .;
|
||||
KEEP(*(.con_initcall.init))
|
||||
__con_initcall_end = .;
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :rodata =0x9002
|
||||
|
||||
.note.gnu.build-id ADDR(.dram_seg.initcall) + SIZEOF(.dram_seg.initcall) : AT(LOADADDR(.dram_seg.initcall) + SIZEOF(.dram_seg.initcall))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
*(.note.gnu.build-id)
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :rodata =0x9002
|
||||
|
||||
.dram_seg.ctors ADDR(.note.gnu.build-id) + SIZEOF(.note.gnu.build-id) : AT(LOADADDR(.note.gnu.build-id) + SIZEOF(.note.gnu.build-id))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE(__ctors_start__ = .);
|
||||
KEEP(*(SORT(.ctors.*)))
|
||||
KEEP(*(SORT(.ctors)))
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE(__ctors_end__ = .);
|
||||
. = ALIGN(0x8);
|
||||
} > DRAM_SEG_KRN :rodata =0x9002
|
||||
|
||||
.dram_seg.dtors ADDR(.dram_seg.ctors) + SIZEOF(.dram_seg.ctors) : AT(LOADADDR(.dram_seg.ctors) + SIZEOF(.dram_seg.ctors))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE(__dtors_start__ = .);
|
||||
KEEP(*(SORT(.dtors.*)))
|
||||
KEEP(*(SORT(.dtors)))
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array))
|
||||
PROVIDE(__dtors_end__ = .);
|
||||
. = ALIGN(0x8);
|
||||
} > DRAM_SEG_KRN :rodata =0x9002
|
||||
|
||||
PROVIDE(__readonly_area_end = .);
|
||||
|
||||
.dram_seg.data ADDR(.dram_seg.dtors) + SIZEOF(.dram_seg.dtors) : AT(LOADADDR(.dram_seg.dtors) + SIZEOF(.dram_seg.dtors))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
KEEP(*(*.vectors*))
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
*(.readmostly.data)
|
||||
|
||||
*(.data1)
|
||||
*(.data1.*)
|
||||
|
||||
/*Best in the middle of data/sdata area.*/
|
||||
PROVIDE( __global_pointer$ = . + 0x400);
|
||||
|
||||
__tdata_start = .;
|
||||
*(.tdata)
|
||||
*(.tdata.*)
|
||||
*(.gnu.linkonce.td.*)
|
||||
__tdata_end = .;
|
||||
|
||||
*(.gnu.linkonce.d.*)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.sdata*)
|
||||
*(.gnu.linkonce.s.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
*(.gnu.linkonce.s2.*)
|
||||
*(.got.plt)
|
||||
*(.got)
|
||||
|
||||
. = ALIGN(8);
|
||||
__fsymtab_start = .;
|
||||
KEEP(*(FSymTab))
|
||||
__fsymtab_end = .;
|
||||
. = ALIGN(8);
|
||||
|
||||
. = ALIGN(8);
|
||||
__vsymtab_start = .;
|
||||
KEEP(*(VSymTab))
|
||||
__vsymtab_end = .;
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :data =0x9002
|
||||
|
||||
.resource_table ADDR(.dram_seg.data) + SIZEOF(.dram_seg.data) : AT(LOADADDR(.dram_seg.data) + SIZEOF(.dram_seg.data))
|
||||
{
|
||||
KEEP(*(.resource_table))
|
||||
} > DRAM_SEG_KRN :data
|
||||
|
||||
.share_irq_table ADDR(.resource_table) + SIZEOF(.resource_table) : AT(LOADADDR(.resource_table) + SIZEOF(.resource_table))
|
||||
{
|
||||
KEEP(*(.share_irq_table))
|
||||
} > DRAM_SEG_KRN :data
|
||||
|
||||
/* stack for bringup process */
|
||||
.dram_seg.stack ADDR(.share_irq_table) + SIZEOF(.share_irq_table) : AT(LOADADDR(.share_irq_table) + SIZEOF(.share_irq_table))
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__init_process_stack_start__ = .;
|
||||
. += __STACKSIZE__;
|
||||
__init_process_stack_end__ = .;
|
||||
. = ALIGN(8);
|
||||
} > DRAM_SEG_KRN :data
|
||||
|
||||
.dram_seg.bss ADDR(.dram_seg.stack) + SIZEOF(.dram_seg.stack) + SIZEOF(.dram_seg.stack) (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.sbss*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.sbss2)
|
||||
*(.sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(COMMON)
|
||||
. = ALIGN(8);
|
||||
__tbss_start = .;
|
||||
*(.tbss)
|
||||
*(.tbss.*)
|
||||
*(.gnu.linkonce.tb.*)
|
||||
. = ALIGN(8);
|
||||
__tbss_end = .;
|
||||
} > DRAM_SEG_KRN :data
|
||||
|
||||
PROVIDE(__bss_start = ADDR(.dram_seg.bss));
|
||||
PROVIDE(__bss_end = ABSOLUTE(.));
|
||||
PROVIDE(_end = ABSOLUTE(.));
|
||||
PROVIDE(_firmware_end = .);
|
||||
|
||||
.note 0 : { *(.note) } :note
|
||||
.stab 0 : { *(.stab) } :note
|
||||
.stabstr 0 : { *(.stabstr) } :note
|
||||
.stab.excl 0 : { *(.stab.excl) } :note
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) } :note
|
||||
.stab.index 0 : { *(.stab.index) } :note
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) } :note
|
||||
.reginfo 0 : { *(.reginfo) } :note
|
||||
.comment 0 : { *(.comment) } :note
|
||||
.mdebug 0 : { *(.mdebug) } :note
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
/* DWARF 3 */
|
||||
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
||||
.debug_ranges 0 : { *(.debug_ranges) }
|
||||
.riscv.attributes 0 : { KEEP (*(.riscv.attributes)) KEEP (*(.gnu.attributes)) }
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
obj-y += main.o
|
||||
|
||||
ifeq ($(CONFIG_FF_TRACE),y)
|
||||
subdir-ccflags-y += -finstrument-functions
|
||||
endif
|
|
@ -0,0 +1,45 @@
|
|||
#include <stdio.h>
|
||||
#include <hal_timer.h>
|
||||
#include <openamp/sunxi_helper/openamp.h>
|
||||
|
||||
extern int csi_init(int argc, const char **argv);
|
||||
extern int msh_exec(char *cmd, int length);
|
||||
|
||||
int app_entry(void *param)
|
||||
{
|
||||
#ifdef CONFIG_DRIVERS_VIN
|
||||
int ret;
|
||||
|
||||
ret = csi_init(0, NULL);
|
||||
if (ret) {
|
||||
rpmsg_notify("rt-media", NULL, 0);
|
||||
printf("csi init fail!\n");
|
||||
}
|
||||
#if 1
|
||||
rpmsg_notify("twi0", NULL, 0);
|
||||
rpmsg_notify("twi1", NULL, 0);
|
||||
rpmsg_notify("tdm0", NULL, 0);
|
||||
rpmsg_notify("isp0", NULL, 0);
|
||||
rpmsg_notify("isp1", NULL, 0);
|
||||
rpmsg_notify("scaler0", NULL, 0);
|
||||
rpmsg_notify("scaler1", NULL, 0);
|
||||
rpmsg_notify("scaler4", NULL, 0);
|
||||
rpmsg_notify("scaler5", NULL, 0);
|
||||
rpmsg_notify("scaler8", NULL, 0);
|
||||
rpmsg_notify("scaler9", NULL, 0);
|
||||
rpmsg_notify("scaler12", NULL, 0);
|
||||
rpmsg_notify("vinc0", NULL, 0);
|
||||
rpmsg_notify("vinc1", NULL, 0);
|
||||
rpmsg_notify("vinc4", NULL, 0);
|
||||
rpmsg_notify("vinc5", NULL, 0);
|
||||
rpmsg_notify("vinc8", NULL, 0);
|
||||
rpmsg_notify("vinc9", NULL, 0);
|
||||
rpmsg_notify("vinc12", NULL, 0);
|
||||
#endif
|
||||
#else
|
||||
hal_msleep(200);
|
||||
rpmsg_notify("rt-media", NULL, 0);
|
||||
#endif
|
||||
//msh_exec("dmesg", strlen("dmesg"));
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# define the verions of the image
|
||||
# format: main
|
||||
# such as 1, 2
|
||||
# NOTICE: the range of main version is from 0 to 31,
|
||||
# ROOT_ROLLBACK_USE ---0:not used,1:used
|
||||
# when you change the version, you must increase main version, and never reduce the versions.
|
||||
# the default version is 0
|
||||
|
||||
ROOT_ROLLBACK_USED = 1
|
||||
MAIN_VERSION = 0
|
|
@ -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
|
|
@ -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))
|
|
@ -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
|
|
@ -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
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
::sysinit:/etc/preinit
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -t tmpfs tmpfs /run
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts
|
||||
::sysinit:/bin/mkdir -p /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
#::sysinit:/etc/init.d/rcS
|
||||
::sysinit:/etc/init.d/rcS boot
|
||||
|
||||
# Put a getty on the serial port
|
||||
/dev/console::respawn:-/bin/sh
|
||||
#ttyS0::respawn:/sbin/getty -n -L ttyS0 115200 vt100 -n -l /bin/sh # GENERIC_SERIAL
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
echo "------run profile file-----"
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
|
||||
fgrep -sq '/ overlay ro,' /proc/mounts && {
|
||||
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
|
||||
echo 'Please try to remove files from /overlay/upper/... and reboot!'
|
||||
}
|
||||
|
||||
export PATH="%PATH%"
|
||||
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
||||
export HOME=${HOME:-/root}
|
||||
export PS1='\u@\h:\w\$ '
|
||||
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
|
||||
ulimit -c unlimited
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
|
||||
[ -x /bin/more ] || alias more=less
|
||||
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
||||
|
||||
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
||||
|
||||
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
[ -n "$FAILSAFE" ] || {
|
||||
for FILE in /etc/profile.d/*.sh; do
|
||||
[ -e "$FILE" ] && . "$FILE"
|
||||
done
|
||||
unset FILE
|
||||
}
|
||||
[ -x /bin/ll ] || alias ll='ls -al'
|
||||
|
||||
#export TSLIB_ROOT=/usr/local/tslib
|
||||
export TSLIB_TSDEVICE=/dev/input/event2
|
||||
export TSLIB_TSEVENTTYPE=input
|
||||
export TSLIB_CONFFILE=/mnt/ts.conf
|
||||
#export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
|
||||
#export TSLIB_CALIBFILE=/etc/pointercal
|
||||
export TSLIB_CALIBFILE=/mnt/pointercal
|
||||
|
||||
export TSLIB_PLUGINDIR=/usr/lib/ts
|
||||
export TSLIB_CONSOLEDEVICE=none
|
||||
export TSLIB_FBDEVICE=/dev/fb0
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
||||
ACTION=="add", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
||||
ACTION=="remove", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
|
|
@ -0,0 +1,3 @@
|
|||
KERNEL=="sda[0-9]", SUBSYSTEM=="block", SUBSYSTEM=="usb", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
||||
ACTION=="add|change", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
||||
ACTION=="remove", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "hotplug usb $(date)"#>>/run/udev.log
|
||||
echo "[$#] $0, $1, $2"#>>/run/udev.log
|
||||
if [ "$#" != "2" ];then
|
||||
echo " !! param err." #>> /run/udev.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$2" == "remove" ];then
|
||||
echo " <==umount"#>> /run/udev.log
|
||||
umount /mnt/exUDISK
|
||||
fi
|
||||
|
||||
if [ "$2" == "add" ];then
|
||||
echo " <==mount"#>> /run/udev.log
|
||||
mount -t vfat /dev/sda1 /mnt/exUDISK
|
||||
fi
|
|
@ -0,0 +1,105 @@
|
|||
# Sample udhcpd configuration file (/etc/udhcpd.conf)
|
||||
# Values shown are defaults
|
||||
|
||||
# The start and end of the IP lease block
|
||||
start 172.168.10.100
|
||||
end 172.168.10.254
|
||||
|
||||
# The interface that udhcpd will use
|
||||
#interface wlan0
|
||||
interface usb0
|
||||
|
||||
# The maximum number of leases (includes addresses reserved
|
||||
# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected
|
||||
# if it's bigger than IP lease block, but it ok to make it
|
||||
# smaller than lease block.
|
||||
#max_leases 254
|
||||
|
||||
# The time period at which udhcpd will write out a dhcpd.leases
|
||||
# file. If this is 0, udhcpd will never automatically write a
|
||||
# lease file. Specified in seconds.
|
||||
#auto_time 7200
|
||||
|
||||
# The amount of time that an IP will be reserved (leased to nobody)
|
||||
# if a DHCP decline message is received (seconds)
|
||||
#decline_time 3600
|
||||
|
||||
# The amount of time that an IP will be reserved
|
||||
# if an ARP conflict occurs (seconds)
|
||||
#conflict_time 3600
|
||||
|
||||
# How long an offered address is reserved (seconds)
|
||||
#offer_time 60
|
||||
|
||||
# If client asks for lease below this value, it will be rounded up
|
||||
# to this value (seconds)
|
||||
#min_lease 60
|
||||
|
||||
# The location of the leases file
|
||||
#lease_file /var/lib/misc/udhcpd.leases
|
||||
|
||||
# The location of the pid file
|
||||
#pidfile /var/run/udhcpd.pid
|
||||
|
||||
# Every time udhcpd writes a leases file, the below script will be called
|
||||
#notify_file # default: no script
|
||||
#notify_file dumpleases # useful for debugging
|
||||
|
||||
# The following are bootp specific options
|
||||
# next server to use in bootstrap
|
||||
#siaddr 192.168.0.22 # default: 0.0.0.0 (none)
|
||||
# tftp server name
|
||||
#sname zorak # default: none
|
||||
# tftp file to download (e.g. kernel image)
|
||||
#boot_file /var/nfs_root # default: none
|
||||
|
||||
# Static leases map
|
||||
#static_lease 00:60:08:11:CE:4E 192.168.0.54
|
||||
#static_lease 00:60:08:11:CE:3E 192.168.0.44
|
||||
|
||||
# The remainder of options are DHCP options and can be specified with the
|
||||
# keyword 'opt' or 'option'. If an option can take multiple items, such
|
||||
# as the dns option, they can be listed on the same line, or multiple
|
||||
# lines.
|
||||
# Examples:
|
||||
opt dns 172.168.10.2 172.168.10.10
|
||||
option subnet 255.255.255.0
|
||||
opt router 172.168.10.1
|
||||
opt wins 172.168.10.1
|
||||
option dns 129.219.13.81 # appended to above DNS servers for a total of 3
|
||||
option domain local
|
||||
option lease 864000 # default: 10 days
|
||||
# Arbitrary option in hex form:
|
||||
option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4"
|
||||
|
||||
# Currently supported options (for more info, see options.c):
|
||||
#opt lease NUM
|
||||
#opt subnet IP
|
||||
#opt broadcast IP
|
||||
#opt router IP_LIST
|
||||
#opt ipttl NUM
|
||||
#opt mtu NUM
|
||||
#opt hostname STRING # client's hostname
|
||||
#opt domain STRING # client's domain suffix
|
||||
#opt search STRING_LIST # search domains
|
||||
#opt nisdomain STRING
|
||||
#opt timezone NUM # (localtime - UTC_time) in seconds. signed
|
||||
#opt tftp STRING # tftp server name
|
||||
#opt bootfile STRING # tftp file to download (e.g. kernel image)
|
||||
#opt bootsize NUM # size of that file
|
||||
#opt rootpath STRING # (NFS) path to mount as root fs
|
||||
#opt wpad STRING
|
||||
#opt serverid IP # default: server's IP
|
||||
#opt message STRING # error message (udhcpd sends it on success too)
|
||||
# Options specifying server(s)
|
||||
#opt dns IP_LIST
|
||||
#opt wins IP_LIST
|
||||
#opt nissrv IP_LIST
|
||||
#opt ntpsrv IP_LIST
|
||||
#opt lprsrv IP_LIST
|
||||
#opt swapsrv IP
|
||||
# Obsolete options, no longer supported
|
||||
#opt logsrv IP_LIST # 704/UDP log server (not syslog!)
|
||||
#opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!)
|
||||
#opt cookiesrv IP_LIST # RFC 865 "quote of the day" server, rarely (never?) used
|
||||
#opt timesrv IP_LIST # RFC 868 time server, rarely (never?) used
|
|
@ -0,0 +1,7 @@
|
|||
ctrl_interface=/var/log/wpa_supplicant
|
||||
update_config=1
|
||||
|
||||
network={
|
||||
ssid="AWTest"
|
||||
psk="1qaz@WSX"
|
||||
}
|
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
|
|
@ -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
|
File diff suppressed because it is too large
Load Diff
|
@ -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))
|
|
@ -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 = "";
|
||||
}
|
||||
);
|
||||
|
||||
}
|
|
@ -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
|
||||
)
|
|
@ -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!
|
|
@ -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
|
|
@ -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}
|
||||
}
|
||||
|
|
@ -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
|
Loading…
Reference in New Issue