页次: 1
因为工作的关系平时用一点Linux,装的双系统。公司的管理系统只管到了Windows,所以最近半年一直主力是Linux。本人做一点点软件,主力开发是做硬件,在Windows下的,这不想以后想都搞在Linux下做开发。
Linux的Ui看个人,平时都是用ubuntu感觉还不错了,就是显卡驱动没有Windows下做的好。
其实如果使用LinuxMint的话,基本感觉不出与Windows的UI差别,体验还是很好的,预装的软件也很全,就连ubuntu的显卡驱动问题都不存在。个人感觉太像Windows了,反而有点排斥。
KiCAD吧,前段时间也想学的,系统上也装了,不过在行业内好多人以cadence为标杆,感觉用这个才算是高端的硬件设计。
其实我cadence 和KiCAD都不怎么熟,最熟的是大家都熟的那个软件。
终于把颜色搞正常了,编译了一个马里奥进去,InfoNES跑起来挺顺的感觉,手柄还没有搞好,继续。
放个视频https://www.bilibili.com/video/BV13b411d7th/?vd_source=daf962ad7fae05abe16a4810c5c0d692
在这里再记录一下,临时解决液晶颜色问题,第3种修改RGB到BGR的方法;
由于使用的是buildroot-tiny200,他的液晶驱动还是在uboot里通过参数传到内核的(见下面的代码,chosen)
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
//for NAND or Nor
bootargs = "console=tty0 console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";
//for sd-card
// bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";
simplefb_lcd: framebuffer-lcd0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_be0-lcd0";
clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
<&ccu CLK_DRAM_DE_BE>, <&ccu CLK_BUS_LCD>,
<&ccu CLK_TCON>;
status = "disabled";
};
我现在还不懂设备树的原理,试过的前两种方法也都没有解决问题,所以就想通过uboot的液晶驱动来改,最终经过分析找到了文件./output/build/uboot-2020.07/arch/arm/include/asm/arch-sunxi/lcdc.h,把文件的第79行,修改成下面这样。临时解决了液晶的颜色问题。
#define SUNXI_LCDC_TCON0_CTRL_ENABLE ((1 << 31) | (1 << 23))
//#define SUNXI_LCDC_TCON0_CTRL_ENABLE (1 << 31)
在这个文件里board/widora/mangopi/r3/devicetree/linux/devicetree.dts 好像是没有使用内核的设备树里驱动LCD。
查了下chosen是从uboot传来的参数。
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
//for NAND or Nor
bootargs = "console=tty0 console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";
//for sd-card
// bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";
simplefb_lcd: framebuffer-lcd0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_be0-lcd0";
clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
<&ccu CLK_DRAM_DE_BE>, <&ccu CLK_BUS_LCD>,
<&ccu CLK_TCON>;
status = "disabled";
};
@pldjn_V3S
我记得这个SDK里面的uboot没有支持lcd,如果确实要支持lcd得试一试荔枝派仓库里面的sdk了。regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,BIT(23),BIT(23));//SWAP R、B引脚
在这前后把寄存器值都打印出来看看。
linux/drivers/gpu/drm/sun4i/sun4i_tcon.c这个文件不知道是没有调用到其中的函数 ,还是我加的调试信息不对,我增加了条printk,然后sh rebuild-kernel.sh ,没有在串口上看到信息。
printk("sun4i_tcon.c printk test\n");
@哇酷小二
再问一下怎么修改buildroot,把RGB改成BGR;尝试了2个方法都没成功。
1,参考https://whycan.com/t_6781.html,在文件 linux/drivers/gpu/drm/sun4i/sun4i_tcon.c添加 "regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,BIT(23),BIT(23));//SWAP R、B引脚" 删除.stamp_built重新编译,没有效果;
2,参考https://gitee.com/IOTTS/f1c100s_buildroot,在文件./board/allwinner/suniv-f1c100s/devicetree/linux/suniv-f1c100s.dtsi中添加 rgb-channel-swap = <1>; /* 设置为1为BGR格式 */ ,重新编译,没有效果;
用busybox修改寄存器的值可以切换BGR,正确显示图片;
busybox devmem 0x01c0c040
busybox devmem 0x01c0c040 w 0x80800100
@哇酷小二
问一下,uboot那段时间LCD没有显示,直到Starting kernel ...以后LCD上才会有显示,小企鹅也没显示不知道哪里有问题。下面是uboot 的.config文件里的一些配置,看着LCD的部分都选上了,但就是不显示。有没有需要在uboot.defconfig里添加的参数。
......
CONFIG_VIDEO_SUNXI=y
CONFIG_VIDEO_LCD_MODE="x:480,y:272,depth:18,pclk_khz:20000,le:42,ri:8,up:11,lo:4,hs:1,vs:1,sync:3,vmode:0"
CONFIG_VIDEO_LCD_DCLK_PHASE=1
CONFIG_VIDEO_LCD_POWER=""
CONFIG_VIDEO_LCD_RESET=""
CONFIG_VIDEO_LCD_BL_EN=""
CONFIG_VIDEO_LCD_BL_PWM=""
CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW=y
# CONFIG_VIDEO_LCD_PANEL_I2C is not set
CONFIG_VIDEO_LCD_IF_PARALLEL=y
CONFIG_VIDEO_LCD_PANEL_PARALLEL=y
# CONFIG_VIDEO_LCD_PANEL_LVDS is not set
# CONFIG_VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828 is not set
# CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804 is not set
# CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM is not set
# CONFIG_VIDEO_LCD_TL059WV5C0 is not set
......
#
# TrueType Fonts
#
# CONFIG_VIDEO_VESA is not set
# CONFIG_VIDEO_LCD_ANX9804 is not set
# CONFIG_VIDEO_LCD_SSD2828 is not set
# CONFIG_VIDEO_LCD_HITACHI_TX18D42VM is not set
# CONFIG_VIDEO_MVEBU is not set
# CONFIG_I2C_EDID is not set
# CONFIG_DISPLAY is not set
# CONFIG_VIDEO_FSL_DCU_FB is not set
# CONFIG_VIDEO_TEGRA20 is not set
# CONFIG_VIDEO_BRIDGE is not set
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE=y
# CONFIG_CFB_CONSOLE_ANSI is not set
CONFIG_VGA_AS_SINGLE_DEVICE=y
CONFIG_VIDEO_SW_CURSOR=y
# CONFIG_CONSOLE_EXTRA_INFO is not set
CONFIG_CONSOLE_SCROLL_LINES=1
CONFIG_SYS_CONSOLE_BG_COL=0x00
CONFIG_SYS_CONSOLE_FG_COL=0xa0
# CONFIG_LCD is not set
# CONFIG_VIDEO_SIMPLE is not set
CONFIG_VIDEO_DT_SIMPLEFB=y
# CONFIG_OSD is not set
......
这是现在的config文件
config-bak.txt
插了一张TF卡,可以正常挂载了。现在板上的RTC的NS2009没有测试了,但是Linux还是不太正常。液晶还不会显示图片,Linux下的编程还没开始学。
overlayfs:/overlay/rom
3072 268 2804 9% /
devtmpfs 19108 0 19108 0% /dev
/dev/mtdblock3 3072 268 2804 9% /overlay
/dev/root 5888 5888 0 100% /overlay/rom/lower
devtmpfs 19108 0 19108 0% /overlay/rom/lower/dev
/dev/mtdblock3 3072 268 2804 9% /overlay/rom/lower/overlay
tmpfs 27812 0 27812 0% /dev/shm
tmpfs 27812 20 27792 0% /tmp
tmpfs 27812 44 27768 0% /run
/dev/mmcblk0p1 3870464 128 3870336 0% /mnt
上个当时加工的时候的gerber文件F1C200S_DIY.zip
整理总结一下;
代码默认使用的是Uart1做为log输出,若要修改成Uart0输出需要修改以下几个部分:
1,board/widora/mangopi/r3/uboot.defconfig
CONFIG_CONS_INDEX=2
2,修改 board\widora\mangopi\r3\devicetree\uboot\suniv-f1c100s-generic.dts的下面这块,改成serial0 = &uart0;就有log输出了;
aliases {
serial0 = &uart0;
spi0 = &spi0;
};
chosen {
stdout-path = "serial0:115200n8";
};
3, Linux 需要修改 ./board/widora/mangopi/r3/devicetree/linux/devicetree.dts ,增加下面这块,才会有log输出。
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pe_pins>;
status = "okay";
};
代码修改成 16M nor spi flash ,需要修改以下几点:
1,需要修改:./board/widora/mangopi/r3/devicetree/linux/devicetree.dts
//for NAND or Nor
bootargs = "console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs
overlayfsdev=/dev/mtdblock3";
//for sd-card
//bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";
2,Linux的设备树board\widora\mangopi\r3\devicetree\linux\devicetree.dts里 spi-nor@0 部分要把 status = "disabled" 注掉,spi-nand@0 部分要把status = "disabled"加上。
&spi0 {
status = "okay";
spi-nor@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
// status = "disabled";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x70000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x70000 0x590000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x700000>;
read-only;
};
partition@3 {
label = "overlay";
reg = <0xd00000 0x300000>;
};
};
};
spi-nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
status = "disabled";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x100000 0x500000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x2a00000>;
read-only;
};
partition@3 {
label = "vendor";
reg = <0x3000000 0x1000000>;
};
partition@4 {
label = "overlay";
reg = <0x4000000 0x3000000>;
};
};
};
};
找到问题原因了,还是Linux的设备树board\widora\mangopi\r3\devicetree\linux\devicetree.dts里 spi-nor@0 要把 status = "disabled" 注掉;
&spi0 {
status = "okay";
spi-nor@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
status = "disabled";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x70000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x70000 0x590000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x700000>;
read-only;
};
partition@3 {
label = "overlay";
reg = <0xd00000 0x300000>;
};
};
};
spi-nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x100000 0x500000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x2a00000>;
read-only;
};
partition@3 {
label = "vendor";
reg = <0x3000000 0x1000000>;
};
partition@4 {
label = "overlay";
reg = <0x4000000 0x3000000>;
};
};
};
};
在线
全部的log,现在可以进shell了。
U-Boot SPL 2020.07 (Feb 13 2023 - 16:11:47 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2020.07 (Feb 13 2023 - 16:11:47 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM: 64 MiB
MMC: mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In: serial
Out: serial
Err: serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
Card did not respond to voltage select!
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=========================
Boot Device: spi
Boot Slot 0: empty
Boot Slot 1: spi-nor
=========================
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x80000, size 0x80000
SF: 524288 bytes @ 0x80000 Read: OK
Unknown command 'bmp' - try 'help'
gpio - query and control gpio pins
Usage:
gpio <input|set|clear|toggle> <pin>
- input/set/clear/toggle the specified pin
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
DFU waiting on SPI-NOR...
musb-hdrc: peripheral reset irq lost!
Booting from SPI-NOR...
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x500000
SF: 5242880 bytes @ 0x100000 Read: OK
## Loading kernel from FIT Image at 81000000 ...
Using 'conf@0' configuration
Trying 'kernel@0' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x810000cc
Data Size: 4309768 Bytes = 4.1 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80000000
Entry Point: 0x80000000
Hash algo: crc32
Hash value: 4bfebdc8
Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 81000000 ...
Using 'conf@0' configuration
Trying 'fdt@0' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x8141c4b8
Data Size: 15714 Bytes = 15.3 KiB
Architecture: ARM
Hash algo: crc32
Hash value: 9ff3b1b8
Verifying Hash Integrity ... crc32+ OK
Booting using the fdt blob at 0x8141c4b8
Loading Kernel Image
Loading Device Tree to 817f9000, end 817ffd61 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.99 (zl@ubuntu) (gcc version 8.4.0 (Buildroot -g4a14fb0-dirty)) #1 Mon Feb 13 17:40:57 CST 2023
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Widora MangoPi R3
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 16 MiB at 0x82c00000
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3 net.ifnames=0 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: 37232K/64036K available (6144K kernel code, 248K rwdata, 1676K rodata, 1024K init, 225K bss, 10420K reserved, 16384K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[ 0.000051] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000142] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000899] Console: colour dummy device 80x30
[ 0.001004] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070267] pid_max: default: 32768 minimum: 301
[ 0.070803] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.070855] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.072831] CPU: Testing write buffer coherency: ok
[ 0.074972] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076286] devtmpfs: initialized
[ 0.088117] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.088185] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.092488] pinctrl core: initialized pinctrl subsystem
[ 0.095188] NET: Registered protocol family 16
[ 0.098948] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.101308] cpuidle: using governor menu
[ 0.142663] SCSI subsystem initialized
[ 0.143037] usbcore: registered new interface driver usbfs
[ 0.143195] usbcore: registered new interface driver hub
[ 0.143354] usbcore: registered new device driver usb
[ 0.143839] mc: Linux media interface: v0.10
[ 0.143964] videodev: Linux video capture interface: v2.00
[ 0.144081] pps_core: LinuxPPS API ver. 1 registered
[ 0.144100] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.144157] PTP clock support registered
[ 0.145261] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[ 0.146215] Advanced Linux Sound Architecture Driver Initialized.
[ 0.148647] clocksource: Switched to clocksource timer
[ 0.150609] simple-framebuffer 83e89000.framebuffer: framebuffer at 0x83e89000, 0x177000 bytes, mapped to 0x(ptrval)
[ 0.150669] simple-framebuffer 83e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 0.177459] Console: switching to colour frame buffer device 100x30
[ 0.202721] simple-framebuffer 83e89000.framebuffer: fb0: simplefb registered!
[ 0.233211] thermal_sys: Registered thermal governor 'step_wise'
[ 0.233945] NET: Registered protocol family 2
[ 0.235541] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.235629] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.235686] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.235737] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.236052] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.236117] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.236669] NET: Registered protocol family 1
[ 0.239606] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.241436] Initialise system trusted keyrings
[ 0.242048] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.264106] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.264738] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.382897] Key type asymmetric registered
[ 0.382940] Asymmetric key parser 'x509' registered
[ 0.383117] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.383146] io scheduler mq-deadline registered
[ 0.383164] io scheduler kyber registered
[ 0.398379] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.422283] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.428416] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.429915] printk: console [ttyS0] disabled
[ 0.450248] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 26, base_baud = 6250000) is a 16550A
[ 0.916781] printk: console [ttyS0] enabled
[ 0.922184] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[ 0.954121] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 27, base_baud = 6250000) is a 16550A
[ 0.974026] SCSI Media Changer driver v0.25
[ 0.980097] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.993446] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 0.999616] 4 fixed-partitions partitions found on MTD device spi0.0
[ 1.005979] Creating 4 MTD partitions on "spi0.0":
[ 1.010939] 0x000000000000-0x000000070000 : "u-boot"
[ 1.019746] 0x000000070000-0x000000600000 : "kernel"
[ 1.028301] 0x000000600000-0x000000d00000 : "rom"
[ 1.036923] 0x000000d00000-0x000001000000 : "overlay"
[ 1.046241] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.052912] ehci-platform: EHCI generic platform driver
[ 1.058542] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.064875] ohci-platform: OHCI generic platform driver
[ 1.070683] usbcore: registered new interface driver usb-storage
[ 1.077734] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.091612] i2c /dev entries driver
[ 1.095769] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.109770] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin PE0 already requested by 1c25000.serial; cannot claim for 1cb0000.csi
[ 1.121100] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin-128 (1cb0000.csi) status -22
[ 1.128818] suniv-f1c100s-pinctrl 1c20800.pinctrl: could not request pin 128 (PE0) from group PE0 on device 1c20800.pinctrl
[ 1.140050] sun4i-csi 1cb0000.csi: Error applying setting, reverse things back
[ 1.147316] sun4i-csi: probe of 1cb0000.csi failed with error -22
[ 1.155033] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.165148] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.203560] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.212947] usbcore: registered new interface driver usbhid
[ 1.218525] usbhid: USB HID core driver
[ 1.222835] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[ 1.230153] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 19
[ 1.242273] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[ 1.257496] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[ 1.273803] NET: Registered protocol family 17
[ 1.278367] Key type dns_resolver registered
[ 1.284033] Loading compiled-in X.509 certificates
[ 1.302234] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.320389] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.327171] ALSA device list:
[ 1.330279] #0: F1C100s Audio Codec
[ 1.334557] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.343320] cfg80211: failed to load regulatory.db
[ 1.353259] random: fast init done
[ 1.359101] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 1.372413] devtmpfs: mounted
[ 1.380847] Freeing unused kernel memory: 1024K
[ 1.385502] Run /preinit as init process
[ 1.632357] random: crng init done
[ 2.406852] overlayfs: upper fs does not support tmpfile.
[ 2.412419] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [ 3.253577] udevd[90]: starting version 3.2.9
[ 3.466169] udevd[91]: starting eudev-3.2.9
[ 5.398168] Goodix-TS 0-005d: 0-005d supply AVDD28 not found, using dummy regulator
[ 5.406217] Goodix-TS 0-005d: 0-005d supply VDDIO not found, using dummy regulator
[ 7.448769] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 9.528765] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 9.535441] Goodix-TS 0-005d: i2c test failed attempt 1: -110
[ 11.608849] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 13.688786] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 13.695393] Goodix-TS 0-005d: i2c test failed attempt 2: -110
[ 13.738803] Goodix-TS 0-005d: I2C communication failure: -110
[ 13.744968] Goodix-TS: probe of 0-005d failed with error -110
[ 15.768785] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 17.848774] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 19.928764] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 19.935332] ov2640 0-0030: Product ID error 92:92
done
Initializing random number generator: OK
Saving random seed: OK
Starting haveged: haveged: listening socket at 3
OK
Starting network: OK
Starting uMTPrd: [ 21.621279] file system registered
[ 21.975004] read descriptors
[ 21.977964] read strings
OK
Welcome to Widora MangoPi R3
mangopi-r3 login: [ 23.244353] configfs-gadget gadget: high-speed config #1: c
[ 31.848736] vcc3v0: disabling
[ 31.851739] vcc3v3: disabling
[ 31.854708] vcc5v0: disabling
Welcome to Widora MangoPi R3
mangopi-r3 login:
Welcome to Widora MangoPi R3
mangopi-r3 login: root
# ls
# ls
#
改完 uboot.env 要重新编译uboot :
rm output/build/uboot-2020.07/ -rf && make
这个不是从uboot.env文件获取的参数,是直接写死到Linux的设备树文件里的。在这个文件里./board/widora/mangopi/r3/devicetree/linux/devicetree.dts,这里为什么nor是root=/dev/mtdblock2,而sd卡是root=/dev/mmcblk0p3。
//for NAND or Nor
bootargs = "console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";
//for sd-card
//bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";
@哇酷小二
修改完,linux没有进shell,不知道是哪个设备出问题了;
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.99 (zl@ubuntu) (gcc version 8.4.0 (Buildroot -g4a14fb0-dirty)) #1 Mon Feb 13 14:46:20 CST 2023
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Widora MangoPi R3
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 16 MiB at 0x82c00000
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3 net.ifnames=0 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: 37232K/64036K available (6144K kernel code, 248K rwdata, 1676K rodata, 1024K init, 225K bss, 10420K reserved, 16384K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[ 0.000049] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000143] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000901] Console: colour dummy device 80x30
[ 0.001007] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070265] pid_max: default: 32768 minimum: 301
[ 0.070778] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.070821] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.072678] CPU: Testing write buffer coherency: ok
[ 0.074829] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076136] devtmpfs: initialized
[ 0.087867] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.087933] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.092160] pinctrl core: initialized pinctrl subsystem
[ 0.094857] NET: Registered protocol family 16
[ 0.098552] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.100885] cpuidle: using governor menu
[ 0.142142] SCSI subsystem initialized
[ 0.142527] usbcore: registered new interface driver usbfs
[ 0.142688] usbcore: registered new interface driver hub
[ 0.142851] usbcore: registered new device driver usb
[ 0.143347] mc: Linux media interface: v0.10
[ 0.143478] videodev: Linux video capture interface: v2.00
[ 0.143595] pps_core: LinuxPPS API ver. 1 registered
[ 0.143614] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.143676] PTP clock support registered
[ 0.144725] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[ 0.145608] Advanced Linux Sound Architecture Driver Initialized.
[ 0.147947] clocksource: Switched to clocksource timer
[ 0.149770] simple-framebuffer 83e89000.framebuffer: framebuffer at 0x83e89000, 0x177000 bytes, mapped to 0x(ptrval)
[ 0.149830] simple-framebuffer 83e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 0.176789] Console: switching to colour frame buffer device 100x30
[ 0.202033] simple-framebuffer 83e89000.framebuffer: fb0: simplefb registered!
[ 0.232698] thermal_sys: Registered thermal governor 'step_wise'
[ 0.233466] NET: Registered protocol family 2
[ 0.235049] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.235132] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.235195] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.235246] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.235575] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.235655] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.236210] NET: Registered protocol family 1
[ 0.238850] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.240708] Initialise system trusted keyrings
[ 0.241361] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.263449] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.264071] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.375350] Key type asymmetric registered
[ 0.375393] Asymmetric key parser 'x509' registered
[ 0.375582] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.375609] io scheduler mq-deadline registered
[ 0.375626] io scheduler kyber registered
[ 0.391076] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.414967] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.421314] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.422577] printk: console [ttyS0] disabled
[ 0.442902] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 26, base_baud = 6250000) is a 16550A
[ 0.906327] printk: console [ttyS0] enabled
[ 0.911715] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[ 0.943705] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 27, base_baud = 6250000) is a 16550A
[ 0.963598] SCSI Media Changer driver v0.25
[ 0.969686] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.988383] random: fast init done
[ 1.378267] spi-nand: probe of spi0.0 failed with error -110
[ 1.384516] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.391166] ehci-platform: EHCI generic platform driver
[ 1.396784] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.403168] ohci-platform: OHCI generic platform driver
[ 1.408984] usbcore: registered new interface driver usb-storage
[ 1.415990] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.429918] i2c /dev entries driver
[ 1.434062] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.447880] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin PE0 already requested by 1c25000.serial; cannot claim for 1cb0000.csi
[ 1.459240] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin-128 (1cb0000.csi) status -22
[ 1.466901] suniv-f1c100s-pinctrl 1c20800.pinctrl: could not request pin 128 (PE0) from group PE0 on device 1c20800.pinctrl
[ 1.478150] sun4i-csi 1cb0000.csi: Error applying setting, reverse things back
[ 1.485418] sun4i-csi: probe of 1cb0000.csi failed with error -22
[ 1.493059] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.503132] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.541507] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.550975] usbcore: registered new interface driver usbhid
[ 1.556556] usbhid: USB HID core driver
[ 1.560838] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[ 1.568222] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 19
[ 1.580324] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[ 1.595518] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[ 1.612276] NET: Registered protocol family 17
[ 1.616838] Key type dns_resolver registered
[ 1.622332] Loading compiled-in X.509 certificates
[ 1.640501] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.658588] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.665370] ALSA device list:
[ 1.668472] #0: F1C100s Audio Codec
[ 1.672724] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.681477] cfg80211: failed to load regulatory.db
[ 1.687384] Waiting for root device /dev/mmcblk0p3...
[ 26.798104] random: crng init done
[ 31.848004] vcc3v0: disabling
[ 31.851004] vcc3v3: disabling
[ 31.853970] vcc5v0: disabling
追加:
分析可能是Waiting for root device /dev/mmcblk0p3...有问题,这里怎么是mmcblk0p3,
这块需要修改:./board/widora/mangopi/r3/devicetree/linux/devicetree.dts
//for NAND or Nor
bootargs = "console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";
//for sd-card
//bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";
修改完了还是不行,不知道啥原因。还是卡在这块。
[ 1.674673] ALSA device list:
[ 1.677662] #0: F1C100s Audio Codec
[ 1.682097] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.690867] cfg80211: failed to load regulatory.db
[ 1.696482] Waiting for root device /dev/mtdblock2...
[ 23.388435] random: crng init done
[ 31.848374] vcc3v0: disabling
[ 31.851375] vcc3v3: disabling
[ 31.854343] vcc5v0: disabling
@pldjn_V3S
对,改设备树。改完设备树, 有一个快速编译的方法:
rm output/build/linux-5.4.66/.stamp_built -rf && make
这样就能重新生成linux 设备树二进制文件了.
uboot亦然.
试了,修改 board\widora\mangopi\r3\devicetree\uboot\suniv-f1c100s-generic.dts的下面这块,改成serial0 = &uart0;就有了;Linux的还是没有,到了Starting kernel ...␍␊就停了。
aliases {
serial0 = &uart0;
spi0 = &spi0;
};
chosen {
stdout-path = "serial0:115200n8";
};
Linux 需要修改 ./board/widora/mangopi/r3/devicetree/linux/devicetree.dts ,增加下面这块,才会有log输出。
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pe_pins>;
status = "okay";
};
@pldjn_V3S
uboot 串口
改这个:
board/widora/mangopi/r3/uboot.defconfigCONFIG_CONS_INDEX=2
然后删除uboot的编译目录:
rm output/build/uboot-2020.07/ -rf重新make即可。
这样改过以后,确实有了log输出,uboot的前一半有了,后一半没出来。后一半是不是需要修改设备树;一会再去修改了试试先。
[15:46:31:768] ␍␊
[15:46:31:768] U-Boot SPL 2020.07 (Feb 13 2023 - 14:44:13 +0800)␍␊
[15:46:31:803] DRAM: 64 MiB␍␊
[15:46:31:803] Trying to boot from MMC1␍␊
[15:46:31:803] Card did not respond to voltage select!␍␊
[15:46:31:803] spl: mmc init failed with error: -95␍␊
[15:46:31:804] Trying to boot from MMC2␍␊
[15:46:31:818] Card did not respond to voltage select!␍␊
[15:46:31:820] spl: mmc init failed with error: -95␍␊
[15:46:31:823] Trying to boot from sunxi SPI␍␊
@哇酷小二
修改F1C200S的uboot,console接口,都要改哪些 地方,我按照坛里的帖子修改了几个地,还是没有输出到uart0上。第3项我没找到声明的地方,不知道是什么原因;
1, board\widora\mangopi\r3\devicetree\uboot\suniv-f1c100s-generic.dts
aliases {
serial0 = &uart0;
spi0 = &spi0;
};
chosen {
stdout-path = "serial0:115200n8";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins_a>;
status = "okay";
};
2,board\allwinner\suniv-f1c100s\devicetree\uboot\suniv-f1c100s.dtsi
uart0_pins_a: uart-pins-pe {
pins = "PE0", "PE1";
function = "uart0";
};
uart1_pins_a: uart1-pins-pa {
pins = "PA2", "PA3";
function = "uart1";
};
uart0: serial@1c25000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c25000 0x400>;
interrupts = <1>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
};
uart1: serial@1c25400 {
compatible = "snps,dw-apb-uart";
reg = <0x01c25400 0x400>;
interrupts = <2>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
};
3, 这块未找到,在文件/output/build/uboot-2020.07/include/configs/sunxi-common.h中没有找到CONFIG_CONS_INDEX这块的定义。
#define CONFIG_CONS_INDEX 1 /* UART0 */
4,uboot的.config中添加
CONFIG_BOOTARGS="console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3"
都在这个文件里面:widora_mangopi_r3_defconfig
当执行 make widora_mangopi_r3_defconfig,就把这个文件复制到 .config
我之前测试好像是没有写,而且报出来的Log里也没有提到。
make widora_mangopi_r3_defconfig
mkdir -p /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config -C support/kconfig -f Makefile.br conf
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -I/home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/.depend 2>/dev/null || :
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -I/home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/conf.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -I/home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config -DCONFIG_=\"\" -I. -c /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/zconf.tab.c -o /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/zconf.tab.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -I/home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config -DCONFIG_=\"\" /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/conf.o /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/zconf.tab.o -o /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/conf
rm /home/zl/f1c200s/buildroot-tiny200/output/build/buildroot-config/zconf.tab.c
#
# configuration written to /home/zl/f1c200s/buildroot-tiny200/.config
#
没有超过,_addr 是内存地址, 起始地址是 0x8000,0000
offset 是flash 偏移地址,取值范围 0 - 16M
在buildroot-tiny200\board\widora\mangopi\r3\devicetree\linux\devicetree.dts文件里spi-nor、spi-nand的分区配置是不一样的,而uboot.env的这个文件里只有一套分区地址设置,不知道是不是这块有问题。我按照spi-nand的参数配置了spi-nor 的分区,一样没启动,不知道为什么。
&spi0 {
status = "okay";
spi-nor@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
status = "disabled";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x70000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x70000 0x590000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x700000>;
read-only;
};
partition@3 {
label = "overlay";
reg = <0xd00000 0x300000>;
};
};
};
spi-nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@1 {
label = "kernel";
reg = <0x100000 0x500000>;
read-only;
};
partition@2 {
label = "rom";
reg = <0x600000 0x2a00000>;
read-only;
};
partition@3 {
label = "vendor";
reg = <0x3000000 0x1000000>;
};
partition@4 {
label = "overlay";
reg = <0x4000000 0x3000000>;
};
};
};
};
我准备使用buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *,支持SPI NAND 给我的F1C200S小板编译Linux固件,遇到一些问题,特开贴请教。
1,我编译的固件烧录到芯片,串口没有信息输出,不知道是不是与DTS文件中的 serial0 = &uart1 有关,为什么这里要把uart1给serial0;
/dts-v1/;
#include "suniv-f1c100s.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Allwinner F1C100s Generic Device";
compatible = "allwinner,suniv-f1c100s",
"allwinner,suniv";
aliases {
serial0 = &uart1;
spi0 = &spi0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
2, 在uboot.env中为什么这些值都那么大?
sf_size=0x1000000
sf_splash_offset=0x80000
sf_kernel_offset=0x100000
sf_kernel_length=0x500000
splash_addr=0x80000000
splash_length=0x80000
kernel_addr_r=0x81000000
bootm_size=0x1800000
按照下面这行,那bootcomv好像不适合SPI Flash ,也不知道自己的理解对不对。
nor_boot=echo "Booting from SPI-NOR..."; sf probe; sf read ${kernel_addr_r} ${sf_kernel_offset} ${sf_kernel_length};
为了方便我把/board/allwinner/generic/uboot.env文件的内容贴出来;
mmc_kernel=kernel.itb
mmc_splash=splash.bmp
mmc_ubootpart=1
mmc_bootpart=2
mmc_rootpart=3
nand_size=0x8000000
nand_splash_offset=0x80000
nand_kernel_offset=0x100000
nand_kernel_length=0x500000
sf_size=0x1000000
sf_splash_offset=0x80000
sf_kernel_offset=0x100000
sf_kernel_length=0x500000
splash_addr=0x80000000
splash_length=0x80000
kernel_addr_r=0x81000000
bootm_size=0x1800000
stderr=serial
stdin=serial
stdout=serial
boot_slot_0=empty
boot_slot_1=empty
scan_boot_slot_0=if mmc dev 0; then setenv boot_slot_0 mmc0; fi;
scan_boot_slot_1=if mmc dev 1; then setenv boot_slot_1 mmc1; else if sf probe; then setenv boot_slot_1 spi-nor; else if mtd list; then setenv boot_slot_1 spi-nand; fi; fi; fi;
scan_boot_slot=run scan_boot_slot_0; run scan_boot_slot_1; echo "========================="; echo "Boot Device: ${boot_device}"; echo "Boot Slot 0: ${boot_slot_0}"; echo "Boot Slot 1: ${boot_slot_1}"; echo "=========================";
dfu_wait_timeout=3
mmc_dfu_info=setenv dfu_alt_info "all raw 0x0 0x37000;u-boot raw 0x10 0x7f0;boot part ${dfu_mmc_dev} ${mmc_bootpart};rom part ${dfu_mmc_dev} ${mmc_rootpart};kernel fat ${dfu_mmc_dev} ${mmc_bootpart}"
nand_dfu_info=setenv dfu_alt_info "all raw 0x0 ${nand_size};u-boot raw 0x0 0x80000;kernel raw ${nand_kernel_offset} ${nand_kernel_length};rom raw 0x600000 0x2a00000;vendor raw 0x3000000 0x1000000"
nor_dfu_info=setenv dfu_alt_info "all raw 0x0 ${sf_size};u-boot raw 0x0 0x80000;kernel raw ${sf_kernel_offset} ${sf_kernel_length};rom raw 0x600000 0x700000"
dfu_mmc=mmc dev ${dfu_mmc_dev}; run mmc_dfu_info; dfu 0 mmc ${dfu_mmc_dev} ${dfu_wait_timeout};
dfu_nand=run nand_dfu_info; dfu 0 mtd spi-nand0 ${dfu_wait_timeout};
dfu_nor=run nor_dfu_info; dfu 0 sf 0:0 ${dfu_wait_timeout};
dfu_boot=if test "${boot_slot_1}" = "spi-nand"; then echo "DFU waiting on SPI-NAND..."; run dfu_nand; fi; if test "${boot_slot_1}" = "spi-nor"; then echo "DFU waiting on SPI-NOR..."; run dfu_nor; fi; if test "${boot_slot_1}" = "mmc1"; then echo "DFU waiting on MMC1..."; setenv dfu_mmc_dev 1; run dfu_mmc; fi; if test "${boot_slot_1}" = "empty" && test "${boot_slot_0}" = "mmc0"; then echo "DFU waiting on MMC0..."; setenv dfu_mmc_dev 0; run dfu_mmc; fi;
fel_boot=echo "Booting from FEL..."; bootm ${kernel_addr_r};
mmc_boot=mmc dev ${devnum}; echo "Booting from MMC${devnum}..."; load mmc ${devnum}:${mmc_bootpart} $kernel_addr_r ${mmc_kernel}; bootm ${kernel_addr_r};
nor_nand_boot=if test "${boot_slot_1}" = "spi-nor"; then run nor_boot; fi; if test "${boot_slot_1}" = "spi-nand"; then run nand_boot; fi;
nor_boot=echo "Booting from SPI-NOR..."; sf probe; sf read ${kernel_addr_r} ${sf_kernel_offset} ${sf_kernel_length}; bootm ${kernel_addr_r};
nand_boot=echo "Booting from SPI-NAND..."; mtd read spi-nand0 ${kernel_addr_r} ${nand_kernel_offset} ${nand_kernel_length}; bootm ${kernel_addr_r};
bootcmd_fel=if test "${boot_device}" = "fel"; then run fel_boot; fi;
bootcmd_dfu=if test "${boot_device}" != "mmc0" || test "${boot_slot_1}" = "empty"; then run dfu_boot; fi;
bootcmd_mmc0=if test "${boot_device}" = "mmc0"; then devnum=0; run mmc_boot; fi;
bootcmd_mmc1=if test "${boot_device}" = "mmc1"; then devnum=1; run mmc_boot; fi;
bootcmd_spi=if test "${boot_device}" = "spi"; then run nor_nand_boot; fi;
boot_targets=fel dfu mmc0 mmc1 spi loopdfu
splash_nor=sf probe; sf read ${splash_addr} ${sf_splash_offset} ${splash_length};
splash_nand=mtd read spi-nand0 ${splash_addr} ${nand_splash_offset} ${splash_length};
splash_spi=if test "${boot_slot_1}" = "spi-nor"; then run splash_nor; fi; if test "${boot_slot_1}" = "spi-nand"; then run splash_nand; fi;
splash_mmc=load mmc ${devnum}:${mmc_bootpart} ${splash_addr} ${mmc_splash};
show_splash=run splash_${boot_device}; bmp display ${splash_addr}; gpio set ${lcd_bl_pin};
distro_bootcmd=run scan_boot_slot; run show_splash; for target in ${boot_targets}; do run bootcmd_${target}; done
@哇酷小二
问一下晕哥:
board/widora/mangopi/r3/devicetree/uboot/suniv-f1c100s-generic.dts里的这段serial0 = &uart1;会影响到串口0的输出吗?
/dts-v1/;
#include "suniv-f1c100s.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Allwinner F1C100s Generic Device";
compatible = "allwinner,suniv-f1c100s",
"allwinner,suniv";
aliases {
serial0 = &uart1;
spi0 = &spi0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
@哇酷小二
我今天试着读了一下写到芯片内的u-boot进行了对比,发现写进去与读出的是一样的,但这个bin文件并没有正常的串口信息输出,看不到uboot是否运行。
不知道有哪个设置会影响uboot的运行,按说设置了ARM及内核926,uboot就应该会在芯片上跑起来。
make widora_mangopi_r3_defconfig
应该会把基本配置写到.config文件里面去吧。
我看了一下mangopi r3的原理,console的串口应该也是uart0,实在不知道是哪里出了问题,还有哪里会影响uboot。
-rw-r--r-- 1 root root 431378 2月 10 16:44 uboo-read.bin
-rw-r--r-- 1 zl zl 431378 2月 10 16:38 u-boot-sunxi-with-spl.bin
zl@zl-System-Product-Name:~/buildroot-image$ diff uboo-read.bin u-boot-sunxi-with-spl.bin
zl@zl-System-Product-Name:~/buildroot-image$
今天遇到2个问题:
1 ,修改液晶RGB到BGR没有成功,按https://whycan.com/viewtopic.php?id=6781的方法添加下面的代码,修改linux的 linux/drivers/gpu/drm/sun4i/sun4i_tcon.c 文件,重新编译打包后,小企鹅的脚还是蓝的,没有变成黄色。
regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,BIT(23),BIT(23));//SWAP R、B引脚
2,修改uboot的液晶分辨率,配置 LCD panel timing details为分辨率480x272,结果只有开始的小企鹅那块好像是对的,后面Linux的信息都不对。
x:480,y:272,depth:18,pclk_khz:10000,le:42,ri:8,up:11,lo:4,hs:1,vs:1,sync:3,vmode:0
查看env bootargs那段没有LCD的信息,也没有看到哪里把分辨率传给Linux
printenv
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel
bootargs=console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
bootcmd=sf probe 0 50000000; sf read 0x80C00000 0x100000 0x4000; sf read 0x80008000 0x110000 0x400000; bootz 0x80008000 - 0x80C00000
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootdelay=2
bootm_size=0x1700000
console=ttyS0,115200
cpu=arm926ejs
dfu_alt_info_ram=kernel ram 0x80500000 0x1000000;fdt ram 0x80C00000 0x100000;ramdisk ram 0x80D50000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
fdt_addr_r=0x80C00000
fdtcontroladdr=82ea2dc8
fdtfile=suniv-f1c100s-licheepi-nano.dtb
fel_booted=1
kernel_addr_r=0x80500000
partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};
pxefile_addr_r=0x80D00000
ramdisk_addr_r=0x80D50000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80C50000
soc=sunxi
stderr=serial@1c25000
stdin=serial@1c25000
stdout=serial@1c25000
uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3
Environment size: 2533/131068 bytes
=>
进linux用命令行查看应该是没有传参数进来。
[12:13:25:748] # cat /proc/cmdline␍␊
[12:13:57:860] console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 ␍␊
buildroot-tiny200 的SDK还没有搞定,编译完后烧写到Spiflash uboot没有串口输出。
回头又去重新git了nano-lcd800480分支,编译了一个1M大的u-boot,打包以后,明显还是不正常,Linux没有正常shell,但是由于换了uboot,现在LCD可以显示了,需要换一下颜色改成GBR。
对Linux不太懂,学起来也是散的,自己是搞到哪不会了,就搜一下。还没有找到好的学习方法。
[14:04:50:530] U-Boot SPL 2018.01-05682-gd83b2fefcf-dirty (Feb 07 2023 - 01:23:22)␍␊
[14:04:50:535] DRAM:␍␊
[14:04:50:768] U-Boot SPL 2018.01-05682-gd83b2fefcf-dirty (Feb 07 2023 - 01:23:22)␍␊
[14:04:50:774] DRAM: 64 MiB␍␊
[14:04:50:786] Trying to boot from MMC1␍␊
[14:04:50:807] Card did not respond to voltage select!␍␊
[14:04:50:810] mmc_init: -95, time 22␍␊
[14:04:50:813] spl: mmc init failed with error: -95␍␊
[14:04:50:816] Trying to boot from sunxi SPI␍␊
[14:04:51:901] ␍␊
[14:04:51:901] ␍␊
[14:04:51:901] U-Boot 2018.01-05682-gd83b2fefcf-dirty (Feb 07 2023 - 01:23:22 +0800) Allwinner Technology␍␊
[14:04:51:909] ␍␊
[14:04:51:909] CPU: Allwinner F Series (SUNIV)␍␊
[14:04:51:912] Model: Lichee Pi Nano␍␊
[14:04:51:912] DRAM: 64 MiB␍␊
[14:04:52:456] MMC: SUNXI SD/MMC: 0␍␊
[14:04:52:460] SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB␍␊
[14:04:55:201] *** Warning - bad CRC, using default environment␍␊
[14:04:55:205] ␍␊
[14:04:55:210] Setting up a 800x480 lcd console (overscan 0x0)␍␊
[14:04:55:366] In: serial@1c25000␍␊
[14:04:55:366] Out: serial@1c25000␍␊
[14:04:55:369] Err: serial@1c25000␍␊
[14:04:55:371] Net: No ethernet found.␍␊
[14:04:55:375] starting USB...␍␊
[14:04:55:375] No controllers found␍␊
[14:04:55:380] Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊
[14:04:57:403] Card did not respond to voltage select!␍␊
[14:04:57:406] mmc_init: -95, time 22␍␊
[14:04:57:409] starting USB...␍␊
[14:04:57:409] No controllers found␍␊
[14:04:57:412] USB is stopped. Please issue 'usb start' first.␍␊
[14:04:57:414] starting USB...␍␊
[14:04:57:417] No controllers found␍␊
[14:04:57:420] No ethernet found.␍␊
[14:04:57:420] missing environment variable: pxeuuid␍␊
[14:04:57:423] missing environment variable: bootfile␍␊
[14:04:57:428] Retrieving file: pxelinux.cfg/00000000␍␊
[14:04:57:431] No ethernet found.␍␊
[14:04:57:431] missing environment variable: bootfile␍␊
[14:04:57:437] Retrieving file: pxelinux.cfg/0000000␍␊
[14:04:57:439] No ethernet found.␍␊
[14:04:57:442] missing environment variable: bootfile␍␊
[14:04:57:445] Retrieving file: pxelinux.cfg/000000␍␊
[14:04:57:448] No ethernet found.␍␊
[14:04:57:450] missing environment variable: bootfile␍␊
[14:04:57:454] Retrieving file: pxelinux.cfg/00000␍␊
[14:04:57:456] No ethernet found.␍␊
[14:04:57:459] missing environment variable: bootfile␍␊
[14:04:57:462] Retrieving file: pxelinux.cfg/0000␍␊
[14:04:57:464] No ethernet found.␍␊
[14:04:57:467] missing environment variable: bootfile␍␊
[14:04:57:470] Retrieving file: pxelinux.cfg/000␍␊
[14:04:57:473] No ethernet found.␍␊
[14:04:57:475] missing environment variable: bootfile␍␊
[14:04:57:478] Retrieving file: pxelinux.cfg/00␍␊
[14:04:57:481] No ethernet found.␍␊
[14:04:57:484] missing environment variable: bootfile␍␊
[14:04:57:486] Retrieving file: pxelinux.cfg/0␍␊
[14:04:57:489] No ethernet found.␍␊
[14:04:57:489] missing environment variable: bootfile␍␊
[14:04:57:495] Retrieving file: pxelinux.cfg/default-arm-sunxi␍␊
[14:04:57:497] No ethernet found.␍␊
[14:04:57:500] missing environment variable: bootfile␍␊
[14:04:57:503] Retrieving file: pxelinux.cfg/default-arm␍␊
[14:04:57:506] No ethernet found.␍␊
[14:04:57:508] missing environment variable: bootfile␍␊
[14:04:57:511] Retrieving file: pxelinux.cfg/default␍␊
[14:04:57:517] No ethernet found.␍␊
[14:04:57:517] Config file not found␍␊
[14:04:57:520] starting USB...␍␊
[14:04:57:520] No controllers found␍␊
[14:04:57:523] No ethernet found.␍␊
[14:04:57:528] No ethernet found.␍␊
[14:04:57:528] =>
今天对F1c200S进行了烧录,PCB上是焊接的W25Q128,写进去的是下面这个sysimage-nor.img文件,结果芯片上电串口没有输出任何字符,说明u-boot没有启动,这是为什么。是我烧写的文件不对吗?我自己编译的那个固件是可以启动linux进入shell的。不知道如何解决。我看自己编译的固件与sysimage-nor.img是同样大小的。
-rw-r--r-- 1 zl zl 16777216 Feb 4 19:59 sysimage-nor.img
-rw-r--r-- 1 zl zl 16777216 2月 3 17:04 f1c100s_spiflash_16M.bin
更新一下,
烧进sysimage-nor.img以后,串口没有输出,但是F1C200S 已经不是跑在FEL了,应该还是跑了uboot了。
来汇报一下,在服务器上安装了ubuntu 18.04 server版http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso,安装以下包
sudo apt install wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev
sudo apt install python3-distutils
拉取源码
git clone https://github.com/aodzip/buildroot-tiny200.git
编译
cd buildroot-tiny200
make widora_mangopi_r3_defconfig
make
没有其他环境的安装操作,dl文件夹是自己下载的,没有复制进去。经过一夜的编译,正确的生成了目标文件。环境很重要,不能使用ubuntu 22.04。
zl@ubuntu:~/f1c200s/buildroot-tiny200/output/images$ ls -l
total 260912
-rw-r--r-- 1 zl zl 8388608 Feb 4 19:59 bootfs.vfat
-rw-r--r-- 1 zl zl 15666 Feb 4 19:35 devicetree.dtb
-rw-r--r-- 1 zl zl 4326936 Feb 4 19:59 kernel.itb
-rw-r--r-- 1 zl zl 18583040 Feb 4 19:59 rootfs.cpio
-rw-r--r-- 1 zl zl 5970377 Feb 4 19:59 rootfs.cpio.gz
-rw-r--r-- 1 zl zl 104857600 Feb 4 19:59 rootfs.ext2
lrwxrwxrwx 1 zl zl 11 Feb 4 19:59 rootfs.ext4 -> rootfs.ext2
-rw-r--r-- 1 zl zl 6021120 Feb 4 19:59 rootfs.squashfs
-rw-r--r-- 1 zl zl 19671040 Feb 4 19:59 rootfs.tar
-rw-r--r-- 1 zl zl 94514 Feb 4 19:59 splash.bmp
-rw-r--r-- 1 zl zl 134217728 Feb 4 19:59 sysimage-nand.img
-rw-r--r-- 1 zl zl 16777216 Feb 4 19:59 sysimage-nor.img
-rw-r--r-- 1 zl zl 114294784 Feb 4 19:59 sysimage-sdcard.img
-rw-r--r-- 1 zl zl 451858 Feb 4 19:59 u-boot-sunxi-with-nand-spl.bin
-rw-r--r-- 1 zl zl 431378 Feb 4 19:19 u-boot-sunxi-with-spl.bin
-rw-r--r-- 1 zl zl 398546 Feb 4 19:19 u-boot.bin
-rw-r--r-- 1 zl zl 4309472 Feb 4 19:35 zImage
我现在使用的是ubuntu 22.04,编译遇到了自己能力解决不了的问题,狗也搜不到,不知道详细的log存在哪个文件里,从目前打印出来的信息,我找不到原因,不知道为什么mknod 没有权限。
正在服务器上装ubuntu 18.04,搞一回开发环境太麻烦了,我对Linux还不太熟。
目前报错是
table='/home/zl/buildroot-tiny200/output/build/buildroot-fs/full_devices_table.txt'
mknod: /home/zl/buildroot-tiny200/output/build/buildroot-fs/cpio/target/dev/console: Operation not permitted
make[1]: *** [fs/cpio/cpio.mk:72: /home/zl/buildroot-tiny200/output/images/rootfs.cpio] Error 1
make: *** [Makefile:84: _all] Error 2
在output/image/文件夹里面已经生成了4个文件,
$ ls
devicetree.dtb u-boot.bin u-boot-sunxi-with-spl.bin zImage
慢慢研究了,是不是可以直接把这4个文件打包或直接烧录到SpiFlash去测试,好像之前编译的时候,就是这几个文件用buildroot打一下包。
用这这个SDK编译会报错,感觉是版本问题,不知道怎么拉取正确的版本。
我是按github上的步骤进行的操作。git clone https://github.com/aodzip/buildroot-tiny200.git 以后,先make widora_mangopi_r3_defconfig,然后再make,他会直接去下载dl文件夹等相关的环境。
然后就是报下面这个错,
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
make[5]: *** [Makefile:1915: c-stack.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile:1674: all] Error 2
make[3]: *** [Makefile:1572: all-recursive] Error 1
make[2]: *** [Makefile:1528: all] Error 2
我把c-stack.c的这部分代码注掉,又会出新的错误。所以感觉是版本问题。
#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
more than the Linux default of an 8k alternate stack when deciding
if a fault was caused by stack overflow. */
# undef SIGSTKSZ
# define SIGSTKSZ 16384
新的错误是一堆的_STAT_VER相关
libfakeroot.c: In function ‘chown’:
libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
找到原因了,是u-boot 的suniv.h文件里修改过的内容,学习过程中给注掉了。
还原以后,就可以正常启动Linux了。
我是按照这个帖子一步步学习的https://whycan.com/viewtopic.php?id=3138 ,就是下面这段代码,我给注掉了。
#define CONFIG_BOOTCOMMAND "sf probe 0 50000000; " \
"sf read 0x80C00000 0x100000 0x4000; " \
"sf read 0x80008000 0x110000 0x400000; " \
"bootz 0x80008000 - 0x80C00000"
正常的启动了Linux。
[17:10:57:965] U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Feb 03 2023 - 16:59:55)␍␊
[17:10:57:971] DRAM: 64 MiB␍␊
[17:10:57:982] SPL: Unsupported Boot Device!␍␊
[17:10:57:985] Trying to boot from sunxi SPI␍␊
[17:10:59:201] ␍␊
[17:10:59:201] U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Feb 03 2023 - 16:59:55)␍␊
[17:10:59:206] DRAM: 64 MiB␍␊
[17:10:59:218] SPL: Unsupported Boot Device!␍␊
[17:10:59:221] Trying to boot from sunxi SPI␍␊
[17:10:59:477] ␍␊
[17:10:59:477] ␍␊
[17:10:59:477] U-Boot 2018.01-05679-g013ca457fd-dirty (Feb 03 2023 - 16:59:55 +0800) Allwinner Technology␍␊
[17:10:59:485] ␍␊
[17:10:59:485] CPU: Allwinner F Series (SUNIV)␍␊
[17:10:59:488] Model: Lichee Pi Nano␍␊
[17:10:59:488] DRAM: 64 MiB␍␊
[17:11:00:007] Using default environment␍␊
[17:11:00:007] ␍␊
[17:11:00:007] In: serial@1c25000␍␊
[17:11:00:010] Out: serial@1c25000␍␊
[17:11:00:012] Err: serial@1c25000␍␊
[17:11:00:017] Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊
[17:11:02:022] SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB␍␊
[17:11:02:028] device 0 offset 0x100000, size 0x4000␍␊
[17:11:02:037] SF: 16384 bytes @ 0x100000 Read: OK␍␊
[17:11:02:040] device 0 offset 0x110000, size 0x400000␍␊
[17:11:03:130] SF: 4194304 bytes @ 0x110000 Read: OK␍␊
[17:11:03:133] ## Flattened Device Tree blob at 80c00000␍␊
[17:11:03:137] Booting using the fdt blob at 0x80c00000␍␊
[17:11:03:140] Loading Device Tree to 816fb000, end 816fff44 ... OK␍␊
[17:11:03:154] ␍␊
[17:11:03:154] Starting kernel ...␍␊
[17:11:03:154] ␍␊
[17:11:04:248] [ 0.000000] Booting Linux on physical CPU 0x0␍␊
[17:11:04:251] [ 0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (zhaili@zhaili-f1c200s) (gcc version 7.5.0 (Linaro GCC 7.5-2019.12)) #7 Thu Feb 2 16:26:09 UTC 2023␍␊
[17:11:04:265] [ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f␍␊
[17:11:04:270] [ 0.000000] CPU: VIVT data cache, VIVT instruction cache␍␊
[17:11:04:276] [ 0.000000] OF: fdt: Machine model: Lichee Pi Nano␍␊
[17:11:04:281] [ 0.000000] Memory policy: Data cache writeback␍␊
[17:11:04:287] [ 0.000000] random: fast init done␍␊
[17:11:04:290] [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256␍␊
[17:11:04:295] [ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2␍␊
[17:11:04:309] [ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)␍␊
[17:11:04:313] [ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)␍␊
[17:11:04:320] [ 0.000000] Memory: 56208K/65536K available (5120K kernel code, 232K rwdata, 1312K rodata, 1024K init, 228K bss, 9328K reserved, 0K cma-reserved, 0K highmem)␍␊
[17:11:04:334] [ 0.000000] Virtual kernel memory layout:␍␊
[17:11:04:338] [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)␍␊
[17:11:04:343] [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)␍␊
[17:11:04:348] [ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)␍␊
[17:11:04:354] [ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)␍␊
[17:11:04:360] [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)␍␊
[17:11:04:367] [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)␍␊
[17:11:04:373] [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (6112 kB)␍␊
[17:11:04:379] [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)␍␊
[17:11:04:384] [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 233 kB)␍␊
[17:11:04:390] [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 229 kB)␍␊
[17:11:04:395] [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1␍␊
[17:11:04:402] [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16␍␊
[17:11:04:406] [ 0.000046] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns␍␊
[17:11:04:415] [ 0.000108] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns␍␊
[17:11:04:423] [ 0.000629] Console: colour dummy device 80x30␍␊
[17:11:04:428] [ 0.000710] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)␍␊
[17:11:04:434] [ 0.070221] pid_max: default: 32768 minimum: 301␍␊
[17:11:04:440] [ 0.070514] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)␍␊
[17:11:04:445] [ 0.070553] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)␍␊
[17:11:04:453] [ 0.071948] CPU: Testing write buffer coherency: ok␍␊
[17:11:04:457] [ 0.073538] Setting up static identity map for 0x80100000 - 0x80100058␍␊
[17:11:04:465] [ 0.076018] devtmpfs: initialized␍␊
[17:11:04:469] [ 0.082488] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns␍␊
[17:11:04:476] [ 0.082548] futex hash table entries: 256 (order: -1, 3072 bytes)␍␊
[17:11:04:484] [ 0.082796] pinctrl core: initialized pinctrl subsystem␍␊
[17:11:04:490] [ 0.084732] NET: Registered protocol family 16␍␊
[17:11:04:494] [ 0.086016] DMA: preallocated 256 KiB pool for atomic coherent allocations␍␊
[17:11:04:501] [ 0.087726] cpuidle: using governor menu␍␊
[17:11:04:504] [ 0.109358] SCSI subsystem initialized␍␊
[17:11:04:506] [ 0.109701] usbcore: registered new interface driver usbfs␍␊
[17:11:04:512] [ 0.109852] usbcore: registered new interface driver hub␍␊
[17:11:04:517] [ 0.110038] usbcore: registered new device driver usb␍␊
[17:11:04:523] [ 0.110559] pps_core: LinuxPPS API ver. 1 registered␍␊
[17:11:04:528] [ 0.110586] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>␍␊
[17:11:04:537] [ 0.110645] PTP clock support registered␍␊
[17:11:04:545] [ 0.111128] Advanced Linux Sound Architecture Driver Initialized.␍␊
[17:11:04:548] [ 0.112567] clocksource: Switched to clocksource timer␍␊
[17:11:04:554] [ 0.137684] NET: Registered protocol family 2␍␊
[17:11:04:560] [ 0.139060] TCP established hash table entries: 1024 (order: 0, 4096 bytes)␍␊
[17:11:04:566] [ 0.139135] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)␍␊
[17:11:04:570] [ 0.139184] TCP: Hash tables configured (established 1024 bind 1024)␍␊
[17:11:04:576] [ 0.139436] UDP hash table entries: 256 (order: 0, 4096 bytes)␍␊
[17:11:04:581] [ 0.139490] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)␍␊
[17:11:04:590] [ 0.139943] NET: Registered protocol family 1␍␊
[17:11:04:592] [ 0.142327] NetWinder Floating Point Emulator V0.97 (double precision)␍␊
[17:11:04:598] [ 0.144206] Initialise system trusted keyrings␍␊
[17:11:04:604] [ 0.144732] workingset: timestamp_bits=30 max_order=14 bucket_order=0␍␊
[17:11:04:609] [ 0.156676] squashfs: version 4.0 (2009/01/31) Phillip Lougher␍␊
[17:11:04:615] [ 0.157263] jffs2: version 2.2. (NAND) <0xc2><0xa9> 2001-2006 Red Hat, Inc.␍␊
[17:11:04:623] [ 0.171391] Key type asymmetric registered␍␊
[17:11:04:626] [ 0.171428] Asymmetric key parser 'x509' registered␍␊
[17:11:04:632] [ 0.171620] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)␍␊
[17:11:04:637] [ 0.171652] io scheduler noop registered␍␊
[17:11:04:642] [ 0.171670] io scheduler deadline registered␍␊
[17:11:04:645] [ 0.172407] io scheduler cfq registered (default)␍␊
[17:11:04:651] [ 0.172437] io scheduler mq-deadline registered␍␊
[17:11:04:657] [ 0.172455] io scheduler kyber registered␍␊
[17:11:04:662] [ 0.173684] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO␍␊
[17:11:04:666] [ 0.183361] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver␍␊
[17:11:04:673] [ 0.345421] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled␍␊
[17:11:04:679] [ 0.351800] console [ttyS0] disabled␍␊
[17:11:04:683] [ 0.372045] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A␍␊
[17:11:04:690] [ 0.816420] console [ttyS0] enabled␍␊
[17:11:04:702] [ 0.826601] panel-simple panel: panel supply power not found, using dummy regulator␍␊
[17:11:04:739] [ 0.863614] brd: module loaded␍␊
[17:11:04:760] [ 0.884461] loop: module loaded␍␊
[17:11:04:797] [ 0.921281] rbd: loaded (major 254)␍␊
[17:11:04:801] [ 0.925612] SCSI Media Changer driver v0.25 ␍␊
[17:11:04:809] [ 0.933402] m25p80 spi0.0: w25q128 (16384 Kbytes)␍␊
[17:11:04:813] [ 0.939017] 4 ofpart partitions found on MTD device spi0.0␍␊
[17:11:04:819] [ 0.944616] Creating 4 MTD partitions on "spi0.0":␍␊
[17:11:04:824] [ 0.949423] 0x000000000000-0x000000100000 : "u-boot"␍␊
[17:11:04:833] [ 0.956948] 0x000000100000-0x000000110000 : "dtb"␍␊
[17:11:04:843] [ 0.964193] 0x000000110000-0x000000510000 : "partition"␍␊
[17:11:04:848] [ 0.971823] 0x000000510000-0x000001000000 : "rootfs"␍␊
[17:11:04:856] [ 0.979790] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver␍␊
[17:11:04:861] [ 0.986436] ehci-platform: EHCI generic platform driver␍␊
[17:11:04:867] [ 0.991939] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver␍␊
[17:11:04:873] [ 0.998231] ohci-platform: OHCI generic platform driver␍␊
[17:11:04:879] [ 1.003901] usbcore: registered new interface driver usb-storage␍␊
[17:11:04:886] [ 1.011096] i2c /dev entries driver␍␊
[17:11:04:948] [ 1.072692] sunxi-mmc 1c0f000.mmc: base:0x0f5caf00 irq:19␍␊
[17:11:04:956] [ 1.080094] usbcore: registered new interface driver usbhid␍␊
[17:11:04:963] [ 1.085782] usbhid: USB HID core driver␍␊
[17:11:04:983] [ 1.107260] NET: Registered protocol family 17␍␊
[17:11:04:986] [ 1.111831] Key type dns_resolver registered␍␊
[17:11:04:992] [ 1.116269] Key type ceph registered␍␊
[17:11:04:995] [ 1.120684] libceph: loaded (mon/osd proto 15/24)␍␊
[17:11:05:003] [ 1.127561] Loading compiled-in X.509 certificates␍␊
[17:11:05:018] [ 1.142130] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0632718)␍␊
[17:11:05:025] [ 1.151041] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc06319fc)␍␊
[17:11:05:033] [ 1.158824] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).␍␊
[17:11:05:039] [ 1.165486] [drm] No driver support for vblank timestamp query.␍␊
[17:11:05:050] [ 1.174402] sun4i-drm display-engine: fb0: frame buffer device␍␊
[17:11:05:057] [ 1.181583] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0␍␊
[17:11:05:064] [ 1.190699] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator␍␊
[17:11:05:077] [ 1.202477] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver␍␊
[17:11:05:082] [ 1.208393] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1␍␊
[17:11:05:096] [ 1.219621] hub 1-0:1.0: USB hub found␍␊
[17:11:05:098] [ 1.223637] hub 1-0:1.0: 1 port detected␍␊
[17:11:05:105] [ 1.229693] cfg80211: Loading compiled-in X.509 certificates for regulatory database␍␊
[17:11:05:122] [ 1.246753] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'␍␊
[17:11:05:128] [ 1.253559] vcc3v3: disabling␍␊
[17:11:05:134] [ 1.256538] ALSA device list:␍␊
[17:11:05:134] [ 1.259501] #0: Loopback 1␍␊
[17:11:05:139] [ 1.263298] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2␍␊
[17:11:05:146] [ 1.271910] cfg80211: failed to load regulatory.db␍␊
[17:11:05:248] [ 1.372028] random: crng init done␍␊
[17:11:06:913] [ 3.037660] VFS: Mounted root (jffs2 filesystem) on device 31:3.␍␊
[17:11:06:922] [ 3.046563] devtmpfs: mounted␍␊
[17:11:06:930] [ 3.054220] Freeing unused kernel memory: 1024K␍␊
[17:11:15:457] Starting syslogd: OK␍␊
[17:11:15:553] Starting klogd: OK␍␊
[17:11:15:775] Running sysctl: OK␍␊
[17:11:16:395] Saving random seed: SKIP (read-only file system detected)␍␊
[17:11:16:456] Starting network: OK␍␊
[17:11:16:852] ␍␍␊
[17:11:16:859] Welcome to Buildroot␍␊
[17:11:16:859] ␍buildroot login: root␍␊
[17:14:20:130] # ls␍␊
研究U-boot,看看是不是Linux引导的地址不对,下面这些参数我现在还看不懂。一个个的放狗找,找找系统的介绍。
[14:24:12:844] => bdinfo␍␊
[14:24:58:592] arch_number = 0x00000000␍␊
[14:24:58:594] boot_params = 0x80000100␍␊
[14:24:58:594] DRAM bank = 0x00000000␍␊
[14:24:58:597] -> start = 0x80000000␍␊
[14:24:58:600] -> size = 0x04000000␍␊
[14:24:58:603] baudrate = 115200 bps␍␊
[14:24:58:606] TLB addr = 0x83FF0000␍␊
[14:24:58:606] relocaddr = 0x83FC9000␍␊
[14:24:58:608] reloc off = 0x028C9000␍␊
[14:24:58:611] irq_sp = 0x83EA6DB0␍␊
[14:24:58:614] sp start = 0x83EA6DA0␍␊
[14:24:58:617] Early malloc usage: 118 / 400␍␊
[14:24:58:619] fdt_blob = 83ea6dc8␍␊
[14:24:58:619] => ␍␊
[14:24:58:651] => printenv␍␊
[14:43:19:897] arch=arm␍␊
[14:43:19:897] baudrate=115200␍␊
[14:43:19:900] board=sunxi␍␊
[14:43:19:900] board_name=sunxi␍␊
[14:43:19:903] boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}␍␊
[14:43:19:911] boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf␍␊
[14:43:19:922] boot_prefixes=/ /boot/␍␊
[14:43:19:925] boot_script_dhcp=boot.scr.uimg␍␊
[14:43:19:928] boot_scripts=boot.scr.uimg boot.scr␍␊
[14:43:19:930] boot_targets=fel ␍␊
[14:43:19:930] bootargs=console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2␍␊
[14:43:19:939] bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi␍␊
[14:43:19:950] bootdelay=2␍␊
[14:43:19:950] bootm_size=0x1700000␍␊
[14:43:19:953] console=ttyS0,115200␍␊
[14:43:19:955] cpu=arm926ejs␍␊
[14:43:19:955] dfu_alt_info_ram=kernel ram 0x80500000 0x1000000;fdt ram 0x80C00000 0x100000;ramdisk ram 0x80D50000 0x4000000␍␊
[14:43:19:966] distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done␍␊
[14:43:19:972] fdt_addr_r=0x80C00000␍␊
[14:43:19:975] fdtcontroladdr=83ea6dc8␍␊
[14:43:19:975] fdtfile=suniv-f1c100s-licheepi-nano.dtb␍␊
[14:43:19:980] fel_booted=1␍␊
[14:43:19:980] kernel_addr_r=0x80500000␍␊
[14:43:19:983] partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};␍␊
[14:43:20:002] pxefile_addr_r=0x80D00000␍␊
[14:43:20:002] ramdisk_addr_r=0x80D50000␍␊
[14:43:20:005] scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;␍␊
[14:43:20:022] scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done␍␊
[14:43:20:044] scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi␍␊
[14:43:20:060] scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done␍␊
[14:43:20:083] scriptaddr=0x80C50000␍␊
[14:43:20:083] soc=sunxi␍␊
[14:43:20:085] stderr=serial@1c25000␍␊
[14:43:20:085] stdin=serial@1c25000␍␊
[14:43:20:088] stdout=serial@1c25000␍␊
[14:43:20:091] uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b␍␊
[14:43:20:094] uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3␍␊
[14:43:20:099] ␍␊
[14:43:20:099] Environment size: 2384/131068 bytes␍␊
[14:43:20:102] => ␍␊
自己编译了u-boot,linux,buildroot,打包烧到了SpiFlash里,只启动了uboot,没有引导系统,不知道是哪里的原因。.config文件是论坛下载的,uboot编译完了大小是182940字节。不知道是应该查uboot,还是查linux。
下面是uboot 的log,感觉像是没有引导。
[12:47:48:885] U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Feb 02 2023 - 09:36:48)␍␊
[12:47:48:891] DRAM: 64 MiB␍␊
[12:47:48:903] SPL: Unsupported Boot Device!␍␊
[12:47:48:906] Trying to boot from sunxi SPI␍␊
[12:47:49:161] ␍␊
[12:47:49:161] ␍␊
[12:47:49:161] U-Boot 2018.01-05679-g013ca457fd-dirty (Feb 02 2023 - 09:36:48 +0000) Allwinner Technology␍␊
[12:47:49:169] ␍␊
[12:47:49:169] CPU: Allwinner F Series (SUNIV)␍␊
[12:47:49:172] Model: Lichee Pi Nano␍␊
[12:47:49:172] DRAM: 64 MiB␍␊
[12:47:49:690] Using default environment␍␊
[12:47:49:690] ␍␊
[12:47:49:690] In: serial@1c25000␍␊
[12:47:49:693] Out: serial@1c25000␍␊
[12:47:49:696] Err: serial@1c25000␍␊
[12:47:49:700] =>
1,个人资料里面没有自己的发贴列表,不知道在哪里可以看到。
2,好久没有实际的进展了,最近收到了一批快递,终于。。终于把这个板子焊齐了。
3,最近在学习编译uboot、内核、buildroot,现在都可以正确编译了,但是还没有烧录测试,不知道是不是能够运行在芯片里。
4,使用sunxi-fel工具把uboot烧进了SPIFlash里,串口工具里面看到了log信息。
因为这是我刚开始学习Linux的开发,进展比较慢;
这是CuteCom软件的uboot的输出信息,现在还不知道uboot是不是正确的,自己学着编译的版本,不是网上下载的。
U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Jan 13 2023 - 17:44:02)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01-05679-g013ca457fd-dirty (Jan 13 2023 - 17:44:02 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
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@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 2 1 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
=>
按照https://whycan.com/t_3138.html 流程一步 步的搞自己的编译环境,u-boot和linux,现在基本上可以编译成功了,但是到了buildroot会报错;而我从github上直接下载来的git clone https://github.com/buildroot/buildroot.git是可以编译成功的;就是不知道能不能用在F1C200S上,第一回搞linux平台的东西,啥都不懂。
按照https://whycan.com/t_3138.html 流程一步 步的搞自己的编译环境,u-boot和linux,现在基本上可以编译成功了,现在是buildroot会报错;而我从github上直接下载来的git clone https://github.com/buildroot/buildroot.git是可以编译成功的;就是不知道能不能用在F1C200S上,第一回搞linux平台的东西,啥都不懂。
帖子发重了,这个删不掉,不知道为什么,请版主给删一下吧。
如图,800*480的LCD显示uboot的logo,显示反了一般是什么原因导致的 LCD排除质量问题
https://whycan.com/files/members/10924/1.jpg
初始化可以配置显示方向,这个检查一下你的LCD初始化代码。
身在帝都,最近疫情高发,器件除了用顺丰其他快递都停了,邮费太贵了,先缓缓了。先多做些设计,画一块F1C200S的小板玩玩。
小板参考了论坛好几位前辈的板子,放置了R8025 做为RTC,背了一个C1220的小电池,其他基本没有啥变化 。准备白嫖JLC。
放上原理图:
F1C200S_DIY.pdf
https://whycan.com/files/members/2487/imx6ull_s1.png
最近抽空又画了一个带外壳的玩玩,大家觉得那种好看一些呢?
能讲讲DDR布线的经验吗?自己不会搞这种高速线。
页次: 1