页次: 1
linux5.2 没有找到声卡。
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0-licheepi-zero+ (psst@ubuntu) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)) #2 SMP Mon Apr 26 09:27:47 +08 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu s34508 r8192 d22836 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi0.0:512k(uboot),64k(dtb)ro,5120k(kernel)ro,-(rootfs) root=31:3 rw rootfstype=jffs2 init=/linuxrc vt.global_cursor_default=0
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 55056K/65536K available (6144K kernel code, 297K rwdata, 1696K rodata, 1024K init, 254K bss, 10480K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x300/0x48c with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000198] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000434] Console: colour dummy device 80x30
[ 0.000492] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000508] pid_max: default: 32768 minimum: 301
[ 0.000670] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000686] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001516] CPU: Testing write buffer coherency: ok
[ 0.002027] /cpus/cpu@0 missing clock-frequency property
[ 0.002053] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002827] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.003033] rcu: Hierarchical SRCU implementation.
[ 0.003553] smp: Bringing up secondary CPUs ...
[ 0.003573] smp: Brought up 1 node, 1 CPU
[ 0.003583] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.003590] CPU: All CPU(s) started in SVC mode.
[ 0.004733] devtmpfs: initialized
[ 0.008101] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.008422] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.008455] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.008699] pinctrl core: initialized pinctrl subsystem
[ 0.009753] NET: Registered protocol family 16
[ 0.010439] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.011727] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.011745] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.035433] SCSI subsystem initialized
[ 0.035717] usbcore: registered new interface driver usbfs
[ 0.035775] usbcore: registered new interface driver hub
[ 0.035896] usbcore: registered new device driver usb
[ 0.036123] mc: Linux media interface: v0.10
[ 0.036165] videodev: Linux video capture interface: v2.00
[ 0.036386] Advanced Linux Sound Architecture Driver Initialized.
[ 0.037709] clocksource: Switched to clocksource arch_sys_counter
[ 0.049299] NET: Registered protocol family 2
[ 0.050113] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.050153] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.050179] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.050204] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.050344] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.050395] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.050689] NET: Registered protocol family 1
[ 0.052598] Initialise system trusted keyrings
[ 0.052969] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.059231] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.089109] Key type asymmetric registered
[ 0.089131] Asymmetric key parser 'x509' registered
[ 0.089234] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 0.089247] io scheduler mq-deadline registered
[ 0.089255] io scheduler kyber registered
[ 0.090273] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[ 0.093974] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.159856] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.162141] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[ 0.163249] printk: console [ttyS0] disabled
[ 0.183569] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.705803] printk: console [ttyS0] enabled
[ 0.734594] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.746033] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.750852] 4 cmdlinepart partitions found on MTD device spi0.0
[ 0.756767] Creating 4 MTD partitions on "spi0.0":
[ 0.761587] 0x000000000000-0x000000080000 : "uboot"
[ 0.767238] 0x000000080000-0x000000090000 : "dtb"
[ 0.772554] 0x000000090000-0x000000590000 : "kernel"
[ 0.778124] 0x000000590000-0x000001000000 : "rootfs"
[ 0.784294] libphy: Fixed MDIO Bus: probed
[ 0.789073] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.794874] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.801147] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000)
[ 0.810636] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.817874] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.825088] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.830063] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.836844] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.842508] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.848412] libphy: stmmac: probed
[ 0.852535] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[ 0.858888] libphy: mdio_mux: probed
[ 0.862490] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[ 0.868887] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[ 0.876019] libphy: mdio_mux: probed
[ 0.880057] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.886583] ehci-platform: EHCI generic platform driver
[ 0.892147] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.897812] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.905737] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.937706] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.944906] hub 1-0:1.0: USB hub found
[ 0.948867] hub 1-0:1.0: 1 port detected
[ 0.953483] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.959813] ohci-platform: OHCI generic platform driver
[ 0.965352] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.972079] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.980062] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 1.052784] hub 2-0:1.0: USB hub found
[ 1.056617] hub 2-0:1.0: 1 port detected
[ 1.063940] usbcore: registered new interface driver usb-storage
[ 1.071589] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 1.076652] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.081362] i2c /dev entries driver
[ 1.086207] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[ 1.095825] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.104516] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.140404] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.147956] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[ 1.159358] usbcore: registered new interface driver usbhid
[ 1.164936] usbhid: USB HID core driver
[ 1.171487] Initializing XFRM netlink socket
[ 1.175796] NET: Registered protocol family 17
[ 1.180955] Registering SWP/SWPB emulation handler
[ 1.186846] Loading compiled-in X.509 certificates
[ 1.198326] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.209840] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.215604] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.224978] hub 3-0:1.0: USB hub found
[ 1.229054] hub 3-0:1.0: 1 port detected
[ 1.234457] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T02:41:01 UTC (9661)
[ 1.242994] vcc3v0: disabling
[ 1.245974] vcc5v0: disabling
[ 1.249000] ALSA device list:
[ 1.251968] No soundcards found.
[ 1.257786] random: fast init done
[ 1.303592] random: crng init done
[ 1.307460] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.321169] mmc0: new high speed SD card at address 1388
[ 1.330836] mmcblk0: mmc0:1388 Stora 119 MiB
[ 1.347209] mmcblk0: p1
[ 3.310384] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 3.318262] devtmpfs: mounted
[ 3.322434] Freeing unused kernel memory: 1024K
[ 3.327115] Run /linuxrc as init process
Starting syslogd: OK
sun8i-v3s.dtsi
codec: codec@01c22c00 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun8i-v3s-codec";
reg = <0x01c22c00 0x400>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
clock-names = "apb", "codec";
resets = <&ccu RST_BUS_CODEC>;
dmas = <&dma 15>, <&dma 15>;
dma-names = "rx", "tx";
allwinner,codec-analog-controls = <&codec_analog>;
status = "disabled";
};
codec_analog: codec-analog@01c23000 {
compatible = "allwinner,sun8i-v3s-codec-analog";
reg = <0x01c23000 0x4>;
};
sun8i-v3s-licheepi-zero-dock.dts
&codec {
allwinner,audio-routing =
"Headphone", "HP",
"Headphone", "HPCOM",
"MIC1", "Mic",
"Mic", "HBIAS";
status = "okay";
};
16M flash
生成img mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d ../buildroot-2018.08.2/output/target/ -o jffs2.img
sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl.bin
sunxi-fel -p spiflash-write 0x100000 sun8i-v3s-licheepi-zero.dtb
sunxi-fel -p spiflash-write 0x110000 zImage
sunxi-fel -p spiflash-write 0x610000 jffs2.img
只操作前面3步,还能启动,串口有输出,只是文件系统没有。烧写img后,串口没有输出,不启动。似乎前面写的都覆盖了,进入fel模式了,最后一步有问题吗?
请教大家,uboot在norlash,如果sd卡不装可以正常启动,装上sd卡后,就卡在Starting kernel
U-Boot 2017.01-rc2 (Mar 10 2020 - 22:45:31 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
** File not found zImage **
** File not found sun8i-v3s-licheepi-zero-dock.dtb **
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42df9000, end 42dff454 ... OK
Starting kernel ...
ifconfig
eth0 Link encap:Ethernet HWaddr 02:00:4D:F1:C2:6B
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:118 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18941 (18.4 KiB) TX bytes:23953 (23.3 KiB)
Interrupt:35
向192.168.1.255:20000 ,或者255.255.255.255:20000 收不到,向192.168.1.15:20000可以收到,是网络协议还是驱动有问题?
static irqreturn_t sunxi_mmc_handle_manual_stop(int irq, void *dev_id)
{
struct sunxi_mmc_host *host = dev_id;
struct mmc_request *mrq;
unsigned long iflags;
spin_lock_irqsave(&host->lock, iflags);
mrq = host->manual_stop_mrq;
spin_unlock_irqrestore(&host->lock, iflags);
if (!mrq) {
dev_err(mmc_dev(host->mmc), "no request for manual stop\n");
return IRQ_HANDLED;
}
dev_err(mmc_dev(host->mmc), "data error, sending stop command\n");
/*
* We will never have more than one outstanding request,
* and we do not complete the request until after
* we've cleared host->manual_stop_mrq so we do not need to
* spin lock this function.
* Additionally we have wait states within this function
* so having it in a lock is a very bad idea.
*/
sunxi_mmc_send_manual_stop(host, mrq);
spin_lock_irqsave(&host->lock, iflags);
host->manual_stop_mrq = NULL;
spin_unlock_irqrestore(&host->lock, iflags);
mmc_request_done(host->mmc, mrq);
return IRQ_HANDLED;
}
static void sunxi_mmc_send_manual_stop(struct sunxi_mmc_host *host,
struct mmc_request *req)
{
u32 arg, cmd_val, ri;
unsigned long expire = jiffies + msecs_to_jiffies(1000);
cmd_val = SDXC_START | SDXC_RESP_EXPIRE |
SDXC_STOP_ABORT_CMD | SDXC_CHECK_RESPONSE_CRC;
if (req->cmd->opcode == SD_IO_RW_EXTENDED) {
cmd_val |= SD_IO_RW_DIRECT;
arg = (1 << 31) | (0 << 28) | (SDIO_CCCR_ABORT << 9) |
((req->cmd->arg >> 28) & 0x7);
} else {
cmd_val |= MMC_STOP_TRANSMISSION;
arg = 0;
}
mmc_writel(host, REG_CARG, arg);
mmc_writel(host, REG_CMDR, cmd_val);
do {
ri = mmc_readl(host, REG_RINTR);
} while (!(ri & (SDXC_COMMAND_DONE | SDXC_INTERRUPT_ERROR_BIT)) &&
time_before(jiffies, expire));
if (!(ri & SDXC_COMMAND_DONE) || (ri & SDXC_INTERRUPT_ERROR_BIT)) {
dev_err(mmc_dev(host->mmc), "send stop command failed\n");
if (req->stop)
req->stop->resp[0] = -ETIMEDOUT;
} else {
if (req->stop)
req->stop->resp[0] = mmc_readl(host, REG_RESP0);
}
mmc_writel(host, REG_RINTR, 0xffff);
}
找到了两个相关的函数,不知道什么原因引起的,不是每次都会出错,偶尔出问题,很要命。
最近调试程序,总有一个Segmentation fault,于是想用gdb调试,gbd7.7~8.01都试过,总是编译出错,buildroot可以编译,奇怪的事编译出的只能电脑上用,要怎么设置才能交叉编译?请教下大家,如果有编译好的共享一个出来也行(v3s平台),谢谢了。
Host GDB Options
[ ] Build cross gdb for the host
[ ] TUI support
[ ] Python support
[ ] Simulator support
GDB debugger Version (gdb 8.0.x) --->
选择了 Build cross gdb for the host
Target packages > Debugging
*** gdb/gdbserver needs a toolchain w/ threads, threads debug 这项是不是有问题?要加什么东西吗?
最近调试程序,总有一个Segmentation fault,于是想用gdb调试,gbd7.7~8.01都试过,总是编译出错,buildroot可以编译,奇怪的事编译出的只能电脑上用,要怎么设置才能交叉编译?请教下大家,如果有编译好的共享一个出来也行(v3s平台),谢谢了。
Host GDB Options
[ ] Build cross gdb for the host
[ ] TUI support
[ ] Python support
[ ] Simulator support
GDB debugger Version (gdb 8.0.x) --->
U-Boot 2019.04-00743-g7d99406 (Apr 26 2019 - 02:24:09 -0400) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: mmc@01c0f000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot: 0
(FEL boot)
## Executing script at 41900000
## Loading init Ramdisk from Legacy Image at 41a00000 ...
Image Name: uInitrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 10271913 Bytes = 9.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Ramdisk to 42434000, end 42dffca9 ... OK
Loading Device Tree to 4242e000, end 42433e4f ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero+ (root@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #15 SMP Wed May 1 09:22:33 EDT 2019
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] percpu: Embedded 16 pages/cpu @c3fdf000 s33920 r8192 d23424 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/ram0 rdinit=/linuxrc earlyprintk rw
[ 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: 45028K/65536K available (6144K kernel code, 236K rwdata, 1580K rodata, 1024K init, 253K bss, 20508K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a3b360 ( 237 kB)
[ 0.000000] .bss : 0xc0a42808 - 0xc0a81dcc ( 254 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000208] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000417] Console: colour dummy device 80x30
[ 0.000450] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000466] pid_max: default: 32768 minimum: 301
[ 0.000586] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000600] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001182] CPU: Testing write buffer coherency: ok
[ 0.001544] /cpus/cpu@0 missing clock-frequency property
[ 0.001569] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002006] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002181] Hierarchical SRCU implementation.
[ 0.002662] smp: Bringing up secondary CPUs ...
[ 0.002676] smp: Brought up 1 node, 1 CPU
[ 0.002685] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002692] CPU: All CPU(s) started in HYP mode.
[ 0.002696] CPU: Virtualization extensions available.
[ 0.003435] devtmpfs: initialized
[ 0.006447] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006734] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006761] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006926] pinctrl core: initialized pinctrl subsystem
[ 0.007760] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[ 0.007895] NET: Registered protocol family 16
[ 0.008316] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009354] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009371] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.021544] SCSI subsystem initialized
[ 0.021821] usbcore: registered new interface driver usbfs
[ 0.021888] usbcore: registered new interface driver hub
[ 0.021981] usbcore: registered new device driver usb
[ 0.022235] Linux video capture interface: v2.00
[ 0.022278] pps_core: LinuxPPS API ver. 1 registered
[ 0.022286] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.022309] PTP clock support registered
[ 0.022518] Advanced Linux Sound Architecture Driver Initialized.
[ 0.024309] clocksource: Switched to clocksource arch_sys_counter
[ 0.034017] NET: Registered protocol family 2
[ 0.034685] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.034721] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.034745] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.034873] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.034919] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.035133] NET: Registered protocol family 1
[ 0.035560] Unpacking initramfs...
[ 0.753577] Freeing initrd memory: 10032K
[ 0.755565] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.763316] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.765082] random: fast init done
[ 0.767909] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.767932] io scheduler noop registered
[ 0.767940] io scheduler deadline registered
[ 0.768170] io scheduler cfq registered (default)
[ 0.768182] io scheduler mq-deadline registered
[ 0.768187] io scheduler kyber registered
[ 0.772480] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.836644] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.839940] console [ttyS0] disabled
[ 0.860216] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 1.437325] console [ttyS0] enabled
[ 1.443508] libphy: Fixed MDIO Bus: probed
[ 1.448187] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 1.453980] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.459756] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 1.465933] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.471585] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.478829] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.484498] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.491710] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.496680] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.503645] libphy: stmmac: probed
[ 1.514842] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.521381] ehci-platform: EHCI generic platform driver
[ 1.526959] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.532574] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.540566] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 1.574333] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.581521] hub 1-0:1.0: USB hub found
[ 1.585466] hub 1-0:1.0: 1 port detected
[ 1.589925] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.596220] ohci-platform: OHCI generic platform driver
[ 1.601763] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.608483] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.616424] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.689375] hub 2-0:1.0: USB hub found
[ 1.693199] hub 2-0:1.0: 1 port detected
[ 1.698275] usbcore: registered new interface driver cdc_acm
[ 1.703939] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.712147] usbcore: registered new interface driver usb-storage
[ 1.718345] usbcore: registered new interface driver usbserial
[ 1.724217] usbcore: registered new interface driver usbserial_generic
[ 1.730819] usbserial: USB Serial support registered for generic
[ 1.736881] usbcore: registered new interface driver ch341
[ 1.742392] usbserial: USB Serial support registered for ch341-uart
[ 1.748710] usbcore: registered new interface driver cp210x
[ 1.754324] usbserial: USB Serial support registered for cp210x
[ 1.760299] usbcore: registered new interface driver ftdi_sio
[ 1.766103] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1.773514] usbcore: registered new interface driver pl2303
[ 1.779164] usbserial: USB Serial support registered for pl2303
[ 1.785153] usbcore: registered new interface driver usb_serial_simple
[ 1.791717] usbserial: USB Serial support registered for carelink
[ 1.797868] usbserial: USB Serial support registered for zio
[ 1.803552] usbserial: USB Serial support registered for funsoft
[ 1.809624] usbserial: USB Serial support registered for flashloader
[ 1.816019] usbserial: USB Serial support registered for google
[ 1.821960] usbserial: USB Serial support registered for vivopay
[ 1.828004] usbserial: USB Serial support registered for moto_modem
[ 1.834305] usbserial: USB Serial support registered for novatel_gps
[ 1.840680] usbserial: USB Serial support registered for hp4x
[ 1.846463] usbserial: USB Serial support registered for suunto
[ 1.852422] usbserial: USB Serial support registered for siemens_mpi
[ 1.860019] mousedev: PS/2 mouse device common for all mice
[ 1.866468] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.875368] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.882163] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.886788] i2c /dev entries driver
[ 1.891716] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.900896] usbcore: registered new interface driver uvcvideo
[ 1.906716] USB Video Class driver (1.1.1)
[ 1.911481] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.974359] sunxi-mmc 1c0f000.mmc: base:0xc48d5000 irq:23
[ 2.021225] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.031060] mmc0: new high speed SD card at address 00c3
[ 2.036883] sunxi-mmc 1c10000.mmc: base:0xc48d9000 irq:24
[ 2.043232] usbcore: registered new interface driver usbhid
[ 2.048896] usbhid: USB HID core driver
[ 2.053476] mmcblk0: mmc0:00c3 E1601 121 MiB
[ 2.059991] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 2.068041] sun4i-codec 1c22c00.codec: Failed to register our card
[ 2.074534] mmcblk0: p1
[ 2.082072] NET: Registered protocol family 17
[ 2.086799] Registering SWP/SWPB emulation handler
[ 2.097043] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 2.108414] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 2.114179] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 2.123330] hub 3-0:1.0: USB hub found
[ 2.127353] hub 3-0:1.0: 1 port detected
[ 2.134922] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 2.143400] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:43 UTC (43)
[ 2.151770] vcc5v0: disabling
[ 2.154810] ALSA device list:
[ 2.157779] #0: V3s Audio Codec
[ 2.163055] Freeing unused kernel memory: 1024K
mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting network: OK
[ 3.397097] Mass Storage Function, version: 2009/09/11
[ 3.402258] LUN: removable file: (no medium)
[ 3.406903] LUN: removable file: /dev/mmcblk0
[ 3.411264] Number of LUNs=1
[ 3.446642] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 3.453622] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 3.460799] g_mass_storage gadget: g_mass_storage ready
这样是不是可以了,没有变成u盘
sd卡是空的,没有系统的条件下也能挂载成u盘吗?我试了,点bat文件闪退了
请教各位高手。我想用drivers/i2c/busses/i2c-gpio.c 模拟iic,硬件iic口没有使用,io被占用了。要怎么玩?
menuconfig配置如下
-*- I2C support
Enable compatibility bits for old user-space
<*> I2C device interface
<*> I2C bus multiplexing support
Multiplexer I2C Chip support --->
[**] Autoselect pertinent helper modules
I2C Hardware Bus support --->
*** I2C system bus drivers (mostly embedded / system-on-chip)
│ │ < > CBUS I2C driver
│ │ < > Synopsys DesignWare Platform
│ │ < > EMMA Mobile series I2C adapter
│ │ <*> GPIO-based bitbanging I2C
│ │ < > Marvell mv64xxx I2C Controller
│ │ < > OpenCores I2C Controller
│ │ < > PCA9564/PCA9665 as platform device
│ │ < > Rockchip RK3xxx I2C adapter
│ │ < > Simtec Generic I2C interface
dts如下
i2c0@0 {
compatible = "i2c-gpio";
gpios = <&pio 2 2 // sda
&pio 2 1 // scl
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
//rv3029c2@56 {
//compatible = "rv3029c2";
//reg = <0x56>;
//};
};
启动后报错, OF: /soc/i2c0@0: could not get #gpio-cells for /soc/clock@01c20000
是不是gpio配置不对,
&pio 2 2 /* sda */
&pio 2 1这两个口是串口,没有使用,应该不会被占用,
设备树怎么写?请教大家了
我的v3s需要两个声卡,想用usb口加一个usb声卡,不幸的是,怎么试都不行
Device Drivers -->
Sound card support -->
--- Sound card support Preclaim OSS device numbers
<*> Advanced Linux Sound Architecture -->
--- Advanced Linux Sound Architecture
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[ *] OSS PCM (digital audio) API - Include plugin system
[* ] USB sound devices --->
<*>USB Audio /MIDI drive
启动信息里还是只有一个声卡
[ 1.252282] vcc5v0: disabling
[ 1.255259] ALSA device list:
[ 1.258285] #0: V3s Audio Codec
这个, 好像没有, 本站只有 TF 卡的
多谢晕哥,我要的就是这样的
https://blog.csdn.net/armkits/article/details/79869712
我参考这个帖子,
3. 执行以下指令为空的img文件创建两个分区,第一个分区为“W95 FAT16,大小为48MB,第二分区为Linux
sudo sfdisk --in-order --Linux --unit M a.img << EOF
1,48,0xE,*
,,,-
EOF
这里sfdisk --in-order 和--unit 单位 有问题,怎样把img格式成fat16和ext4两个分区。
config文件
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_GPIO=y
DTS
led1 {
label = "psst:led:button1";
linux,default-trigger = "timer";
gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; // PE7
retain-state-suspended;
};
我想实现自定义的闪烁,心跳闪烁时间似乎不能自定义,我找了网上的帖子,用echo timer不行
# echo timer > /sys/class/leds/psst:led:button1/trigger
sh: write error: Invalid argument
# cat /sys/class/leds/psst:led:button1/trigger
[none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock mmc0 mmc1 heartbeat default-on
发现没有timer这个参数,另外网上说的delay_on delay_off也没有,我要如何让灯闪起来呢?
debounce-delay-ms 这个去抖延迟时间 100ms 感觉有点太大了, 改小试一试了。
https://e2echina.ti.com/question_answer/dsp_arm/sitara_arm/f/25/t/134142
这个才 5ms
我最后改成20了,用100主要是抖动非常大,用手摸都会有反应,延时加大也不行,没办法加了下拉电阻才搞定
my-keypad {
compatible = "gpio-matrix-keypad";
debounce-delay-ms = <100>;
col-scan-delay-us = <200>;
linux,no-autorepeat;
col-gpios = <
&pio 1 5 0
&pio 1 4 0
&pio 1 2 0
&pio 1 3 0
>;
row-gpios = <
&pio 1 1 0
&pio 1 0 0
&pio 1 6 0
&pio 1 7 0
>;
linux,keymap = <
MATRIX_KEY(0,0,1)
MATRIX_KEY(0,1,2)
MATRIX_KEY(0,2,3)
MATRIX_KEY(0,3,13)
MATRIX_KEY(1,0,4)
MATRIX_KEY(1,1,5)
MATRIX_KEY(1,2,6)
MATRIX_KEY(1,3,14)
MATRIX_KEY(2,0,7)
MATRIX_KEY(2,1,8)
MATRIX_KEY(2,2,9)
MATRIX_KEY(2,3,15)
MATRIX_KEY(3,0,11)
MATRIX_KEY(3,1,10)
MATRIX_KEY(3,2,12)
MATRIX_KEY(3,3,16)
>;
};
我用PB0-PB7 做4*4键盘,设备树这样写有问题吗?只有几个IO是正常,其余的不是不反应就是一次出几个码
mygpio {
compatible = "gpio-leds";sta_led {
label = "psst:sta:led";
gpios = <&pio 4 2 GPIO_ACTIVE_LOW>; // Pe2
};/*call_led {
label = "psst:call:led";
gpios = <&pio 4 5 GPIO_ACTIVE_LOW>; // Pe5
default-state = "on";
};reg_led {
label = "psst:reg:led";
gpios = <&pio 4 6 GPIO_ACTIVE_LOW>; // PE6
};
led1 {
label = "psst:led:button1";
gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; // PE7
};*/
};我用PE2 PE5~7也就是LCD-HSYNC LCD-D3 D4 D5做LED输出,/sys/class/leds 里面没有节点,注释掉就有1个,这几个IO在哪里被占用了吗?日志里没看到错误,怎么排查呢?
注释PE5 PE6 PE7就可以,打开任何一个都不行,没用CSI,设备树里也没有csi相关的信息
mygpio {
compatible = "gpio-leds";
sta_led {
label = "psst:sta:led";
gpios = <&pio 4 2 GPIO_ACTIVE_LOW>; // Pe2
};
/*call_led {
label = "psst:call:led";
gpios = <&pio 4 5 GPIO_ACTIVE_LOW>; // Pe5
default-state = "on";
};
reg_led {
label = "psst:reg:led";
gpios = <&pio 4 6 GPIO_ACTIVE_LOW>; // PE6
};
led1 {
label = "psst:led:button1";
gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; // PE7
};*/
};
我用PE2 PE5~7也就是LCD-HSYNC LCD-D3 D4 D5做LED输出,/sys/class/leds 里面没有节点,注释掉就有1个,这几个IO在哪里被占用了吗?日志里没看到错误,怎么排查呢?
我的也没有wlan0
# insmod /home/r8723bs.ko
[ 650.283158] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 650.299916] RTL8723BS: module init start
[ 650.303859] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 650.310996] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 650.317654] RTL8723BS: module init ret =0
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:02:2A:F8:2B:EC
inet addr:192.168.1.111 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:612 errors:0 dropped:0 overruns:0 frame:0
TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:710841 (694.1 KiB) TX bytes:30458 (29.7 KiB)
Interrupt:38
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:638 errors:0 dropped:0 overruns:0 frame:0
TX packets:638 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47320 (46.2 KiB) TX bytes:47320 (46.2 KiB)
usb0 Link encap:Ethernet HWaddr 42:43:E9:07:73:5A
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# ifconfig wlan0 up
ifconfig: SIOCGIFFLAGS: No such device
# lsmod
Module Size Used by Tainted: G
r8723bs 524288 0
驱动已经加载了,是系统编译的驱动,有没有适合新手的教程
matrix_keypad需要IO支持中断才行吧,如果用LCD的IO口,好像没有中断功能,会报错
这是启动信息,能看出问题吗?
Welcome to Buildroot
buildroot login: dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
Starting network: [ 1.866953] Generic PHY stmmac-0:01: attachedPassword:
878] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 1.886644] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
OK
ifup eth0 up
ifconfig eth0 192.168.1.99
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:02:2A:F8:2B:EC
inet addr:192.168.1.99 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:38
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:189 errors:0 dropped:0 overruns:0 frame:0
TX packets:189 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21168 (20.6 KiB) TX bytes:21168 (20.6 KiB)
#
但是网口灯是不亮的,ping不同内网IP。
晕哥 说:你没有生成 mtd parts,
对比我一楼 backup_20190220A.tgz 这里面的文件。
没看明白,请问怎么生成mtd parts
内核配置已经选上了
Device Drivers --->
Memory Technology Device (MTD) support --->
Command line partition table parsing
sun8i.h 和sun8i-v3s-licheepi-zero.dts都改了
你没有生成 mtd parts,
对比我一楼 backup_20190220A.tgz 这里面的文件。
没看明白,请问怎么生成mtd parts
贴完整的log看下
U-Boot SPL 2017.01-rc2 (Feb 27 2019 - 21:34:08)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2 (Feb 27 2019 - 21:34:08 -0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2 (Feb 27 2019 - 21:34:08 -0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffbb2 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.0-licheepi-zero+ (hexing@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #46 SMP Fri Dec 15 14:36:43 CST 2017
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3f5f000 s33920 r8192 d23424 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
[ 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: 55084K/65536K available (6144K kernel code, 222K rwdata, 1480K rodata, 1024K init, 266K bss, 10452K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a37b00 ( 223 kB)
[ 0.000000] .bss : 0xc0a3ebec - 0xc0a8153c ( 267 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000185] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000412] Console: colour dummy device 80x30
[ 0.000449] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000465] pid_max: default: 32768 minimum: 301
[ 0.000591] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000605] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001197] CPU: Testing write buffer coherency: ok
[ 0.001569] /cpus/cpu@0 missing clock-frequency property
[ 0.001594] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002024] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002195] Hierarchical SRCU implementation.
[ 0.002680] smp: Bringing up secondary CPUs ...
[ 0.002697] smp: Brought up 1 node, 1 CPU
[ 0.002706] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002713] CPU: All CPU(s) started in SVC mode.
[ 0.003459] devtmpfs: initialized
[ 0.006414] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006698] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006727] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006892] pinctrl core: initialized pinctrl subsystem
[ 0.007738] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[ 0.007876] NET: Registered protocol family 16
[ 0.008344] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009463] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009480] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.021883] SCSI subsystem initialized
[ 0.022158] usbcore: registered new interface driver usbfs
[ 0.022225] usbcore: registered new interface driver hub
[ 0.022322] usbcore: registered new device driver usb
[ 0.022574] pps_core: LinuxPPS API ver. 1 registered
[ 0.022586] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.022621] PTP clock support registered
[ 0.022840] Advanced Linux Sound Architecture Driver Initialized.
[ 0.024650] clocksource: Switched to clocksource arch_sys_counter
[ 0.034921] NET: Registered protocol family 2
[ 0.035496] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.035531] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.035554] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.035673] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.035719] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.035914] NET: Registered protocol family 1
[ 0.036479] RPC: Registered named UNIX socket transport module.
[ 0.036499] RPC: Registered udp transport module.
[ 0.036505] RPC: Registered tcp transport module.
[ 0.036511] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.038364] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.047290] NFS: Registering the id_resolver key type
[ 0.047350] Key type id_resolver registered
[ 0.047357] Key type id_legacy registered
[ 0.047406] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.048885] random: fast init done
[ 0.051689] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.051713] io scheduler noop registered
[ 0.051721] io scheduler deadline registered
[ 0.051974] io scheduler cfq registered (default)
[ 0.051989] io scheduler mq-deadline registered
[ 0.051996] io scheduler kyber registered
[ 0.056352] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.124417] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.127958] console [ttyS0] disabled
[ 0.148227] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.736844] console [ttyS0] enabled
[ 0.743601] libphy: Fixed MDIO Bus: probed
[ 0.748218] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.754797] ehci-platform: EHCI generic platform driver
[ 0.760282] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.765948] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.773851] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.804679] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.811870] hub 1-0:1.0: USB hub found
[ 0.815800] hub 1-0:1.0: 1 port detected
[ 0.820268] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.826566] ohci-platform: OHCI generic platform driver
[ 0.832102] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.838825] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.846776] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 0.919700] hub 2-0:1.0: USB hub found
[ 0.923526] hub 2-0:1.0: 1 port detected
[ 0.931070] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.940791] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.947685] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.952217] i2c /dev entries driver
[ 0.957111] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[ 0.966618] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.034880] sunxi-mmc 1c0f000.mmc: base:0xc48b8000 irq:23
[ 1.041868] usbcore: registered new interface driver usbhid
[ 1.047542] usbhid: USB HID core driver
[ 1.053337] NET: Registered protocol family 17
[ 1.058011] Key type dns_resolver registered
[ 1.062433] Registering SWP/SWPB emulation handler
[ 1.074141] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.085608] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.091374] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.102580] hub 3-0:1.0: USB hub found
[ 1.106574] hub 3-0:1.0: 1 port detected
[ 1.111616] using random self ethernet address
[ 1.116171] using random host ethernet address
[ 1.121628] usb0: HOST MAC 82:c1:a1:86:8f:e0
[ 1.126056] usb0: MAC 3e:b4:3e:90:d6:7a
[ 1.129959] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.137477] g_cdc gadget: g_cdc ready
[ 1.141475] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 01:39:34 UTC (5974)
[ 1.149951] vcc3v0: disabling
[ 1.152929] vcc5v0: disabling
[ 1.155940] ALSA device list:
[ 1.158904] No soundcards found.
[ 1.163221] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[ 1.170918] Please append a correct "root=" boot option; here are the available partitions:
[ 1.179295] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.187641] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-licheepi-zero+ #46
[ 1.194937] Hardware name: Allwinner sun8i Family
[ 1.199673] [<c010e22c>] (unwind_backtrace) from [<c010af9c>] (show_stack+0x10/0x14)
[ 1.207418] [<c010af9c>] (show_stack) from [<c0674fd0>] (dump_stack+0x90/0xa4)
[ 1.214642] [<c0674fd0>] (dump_stack) from [<c011b05c>] (panic+0xf0/0x268)
[ 1.221519] [<c011b05c>] (panic) from [<c090110c>] (mount_block_root+0x19c/0x26c)
[ 1.228998] [<c090110c>] (mount_block_root) from [<c09012f8>] (mount_root+0x11c/0x124)
[ 1.236908] [<c09012f8>] (mount_root) from [<c090144c>] (prepare_namespace+0x14c/0x194)
[ 1.244905] [<c090144c>] (prepare_namespace) from [<c0900dcc>] (kernel_init_freeable+0x1d0/0x1e0)
[ 1.253768] [<c0900dcc>] (kernel_init_freeable) from [<c0686fdc>] (kernel_init+0x8/0x110)
[ 1.261939] [<c0686fdc>] (kernel_init) from [<c0107358>] (ret_from_fork+0x14/0x3c)
[ 1.269511] Rebooting in 5 seconds..
晕哥,有v3s 16M的文件系统吗?
现在uboot zimage 都烧写正常,能启动,但是过一会就提示 [ 1.269366] Rebooting in 5 seconds..
应该是文件系统有问题。
我用buildroot2018.08.2,按照之前帖子说明配置好了,制作bin文件的步骤如下:
tar xvf ../../images/rootfs.tar -C ../../images 文件系统默认是压缩包,需要解压吧
mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d ../../images/rootfs/ -o jffs2.img
dd if=/dev/zero of=flashimg.bin bs=1M count=16
dd if=../uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin of=flashimg.bin bs=1K conv=notrunc
dd if=arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb of=flashimg.bin bs=1K seek=1024 conv=notrunc
dd if=arch/arm/boot/zImage of=flashimg.bin bs=1K seek=1088 conv=notrunc
dd if=jffs2.img of=flashimg.bin bs=1K seek=5184 conv=notrunc
哪些地方有错误吗?
好的,谢谢
是啊,是跟buildroot没关系,我现在回到linux源码,make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 这一步正常,编译了zimage 但是make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs,没有提示错误,也没有生成dtb文件,现在就卡在这里了。
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
后面没有提示是否生成了dtb文件,也没错误信息
我也是参考这个帖子 http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/SPI_flash_build.html#id4 怎么编译uboot出错
./arch/arm/include/asm/global_data.h:100:58: error: invalid register name for ‘gd’
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
^
arch/arm/cpu/armv8/generic_timer.c:12:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’
DECLARE_GLOBAL_DATA_PTR;
^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [arch/arm/cpu/armv8/generic_timer.o] Error 1
make: *** [arch/arm/cpu/armv8] Error 2
是怎么回事呢?交叉编译工具是gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf,环境变量已设置好,查看版本正常。
页次: 1