您尚未登录。

楼主 #1 2021-03-29 21:53:04

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

修改 target/allwinner/violin-F1C200s/configs/sys_config.fex

 [norflash]
-size           = 8
+size           = 16

修改 target/allwinner/violin-F1C200s/configs/sys_partition_nor.fex

 [partition]
     name         = rootfs
     ;size         = 1024
-    size         = 6656
+    size         = 8192
     downloadfile = "rootfs.fex"
     user_type    = 0x8000

然后执行 ARCH=arm make clean -C ./lichee/linux-3.10/;make -j3;pack

.....
Begin Parse sys_partion.fex
Add partion bootlogo.fex BOOTLOGO_FEX0000
Add partion very bootlogo.fex BOOTLOGO_FEX0000
FilePath: bootlogo.fex
FileLength=4b036Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=276688Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=3c0000sys_config.fex Len: 0xb943
config.fex Len: 0x7000
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xbf2
sunxi.fex Len: 0xc400
boot0_nand.fex Len: 0x4000
boot0_sdcard.fex Len: 0x8000
boot0_spinor.fex Len: 0x4000
u-boot.fex Len: 0xa4000
toc1.fex Len: 0x8
toc0.fex Len: 0x8
fes1.fex Len: 0x2d80
boot_package_nor.fex Len: 0x54000
usbtool.fex Len: 0x24200
aultools.fex Len: 0x2849b
aultls32.fex Len: 0x24d3f
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x6de
sunxi_mbr_nor.fex Len: 0x4000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0xf
bootlogo.fex Len: 0x4b036
Vbootlogo.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0x276688
Vboot.fex Len: 0x4
rootfs.fex Len: 0x3c0000
Vrootfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is for nor----------
----------image is at----------

/opt/Tina_rel/tina/out/violin-F1C200s/tina_violin-F1C200s_uart0_nor.img

pack finish

用 PhoenixSuit.exe 烧录 tina_violin-F1C200s_uart0_nor.img

启动日志:

[0]HELLO! BOOT0 is starting!
[2]boot0 commit : 80628dcde5dc4ecdc757a9e782c58d7cf1abf959

[60]dram size =64
[62]Reg pull reg_val=0x00000000,read=0x00000010
[66]Succeed in reading toc file head.
[69]The size of toc is 00054000.
[127]Reg pull reg_val=0x00000000,read=0x00000010
[136]Ready to disable icache.
[138]Jump to secend Boot.


U-Boot 2014.07 (Aug 21 2019 - 14:53:43) Allwinner Technology

uboot commit : 78cb55af380c57c0278162e241a9999cdc16e1d6

