页次: 1
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 init=/linuxrc loglevel=8 partitions= mac_addr= uid=1234567890 kmemleak=on rootfstype=cramfs
这是启动日志,是看这里吗?
完整如下:
HELLO! BOOT0 is starting!
get_ifm reg_val=7
===i2c gpio === 22777777
axp read fail, maybe no pmu
set pmu vol failed,maybe no pmu
DRAM DRIVE INFO: V0.7
DRAM Type = 2 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
DRAM CLK = 408 MHz
DRAM zq value: 000039bb
DRAM size = 64 MB
Succeed in reading Boot1 file head.
Jump to secend Boot.
[ 0.484]
U-Boot 2011.09-rc1-00000-g63a73aff4-dirty (Sep 02 2020 - 02:51:17) Allwinner Technology
[ 0.493]version: 1.1.0
[ 0.499]pmbus:
===i2c gpio === 22777777
ready
axp read error
probe axp20x failed
axp_probe fail,run clock=912
set power on vol to default
axp_set_power_supply_output dcdc2_vol = 1250
axp set dcdc2_vol to 1250 failed
axp_set_power_supply_output dcdc3_vol = 3300
axp set dcdc3_vol to 3300 failed
axp_set_power_supply_output aldo2_vol = 2500
axp set aldo2_vol to 2500 failed
axp_set_power_supply_output aldo3_vol = 3000
axp set aldo3_vol to 3000 failed
axp_set_power_supply_output ldo1_vol = 3300
axp set ldo1_vol to 3300 failed
axp_set_power_supply_output ldo2_vol = 3000
axp set ldo2_vol to 3000 failed
axp_set_power_supply_output ldo3_vol = 3000
axp set ldo3_vol to 3000 failed
[ 0.836]DRAM: 64 MiB
[debug_jaosn]:use the clock in sys_config
OK
[ 0.858]sunxi flash init ok
hello @flash_speed=1
env_relocate_spec storage_type = 3
In: serial
Out: serial
Err: serial
WORK_MODE_BOOT
read bootlogo partition fail,start_block=0x0,rblock=0x0 ,ret=0
Not a JPG file ?
parse_header failed
Use decode 2x1 sampling
sunxi_read_bootlogo: jpg convert argb
[ 0.892]Hit any key to stop autoboot: 0
read boot or recovery all
try to read all
[ 1.110]sunxi flash read :offset 4000, 3145728 bytes OK
## Booting kernel from Legacy Image at 40007fc0 ...
Image Name: Linux-3.4.39
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2352264 Bytes = 2.2 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
[ 1.161]
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.4.39 (root@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #104 Wed Sep 2 02:54:35 PDT 2020
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun8i
[ 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 c04b01a8, node_mem_map c04e5000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16256 pages, LIFO batch:3
[ 0.000000] script_init enter!
[ 0.000000] script_init exit!
[ 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: console=ttyS0,115200 root=/dev/mtdblock2 init=/linuxrc loglevel=8 partitions= mac_addr= uid=1234567890 kmemleak=on rootfstype=cramfs
[ 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: 59868k/59868k available, 5668k 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 - 0xc0450000 (4384 kB)
[ 0.000000] .init : 0xc0450000 - 0xc0474000 ( 144 kB)
[ 0.000000] .data : 0xc0474000 - 0xc04b08c0 ( 243 kB)
[ 0.000000] .bss : 0xc04b08e4 - 0xc04e4240 ( 207 kB)
[ 0.000000] NR_IRQS:544
[ 0.000000] 524 ahb1 set parent pll_periph0d2
[ 0.000000] Architected local timer running at 24.00MHz.
[ 0.000000] Switching to timer-based delay loop
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000167] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[ 0.000192] pid_max: default: 32768 minimum: 301
[ 0.000347] Mount-cache hash table entries: 512
[ 0.000889] CPU: Testing write buffer coherency: ok
[ 0.001150] Setting up static identity map for 0x4033ae58 - 0x4033aeb0
[ 0.001809] devtmpfs: initialized
[ 0.003670] pinctrl core: initialized pinctrl subsystem
[ 0.003861] NET: Registered protocol family 16
[ 0.004209] DMA: preallocated 128 KiB pool for atomic coherent allocations
[ 0.004271] script_sysfs_init success
[ 0.004310] sunxi_dump_init success
[ 0.005103] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[ 0.006048] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[ 0.006851] tsc2003 device registered
[ 0.007170] [sunxi-module]: [sunxi-module.0] probe success
[ 0.007222] script config pll_isp to 360 Mhz
[ 0.007255] Not Found clk pll_video in script
[ 0.007270] script config pll_ve to 360 Mhz
[ 0.007291] Not Found clk pll_periph0 in script
[ 0.007301] Not Found clk pll_de in script
[ 0.007309] sunxi_default_clk_init
[ 0.007318] try to set pll6ahb1 to 200000000
[ 0.007328] Error not get clk pll6ahb1
[ 0.007341] Error not get clk pll6ahb1try to set ahb1 to 200000000
[ 0.007362] try to set apb1 to 100000000
[ 0.007629] ===fe3o4==== sunxi_root_procfs_attach ret:0
[ 0.011542] bio: create slab <bio-0> at 0
[ 0.011793] pwm module init!
[ 0.013436] SCSI subsystem initialized
[ 0.013669] usbcore: registered new interface driver usbfs
[ 0.013747] usbcore: registered new interface driver hub
[ 0.013920] usbcore: registered new device driver usb
[ 0.014062] twi_chan_cfg()342 - [twi0] has no twi_speed!
[ 0.014075] twi_chan_cfg()353 - [twi0] has no twi_regulator.
[ 0.014089] twi_chan_cfg()342 - [twi1] has no twi_speed!
[ 0.014099] twi_chan_cfg()353 - [twi1] has no twi_regulator.
[ 0.014110] sunxi_i2c_adap_init()1563 - Sunxi I2C init channel 0
[ 0.014266] ++sunxi_i2c_probe
[ 0.014317] twi_request_gpio()406 - Pinctrl init 0 ... [twi0]
[ 0.014432] twi_clk_write_reg()241 - twi_clk_write_reg: clk_n = 0, clk_m = 5
[ 0.014572] sunxi_i2c_probe()1250 - I2C: i2c-0: sunxi I2C adapter
[ 0.014592] sunxi_i2c_probe()1251 - TWI_CTL 0xf1c2ac0c: 0x00000040
[ 0.014606] sunxi_i2c_probe()1252 - TWI_STAT 0xf1c2ac10: 0x000000f8
[ 0.014620] sunxi_i2c_probe()1253 - TWI_CLK 0xf1c2ac14: 0x00000028
[ 0.014633] sunxi_i2c_probe()1254 - TWI_SRST 0xf1c2ac18: 0x00000000
[ 0.014645] sunxi_i2c_probe()1255 - TWI_EFR 0xf1c2ac1c: 0x00000000
[ 0.014853] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.015754] cfg80211: Calling CRDA to update world regulatory domain
[ 0.016724] Switching to clocksource arch_sys_counter
[ 0.019968] NET: Registered protocol family 2
[ 0.019968] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.020353] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.020404] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.020434] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.020446] TCP: reno registered
[ 0.020460] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.020483] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.020754] NET: Registered protocol family 1
[ 0.021131] RPC: Registered named UNIX socket transport module.
[ 0.021147] RPC: Registered udp transport module.
[ 0.021156] RPC: Registered tcp transport module.
[ 0.021165] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.021553] [pm]aw_pm_init!
[ 0.021574] standby_mode = 1.
[ 0.021583] wakeup src cnt is : 3.
[ 0.021644] sunxi_reg_init enter
[ 0.023341] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.023395] NFS: Registering the id_resolver key type
[ 0.023773] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.024009] msgmni has been set to 116
[ 0.025032] io scheduler noop registered
[ 0.025048] io scheduler deadline registered
[ 0.025135] io scheduler cfq registered (default)
[ 0.025425] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[ 0.025759] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[ 0.025777] sw_uart_pm()890 - uart0 clk is already enable
[ 0.025799] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[ 0.121509] console [ttyS0] enabled
[ 0.718958] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[ 0.726690] spi spi0: master is unqueued, this is deprecated
[ 0.733170] m25p_probe()1007 - Use the Dual Mode Read.
[ 0.738960] NorFlash ID: 0xef4018 - 0x0
[ 0.743278] NorFlash Unique ID: d2668858c71b3c2c6933442c630d1e16
[ 0.749963] m25p80 spi0.0: found W25q128, expected at25df641
[ 0.756262] m25p80 spi0.0: W25q128 (16384 Kbytes)
[ 0.762966] @@@[debug_jaosn]: Invalid partitions count: 4 8
[ 0.769640] Creating 7 MTD partitions on "spi0.0":
[ 0.775006] 0x000000000000-0x000000040000 : "uboot"
[ 0.781496] 0x000000040000-0x000000340000 : "boot"
[ 0.787735] 0x000000340000-0x000000bb0000 : "system"
[ 0.794240] 0x000000bb0000-0x000000eb0000 : "app"
[ 0.800436] 0x000000eb0000-0x000000f30000 : "cfg"
[ 0.806527] 0x000000f30000-0x000000f40000 : "env"
[ 0.812677] 0x000000f40000-0x000000f50000 : "private"
[ 0.819447] priv->phy_ext = INT_PHY
[ 0.824620] Failed to alloc md5
[ 0.828150] eth0: Use random mac address
[ 0.832684] usbcore: registered new interface driver asix
[ 0.838733] usbcore: registered new interface driver cdc_ether
[ 0.845268] usbcore: registered new interface driver net1080
[ 0.851597] usbcore: registered new interface driver rndis_host
[ 0.858223] usbcore: registered new interface driver cdc_subset
[ 0.864846] usbcore: registered new interface driver zaurus
[ 0.871105] usbcore: registered new interface driver cdc_ncm
[ 0.877385] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.904723] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.913654] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[ 0.922174] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[ 0.940049] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[ 0.947357] hub 1-0:1.0: USB hub found
[ 0.951580] hub 1-0:1.0: 1 port detected
[ 0.956383] sunxi-ehci sunxi-ehci.1: remove, state 1
[ 0.961933] usb usb1: USB disconnect, device number 1
[ 1.262335] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[ 1.278618] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.305565] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[ 1.314096] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[ 1.322547] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[ 1.384684] hub 1-0:1.0: USB hub found
[ 1.388864] hub 1-0:1.0: 1 port detected
[ 1.393652] sunxi-ohci sunxi-ohci.1: remove, state 1
[ 1.399174] usb usb1: USB disconnect, device number 1
[ 1.405388] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[ 1.421691] Initializing USB Mass Storage driver...
[ 1.427185] usbcore: registered new interface driver usb-storage
[ 1.433864] USB Mass Storage support registered.
[ 1.439109] usbcore: registered new interface driver usbserial
[ 1.445647] usbcore: registered new interface driver usbserial_generic
[ 1.452940] USB Serial support registered for generic
[ 1.458542] usbserial: USB Serial Driver core
[ 1.463426] usbcore: registered new interface driver option
[ 1.469638] USB Serial support registered for GSM modem (1-port)
[ 1.476475] g_ether gadget: using random self ethernet address
[ 1.482982] g_ether gadget: using random host ethernet address
[ 1.489981] usb0: MAC 46:28:aa:31:a0:48
[ 1.494279] usb0: HOST MAC ba:25:34:fa:6f:60
[ 1.499094] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.508579] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.518054] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ef0, 0xc39dde00, ep1out-bulk)
[ 1.527620] gadget_is_softwinner_otg is not -int
[ 1.532746] gadget_is_softwinner_otg is not -int
[ 1.537889] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.547366] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.556838] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ef0, 0xc39dde00, ep1out-bulk)
[ 1.566402] gadget_is_softwinner_otg is not -int
[ 1.571527] gadget_is_softwinner_otg is not -int
[ 1.576657] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 1.584019] g_ether gadget: g_ether ready
[ 1.588583] sunxikbd_script_init: key para not found, used default para.
[ 1.596678] tsc2003_ts_init
[ 1.599780] =====ctp_fetch_sysconfig_para=====.
[ 1.604936] ctp_fetch_sysconfig_para: ctp_unused.
[ 1.610259] =========script_get_item_err============
[ 1.615765] tsc2003_ts_init: ctp_fetch_sysconfig_para err.
[ 1.622372] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[ 1.629770] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[ 1.636946] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[ 1.648157] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[ 1.655622] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[ 1.661818] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[ 1.671449] [mmc]: SD/MMC/SDIO Host Controller Driver(v1.114 2015-6-2 10:21) Compiled in Aug 26 2020 at 01:08:27
[ 1.682809] [mmc]: get mmc0's sdc_power failed
[ 1.687752] [mmc]: MMC host used card: 0x1, boot card: 0x0, io_card 0
[ 1.695687] [mmc]: sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 1.708546] usbcore: registered new interface driver usbhid
[ 1.714760] usbhid: USB HID core driver
[ 1.721200] asoc: sndcodec <-> sunxi-codec mapping ok
[ 1.728795] TCP: cubic registered
[ 1.732526] NET: Registered protocol family 17
[ 1.737523] Registering the dns_resolver key type
[ 1.743014] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 1.751542] ThumbEE CPU extension supported.
[ 1.756297] Registering SWP/SWPB emulation handler
[ 1.762544] sunxi-rtc sunxi-rtc: setting system clock to 2020-09-03 19:23:51 UTC (1599161031)
[ 1.773443] [wifi module_pm]: select module num is 6
[ 1.778967] [wifi module_pm]: step [0] failed to fetch module_power0
[ 1.786075] [wifi module_pm]: mod has no chip_en gpio
[ 1.791688] [wifi module_pm]: failed to fetch lpo_use_apclk
[ 1.798170] [wifi_pm]: wifi gpio init is OK !!
[ 1.803222] ALSA device list:
[ 1.806513] #0: audiocodec
[ 1.814425] VFS: Mounted root (cramfs filesystem) readonly on device 31:2.
[ 1.822173] devtmpfs: mounted
[ 1.825652] Freeing init memory: 144K
chmod: /etc/hotplug/insert.sh: Read-only file system
chmod: /etc/hotplug/remove.sh: Read-only file system
cp cron config file to /var/spool/cron/crontabs
Starting logging: crond[69]: crond (busybox 1.27.1) started, log level 8
OK
read-only file system detected...done
Starting nginx...
start-stop-daemon: can't execute '/usr/sbin/nginx': No such file or directory
Starting telnetd: OK
Starting mount: umount: can't unmount /dev/mmcblk0p1: No such file or directory
mount: mounting /dev/mmcblk0p1 on /app/sd01 failed: No such file or directory
/etc/init.d/S60mount: line 61: /app/sd01/webserver/nginx/sbin/nginx: not found
OK
Starting network:
method: 2
address: 192.168.0.100
netmask: 255.255.255.0
gateway: 192.168.0.1
dns: 192.168.0.1
[ 5.587063] gmac0: probed
[ 5.595756] eth0: PHY ID 00441400 at 0 IRQ poll (gmac0-0:00)
OK
Starting S80system:
Welcome to Buildroot
buildroot login: [ 9.595171] PHY: gmac0-0:00 - Link is Up - 100/Full
购买链接https://item.taobao.com/item.htm?id=566547808242 直接能在V3S ZERO开发板的MIPI接口上使用
beign to init dram
DRAM DRIVE INFO: V0.7
DRAM Type = 2 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
DRAM CLK = 408 MHz
DRAM zq value: 000039bb
DRAM size = 64 MB
init dram ok
fes1 reg_val=7
[ 2.368]
U-Boot 2011.09-rc1-00000-g63a73aff4-dirty (Apr 10 2020 - 14:53:13) Allwinner Technology
[ 2.377]version: 1.1.0
[ 2.384]pmbus:
===i2c gpio === 22777777
ready
axp read error
probe axp20x failed
axp_probe fail,run clock=912
set power on vol to default
axp_set_power_supply_output dcdc2_vol = 1250
axp set dcdc2_vol to 1250 failed
axp_set_power_supply_output dcdc3_vol = 3300
axp set dcdc3_vol to 3300 failed
axp_set_power_supply_output aldo2_vol = 2500
axp set aldo2_vol to 2500 failed
axp_set_power_supply_output aldo3_vol = 3000
axp set aldo3_vol to 3000 failed
axp_set_power_supply_output ldo1_vol = 3300
axp set ldo1_vol to 3300 failed
axp_set_power_supply_output ldo2_vol = 3000
axp set ldo2_vol to 3000 failed
axp_set_power_supply_output ldo3_vol = 3000
axp set ldo3_vol to 3000 failed
[ 2.720]DRAM: 64 MiB
save config for small mem_size
workmode = 16
[debug_jaosn]:use the clock in sys_config
OK
spinor id is 1920c2
try nor successed
sunxi sprite has installed spi function
read flash error
env_relocate_spec storage_type = 3
In: serial
Out: serial
Err: serial
mbr not exist
[ 2.792]Hit any key to stop autoboot: 0
work mode=0x10
run usb efex
delay time 2500
usb init ok
set address 0x4
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x1
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
sunxi spinor is already inited
flash size =32 M
按照https://www.cnblogs.com/kinglaw/p/9003923.html网站教程
生成镜像文件,烧录过程串口打印数据如上,稍不进去,出现error4
换了张SD可以了,但是按照
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
sudo tar xvf output/images/rootfs.tar -C /media/bao/rootfs
这样子烧写到SD卡
偶尔几次就又启动不了,偶尔几次又可以
按照论坛里的教程:
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
在V3S ZERO开发板上运行后,出现如下情况:
[ 1.391582] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.401860] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.552817] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[ 1.567509] EXT4-fs (mmcblk0p2): recovery complete
[ 1.577550] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.585719] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.594166] devtmpfs: mounted
[ 1.598397] Freeing unused kernel memory: 1024K
[ 1.613776] Starting init: /sbin/init exists but couldn't execute it (error -5)
[ 1.623757] Starting init: /bin/sh exists but couldn't execute it (error -5)
[ 1.630930] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 1.645087] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero #1
[ 1.652298] Hardware name: Allwinner sun8i Family
[ 1.657036] [<c010e514>] (unwind_backtrace) from [<c010b1b8>] (show_stack+0x10/0x14)
[ 1.664779] [<c010b1b8>] (show_stack) from [<c065e5a4>] (dump_stack+0x88/0x9c)
[ 1.672001] [<c065e5a4>] (dump_stack) from [<c011b48c>] (panic+0xdc/0x248)
[ 1.678875] [<c011b48c>] (panic) from [<c06700ec>] (kernel_init+0x100/0x110)
[ 1.685919] [<c06700ec>] (kernel_init) from [<c0107538>] (ret_from_fork+0x14/0x3c)
[ 1.693492] Rebooting in 5 seconds..
板子启动不了?是什么情况?
如果把第二步改一下:
4) 建立第二个分区,大小100M,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
第二个分区改成100M,就可以正常启动。200M就不行了,是什么问题呢?
遇到同样问题,该如何解决?
https://whycan.cn/t_561.html
按照这个论坛做的,目前不知道该如何解决问题
按照论坛里的教程:
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
在V3S ZERO开发板上运行后,出现如下情况:
[ 1.391582] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.401860] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.552817] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[ 1.567509] EXT4-fs (mmcblk0p2): recovery complete
[ 1.577550] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.585719] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.594166] devtmpfs: mounted
[ 1.598397] Freeing unused kernel memory: 1024K
[ 1.613776] Starting init: /sbin/init exists but couldn't execute it (error -5)
[ 1.623757] Starting init: /bin/sh exists but couldn't execute it (error -5)
[ 1.630930] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 1.645087] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero #1
[ 1.652298] Hardware name: Allwinner sun8i Family
[ 1.657036] [<c010e514>] (unwind_backtrace) from [<c010b1b8>] (show_stack+0x10/0x14)
[ 1.664779] [<c010b1b8>] (show_stack) from [<c065e5a4>] (dump_stack+0x88/0x9c)
[ 1.672001] [<c065e5a4>] (dump_stack) from [<c011b48c>] (panic+0xdc/0x248)
[ 1.678875] [<c011b48c>] (panic) from [<c06700ec>] (kernel_init+0x100/0x110)
[ 1.685919] [<c06700ec>] (kernel_init) from [<c0107538>] (ret_from_fork+0x14/0x3c)
[ 1.693492] Rebooting in 5 seconds..
板子启动不了?是什么情况?
如果把第二步改一下:
4) 建立第二个分区,大小100M,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
第二个分区改成100M,就可以正常启动。200M就不行了,是什么问题呢?
7寸屏 1024*600分辨率基本成功。
更改uboot/include/configs/sunxi_common.h #define CONFIG_SUNXI_MAX_FB_SIZE (3 << 20)
uboot/configs目录下增加LicheePi_Zero_1024x600LCD_defconfig文件
文件内容为:
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
# CONFIG_ARMV7_NONSEC is not set
CONFIG_MACH_SUN8I_V3S=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_ZQ=14779
CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:24,pclk_khz:55000,le:100,ri:170,up:10,lo:15,hs:50,vs:10,sync:3,vmode:0"
CONFIG_VIDEO_LCD_BL_PWM="PB4"
# CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set
CONFIG_DEFAULT_DEVICE_TREE="sun8i-v3s-licheepi-zero"
# CONFIG_CONSOLE_MUX is not set
CONFIG_SPL=y
CONFIG_CMD_BOOTMENU=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMINFO=y
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
# CONFIG_NETDEVICES is not set
CONFIG_OF_LIBFDT_OVERLAY=y
编译的时候使用
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_1024x600LCD_defconfig
这样7寸屏就可以驱动起来了。
但是背光该怎么控制?背光有点暗
这是我编译好的uboot, linux&dtb, rootfs: V3s_TFCard.7z
荔枝派Zero开发板网卡验证通过, 登陆账号root,无密码。
sha1sum文件校验码: 43c635802438e26c8fe96ada66255b664d52cddd
这里下载的文件按照步骤烧写到SD卡,V3S无法启动,出现 Starting init: /sbin/init exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Rebooting in 5 seconds..
这种错误,什么原因呢?
本站搜一下 dropbear:
https://whycan.cn/t_2035.html
https://whycan.cn/t_639.html
https://whycan.cn/t_710.html
https://whycan.cn/t_547.html还有很多, 你自己搜索一下。
我是直接从论坛里下载的别人做好的镜像文件,烧写到SD卡测试硬件好不好的,没有自己去编译,目前不清楚该镜像能否支持远程登录,所以问一下,能否登录到设备,看一下设备内部信息。
# cat /proc/interrupts CPU0 19: 4012472 GIC-0 27 Level arch_timer 21: 0 GIC-0 50 Level /soc/timer@01c20c00 22: 0 GIC-0 82 Level 1c02000.dma-controller 23: 0 GIC-0 103 Level musb-hdrc.1.auto 24: 0 GIC-0 104 Level ehci_hcd:usb1 25: 0 GIC-0 105 Level ohci_hcd:usb2 30: 0 GIC-0 62 Level sun4i-a10-lradc-keys 33: 425 GIC-0 33 Level ttyS1 34: 8 GIC-0 34 Level ttyS2 35: 5740272 GIC-0 38 Level mv64xxx_i2c 36: 181 GIC-0 114 Level eth0 37: 1161519 GIC-0 97 Level sun6i-spi IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 CPU stop interrupts IPI5: 0 IRQ work interrupts IPI6: 0 completion interrupts Err: 0
30: 0 GIC-0 62 Level sun4i-a10-lradc-keys
主线是这样的。
我这边用的是V3S芯片
# cat /proc/interrupts CPU0 19: 4012472 GIC-0 27 Level arch_timer 21: 0 GIC-0 50 Level /soc/timer@01c20c00 22: 0 GIC-0 82 Level 1c02000.dma-controller 23: 0 GIC-0 103 Level musb-hdrc.1.auto 24: 0 GIC-0 104 Level ehci_hcd:usb1 25: 0 GIC-0 105 Level ohci_hcd:usb2 30: 0 GIC-0 62 Level sun4i-a10-lradc-keys 33: 425 GIC-0 33 Level ttyS1 34: 8 GIC-0 34 Level ttyS2 35: 5740272 GIC-0 38 Level mv64xxx_i2c 36: 181 GIC-0 114 Level eth0 37: 1161519 GIC-0 97 Level sun6i-spi IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 CPU stop interrupts IPI5: 0 IRQ work interrupts IPI6: 0 completion interrupts Err: 0
30: 0 GIC-0 62 Level sun4i-a10-lradc-keys
主线是这样的。
该怎么改?
# cat /proc/interrupts
CPU0
29: 119950 GIC arch_timer
30: 0 GIC arch_timer
32: 68 GIC uart0
38: 0 GIC twi0
47: 0 GIC PB
49: 0 GIC PG
50: 0 GIC sunxi_timer0
61: 0 GIC audio_hmic_irq
62: 464 GIC sunxikbd
72: 0 GIC sunxi-rtc alarm
82: 11424 GIC sunxi_dmac
92: 100 GIC sunxi-mmc
97: 71266 GIC spi0
103: 0 GIC sunxi_usb_udc
114: 4640 GIC gmac0
Err: 0
我看了贴子,是不是中断号不对?
晕哥,LRADC按键 在/dev/input 下 用cat event0 | hexdump 命令
为什么有时上电后能捕捉到事件:
0000000 002f 0000 d95c 0002 0001 0073 0001 0000
0000010 002f 0000 d967 0002 0000 0000 0000 0000
0000020 002f 0000 563e 0003 0001 0073 0000 0000
0000030 002f 0000 5646 0003 0000 0000 0000 0000
0000040 002f 0000 b411 0003 0001 0073 0001 0000
0000050 002f 0000 b41a 0003 0000 0000 0000 0000
0000060 002f 0000 5055 0004 0001 0073 0000 0000
0000070 002f 0000 505f 0004 0000 0000 0000 0000
但有时重新上电捕捉不到啊?
# cat /dev/input/event0 | hexdump
什么都没有
buildroot该如何配置?menuconfig中的哪项?
就只有一个按键,
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include <stdlib.h>
struct input_event buff;
int fd;
int read_nu;
int main(int argc, char *argv[])
{
int i = 0;
fd = open("/dev/input/event0", O_RDONLY); //may be the powerkey is /dev/input/event1
if (fd < 0) {
perror("can not open device usbkeyboard!");
exit(1);
}
printf("--fd:%d--\n",fd);
while(1)
{
while(read(fd,&buff,sizeof(struct input_event))==0)
{
;
}
//if(buff.code > 40)
printf("time %u:%u type:%d code:%d value:%d\n",buff.time.tv_sec,buff.time.tv_usec,buff.type,buff.code,buff.value);
//#if 0
//i++;
//if(i > 12)
//{
//break;
//}
//#endif
}
close(fd);
return 1;
}
这段代码可以不?这是例程里的一个key_test.c
自动挂载sd卡成功,根据下面网站的经验
https://whycan.cn/t_643.html
由于系统只读
需要在etc/init.d/rcS中添加
chmod 777 /etc/hotplug/insert.sh
chmod 777 /etc/hotplug/remove.sh
更改文件权限即可
上电后插上SD卡 fdisk -l 有出现sd卡
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size
Id Type
/dev/mmcblk0p1 0,32,33 244,227,47 2048 3934207 3932160 1920M
e Win95 FAT16 (LBA)
Partition 1 has different physical/logical start (non-Linux?):
phys=(0,32,33) logical=(0,43,28)
Partition 1 has different physical/logical end:
phys=(244,227,47) logical=(367,30,26)
但 df -h
/dev/mtdblock3 3.0M 484.0K 2.5M 16% /app
没有出现SD卡,我更改脚本挂载到app/sd01 目录下了
yuanlwjt 说:剩下一个问题,我自己的设备上没有电池,每次上电启动设备,使用hwclock hwclock: RTC_RD_TIME: Operation not permitted就出现这,查了资料,很可能是说linux上电时没有初始化RTC,所以只能带电reboot,再想想还有什么办法可以解决
不上电池时间很乱套的,里面的时间可能还比1970年还要小,然后设置系统时间就失败了。不晓得你用的那个版本的linux,新版的linux设置RTC时间是不能小于已经运行时间的。
也就是说,最好外部加电池是吧,我是想通过ntpdate 更新系统时间,然后更新硬件时间
# dmesg | grep rtc
[ 1.438131] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[ 1.578354] sunxi-rtc sunxi-rtc: hctosys: unable to read the hardware clock
我的是这样的,查看驱动:
err = rtc_read_time(rtc, &tm);
if (err) {
dev_err(rtc->dev.parent,
"hctosys: unable to read the hardware clock\n");
goto err_read;
}
继续跟踪rtc_read_time:
static int __rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm)
{
int err;
if (!rtc->ops)
err = -ENODEV;
else if (!rtc->ops->read_time)
err = -EINVAL;
else {
memset(tm, 0, sizeof(struct rtc_time));
err = rtc->ops->read_time(rtc->dev.parent, tm);
}
return err;
}
int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm)
{
int err;
err = mutex_lock_interruptible(&rtc->ops_lock);
if (err)
return err;
err = __rtc_read_time(rtc, tm);
mutex_unlock(&rtc->ops_lock);
return err;
}
(!rtc->ops) 这里ops 是结构体变量:
struct rtc_device
{
struct device dev;
struct module *owner;
int id;
char name[RTC_DEVICE_NAME_SIZE];
const struct rtc_class_ops *ops;
...........................
};
struct rtc_class_ops {
int (*open)(struct device *);
void (*release)(struct device *);
int (*ioctl)(struct device *, unsigned int, unsigned long);
int (*read_time)(struct device *, struct rtc_time *);
int (*set_time)(struct device *, struct rtc_time *);
int (*read_alarm)(struct device *, struct rtc_wkalrm *);
int (*set_alarm)(struct device *, struct rtc_wkalrm *);
int (*proc)(struct device *, struct seq_file *);
int (*set_mmss)(struct device *, unsigned long secs);
int (*read_callback)(struct device *, int data);
int (*alarm_irq_enable)(struct device *, unsigned int enabled);
};
ENODEV 19 表示无此设备
EINVAL 22 表示无效的参数
看到这里到底是哪里引起unable to read the hardware clock,还是没找到原因
页次: 1