全志F1C100S/F1C200S学习笔记(7)——根文件系统编译

源码和工具打包:[CSND下载]荔枝派nano汇总资料(uboot、主线Linux、buildroot及dl包、编译烧录工具、配置及烧录文件)

一、下载源码

# 首先安装一些依赖,比如linux头文件:
sudo apt-get install linux-headers-$(uname -r)

# 下载解压
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz

二、图形配置

cd buildroot-2017.08/
# 下载默认配置文件 buildroot.config
wget https://fdvad021asfd8q.oss-cn-hangzhou.aliyuncs.com/migrate/buildroot.config
# 复制一个并重命名
cp buildroot.config .config

# 图形界面配置
make menuconfig

配置界面:

Target options  --->
	Target Architecture Variant (arm926t)  --->   # arm926ejs架构
[ ] Enable VFP extension support	# Nano 没有 VFP单元,勾选会导致某些应用无法运行
    Target ABI (EABI)  --->
    Floating point strategy (Soft float)  --->    // 软浮点

System configuration  --->
    (Lichee Pi) System hostname                   // hostname
    (licheepi) Root password                      // 默认账户为root 密码为licheepi
    [*] remount root filesystem read-write during boot  // 启动时重新挂在文件系统使其可读写

三、软件包

  • 编译时会下载很多软件包,速度很慢,可以先下载下来:【dl包】百度网盘下载
  • 解压出dl文件夹放在buildroot-2017.08根目录下
  • 在编译的时候发现在下载arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2,所以这个也要放入dl文件夹里(编译时会自动解压)。
  • 这些资料在文章第一行链接里面全部打包了。

四、编译

# buildroot不能进行多线程编译
make

第一次编译失败,不清楚是否虚拟机崩溃引起的,make clean再次make就编译成功了。
编译完成的镜像包在 buildroot-2017.08 ‣ output ‣images ‣ rootfs.tar(大小98.1MB)


五、烧录

参考:全志F1C100S/F1C200S学习笔记(2)——TF/SD卡分区及系统构建烧录
使用TF卡烧录。


六、启动LOG

账号:root
密码:licheepi