i2c_init: by cpux
[I2C-DEBUG]:i2c_set_clock() 354
[I2C-ERROR]:twi_send_clk_9pulse() 136 SDA is still Stuck Low, failed.
i2c_init ok
[0.187]pmbus:   ready
axp: get node[/soc/pmu0] error
axp_probe error
[0.193]PMU: cpux 408 Mhz,AXI=408 Mhz
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz
key value = 4294967295, fel_key = [256,426]
DRAM:  64 MiB
Relocation Offset is: 03580000
axp: get node[/soc/pmu0] error
int sunxi_dma_init---
irq enable
workmode = 0,storage type = 3
[0.259]spinor:   0
flash size =0x8000 sectors
sunxi spinor is initing...int sunxi_dma_init---
irq enable
sunxi_dma_install_int ok
sunxi_dma_install_int ok
OK
spinor id:0x1840ef
spi_freq = 40000000
[0.278]sunxi flash init ok
spinor read: start 0x3e0, sector 0x20
used mbr [0], count = 8
spinor read: start 0x800, sector 0x200
env size is 256
env partition is too small!
can't enabled backup env functions
logo addr = 0x83f00000
spinor read: start 0x400, sector 0x400
sunxi_read_bootlogo: read bootlogo partition successful
do not find fastboot status flag
--------fastboot partitions--------
-total partitions:8-
-name-        -start-       -size-
bootlogo    : 4000          80000
env         : 84000         20000
boot        : a4000         280000
rootfs      : 324000        400000
rootfs_data : 724000        80000
misc        : 7a4000        10000
private     : 7b4000        10000
UDISK       : 7c4000        0
-----------------------------------
spinor read: start 0x4100, sector 0x4
disable nand error: FDT_ERR_BADPATH
disable nand error: FDT_ERR_BADPATH
## error: update_fdt_dram_para : FDT_ERR_NOTFOUND
PowerBus = 0( 2:vBus 3:acBus other: not exist)
no battery exist
sunxi_bmp_logo_display
Hit any key to stop autoboot:  0
spinor read: start 0x900, sector 0x40
spinor read: start 0x940, sector 0x1374
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name:   ARM OpenWrt Linux-3.10.65
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2582088 Bytes = 2.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   XIP Kernel Image ... OK
   reserving fdt memory region: addr=81000000 size=10000
   Using Device Tree in place at 81000000, end 8100f23f

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.65 (cube@global) (gcc version 6.4.1 (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) ) #33 Mon Mar 29 13:37:21 UTC 2021
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Allwinner A1X (Device Tree), model: sun3iw1p1
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] cma: CMA: reserved 32 MiB at 82000000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat c0542acc, node_mem_map c0570000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: enforcing=1 earlyprintk=sunxi-uart,0x01c25000 initcall_debug=0 console=ttyS1,115200 loglevel=8 root=/dev/mtdblock4 init=/pseudo_init rdinit=/rdinit partitions=bootlogo@mtdblock1:env@mtdblock2:boot@mtdblock3:rootfs@mtdblock4:rootfs_data@mtdblock5:misc@mtdblock6:private@mtdblock7:UDISK@mtdblock8 cma=32M fb_base=0x83f00000 androidboot.serialno=<NULL> boot_type=3
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 26420k/26420k available, 39116k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc043ef84   (4316 kB)
[    0.000000]       .init : 0xc043f000 - 0xc045cf34   ( 120 kB)
[    0.000000]       .data : 0xc045e000 - 0xc05433e8   ( 917 kB)
[    0.000000]        .bss : 0xc05433e8 - 0xc056fbc0   ( 178 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] of_sunxi_clocks_init : sunxi_clk_base[0xf1c20000]
[    0.000000] pll_cpu-set_default_rate=552000000 success!
[    0.000000] pll_video-set_default_rate=297000000 success!
[    0.000000] pll_ddr-set_default_rate=312000000 success!
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.005328] Calibrating delay loop... 275.25 BogoMIPS (lpj=1376256)
[    0.075252] pid_max: default: 32768 minimum: 301
[    0.080437] Mount-cache hash table entries: 512
[    0.086403] CPU: Testing write buffer coherency: ok
[    0.092181] Setting up static identity map for 0xc0340248 - 0xc03402a0
[    0.101429] devtmpfs: initialized
[    0.106914] pinctrl core: initialized pinctrl subsystem
[    0.119338] NET: Registered protocol family 16
[    0.127272] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.134925] dump_class_init,844, success
[    0.143764] sun3iw1p1-pinctrl pio: initialized sunXi PIO driver
[    0.167576] bio: create slab <bio-0> at 0
[    0.173104] pwm module init!
[    0.177898] SCSI subsystem initialized
[    0.182071] usbcore: registered new interface driver usbfs
[    0.187957] usbcore: registered new interface driver hub
[    0.193836] usbcore: registered new device driver usb
[    0.201386] gpio=0,mul_sel=0,pull=0,drv_level=0,data=0
[    0.207100] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.215645] pcf857x 0-0020: retry commucation.7
[    0.220608] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.229135] pcf857x 0-0020: retry commucation.6
[    0.234115] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.242634] pcf857x 0-0020: retry commucation.5
[    0.247594] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.256114] pcf857x 0-0020: retry commucation.4
[    0.261066] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.269584] pcf857x 0-0020: retry commucation.3
[    0.274556] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.283071] pcf857x 0-0020: retry commucation.2
[    0.288022] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.296535] pcf857x 0-0020: retry commucation.1
[    0.301491] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[    0.310036] pcf857x: probe of 0-0020 failed with error -70
[    0.319580] Linux video capture interface: v2.00
[    0.325015] Advanced Linux Sound Architecture Driver Initialized.
[    0.332966] cfg80211: Calling CRDA to update world regulatory domain
[    0.340479] Switching to clocksource sun3i high-res couter
[    0.365530] get det_vbus is fail, 84
[    0.370958] NET: Registered protocol family 2
[    0.377612] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.384724] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.391388] TCP: Hash tables configured (established 512 bind 512)
[    0.397957] TCP: reno registered
[    0.401350] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.407460] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.414558] NET: Registered protocol family 1
[    0.432647] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.439304] jffs2: version 2.2. © 2001-2006 Red Hat, Inc.
[    0.445744] msgmni has been set to 115
[    0.452972] io scheduler noop registered
[    0.457268] io scheduler cfq registered (default)
[    0.462145] [pm]aw_pm_init!
[    0.465415] [pm]valid
[    0.467916] [pm]valid
[    0.470649] [DISP]disp_module_init
[    0.526367] pll_freq=297000000HZ, lcd_dclk_freq=33000000HZ, clk_div=9
[    0.533747] num_screens=1
[    0.536635] screen_id=0
[    0.539216] para->mclk[MOD_CLK_LCD1CH0]=0xc180c340
[    0.544166] para->mclk[MOD_CLK_LCD1CH1]=0xc180c440
[    0.549170] disp tv init
[    0.551839] tcon_clk=0xc180c340, tcon_clk_parent=0x0
[    0.557009] tcon_clk=0xc180c340, tcon_clk_parent=0xc1804400
[    0.562757] tve_clk=0xc180c440, tve_clk_parent=0xc1804400
[    0.568355] disp al tv init
[    0.574034] fetch script datadisp.screen2_output_type fail
[    0.580129] fetch script datadisp.screen2_output_mode fail
[    0.588544] fetch script datadisp.fb2_format fail
[    0.593723] fetch script datadisp.fb2_scaler_mode_enable fail
[    0.600032] fetch script datadisp.fb2_width fail
[    0.605123] fetch script datadisp.fb2_height fail
[    0.633343] [DISP]disp_module_init finish
[    0.651664] uart1: ttyS1 at MMIO 0x1c25400 (irq = 104) is a SUNXI
[    0.658111] sw_console_setup()1324 - console setup baud 115200 parity n bits 8, flow n
[    0.666333] console [ttyS1] enabled, bootconsole disabled
[    0.666333] console [ttyS1] enabled, bootconsole disabled
[    0.678883] misc dump reg init
[    0.683558] sunxi-wlan wlan: wlan_busnum (0)
[    0.688439] sunxi-wlan wlan: wlan_power_num (0)
[    0.693483] sunxi-wlan wlan: Missing wlan_io_regulator.
[    0.699336] sunxi-wlan wlan: io_regulator_name ((null))
[    0.705166] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[    0.713024] ------------SUNXI_RF: Set regon for SUN3IW1P1_R6!----------------
[    0.720996] sunxi-wlan wlan: wlan_regon gpio=-1048148608  mul-sel=-1048355436  pull=-1048355480  drv_level=-1072832404  data=-1072834700
[    0.734637] sunxi-wlan wlan: can't request wlan_regon gpio 2041
[    0.741275] platform wlan: Driver sunxi-wlan requests probe deferral
[    0.748716] lradc_battery_probe:lradc_battery_probe ++++++
[    0.754812] lradc_battery_dts_parse:lradc_battery_dts_parse ++++++
[    0.761779] key base: f1c23400
[    0.765306] irq num: 115 !
[    0.768380] battery_data_hw_init:battery_data_hw_init ++++++
[    0.774721] lradc_battery_probe:lradc_battery_probe ------
[    0.783365] spi spi0: master is unqueued, this is deprecated
[    0.791041] m25p80 spi0.0: found w25q128, expected m25p64
[    0.797173] m25p80 spi0.0: w25q128 (16384 Kbytes) - fast mode
[    0.807952] 9 sunxipart partitions found on MTD device (null)
[    0.814347] Creating 9 MTD partitions on "(null)":
[    0.819786] 0x000000000000-0x000000080000 : "uboot"
[    0.827456] 0x000000080000-0x000000100000 : "bootlogo"
[    0.835094] 0x000000100000-0x000000120000 : "env"
[    0.842238] 0x000000120000-0x0000003a0000 : "boot"
[    0.849440] 0x0000003a0000-0x0000007a0000 : "rootfs"
[    0.856900] 0x0000007a0000-0x000000820000 : "rootfs_data"
[    0.864792] 0x000000820000-0x000000830000 : "misc"
[    0.872188] 0x000000830000-0x000000840000 : "private"
[    0.879780] 0x000000840000-0x000001000000 : "UDISK"
[    0.887592] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.896113] gpio_request failed
[    0.899757] get regulator_io is no nocare
[    0.904364] sunxi_hcd_host0 1c13000.otghci0-controller: sunxi_hcd host driver
[    0.912455] sunxi_hcd_host0 1c13000.otghci0-controller: new USB bus registered, assigned bus number 1
[    0.924312] hub 1-0:1.0: USB hub found
[    0.928652] hub 1-0:1.0: 1 port detected
[    0.933517] wrn: hcd is not enable, need not stop hcd
[    0.939982] sunxi_keyboard_startup: keyboard has no clk.
[    0.946571] input: sunxi-keyboard as /devices/virtual/input/input0
[    0.954538] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[    0.961697] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x51)
[    0.970946] rtc-pcf8563 0-0051: pcf8563_get_datetime: read error
[    0.978185] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    0.985742] sunxi cedar version 0.1
[    0.989974] VE: install start!!!
[    0.989974]
[    0.995358] cedar_ve: cedar-ve the get irq is 103
[    1.001282] VE: install end!!!
[    1.001282]
[    1.008118] sunxi-mmc sdc0: SD/MMC/SDIO Host Controller Driver(v0.91 2018-5-29 14:19) Compiled in Mar 29 2021 at 13:36:51
[    1.020598] sunxi-mmc sdc0: Can't get vmmc regulator string
[    1.026893] sunxi-mmc sdc0: Can't get vqmmc regulator string
[    1.033188] sunxi-mmc sdc0: Can't get vdmmc regulator string
[    1.039523] sunxi-mmc sdc0: Failed getting OCR mask: 0
[    1.046820] sunxi-mmc sdc0: ***set host ocr***
[    1.052147] sunxi-mmc sdc0: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.076384] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.106546] sunxi-mmc sdc0: base:0xf1c0f000 irq:107
[    1.112005] sunxi-mmc sdc0: smc 0 p0 err, cmd 52, RTO !!
[    1.118853] sunxi-mmc sdc0: smc 0 p0 err, cmd 52, RTO !!
[    1.124852] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.139387] failed to get gpio-spk and gpio_num
[    1.147913] sunxi-internal-codec 1c23c00.codec: ASoC: DAPM unknown pin HPOUTR
[    1.155916] sunxi-internal-codec 1c23c00.codec: ASoC: DAPM unknown pin HPOUTL
[    1.163929] sunxi-internal-codec 1c23c00.codec: ASoC: DAPM unknown pin SPKL
[    1.171711] sunxi-internal-codec 1c23c00.codec: ASoC: DAPM unknown pin SPKR
[    1.179478] sunxi-codec-machine sound.2: ASoC: DAPM unknown pin External Speaker
[    1.188813] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.207661] sunxi-codec-machine sound.2:  sun3iw1codec <-> 1c23c00.cpudai0-controller mapping ok
[    1.217574] sunxi-codec-machine sound.2: ASoC: no sink widget found for MainMic Bias
[    1.226180] sunxi-codec-machine sound.2: ASoC: Failed to add route External MainMic -> direct -> MainMic Bias
[    1.237246] sunxi-codec-machine sound.2: ASoC: no source widget found for MainMic Bias
[    1.246037] sunxi-codec-machine sound.2: ASoC: Failed to add route MainMic Bias -> direct -> MIC1P
[    1.256023] sunxi-codec-machine sound.2: ASoC: no source widget found for MainMic Bias
[    1.264848] sunxi-codec-machine sound.2: ASoC: Failed to add route MainMic Bias -> direct -> MIC1N
[    1.276789] sunxi-mmc sdc0: smc 0 p0 err, cmd 8, RTO !!
[    1.283526] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[    1.290335] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[    1.296673] ipip: IPv4 over IPv4 tunneling driver
[    1.301950] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[    1.308690] sunxi-mmc sdc0: smc 0 p0 err, cmd 5, RTO !!
[    1.314954] gre: GRE over IPv4 demultiplexor driver
[    1.320516] sunxi-mmc sdc0: smc 0 p0 err, cmd 55, RTO !!
[    1.326500] ip_gre: GRE over IPv4 tunneling driver
[    1.332702] sunxi-mmc sdc0: smc 0 p0 err, cmd 55, RTO !!
[    1.339611] sunxi-mmc sdc0: smc 0 p0 err, cmd 55, RTO !!
[    1.346436] sunxi-mmc sdc0: smc 0 p0 err, cmd 55, RTO !!
[    1.352589] sunxi-mmc sdc0: sdc set ios: clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.363461] TCP: cubic registered
[    1.367216] Initializing XFRM netlink socket
[    1.372150] NET: Registered protocol family 17
[    1.377193] sunxi-mmc sdc0: smc 0 p0 err, cmd 1, RTO !!
[    1.383074] sunxi-mmc sdc0: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    1.393586] NET: Registered protocol family 15
[    1.399074] VFP support v0.3: not present
[    1.405834] [LCD]lcd_module_init
[    1.413483] enhance_en=1
[    1.416464] matrixresult:(0x0, 0x3c4, 0x0, 0x0)
[    1.421643] pll_freq=297000000HZ, lcd_dclk_freq=33000000HZ, clk_div=9
[    1.428898] clk_div=9
[    1.431439] [DISP] disp_sys_gpio_request,line:303:    disp_sys_gpio_request failed, gpio_name=lcd_gpio_0, gpio=2043, ret=-517
[    1.445587] [LCD]open, step 0 finish
[    1.486346] [LCD]open, step 1 finish
[    1.546347] [LCD]open, step 2 finish
[    1.666356] ------------[ cut here ]------------
[    1.671556] WARNING: at drivers/gpio/gpiolib.c:126 gpio_to_desc+0x28/0x4c()
[    1.679347] invalid GPIO -517
[    1.682666] Modules linked in:
[    1.686074] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 3.10.65 #33
[    1.693103] Workqueue: events start_work
[    1.697503] Backtrace:
[    1.700321] [<c0013328>] (dump_backtrace+0x0/0x104) from [<c0013534>] (show_stack+0x18/0x1c)
[    1.709733]  r7:0000007e r6:c03f32ed r5:00000009 r4:c185bda8
[    1.716132] [<c001351c>] (show_stack+0x0/0x1c) from [<c033da38>] (dump_stack+0x20/0x28)
[    1.725120] [<c033da18>] (dump_stack+0x0/0x28) from [<c001b9dc>] (warn_slowpath_common+0x54/0x70)
[    1.735071] [<c001b988>] (warn_slowpath_common+0x0/0x70) from [<c001ba30>] (warn_slowpath_fmt+0x38/0x40)
[    1.745626]  r9:c05551e0 r8:c03f4102 r7:00000001 r6:00000000 r5:c18ce300
r4:fffffdfb
[    1.754472] [<c001b9f8>] (warn_slowpath_fmt+0x0/0x40) from [<c014bb98>] (gpio_to_desc+0x28/0x4c)
[    1.764267]  r3:fffffdfb r2:c03f32dc
[    1.768346] [<c014bb70>] (gpio_to_desc+0x0/0x4c) from [<c014bc3c>] (gpio_get_value_cansleep+0x10/0x44)
[    1.778775] [<c014bc2c>] (gpio_get_value_cansleep+0x0/0x44) from [<c015a7fc>] (disp_sys_gpio_set_direction+0x20/0xb8)
[    1.790685] [<c015a7dc>] (disp_sys_gpio_set_direction+0x0/0xb8) from [<c0170d5c>] (disp_lcd_gpio_set_direction+0xa8/0xc8)
[    1.802908]  r5:c18ce300 r4:c1814000
[    1.806981] [<c0170cb4>] (disp_lcd_gpio_set_direction+0x0/0xc8) from [<c016c730>] (bsp_disp_lcd_gpio_set_direction+0x38/0x44)
[    1.819577]  r7:c1814000 r6:c0554f68 r5:00000001 r4:00000000
[    1.825934] [<c016c6f8>] (bsp_disp_lcd_gpio_set_direction+0x0/0x44) from [<c0177274>] (sunxi_lcd_gpio_set_direction+0x20/0x30)
[    1.838633]  r5:00000000 r4:00000003
[    1.842661] [<c0177254>] (sunxi_lcd_gpio_set_direction+0x0/0x30) from [<c017a9c0>] (LCD_bl_open+0x28/0x3c)
[    1.853476] [<c017a998>] (LCD_bl_open+0x0/0x3c) from [<c0154010>] (drv_lcd_enable+0xa0/0xe0)
[    1.862908] [<c0153f70>] (drv_lcd_enable+0x0/0xe0) from [<c015415c>] (start_work+0x10c/0x1cc)
[    1.872420]  r9:c05551e0 r8:c03f411f r7:00000001 r6:c03f40af r5:c0555454
r4:00000000
[    1.881210] [<c0154050>] (start_work+0x0/0x1cc) from [<c0031cc0>] (process_one_work+0x1e8/0x330)
[    1.891032] [<c0031ad8>] (process_one_work+0x0/0x330) from [<c0031e38>] (process_scheduled_works+0x30/0x34)
[    1.901914] [<c0031e08>] (process_scheduled_works+0x0/0x34) from [<c0032b78>] (worker_thread+0x1e0/0x358)
[    1.912555]  r5:c046abd0 r4:c1822e40
[    1.916631] [<c0032998>] (worker_thread+0x0/0x358) from [<c0037cf8>] (kthread+0xa8/0xb4)
[    1.925642] [<c0037c50>] (kthread+0x0/0xb4) from [<c000f930>] (ret_from_fork+0x14/0x24)
[    1.934594]  r7:00000000 r6:00000000 r5:c0037c50 r4:c1849e7c
[    1.940945] ---[ end trace 7bafd6f951250a1d ]---
[    1.946068] ------------[ cut here ]------------
[    1.951284] WARNING: at drivers/gpio/gpiolib.c:126 gpio_to_desc+0x28/0x4c()
[    1.959049] invalid GPIO -517
[    1.962335] Modules linked in:
[    1.965737] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W    3.10.65 #33
[    1.973830] Workqueue: events start_work
[    1.978236] Backtrace:
[    1.981012] [<c0013328>] (dump_backtrace+0x0/0x104) from [<c0013534>] (show_stack+0x18/0x1c)
[    1.990441]  r7:0000007e r6:c03f32ed r5:00000009 r4:c185bda0
[    1.996845] [<c001351c>] (show_stack+0x0/0x1c) from [<c033da38>] (dump_stack+0x20/0x28)
[    2.005805] [<c033da18>] (dump_stack+0x0/0x28) from [<c001b9dc>] (warn_slowpath_common+0x54/0x70)
[    2.015742] [<c001b988>] (warn_slowpath_common+0x0/0x70) from [<c001ba30>] (warn_slowpath_fmt+0x38/0x40)
[    2.026329]  r9:c05551e0 r8:c03f4102 r7:00000001 r6:00000000 r5:c18ce300
r4:00000000
[    2.035144] [<c001b9f8>] (warn_slowpath_fmt+0x0/0x40) from [<c014bb98>] (gpio_to_desc+0x28/0x4c)
[    2.044939]  r3:fffffdfb r2:c03f32dc
[    2.048997] [<c014bb70>] (gpio_to_desc+0x0/0x4c) from [<c014c628>] (gpio_direction_output+0x14/0x20)
[    2.059250] [<c014c614>] (gpio_direction_output+0x0/0x20) from [<c015a808>] (disp_sys_gpio_set_direction+0x2c/0xb8)
[    2.070890]  r5:c18ce300 r4:fffffdfb
[    2.074950] [<c015a7dc>] (disp_sys_gpio_set_direction+0x0/0xb8) from [<c0170d5c>] (disp_lcd_gpio_set_direction+0xa8/0xc8)
[    2.087173]  r5:c18ce300 r4:c1814000
[    2.091205] [<c0170cb4>] (disp_lcd_gpio_set_direction+0x0/0xc8) from [<c016c730>] (bsp_disp_lcd_gpio_set_direction+0x38/0x44)
[    2.103806]  r7:c1814000 r6:c0554f68 r5:00000001 r4:00000000
[    2.110206] [<c016c6f8>] (bsp_disp_lcd_gpio_set_direction+0x0/0x44) from [<c0177274>] (sunxi_lcd_gpio_set_direction+0x20/0x30)
[    2.122898]  r5:00000000 r4:00000003
[    2.126963] [<c0177254>] (sunxi_lcd_gpio_set_direction+0x0/0x30) from [<c017a9c0>] (LCD_bl_open+0x28/0x3c)
[    2.137772] [<c017a998>] (LCD_bl_open+0x0/0x3c) from [<c0154010>] (drv_lcd_enable+0xa0/0xe0)
[    2.147211] [<c0153f70>] (drv_lcd_enable+0x0/0xe0) from [<c015415c>] (start_work+0x10c/0x1cc)
[    2.156719]  r9:c05551e0 r8:c03f411f r7:00000001 r6:c03f40af r5:c0555454
r4:00000000
[    2.165478] [<c0154050>] (start_work+0x0/0x1cc) from [<c0031cc0>] (process_one_work+0x1e8/0x330)
[    2.175305] [<c0031ad8>] (process_one_work+0x0/0x330) from [<c0031e38>] (process_scheduled_works+0x30/0x34)
[    2.186185] [<c0031e08>] (process_scheduled_works+0x0/0x34) from [<c0032b78>] (worker_thread+0x1e0/0x358)
[    2.196833]  r5:c046abd0 r4:c1822e40
[    2.200851] [<c0032998>] (worker_thread+0x0/0x358) from [<c0037cf8>] (kthread+0xa8/0xb4)
[    2.209931] [<c0037c50>] (kthread+0x0/0xb4) from [<c000f930>] (ret_from_fork+0x14/0x24)
[    2.218874]  r7:00000000 r6:00000000 r5:c0037c50 r4:c1849e7c
[    2.225185] ---[ end trace 7bafd6f951250a1e ]---
[    2.230345] gpiod_direction_output: invalid GPIO
[    2.235498] [DISP] disp_sys_gpio_set_direction,line:413:    gpio_direction_output fail!
[    2.244424] ------------[ cut here ]------------
[    2.249622] WARNING: at drivers/gpio/gpiolib.c:126 gpio_to_desc+0x28/0x4c()
[    2.257407] invalid GPIO -517
[    2.260693] Modules linked in:
[    2.264098] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W    3.10.65 #33
[    2.272190] Workqueue: events start_work
[    2.276590] Backtrace:
[    2.279369] [<c0013328>] (dump_backtrace+0x0/0x104) from [<c0013534>] (show_stack+0x18/0x1c)
[    2.288802]  r7:0000007e r6:c03f32ed r5:00000009 r4:c185bda8
[    2.295158] [<c001351c>] (show_stack+0x0/0x1c) from [<c033da38>] (dump_stack+0x20/0x28)
[    2.304161] [<c033da18>] (dump_stack+0x0/0x28) from [<c001b9dc>] (warn_slowpath_common+0x54/0x70)
[    2.314083] [<c001b988>] (warn_slowpath_common+0x0/0x70) from [<c001ba30>] (warn_slowpath_fmt+0x38/0x40)
[    2.324655]  r9:c05551e0 r8:c03f4102 r7:00000001 r6:00000000 r5:c18ce300
r4:00000001
[    2.333469] [<c001b9f8>] (warn_slowpath_fmt+0x0/0x40) from [<c014bb98>] (gpio_to_desc+0x28/0x4c)
[    2.343278]  r3:fffffdfb r2:c03f32dc
[    2.347334] [<c014bb70>] (gpio_to_desc+0x0/0x4c) from [<c014be10>] (gpio_set_value_cansleep+0x14/0x6c)
[    2.357779] [<c014bdfc>] (gpio_set_value_cansleep+0x0/0x6c) from [<c015a8f8>] (disp_sys_gpio_set_value+0x18/0x4c)
[    2.369202]  r5:c18ce300 r4:c1814000
[    2.373279] [<c015a8e0>] (disp_sys_gpio_set_value+0x0/0x4c) from [<c0170c94>] (disp_lcd_gpio_set_value+0xa8/0xc8)
[    2.384762] [<c0170bec>] (disp_lcd_gpio_set_value+0x0/0xc8) from [<c016c6ec>] (bsp_disp_lcd_gpio_set_value+0x38/0x44)
[    2.396593]  r7:c1814000 r6:c0554f68 r5:00000001 r4:00000000
[    2.402949] [<c016c6b4>] (bsp_disp_lcd_gpio_set_value+0x0/0x44) from [<c0177244>] (sunxi_lcd_gpio_set_value+0x20/0x30)
[    2.414877]  r5:00000000 r4:00000003
[    2.418947] [<c0177224>] (sunxi_lcd_gpio_set_value+0x0/0x30) from [<c017a9d0>] (LCD_bl_open+0x38/0x3c)
[    2.429372] [<c017a998>] (LCD_bl_open+0x0/0x3c) from [<c0154010>] (drv_lcd_enable+0xa0/0xe0)
[    2.438827] [<c0153f70>] (drv_lcd_enable+0x0/0xe0) from [<c015415c>] (start_work+0x10c/0x1cc)
[    2.448328]  r9:c05551e0 r8:c03f411f r7:00000001 r6:c03f40af r5:c0555454
r4:00000000
[    2.457139] [<c0154050>] (start_work+0x0/0x1cc) from [<c0031cc0>] (process_one_work+0x1e8/0x330)
[    2.466946] [<c0031ad8>] (process_one_work+0x0/0x330) from [<c0031e38>] (process_scheduled_works+0x30/0x34)
[    2.477828] [<c0031e08>] (process_scheduled_works+0x0/0x34) from [<c0032b78>] (worker_thread+0x1e0/0x358)
[    2.488487]  r5:c046abd0 r4:c1822e40
[    2.492505] [<c0032998>] (worker_thread+0x0/0x358) from [<c0037cf8>] (kthread+0xa8/0xb4)
[    2.501556] [<c0037c50>] (kthread+0x0/0xb4) from [<c000f930>] (ret_from_fork+0x14/0x24)
[    2.510496]  r7:00000000 r6:00000000 r5:c0037c50 r4:c1849e7c
[    2.516840] ---[ end trace 7bafd6f951250a1f ]---
[    2.521981] [LCD]open, step 3 finish
[    2.526862] [LCD]lcd_module_init finish
[    2.531807] sunxi-wlan wlan: wlan_busnum (0)
[    2.536711] sunxi-wlan wlan: wlan_power_num (0)
[    2.541803] sunxi-wlan wlan: Missing wlan_io_regulator.
[    2.547675] sunxi-wlan wlan: io_regulator_name ((null))
[    2.553592] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[    2.561508] ------------SUNXI_RF: Set regon for SUN3IW1P1_R6!----------------
[    2.569501] sunxi-wlan wlan: wlan_regon gpio=-1048148608  mul-sel=-1047962220  pull=-1047962264  drv_level=-1072832404  data=-1072834700
[    2.583175] sunxi-wlan wlan: can't request wlan_regon gpio 2041
[    2.589842] platform wlan: Driver sunxi-wlan requests probe deferral
[    2.597249] usb_serial_number:20080411
[    2.601996] file system registered
[    2.608705] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    2.616482] android_usb gadget: Number of LUNs=3
[    2.621715]  lun0: LUN: removable file: (no medium)
[    2.627206]  lun1: LUN: removable file: (no medium)
[    2.632621]  lun2: LUN: removable file: (no medium)
[    2.638933] android_usb gadget: android_usb ready
[    2.644590] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x51)
[    2.653868] rtc-pcf8563 0-0051: pcf8563_get_datetime: read error
[    2.660637] rtc-pcf8563 0-0051: hctosys: unable to read the hardware clock
[    2.668535] ALSA device list:
[    2.671845]   #0: audiocodec
[    2.690776] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    2.704496] devtmpfs: mounted
[    2.708993] Freeing unused kernel memory: 116K (c043f000 - c045c000)
mount: mounting none on /dev failed: Resource busy
mount: mounting pstore on /sys/fs/pstore failed: No such file or directory
-- run rc.preboot --
-- set volume --
-- play music --
-- end --
[    4.386401]
[    4.386401] insmod_device_driver
[    4.386401]
[    4.393538] device_chose finished 77!
playing '/etc/kaiji.wav': 2 ch, 48000 hz, 16 bit
[    6.587618] get ctp_name is fail, -22
[    6.591710] get ctp_power is fail, -22
[    6.595870] get ctp_power_ldo_vol is fail, -22
[    6.600973] ctp_fetch_sysconfig_para: ctp_power_io is invalid.
[    6.607556] get ctp_wakeup is fail, -22
[    6.611831] ctp_fetch_sysconfig_para: irq_gpio is invalid.
[    6.668290] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x5d)
[    6.697586] input: gt82x as /devices/virtual/input/input1
[    6.721252] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x5d)
[    6.741641] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x5d)
[    6.752059] sunxi-wlan wlan: wlan_busnum (0)
[    6.757044] sunxi-wlan wlan: wlan_power_num (0)
[    6.762099] sunxi-wlan wlan: Missing wlan_io_regulator.
[    6.767971] sunxi-wlan wlan: io_regulator_name ((null))
[    6.781877] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[    6.789892] ------------SUNXI_RF: Set regon for SUN3IW1P1_R6!----------------
[    6.797915] sunxi-wlan wlan: wlan_regon gpio=-1048148608  mul-sel=-1048257132  pull=-1048257176  drv_level=-1072832404  data=-1072834700
[    6.811606] sunxi-wlan wlan: can't request wlan_regon gpio 2041
[    6.826575] ==icn85xx_init 3281    20150319!!!!!!!!
[    6.832139] get ctp_name is fail, -22
[    6.836356] get ctp_power is fail, -22
[    6.840562] get ctp_power_ldo_vol is fail, -22
[    6.845501] ctp_fetch_sysconfig_para: ctp_power_io is invalid.
[    6.852051] get ctp_wakeup is fail, -22
[    6.856388] ctp_fetch_sysconfig_para: irq_gpio is invalid.
[    6.862480] wakeup gpio_request is failed
[    6.866964] icn85xx_ts_init:init_platform_resource err.
[    6.886106] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x5d)
[    6.896125] 20141014  ====icn85xx_ts_probe begin=====.
[    6.902050] can't find function irq on pin 0
[    6.907968] goodix_probe: request irq failed
[    6.912838] platform wlan: Driver sunxi-wlan requests probe deferral
[    6.986794] twi_stop()424 - [i2c0] i2c state(0x000000f9) isn't idle(0xf8)
[    6.994351] sunxi_i2c_core_process()787 - [i2c0] STOP failed!
[    7.000859] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x30, dev addr: 0x48)
[    7.010145] iic test error! retry = 1
[    7.028509] twi_start()387 - [i2c0] START can't sendout!
[    7.035020] twi_stop()424 - [i2c0] i2c state(0x000000f9) isn't idle(0xf8)
[    7.042561] sunxi_i2c_core_process()787 - [i2c0] STOP failed!
[    7.050347] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x30, dev addr: 0x48)
[    7.059743] iic test error! retry = 2
[    7.078510] twi_start()387 - [i2c0] START can't sendout!
[    7.085024] twi_stop()424 - [i2c0] i2c state(0x000000f9) isn't idle(0xf8)
[    7.092559] sunxi_i2c_core_process()787 - [i2c0] STOP failed!
[    7.100334] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x30, dev addr: 0x48)
[    7.109738] iic test error! retry = 3
[    7.208484] twi_start()387 - [i2c0] START can't sendout!
[    7.214779] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.225472] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.235877] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.245224] icn85xx_prog_i2c_txdata i2c write error: -70
[    7.326598] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.336062] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.346955] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.356151] icn85xx_prog_i2c_txdata i2c write error: -70
[    7.436619] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.446121] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.456935] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.466178] icn85xx_prog_i2c_txdata i2c write error: -70
[    7.474177] icn85xx_goto_progmode over, ret: -70
[    7.496735] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.507050] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.517538] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x30)
[    7.526847] icn85xx_prog_i2c_txdata i2c write error: -70
[    7.532786] write reg failed! ret: -70
[    7.536994] icn85xx_iic_test  failed.
[    7.541895] ctp_icn85xx: probe of 0-0048 failed with error -1
[    7.549991] icn85xx init ok,by zyt
[    7.624626] Unable to handle kernel NULL pointer dereference at virtual address 00000054
[    7.633836] pgd = c1b04000
[    7.636912] [00000054] *pgd=81bbf831, *pte=00000000, *ppte=00000000
[    7.643899] Internal error: Oops: 17 [#1] ARM
[    7.648729] Modules linked in: xradio_core(+) xradio_mac icn85xx_ts gt82x snd_pcm_oss snd_mixer_oss snd_seq_device
[    7.660260] CPU: 0 PID: 108 Comm: kmodloader Tainted: G        W    3.10.65 #33
[    7.668369] task: c1b002c0 ti: c1aea000 task.ti: c1aea000
[    7.674394] PC is at dev_driver_string+0xc/0x44
[    7.679426] LR is at __dev_printk+0x3c/0x6c
[    7.684073] pc : [<c019f008>]    lr : [<c019f198>]    psr: 20000013
[    7.684073] sp : c1aebdb8  ip : c1aebdc8  fp : c1aebdc4
[    7.696799] r10: 0000001a  r9 : 00000000  r8 : 00000000
[    7.702592] r7 : bf0bdab8  r6 : c0543400  r5 : c1aebdf0  r4 : 00000036
[    7.709829] r3 : c1aebdec  r2 : c1aebdf0  r1 : 00000010  r0 : 00000010
[    7.717069] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[    7.724982] Control: 0005317f  Table: 81b04000  DAC: 00000015
[    7.731351]
[    7.731351] PC: 0xc019ef88:
[    7.736084] ef88  e24b409c e1a05000 e1a06002 e1a00001 e3a02080 e1a01004 e1a07003 ebffffaf
[    7.745194] efa8  e3500000 e1a03000 e88d00c0 11a02004 03a02000 e1a01005 e3a00000 ebf9f945
[    7.754305] efc8  e24bd01c e89da8f0 e1a0c00d e92d000c e92dd800 e24cb00c e24dd008 e28b3008
[    7.763414] efe8  e59b2004 e50b3010 ebffffe0 e24bd00c e89da800 e1a0c00d e92dd800 e24cb004
[    7.772522] f008  e5903044 e3530000 0a000001 e5930000 e89da800 e5903040 e3530000 1afffffa
[    7.781632] f028  e59030cc e3530000 1afffff7 e59f0000 e89da800 c03e822d e1a0c00d e92dd830
[    7.790742] f048  e24cb004 e5913008 e1a05001 e3530000 e2400008 03e04004 0a000006 e12fff33
[    7.799852] f068  e3500a01 e1a04000 ba000002 e5951008 e59f0008 ebfadcd0 e1a00004 e89da830
[    7.808966]
[    7.808966] LR: 0xc019f118:
[    7.813700] f118  089da830 e5903000 e3530000 089da830 e593303c e5942010 e2833084 e1520003
[    7.822807] f138  189da830 e59f0014 eb067de1 e1a00004 ebfe2380 e59f0004 eb067df6 e89da830
[    7.831918] f158  c0533c50 e1a0c00d e92dd830 e24cb004 e24dd008 e3510000 e1a05002 1a000004
[    7.841028] f178  e1a01000 e59f003c eb067429 e24bd014 e89da830 e5d04001 e1a00001 ebffff98
[    7.850139] f198  e591202c e2444030 e3520000 05912008 e1a03000 e88d0024 e1a00004 e59f2008
[    7.859248] f1b8  ebffff84 eafffff0 c03f95e2 c0416f72 e1a0c00d e92d000c e92dd800 e24cb00c
[    7.868356] f1d8  e24dd010 e28b3008 e50b3018 e59b3004 e24b2014 e50b3014 e24b3018 e50b3010
[    7.877469] f1f8  ebffffd7 e24bd00c e89da800 e1a0c00d e92d000e e92dd800 e24cb010 e24dd014
[    7.886582]
[    7.886582] SP: 0xc1aebd38:
[    7.891316] bd38  00000000 c0477690 c1aebd64 c1aebd50 c003f2c4 c033f0dc c019f008 20000013
[    7.900424] bd58  ffffffff c1aebda4 c1aebdc4 c1aebd70 c000f4b8 c000a1a0 00000010 00000010
[    7.909534] bd78  c1aebdf0 c1aebdec 00000036 c1aebdf0 c0543400 bf0bdab8 00000000 00000000
[    7.918643] bd98  0000001a c1aebdc4 c1aebdc8 c1aebdb8 c019f198 c019f008 20000013 ffffffff
[    7.927752] bdb8  c1aebde4 c1aebdc8 c019f198 c019f00c c033e8e0 c033f624 c0558d6c bf0bda24
[    7.936863] bdd8  c1aebe08 c1aebde8 c019f44c c019f16c c1aebe24 c1aebe10 c03fa8da c1aebdec
[    7.945973] bdf8  c002fd6c c1aebe2c c1aebe18 c01b2ae4 c019f424 c03fa8da c1bcde50 c1bcd6d0
[    7.955084] be18  c1aea000 bf0bda24 c1aebe3c c1aebe30 bf0a7b9c c01b2ac4 c1aebe54 c1aebe40
[    7.964196]
[    7.964196] IP: 0xc1aebd48:
[    7.968929] bd48  c003f2c4 c033f0dc c019f008 20000013 ffffffff c1aebda4 c1aebdc4 c1aebd70
[    7.978039] bd68  c000f4b8 c000a1a0 00000010 00000010 c1aebdf0 c1aebdec 00000036 c1aebdf0
[    7.987147] bd88  c0543400 bf0bdab8 00000000 00000000 0000001a c1aebdc4 c1aebdc8 c1aebdb8
[    7.996257] bda8  c019f198 c019f008 20000013 ffffffff c1aebde4 c1aebdc8 c019f198 c019f00c
[    8.005368] bdc8  c033e8e0 c033f624 c0558d6c bf0bda24 c1aebe08 c1aebde8 c019f44c c019f16c
[    8.014478] bde8  c1aebe24 c1aebe10 c03fa8da c1aebdec c002fd6c c1aebe2c c1aebe18 c01b2ae4
[    8.023586] be08  c019f424 c03fa8da c1bcde50 c1bcd6d0 c1aea000 bf0bda24 c1aebe3c c1aebe30
[    8.032698] be28  bf0a7b9c c01b2ac4 c1aebe54 c1aebe40 bf0c602c bf0a7b9c c1aea000 bf0c6000
[    8.041811]
[    8.041811] FP: 0xc1aebd44:
[    8.046544] bd44  c1aebd50 c003f2c4 c033f0dc c019f008 20000013 ffffffff c1aebda4 c1aebdc4
[    8.055654] bd64  c1aebd70 c000f4b8 c000a1a0 00000010 00000010 c1aebdf0 c1aebdec 00000036
[    8.064762] bd84  c1aebdf0 c0543400 bf0bdab8 00000000 00000000 0000001a c1aebdc4 c1aebdc8
[    8.073871] bda4  c1aebdb8 c019f198 c019f008 20000013 ffffffff c1aebde4 c1aebdc8 c019f198
[    8.082979] bdc4  c019f00c c033e8e0 c033f624 c0558d6c bf0bda24 c1aebe08 c1aebde8 c019f44c
[    8.092090] bde4  c019f16c c1aebe24 c1aebe10 c03fa8da c1aebdec c002fd6c c1aebe2c c1aebe18
[    8.101199] be04  c01b2ae4 c019f424 c03fa8da c1bcde50 c1bcd6d0 c1aea000 bf0bda24 c1aebe3c
[    8.110308] be24  c1aebe30 bf0a7b9c c01b2ac4 c1aebe54 c1aebe40 bf0c602c bf0a7b9c c1aea000
[    8.119419]
[    8.119419] R2: 0xc1aebd70:
[    8.124151] bd70  00000010 00000010 c1aebdf0 c1aebdec 00000036 c1aebdf0 c0543400 bf0bdab8
[    8.133257] bd90  00000000 00000000 0000001a c1aebdc4 c1aebdc8 c1aebdb8 c019f198 c019f008
[    8.142365] bdb0  20000013 ffffffff c1aebde4 c1aebdc8 c019f198 c019f00c c033e8e0 c033f624
[    8.151475] bdd0  c0558d6c bf0bda24 c1aebe08 c1aebde8 c019f44c c019f16c c1aebe24 c1aebe10
[    8.160586] bdf0  c03fa8da c1aebdec c002fd6c c1aebe2c c1aebe18 c01b2ae4 c019f424 c03fa8da
[    8.169695] be10  c1bcde50 c1bcd6d0 c1aea000 bf0bda24 c1aebe3c c1aebe30 bf0a7b9c c01b2ac4
[    8.178806] be30  c1aebe54 c1aebe40 bf0c602c bf0a7b9c c1aea000 bf0c6000 c1aebe94 c1aebe58
[    8.187916] be50  c000a4d4 bf0c6010 c1aebe84 bf0bda70 c1aebf48 c1997800 bf0bdab8 bf0bda70
[    8.197027]
[    8.197027] R3: 0xc1aebd6c:
[    8.201759] bd6c  c000a1a0 00000010 00000010 c1aebdf0 c1aebdec 00000036 c1aebdf0 c0543400
[    8.210869] bd8c  bf0bdab8 00000000 00000000 0000001a c1aebdc4 c1aebdc8 c1aebdb8 c019f198
[    8.219977] bdac  c019f008 20000013 ffffffff c1aebde4 c1aebdc8 c019f198 c019f00c c033e8e0
[    8.229087] bdcc  c033f624 c0558d6c bf0bda24 c1aebe08 c1aebde8 c019f44c c019f16c c1aebe24
[    8.238198] bdec  c1aebe10 c03fa8da c1aebdec c002fd6c c1aebe2c c1aebe18 c01b2ae4 c019f424
[    8.247307] be0c  c03fa8da c1bcde50 c1bcd6d0 c1aea000 bf0bda24 c1aebe3c c1aebe30 bf0a7b9c
[    8.256420] be2c  c01b2ac4 c1aebe54 c1aebe40 bf0c602c bf0a7b9c c1aea000 bf0c6000 c1aebe94
[    8.265528] be4c  c1aebe58 c000a4d4 bf0c6010 c1aebe84 bf0bda70 c1aebf48 c1997800 bf0bdab8
[    8.274642]
[    8.274642] R5: 0xc1aebd70:
[    8.279376] bd70  00000010 00000010 c1aebdf0 c1aebdec 00000036 c1aebdf0 c0543400 bf0bdab8
[    8.288488] bd90  00000000 00000000 0000001a c1aebdc4 c1aebdc8 c1aebdb8 c019f198 c019f008
[    8.297598] bdb0  20000013 ffffffff c1aebde4 c1aebdc8 c019f198 c019f00c c033e8e0 c033f624
[    8.306705] bdd0  c0558d6c bf0bda24 c1aebe08 c1aebde8 c019f44c c019f16c c1aebe24 c1aebe10
[    8.315815] bdf0  c03fa8da c1aebdec c002fd6c c1aebe2c c1aebe18 c01b2ae4 c019f424 c03fa8da
[    8.324925] be10  c1bcde50 c1bcd6d0 c1aea000 bf0bda24 c1aebe3c c1aebe30 bf0a7b9c c01b2ac4
[    8.334036] be30  c1aebe54 c1aebe40 bf0c602c bf0a7b9c c1aea000 bf0c6000 c1aebe94 c1aebe58
[    8.343146] be50  c000a4d4 bf0c6010 c1aebe84 bf0bda70 c1aebf48 c1997800 bf0bdab8 bf0bda70
[    8.352258]
[    8.352258] R6: 0xc0543380:
[    8.356990] 3380  c02df884 c04673d8 c02d7e1c c02d7dc0 c056cbe0 c028fe14 c028ff18 c056cbe0
[    8.366100] 33a0  c02d4b64 c02d4b8c c056cbe0 c02c46bc c02c46d0 c056cbe0 c0299728 c0299738
[    8.375209] 33c0  c056cbe0 c028ff5c c0290000 c056cbe0 c028c67c c028c718 c056cbe0 c028b940
[    8.384319] 33e0  c028b958 c056cbe0 00000000 00000000 00000000 00000000 00000000 00000000
[    8.393427] 3400  00000000 c0600138 00000000 00000000 00000000 c05fff40 c06000c0 00000000
[    8.402533] 3420  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    8.411641] 3440  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    8.420748] 3460  00000000 00000000 01f00004 00000000 00000001 00000000 c0543478 00000000
[    8.429867] Process kmodloader (pid: 108, stack limit = 0xc1aea1b8)
[    8.436816] Stack: (0xc1aebdb8 to 0xc1aec000)
[    8.451728] bda0:                                                       c1aebde4 c1aebdc8
[    8.460999] bdc0: c019f198 c019f00c c033e8e0 c033f624 c0558d6c bf0bda24 c1aebe08 c1aebde8
[    8.470213] bde0: c019f44c c019f16c c1aebe24 c1aebe10 c03fa8da c1aebdec c002fd6c c1aebe2c
[    8.479364] be00: c1aebe18 c01b2ae4 c019f424 c03fa8da c1bcde50 c1bcd6d0 c1aea000 bf0bda24
[    8.488523] be20: c1aebe3c c1aebe30 bf0a7b9c c01b2ac4 c1aebe54 c1aebe40 bf0c602c bf0a7b9c
[    8.497665] be40: c1aea000 bf0c6000 c1aebe94 c1aebe58 c000a4d4 bf0c6010 c1aebe84 bf0bda70
[    8.506821] be60: c1aebf48 c1997800 bf0bdab8 bf0bda70 c1aebf48 c1997800 bf0bdab8 c1997a08
[    8.515908] be80: 00000000 0000001a c1aebf44 c1aebe98 c0054e5c c000a3c8 bf0bda7c 00007fff
[    8.525060] bea0: c0051fc8 c1aebed8 ffffffff 000123b7 bf0bdbb0 c4916420 c00529c0 00000028
[    8.534195] bec0: c1aea000 bf0bda7c c1aebfa4 c1aebed8 c000f520 c000a2e8 c48da520 00000000
[    8.543347] bee0: 00000000 bf0b20ac 00000003 00000000 00000000 00000000 00000000 00000000
[    8.552554] bf00: 00000000 00000000 00000000 00000000 00000000 00000000 20000013 b6e70010
[    8.561703] bf20: 000123b7 00044470 00000080 c000fa28 c1aea000 00000000 c1aebfa4 c1aebf48
[    8.570862] bf40: c0055518 c0053a1c c48d2000 00044470 c4916060 c4915f7c c4908984 00032a88
[    8.579998] bf60: 000362b8 00000000 00000000 00000000 00000018 00000019 00000013 00000000
[    8.589161] bf80: 0000000c 00000000 00000001 00000000 00000000 00000004 00000000 c1aebfa8
[    8.598302] bfa0: c000f8a0 c0055458 00000000 00000000 b6e70010 00044470 000123b7 00001f04
[    8.607455] bfc0: 00000000 00000000 00000004 00000080 00044470 00000000 b6ed0c70 00000000
[    8.616586] bfe0: bed6ec2c bed6ec10 00011ae8 b6f234cc 60000010 b6e70010 81fee831 81feec31
[    8.625673] Backtrace:
[    8.628506] [<c019effc>] (dev_driver_string+0x0/0x44) from [<c019f198>] (__dev_printk+0x3c/0x6c)
[    8.638367] [<c019f15c>] (__dev_printk+0x0/0x6c) from [<c019f44c>] (_dev_info+0x3c/0x48)
[    8.647390]  r5:bf0bda24 r4:c0558d6c
[    8.651407] [<c019f410>] (_dev_info+0x0/0x48) from [<c01b2ae4>] (sunxi_wlan_get_bus_index+0x30/0x4c)
[    8.661603]  r3:c1bcd6d0 r2:c1bcde50 r1:c03fa8da
[    8.667110] [<c01b2ab4>] (sunxi_wlan_get_bus_index+0x0/0x4c) from [<bf0a7b9c>] (xradio_plat_init+0x10/0x24 [xradio_core])
[    8.679368]  r5:bf0bda24 r4:c1aea000
[    8.683844] [<bf0a7b8c>] (xradio_plat_init+0x0/0x24 [xradio_core]) from [<bf0c602c>] (init_module+0x2c/0xcc [xradio_core])
[    8.696542] [<bf0c6000>] (init_module+0x0/0xcc [xradio_core]) from [<c000a4d4>] (do_one_initcall+0x11c/0x148)
[    8.707636]  r5:bf0c6000 r4:c1aea000
[    8.711659] [<c000a3b8>] (do_one_initcall+0x0/0x148) from [<c0054e5c>] (load_module+0x1450/0x1a3c)
[    8.721693] [<c0053a0c>] (load_module+0x0/0x1a3c) from [<c0055518>] (SyS_init_module+0xd0/0xd4)
[    8.731421] [<c0055448>] (SyS_init_module+0x0/0xd4) from [<c000f8a0>] (ret_fast_syscall+0x0/0x2c)
[    8.741321]  r6:00000004 r5:00000000 r4:00000000
[    8.746558] Code: e89da800 e1a0c00d e92dd800 e24cb004 (e5903044)
[    8.753329] ---[ end trace 7bafd6f951250a20 ]---
Segmentation fault
-- run rc.final --
insmod F1C200s-board
-- wifi connect --
insmod wifi kernel module --------------------
[    8.968847] android_usb: already disabled
[    9.152143] adb_open
[    9.155008] adb_bind_config
[    9.411108] android_work: sent uevent USB_STATE=CONNECTED
[    9.536919] android_usb gadget: high-speed config #1: android
[    9.566817] android_work: sent uevent USB_STATE=CONFIGURED



