源码和工具打包:[CSND下载]荔枝派nano汇总资料(uboot、主线Linux、buildroot及dl包、编译烧录工具、配置及烧录文件)
一、加快git获取速度配置
# 在https://www.ipaddress.com/查询以下域名的IP地址:
github.global.ssl.fastly.net
github.com
# 编辑
sudo vim /etc/hosts
# 添加下面两行(IP替换为上面查询出来的IP)
140.82.114.4 github.com
199.232.69.194 github.global.ssl.fastly.net
# 保存更新DNS
sudo /etc/init.d/networking restart
二、源码获取与编译
# 完整拉取linux极大,建议只拉取单层分支,减少等待时间:
git clone --depth=1 -b f1c100s-480272lcd-test https://github.com/Icenowy/linux.git
# 进入linux源码目录
cd linux/
#获取配置好的配置文件到linux源码的根目录(如果已存在.config,则需要替换)
wget http://dl.sipeed.com/LICHEE/Nano/SDK/config
cp config .config
#图形配置与编译
make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12
生成的 zImage
在 arch ‣ arm ‣ boot
目录下;将其放入第一分区。
生成的设备树suniv-f1c100s-licheepi-nano.dtb
在linux ‣ arch ‣ arm ‣ boot ‣ dts
目录下;将其放入第一分区。
三、修改顶层Makefile
在内核根目录下的Makefile
修改默认编译器,可以直接用make
编译:
# ARCH ?= $(SUBARCH)
# CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-gnueabi-
四、烧录
# 查看芯片信息,确认是否成功进入fel模式:
sudo sunxi-fel ver
# 烧录到RAM试运行
sudo sunxi-fel -p uboot u-boot-sunxi-with-spl.bin write 0x80000000 zImage write 0x80700000 suniv-f1c100s-licheepi-nano.dtb
五、启动LOG
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 14 ms (19.5 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
8035 bytes read in 25 ms (313.5 KiB/s)
reading zImage
3836208 bytes read in 211 ms (17.3 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.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000115] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000663] Console: colour dummy device 80x30
[ 0.001585] console [tty1] enabled
[ 0.001693] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070291] pid_max: default: 32768 minimum: 301
[ 0.070633] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070725] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.072217] CPU: Testing write buffer coherency: ok
[ 0.073935] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076582] devtmpfs: initialized
[ 0.083182] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.083350] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.083665] pinctrl core: initialized pinctrl subsystem
[ 0.085759] NET: Registered protocol family 16
[ 0.087270] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.089152] cpuidle: using governor menu
[ 0.115253] SCSI subsystem initialized
[ 0.115670] usbcore: registered new interface driver usbfs
[ 0.115889] usbcore: registered new interface driver hub
[ 0.116147] usbcore: registered new device driver usb
[ 0.116647] pps_core: LinuxPPS API ver. 1 registered
[ 0.116731] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.116858] PTP clock support registered
[ 0.117358] Advanced Linux Sound Architecture Driver Initialized.
[ 0.118938] clocksource: Switched to clocksource timer
[ 0.145357] NET: Registered protocol family 2
[ 0.146866] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.147017] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.147106] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.147433] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.147540] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.148072] NET: Registered protocol family 1
[ 0.149515] RPC: Registered named UNIX socket transport module.
[ 0.149631] RPC: Registered udp transport module.
[ 0.149681] RPC: Registered tcp transport module.
[ 0.149726] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.151977] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.153879] Initialise system trusted keyrings
[ 0.154506] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.172050] NFS: Registering the id_resolver key type
[ 0.172210] Key type id_resolver registered
[ 0.172267] Key type id_legacy registered
[ 0.185739] Key type asymmetric registered
[ 0.185845] Asymmetric key parser 'x509' registered
[ 0.186087] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.186188] io scheduler noop registered
[ 0.186234] io scheduler deadline registered
[ 0.187025] io scheduler cfq registered (default)
[ 0.187117] io scheduler mq-deadline registered
[ 0.187168] io scheduler kyber registered
[ 0.188317] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[ 0.198011] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.367742] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.394822] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.417601] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 24, base_baud = 6250000) is a 16550A
[ 0.894605] console [ttyS1] enabled
[ 0.905408] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.914940] SCSI Media Changer driver v0.25
[ 0.922839] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, c8, f1
[ 0.929814] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.936411] ehci-platform: EHCI generic platform driver
[ 0.942083] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.948368] ohci-platform: OHCI generic platform driver
[ 0.954139] usbcore: registered new interface driver usb-storage
[ 0.961308] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.970474] i2c /dev entries driver
[ 1.029077] sunxi-mmc 1c0f000.mmc: base:0x6917abdb irq:19
[ 1.036609] usbcore: registered new interface driver usbhid
[ 1.042383] usbhid: USB HID core driver
[ 1.064474] NET: Registered protocol family 17
[ 1.069385] Key type dns_resolver registered
[ 1.076004] Loading compiled-in X.509 certificates
[ 1.094534] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07394b8)
[ 1.103499] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073879c)
[ 1.111373] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.118031] [drm] No driver support for vblank timestamp query.
[ 1.172270] Console: switching to colour frame buffer device 60x34
[ 1.172649] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.174824] mmc0: new high speed SD card at address 21b7
[ 1.175936] mmcblk0: mmc0:21b7 APPSD 1.88 GiB
[ 1.178001] mmcblk0: p1 p2
[ 1.235638] sun4i-drm display-engine: fb0: frame buffer device
[ 1.255048] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.276713] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.307447] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.326133] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.349347] hub 1-0:1.0: USB hub found
[ 1.359979] hub 1-0:1.0: 1 port detected
[ 1.372058] using random self ethernet address
[ 1.383072] using random host ethernet address
[ 1.395687] usb0: HOST MAC ba:67:02:6b:d6:15
[ 1.406520] usb0: MAC 5a:bf:df:fb:6d:e1
[ 1.416695] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.436548] g_cdc gadget: g_cdc ready
[ 1.447439] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.477508] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.496735] ALSA device list:
[ 1.505953] #0: Loopback 1
[ 1.515761] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.536577] cfg80211: failed to load regulatory.db
[ 1.550315] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.576746] JBD2: no valid journal superblock found
[ 1.587884] EXT4-fs (mmcblk0p2): error loading journal
[ 1.600666] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c0)
[ 1.624597] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.650809] JBD2: no valid journal superblock found
[ 1.661959] EXT4-fs (mmcblk0p2): error loading journal
[ 1.674582] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c0)
[ 1.697294] List of all partitions:
[ 1.706757] b300 1969152 mmcblk0
[ 1.706776] driver: mmcblk
[ 1.725008] b301 32768 mmcblk0p1 a46ffe92-01
[ 1.725021]
[ 1.743217] b302 1935360 mmcblk0p2 a46ffe92-02
[ 1.743228]
[ 1.761564] No filesystem could mount root, tried:
[ 1.761577] ext3
[ 1.772326] ext4
[ 1.780070] ext2
[ 1.787547] vfat
[ 1.794949]
[ 1.808846] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[ 1.827569] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano+ #2
[ 1.845287] Hardware name: Allwinner suniv Family
[ 1.855439] [<c010e550>] (unwind_backtrace) from [<c010b6a8>] (show_stack+0x10/0x14)
[ 1.873897] [<c010b6a8>] (show_stack) from [<c0116878>] (panic+0xb8/0x230)
[ 1.891505] [<c0116878>] (panic) from [<c0901204>] (mount_block_root+0x1e4/0x250)
[ 1.909798] [<c0901204>] (mount_block_root) from [<c0901364>] (mount_root+0xf4/0x120)
[ 1.928639] [<c0901364>] (mount_root) from [<c09014b8>] (prepare_namespace+0x128/0x188)
[ 1.947800] [<c09014b8>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x174/0x1b8)
[ 1.967860] [<c0900dc0>] (kernel_init_freeable) from [<c064faf0>] (kernel_init+0x8/0x10c)
[ 1.987413] [<c064faf0>] (kernel_init) from [<c0107dc0>] (ret_from_fork+0x14/0x34)
[ 2.006461] Rebooting in 5 seconds..
[ 7.991488] Reboot failed -- System halted