U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Jan 28 2021 - 17:16:00)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2018.01-05679-g013ca457fd-dirty (Jan 28 2021 - 17:16:00 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, c8, f1
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

Setting up a 480x272 lcd console (overscan 0x0)
In:    serial@1c25400
Out:   serial@1c25400
Err:   serial@1c25400
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 16 ms (16.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
8035 bytes read in 27 ms (290 KiB/s)
reading zImage
3836208 bytes read in 202 ms (18.1 MiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fb000, end 816fff62 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (pjw@pjw-virtual-machine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #2 Mon Jan 25 11:04:40 CST 2021
[    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: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=tty1 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
[    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: 55164K/65536K available (6144K kernel code, 236K rwdata, 1388K rodata, 1024K init, 244K bss, 10372K 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 : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 237 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 245 kB)
[    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.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000116] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000666] Console: colour dummy device 80x30
[    0.001591] console [tty1] enabled
[    0.001698] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070295] pid_max: default: 32768 minimum: 301
[    0.070635] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070727] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072203] CPU: Testing write buffer coherency: ok
[    0.073926] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076565] devtmpfs: initialized
[    0.083193] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083362] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083675] pinctrl core: initialized pinctrl subsystem
[    0.085777] NET: Registered protocol family 16
[    0.087296] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089176] cpuidle: using governor menu
[    0.115316] SCSI subsystem initialized
[    0.115733] usbcore: registered new interface driver usbfs
[    0.115952] usbcore: registered new interface driver hub
[    0.116211] usbcore: registered new device driver usb
[    0.116719] pps_core: LinuxPPS API ver. 1 registered
[    0.116802] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.116932] PTP clock support registered
[    0.117434] Advanced Linux Sound Architecture Driver Initialized.
[    0.119016] clocksource: Switched to clocksource timer
[    0.145398] NET: Registered protocol family 2
[    0.146900] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.147054] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.147144] TCP: Hash tables configured (established 1024 bind 1024)
[    0.147474] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.147580] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.148107] NET: Registered protocol family 1
[    0.149566] RPC: Registered named UNIX socket transport module.
[    0.149681] RPC: Registered udp transport module.
[    0.149733] RPC: Registered tcp transport module.
[    0.149775] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.152058] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.153953] Initialise system trusted keyrings
[    0.154594] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.172172] NFS: Registering the id_resolver key type
[    0.172330] Key type id_resolver registered
[    0.172387] Key type id_legacy registered
[    0.185896] Key type asymmetric registered
[    0.186004] Asymmetric key parser 'x509' registered
[    0.186249] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.186349] io scheduler noop registered
[    0.186394] io scheduler deadline registered
[    0.187185] io scheduler cfq registered (default)
[    0.187276] io scheduler mq-deadline registered
[    0.187328] io scheduler kyber registered
[    0.188488] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.198180] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.368065] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.395073] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.417862] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 24, base_baud = 6250000) is a 16550A
[    0.894866] console [ttyS1] enabled
[    0.905638] panel-simple panel: panel supply power not found, using dummy regulator
[    0.915162] SCSI Media Changer driver v0.25 
[    0.923069] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, c8, f1
[    0.930040] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.936638] ehci-platform: EHCI generic platform driver
[    0.942309] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.948595] ohci-platform: OHCI generic platform driver
[    0.954380] usbcore: registered new interface driver usb-storage
[    0.961546] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.970714] i2c /dev entries driver
[    1.029147] sunxi-mmc 1c0f000.mmc: base:0x6917abdb irq:19
[    1.036689] usbcore: registered new interface driver usbhid
[    1.042462] usbhid: USB HID core driver
[    1.064559] NET: Registered protocol family 17
[    1.069471] Key type dns_resolver registered
[    1.076088] Loading compiled-in X.509 certificates
[    1.094618] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07394b8)
[    1.103583] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073879c)
[    1.111457] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.118115] [drm] No driver support for vblank timestamp query.
[    1.172361] Console: switching to colour frame buffer device 60x34
[    1.172736] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.175040] mmc0: new high speed SDHC card at address b368
[    1.176155] mmcblk0: mmc0:b368 NCard 29.1 GiB 
[    1.178482]  mmcblk0: p1 p2
[    1.241939] sun4i-drm display-engine: fb0:  frame buffer device
[    1.261409] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.283077] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.313876] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.332630] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.355729] hub 1-0:1.0: USB hub found
[    1.366323] hub 1-0:1.0: 1 port detected
[    1.378458] using random self ethernet address
[    1.389544] using random host ethernet address
[    1.402138] usb0: HOST MAC ba:67:02:6b:d6:15
[    1.412981] usb0: MAC 5a:bf:df:fb:6d:e1
[    1.423277] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.443255] g_cdc gadget: g_cdc ready
[    1.454176] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.484188] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.503351] ALSA device list:
[    1.512580]   #0: Loopback 1
[    1.522412] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.543220] cfg80211: failed to load regulatory.db
[    1.557211] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.611234] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[    1.662075] EXT4-fs (mmcblk0p2): recovery complete
[    1.673237] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.693549] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.728163] devtmpfs: mounted
[    1.741866] Freeing unused kernel memory: 1024K
[    1.941203] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
[    7.677011] random: crng init done


[  305.129055] EXT4-fs (mmcblk0p2): error count since last fsck: 14
[  305.146504] EXT4-fs (mmcblk0p2): initial error at time 1611891021: ext4_validate_block_bitmap:376
[  305.167182] EXT4-fs (mmcblk0p2): last error at time 1611901992: ext4_validate_block_bitmap:376

如果shell终端无法控制,需要做以下修改:
全志F1C100S/F1C200S学习笔记(10)——buildroot更改默认终端串口为uart1

猜你喜欢

转载自blog.csdn.net/p1279030826/article/details/112969949