[   38.886168] xradio_wlan: gave up waiting for init of module xradio_core.
[   38.893695] xradio_wlan: Unknown symbol xradio_etf_to_wlan (err -16)

[   68.895887] xradio_wlan: gave up waiting for init of module xradio_core.
[   68.903397] xradio_wlan: Unknown symbol xradio_core_init (err -16)
[   98.905664] xradio_wlan: gave up waiting for init of module xradio_core.
[   98.913132] xradio_wlan: Unknown symbol xradio_core_deinit (err -16)
[  128.915430] xradio_wlan: gave up waiting for init of module xradio_core.
[  128.922898] xradio_wlan: Unknown symbol xradio_etf_to_wlan (err -16)
[  158.925189] xradio_wlan: gave up waiting for init of module xradio_core.
[  158.932692] xradio_wlan: Unknown symbol xradio_core_init (err -16)

[  188.934944] xradio_wlan: gave up waiting for init of module xradio_core.
[  188.942409] xradio_wlan: Unknown symbol xradio_core_deinit (err -16)
insmod: can't insert '/lib/modules/3.10.65/xradio_wlan.ko': Resource busy
start wpa_supplicant ------------------------
Successfully initialized wpa_supplicant
Line 6: Invalid passphrase length 6 (expected: 8..63) '******"'.
Line 6: failed to parse psk '"******"'.
Line 7: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
start udhcpc ----------------
-- end --


BusyBox v1.27.2 () built-in shell (ash)

udhcpc: SIOCGIFINDEX: No such device
 _____  _              __     _
|_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
  | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
  | |  | || | || _ |  |_____||_||_|_||___||_,_|
  |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
 ----------------------------------------------
 Tina Linux (Neptune, 5C1C9C53)
 ----------------------------------------------
root@TinaLinux:/#

mtd分区已经改好:

[    0.819786] 0x000000000000-0x000000080000 : "uboot"
[    0.827456] 0x000000080000-0x000000100000 : "bootlogo"
[    0.835094] 0x000000100000-0x000000120000 : "env"
[    0.842238] 0x000000120000-0x0000003a0000 : "boot"
[    0.849440] 0x0000003a0000-0x0000007a0000 : "rootfs"
[    0.856900] 0x0000007a0000-0x000000820000 : "rootfs_data"
[    0.864792] 0x000000820000-0x000000830000 : "misc"
[    0.872188] 0x000000830000-0x000000840000 : "private"
[    0.879780] 0x000000840000-0x000001000000 : "UDISK"

这是之前的:

[    0.819592] 0x000000000000-0x000000080000 : "uboot"
[    0.827240] 0x000000080000-0x000000100000 : "bootlogo"
[    0.834874] 0x000000100000-0x000000120000 : "env"
[    0.842023] 0x000000120000-0x0000003a0000 : "boot"
[    0.849237] 0x0000003a0000-0x0000006e0000 : "rootfs"
[    0.856700] 0x0000006e0000-0x000000760000 : "rootfs_data"
[    0.864598] 0x000000760000-0x000000770000 : "misc"
[    0.872003] 0x000000770000-0x000000780000 : "private"
[    0.879597] 0x000000780000-0x000001000000 : "UDISK"

离线

楼主 #2 2021-03-30 09:10:59

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

root@TinaLinux:/# cat /rom/etc/mtab
rootfs / rootfs rw 0 0
/dev/root /rom squashfs ro,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=13208k,nr_inodes=3302,mode=755 0 0
/proc /proc proc rw,relatime 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
sys /sys sysfs rw,relatime 0 0
/dev/by-name/rootfs_data /overlay jffs2 rw,relatime 0 0
overlayfs:/overlay / overlayfs rw,noatime,lowerdir=/,upperdir=/overlay 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/mtdblock8 /mnt/UDISK jffs2 rw,relatime 0 0

根文件系统由两部分构成,
/dev/by-name/rootfs
/dev/by-name/rootfs_data

其中 rootfs 是squashfs 格式压缩只读文件系统,
rootfs_data 是jffs2可读写文件系统

离线

#3 2021-03-30 09:23:56

MagicKind
会员
注册时间: 2021-03-25
已发帖子: 41
积分: 18.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

大佬,请问下,你知道VFS: Cannot open root device "mtdblock4" or unknown-block(0,0): error -6的问题是什么吗

离线

#4 2021-03-30 09:35:55

飞翔工控
会员
注册时间: 2019-11-21
已发帖子: 95
积分: 93.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

MagicKind 说:

大佬,请问下,你知道VFS: Cannot open root device "mtdblock4" or unknown-block(0,0): error -6的问题是什么吗

https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

#define ENXIO            6      /* No such device or address */

/dev/mtdblock4 设备不存在

离线

楼主 #5 2021-03-30 09:41:20

无根浮萍
会员
注册时间: 2021-01-14
已发帖子: 62
积分: 31

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

通过这个实现文件系统初始化
[    0.000000] Kernel command line: enforcing=1 earlyprintk=sunxi-uart,0x01c25000 initcall_debug=0 console=ttyS1,115200 loglevel=8 root=/dev/mtdblock4 init=/pseudo_init rdinit=/rdinit partitions=bootlogo@mtdblock1:env@mtdblock2:boot@mtdblock3:rootfs@mtdblock4:rootfs_data@mtdblock5:misc@mtdblock6:private@mtdblock7:UDISK@mtdblock8 cma=32M fb_base=0x83f00000 androidboot.serialno=<NULL> boot_type=3


/pseudo_init 文件内容:

#!/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
}

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
                        ;;
                *)
                        /usr/sbin/fsck.ext4 -y /dev/by-name/rootfs_data &>/dev/null
                        /bin/mount -t ext4 /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 /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(){
        [ -L /dev/by-name/extend ] || return

        /bin/mkdir -p /tmp/usr
        /bin/mount /dev/by-name/extend /tmp/usr >/dev/null || {
                rm -rf /tmp/usr
                return
        }

        ! [ -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
                                ;;
                        *)
                                /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(){
        mkdir -p /var/lock
        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)"

        mkdir -p /overlay

        case "${root_dev}" in
                /dev/mtdblock*)
                        /bin/mount -t jffs2 /dev/by-name/rootfs_data /overlay || {
                                /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 /overlay
                        }
                        ;;
                *)
                        /usr/sbin/fsck.ext4 -y /dev/by-name/rootfs_data &>/dev/null
                        /bin/mount -t ext4 /dev/by-name/rootfs_data /overlay || {
                                /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 /dev/by-name/rootfs_data /overlay
                        }
                        ;;
        esac

        fgrep -sq overlay /proc/filesystems || {
                /bin/echo "skip mount overlayfs as kernel not support"
                return
        }

        fgrep -sq '/dev/root / squashfs ro' /proc/mounts || {
                /bin/echo "skip mount overlayfs as now rootfs not squashfs"
                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

        if [ x"$overlay_need_workdir" = x"0" ]; then
                mount -n -t overlayfs overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay /mnt
        else
                mkdir -p /overlay/upper /overlay/workdir
                mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/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/overlay -o noatime,move /overlay
        fgrep -sq '/rom/usr' /proc/mounts && {
                mount -n /rom/usr -o noatime,move /usr
                if [ x"$overlay_need_workdir" = x"0" ]; then
                        mkdir -p /overlay/usr
                        mount -n -t overlayfs overlayfs:/overlay -o rw,noatime,lowerdir=/usr,upperdir=/overlay/usr /usr
                else
                        mkdir -p /overlay/upper/usr /overlay/workdir/usr
                        mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/usr,upperdir=/overlay/upper/usr,workdir=/overlay/workdir/usr /usr
                fi
        }
}

set_parts_by_name() {
        # create by-name
        local parts part
        /bin/mkdir -p /dev/by-name
        parts=$partitions
        for part in $(/bin/echo ${parts} | /bin/sed 's/:/ /g')
        do
                [ ! -e /dev/${part#*@} ] && 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 $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
}

#----------------------------------------------------------------
/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 pstore pstore /sys/fs/pstore

#common but slow
set_parts_by_name

mount_sec_storage

mount_usr
[ x"$MOUNT_ETC" = x"1" ] && mount_etc
[ x"$MOUNT_OVERLAY" = x"1" ] && mount_overlay
mount_app

#hardcode but fast
#mount_etc_hardcode
#set_parts_by_name_hardcode
#mount_usr

exec /sbin/init

离线

#6 2021-03-30 09:42:32

MagicKind
会员
注册时间: 2021-03-25
已发帖子: 41
积分: 18.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

飞翔工控 说:
MagicKind 说:

大佬,请问下,你知道VFS: Cannot open root device "mtdblock4" or unknown-block(0,0): error -6的问题是什么吗

https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

#define ENXIO            6      /* No such device or address */

/dev/mtdblock4 设备不存在

这个不是系统会自己创建的吗

离线

#7 2021-03-30 09:44:40

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

MagicKind 说:
飞翔工控 说:
MagicKind 说:

大佬,请问下,你知道VFS: Cannot open root device "mtdblock4" or unknown-block(0,0): error -6的问题是什么吗

https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

#define ENXIO            6      /* No such device or address */

/dev/mtdblock4 设备不存在

这个不是系统会自己创建的吗

要追溯起来,可复杂了。
要提供dtb/bootargs mtdparts传入分区参数,要勾选mtd和mtdblock驱动

离线

#8 2021-03-30 09:50:02

MagicKind
会员
注册时间: 2021-03-25
已发帖子: 41
积分: 18.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

raspberryman 说:
MagicKind 说:
飞翔工控 说:

https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

#define ENXIO            6      /* No such device or address */

/dev/mtdblock4 设备不存在

这个不是系统会自己创建的吗

要追溯起来,可复杂了。
要提供dtb/bootargs mtdparts传入分区参数,要勾选mtd和mtdblock驱动

这个都勾上了的

离线

#9 2021-03-30 09:55:55

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

MagicKind,麻烦重新开帖,把你的日志和.config配置都贴上,否则谁能猜中?

离线

#10 2021-03-30 10:09:29

MagicKind
会员
注册时间: 2021-03-25
已发帖子: 41
积分: 18.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

raspberryman 说:

MagicKind,麻烦重新开帖,把你的日志和.config配置都贴上,否则谁能猜中?

好的,麻烦大佬帮忙看一下了

求助F1C200S启动时,无法挂在根文件
http://whycan.com/t_6238.html
(出处:哇酷开发者社区)

离线

#11 2022-09-19 20:27:50

jkl
会员
注册时间: 2019-11-18
已发帖子: 263
积分: 146.5

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

@无根浮萍
楼主,你用spi-nor的logo能够正常显示吗?我从nandflash变成nor,然后logo就不正常显示了,这是要改那个地方吗,分区跟您上面是一样的,只是分区大小不一样,tina系统里面的logo显示是在哪里实现的呀

离线

#12 2024-01-01 15:01:59

Nicholas
会员
注册时间: 2023-11-23
已发帖子: 6
积分: 3

Re: 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享]

烧录nor之后,什么反应也没有,有遇到这问题的大佬吗?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn