日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

lichee linux nfs,SPI Flash 系统编译

發(fā)布時間:2024/7/23 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 lichee linux nfs,SPI Flash 系统编译 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

在一些低成本應(yīng)用場景,需要在SPI flash上啟動系統(tǒng),這需要對Uboot和系統(tǒng)鏡像做些適配。

本文介紹SPI Flash鏡像的制作過程。

這里 使用 MX25L25645G, 32M SPI flash 作為啟動介質(zhì),規(guī)劃分區(qū)如下:

分區(qū)序號

分區(qū)大小

分區(qū)作用

地址空間及分區(qū)名

mtd0

1MB

spl+uboot

0x0000000-0x0100000 : “uboot”

mtd1

64KB

dtb文件

0x0100000-0x0110000: “dtb”

mtd2

4MB

linux內(nèi)核

0x0110000-0x0510000 : “kernel”

mtd3

剩余

根文件系統(tǒng)

0x0510000-0x2000000 : “rootfs”

由于目前Uboot環(huán)境變量固定存放在1MB位置之內(nèi),所有留給uboot的空間固定到flash前1MB的位置不變。

每個分區(qū)的大小必須是擦除塊大小的整數(shù)倍,MX25L25645G的擦除塊大小是64KB。

下載包含spi驅(qū)動的體驗版本uboot,該驅(qū)動目前尚未合并到主線

git clone -b v3s-spi-experimental https://github.com/Lichee-Pi/u-boot.git

執(zhí)行 make ARCH=arm menuconfig 打開uboot菜單配置,進(jìn)入到 Device Drivers ? SPI Flash Support

注意看一下自己flash的廠家名稱,例如選上Macronix SPI flash support用來支持測試用的flash:MX25L25645G。

如果使用的是16MB以上的flash,需要勾選flash bank支持選項,否則最多只能讀到16MB: CONFIG_SPI_FLASH_BAR

在文件 include/configs/sun8i.h 中添加默認(rèn)bootcmd和bootargs的環(huán)境變量設(shè)置,注意添加的位置在“ #include ”的前邊。

vi include/configs/sun8i.h?

#define CONFIG_BOOTCOMMAND "sf probe 0; " \

"sf read 0x41800000 0x100000 0x10000; " \

"sf read 0x41000000 0x110000 0x400000; " \

"bootz 0x41000000 - 0x41800000"

#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \

"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2"

環(huán)境命令解析:sf probe 0; //初始化Flash設(shè)備(CS拉低)

sf read 0x41800000 0x100000 0x10000; //從flash0x100000(1MB)位置讀取dtb放到內(nèi)存0x41800000偏移處。 //如果是bsp的bin,則是0x41d00000

sf read 0x41000000 0x110000 0x400000; //從flash0x110000(1MB+64KB)位置讀取dtb放到內(nèi)存0x41000000偏移處。

bootz 0x41000000 (內(nèi)核地址)- 0x41800000(dtb地址) 啟動內(nèi)核

啟動參數(shù)解析console=ttyS0,115200 earlyprintk panic=5 rootwait //在串口0上輸出信息

mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 //spi32766.0是設(shè)備名,后面是分區(qū)大小,名字,讀寫屬性。

root=31:03表示根文件系統(tǒng)是mtd3;jffs2格式

time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log

會在目錄下生成 u-boot-sunxi-with-spl.bin

linux內(nèi)核基于github上的版本https://github.com/Lichee-Pi/linux.git,分支為最新的zero-4.13.y

執(zhí)行 make ARCH=arm menuconfig 打開內(nèi)核菜單配置,

進(jìn)入到 Device Drivers ? Memory Technology Device (MTD) support ,

確保選擇上mtd的 Command line partition table parsing 支持,該項目用來解析uboot傳遞過來的flash分區(qū)信息。

以及SPI-NOR 設(shè)備的支持。

添加對jffs2文件系統(tǒng)的支持,路徑在 File systems ? Miscellaneous filesystems ? Journalling Flash File System v2 (JFFS2) support

修改dts配置添加spi flash節(jié)點

vi arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

添加spi節(jié)點配置:

&spi0 {

status ="okay";

mx25l25635e:mx25l25635e@0 {

compatible = "jedec,spi-nor";

reg = <0x0>;

spi-max-frequency = <50000000>;

#address-cells = <1>;

#size-cells = <1>;

};

};

這里的flash型號需要在下表之中,否則將無法識別:(注意容量也一定要對應(yīng))

static const struct spi_device_id m25p_ids[] = {

/*

* Allow non-DT platform devices to bind to the "spi-nor" modalias, and

* hack around the fact that the SPI core does not provide uevent

* matching for .of_match_table

*/

{"spi-nor"},

/*

* Entries not used in DTs that should be safe to drop after replacing

* them with "spi-nor" in platform data.

*/

{"s25sl064a"}, {"w25x16"}, {"m25p10"}, {"m25px64"},

/*

* Entries that were used in DTs without "jedec,spi-nor" fallback and

* should be kept for backward compatibility.

*/

{"at25df321a"}, {"at25df641"}, {"at26df081a"},

{"mx25l4005a"}, {"mx25l1606e"}, {"mx25l6405d"}, {"mx25l12805d"},

{"mx25l25635e"},{"mx66l51235l"},

{"n25q064"}, {"n25q128a11"}, {"n25q128a13"}, {"n25q512a"},

{"s25fl256s1"}, {"s25fl512s"}, {"s25sl12801"}, {"s25fl008k"},

{"s25fl064k"},

{"sst25vf040b"},{"sst25vf016b"},{"sst25vf032b"},{"sst25wf040"},

{"m25p40"}, {"m25p80"}, {"m25p16"}, {"m25p32"},

{"m25p64"}, {"m25p128"},

{"w25x80"}, {"w25x32"}, {"w25q32"}, {"w25q32dw"},

{"w25q80bl"}, {"w25q128"}, {"w25q256"},

/* Flashes that can't be detected using JEDEC */

{"m25p05-nonjedec"}, {"m25p10-nonjedec"}, {"m25p20-nonjedec"},

{"m25p40-nonjedec"}, {"m25p80-nonjedec"}, {"m25p16-nonjedec"},

{"m25p32-nonjedec"}, {"m25p64-nonjedec"}, {"m25p128-nonjedec"},

/* Everspin MRAMs (non-JEDEC) */

{ "mr25h256" }, /* 256 Kib, 40 MHz */

{ "mr25h10" }, /* 1 Mib, 40 MHz */

{ "mr25h40" }, /* 4 Mib, 40 MHz */

{ },

};

退出菜單配置并編譯內(nèi)核和dts?

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j32

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs

首先選擇rootfs文件系統(tǒng),我是用的是群朋提供的最小根文件系統(tǒng) rootfs-brmin.tar.gz,大小只有3M左右,下載地址在

https://pan.baidu.com/share/link?

shareid=1432204556&uk=3658413294#list/path=%2F

Lichee Zero>zero_imager.zip

Flash支持jffs2文件系統(tǒng)格式,所以需要使用此該rootfs制作jffs2文件系統(tǒng)鏡像、

下載jffs2文件系統(tǒng)制作工具

apt-get install mtd-utils

解壓 rootfs-brmin.tar.gz

tar xzvf rootfs-brmin.tar.gz

計算好jffs的大小,可以使用zero_imager里的 make_jffs2.sh 32 生成

總空間是32M-1M-64K-4M=0x1AF0000

mkfs.jffs2 -s 0x100 -e 0x10000 -p 0x1AF0000 -d rootfs/ -o jffs2.img

頁大小0x100 256字節(jié)

塊大小0x10000 64k

jffs2分區(qū)總空間0x1AF0000

jffs2.img是生成的文件系統(tǒng)鏡像。

最后將uboot,dtb,kernel,rootfs打包成一個系統(tǒng)鏡像,命令如下;(即zero_imager里的 make_spiflash.sh 32 dock)

#!/bin/sh

dd if=/dev/zero of=flashimg.bin bs=1M count=$1

dd if=u-boot-sunxi-with-spl-$2.bin of=flashimg.bin bs=1K conv=notrunc

dd if=sun8i-v3s-licheepi-zero-$2.dtb of=flashimg.bin bs=1K seek=1024 conv=notrunc

dd if=zImage of=flashimg.bin bs=1K seek=1088 conv=notrunc

dd if=jffs2.img of=flashimg.bin bs=1K seek=5184 conv=notrunc

第一步: 生成一個空文件,大小是32MB

第二步: 將uboot添加到文件開頭

第三步: 將dtb放到1M偏移處

第四步: 將kernel放到1M+64K偏移處

第五步: 將rootfs放到1M+64K+4M偏移處

偏移大小是seek,單位是KB。

執(zhí)行完畢后生成鏡像文件 flashimg.bin

git clone -b spi-rebase https://github.com/Icenowy/sunxi-tools.git

注解

注意是spi-rebase分支。

進(jìn)入工具目錄執(zhí)行 make && sudo make install

如果出現(xiàn):fel_lib.c:26:20: fatal error: libusb.h: No such file or directory,那需要安裝libusb:

sudo apt-get install libusb-1.0-0-dev

Zero有一個usb下載模式稱為fel模式,進(jìn)入fel模式有下面幾種方式:

TF卡和spi flash 同時沒有可啟動鏡像;也就是說你不插卡,且焊接的是新的或者沒有有效鏡像的spi flash,那就上電自動進(jìn)入fel下載模式

TF卡中有進(jìn)入fel模式的特殊固件 fel-sdboot.sunxi如果你的spiflash已經(jīng)有了啟動鏡像,那么需要在TF卡中燒入一個sunxi提供的 啟動工具

( dd if=fel-sdboot.sunxi of=/dev/mmcblk0 bs=1024 seek=8 ),

那么插入該TF卡啟動會進(jìn)入fel模式;

上電時SPI_MISO拉低到地該引腳為boot引腳,上電時出于低電平即會進(jìn)入fel下載模式。

進(jìn)入fel模式后使用usb數(shù)據(jù)線連接pc和zero,即可進(jìn)行操作。

sudo sunxi-fel version #查看連接的cpu信息

AWUSBFEX soc=00001681(V3s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000

sudo sunxi-fel spiflash-info #顯示flash信息

Manufacturer: Unknown (C2h), model: 20h, size: 33554432 bytes.

執(zhí)行如下命令燒入我們前邊制作好的鏡像文件

sudo sunxi-fel -p spiflash-write 0 flashimg.bin

# -p 顯示進(jìn)度條

# spiflash-info Retrieves basic information

# spiflash-hex[dump] addr length Dumps SPI flash region in hex

# spiflash-read addr length file Write SPI flash contents into file

# spiflash-write addr file Store file contents into SPI flash

SPI flash下載速度約50KB/s,等待5分鐘(16MB)或者10分鐘(32MB),燒寫完成,如果一切順利,重新上電zero那么就會進(jìn)入linux系統(tǒng)了,賬號是root沒有密碼。

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Oct 14 2017 - 16:33:01)

DRAM: 64 MiB

Trying to boot from sunxi SPI

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Oct 14 2017 - 16:33:01 +0000) Allwinner Technology

CPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB

*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)

dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Oct 14 2017 - 16:33:01 +0000) Allwinner Technology

CPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB

*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)

dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

Net: No ethernet found.

starting USB...

No controllers found

Hit any key to stop autoboot: 0

SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB

device 0 offset 0x100000, size 0x10000

SF: 65536 bytes @ 0x100000 Read: OK

device 0 offset 0x110000, size 0x400000

SF: 4194304 bytes @ 0x110000 Read: OK

## Flattened Device Tree blob at 41800000

Booting using the fdt blob at 0x41800000

Loading Device Tree to 42dfa000, end 42dffc48 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Linux version 4.13.0-licheepi-zero+ (root@bf756b445919) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #10 SMP Sat Oct 14 16:59:37 UTC 2017

[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d

[ 0.000000] CPU: div instructions available: patching division code

[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero XFJ

[ 0.000000] Memory policy: Data cache writealloc

[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536

[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883

[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2

[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)

[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

[ 0.000000] Memory: 53576K/64036K available (6144K kernel code, 229K rwdata, 1512K rodata, 1024K init, 265K bss, 10460K 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 : 0xc4000000 - 0xff800000 ( 952 MB)

[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)

[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)

[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)

[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)

[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)

[ 0.000000] .data : 0xc0a00000 - 0xc0a39580 ( 230 kB)

[ 0.000000] .bss : 0xc0a3f65c - 0xc0a81b54 ( 266 kB)

[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[ 0.000000] Hierarchical RCU implementation.

[ 0.000000] RCU event tracing is enabled.

[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.

[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1

[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16

[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).

[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns

[ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns

[ 0.000019] Switching to timer-based delay loop, resolution 41ns

[ 0.000187] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns

[ 0.000420] Console: colour dummy device 80x30

[ 0.000457] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)

[ 0.000475] pid_max: default: 32768 minimum: 301

[ 0.000604] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

[ 0.000619] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

[ 0.001213] CPU: Testing write buffer coherency: ok

[ 0.001589] /cpus/cpu@0 missing clock-frequency property

[ 0.001612] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

[ 0.002074] Setting up static identity map for 0x40100000 - 0x40100060

[ 0.002259] Hierarchical SRCU implementation.

[ 0.002765] smp: Bringing up secondary CPUs ...

[ 0.002781] smp: Brought up 1 node, 1 CPU

[ 0.002790] SMP: Total of 1 processors activated (48.00 BogoMIPS).

[ 0.002797] CPU: All CPU(s) started in SVC mode.

[ 0.003559] devtmpfs: initialized

[ 0.006668] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5

[ 0.006932] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[ 0.006967] futex hash table entries: 256 (order: 2, 16384 bytes)

[ 0.007136] pinctrl core: initialized pinctrl subsystem

[ 0.008026] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0

[ 0.008162] NET: Registered protocol family 16

[ 0.008655] DMA: preallocated 256 KiB pool for atomic coherent allocations

[ 0.009800] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

[ 0.009817] hw-breakpoint: maximum watchpoint size is 8 bytes.

[ 0.023260] SCSI subsystem initialized

[ 0.023562] usbcore: registered new interface driver usbfs

[ 0.023652] usbcore: registered new interface driver hub

[ 0.023747] usbcore: registered new device driver usb

[ 0.023983] Linux video capture interface: v2.00

[ 0.024036] pps_core: LinuxPPS API ver. 1 registered

[ 0.024044] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti

[ 0.024064] PTP clock support registered

[ 0.024282] Advanced Linux Sound Architecture Driver Initialized.

[ 0.024955] Bluetooth: Core ver 2.22

[ 0.025029] NET: Registered protocol family 31

[ 0.025037] Bluetooth: HCI device and connection manager initialized

[ 0.025056] Bluetooth: HCI socket layer initialized

[ 0.025066] Bluetooth: L2CAP socket layer initialized

[ 0.025097] Bluetooth: SCO socket layer initialized

[ 0.026313] clocksource: Switched to clocksource arch_sys_counter

[ 0.037157] NET: Registered protocol family 2

[ 0.037746] TCP established hash table entries: 1024 (order: 0, 4096 bytes)

[ 0.037780] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)

[ 0.037803] TCP: Hash tables configured (established 1024 bind 1024)

[ 0.037937] UDP hash table entries: 256 (order: 1, 8192 bytes)

[ 0.037985] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)

[ 0.038205] NET: Registered protocol family 1

[ 0.038812] RPC: Registered named UNIX socket transport module.

[ 0.038833] RPC: Registered udp transport module.

[ 0.038840] RPC: Registered tcp transport module.

[ 0.038846] RPC: Registered tcp NFSv4.1 backchannel transport module.

[ 0.040940] workingset: timestamp_bits=30 max_order=14 bucket_order=0

[ 0.048568] NFS: Registering the id_resolver key type

[ 0.048618] Key type id_resolver registered

[ 0.048627] Key type id_legacy registered

[ 0.048672] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.

[ 0.050140] random: fast init done

[ 0.053091] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)

[ 0.053111] io scheduler noop registered

[ 0.053118] io scheduler deadline registered

[ 0.053358] io scheduler cfq registered (default)

[ 0.053368] io scheduler mq-deadline registered

[ 0.053376] io scheduler kyber registered

[ 0.057981] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver

[ 0.058417] name=allwinner,sun7i-a20-pwm

[ 0.058432] npwm=2

[ 0.127969] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled

[ 0.131445] console [ttyS0] disabled

[ 0.151721] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A

[ 0.780269] console [ttyS0] enabled

[ 0.805297] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 34, base_baud = 1500000) is a U6_16550A

[ 0.835807] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 35, base_baud = 1500000) is a U6_16550A

[ 0.848508] libphy: Fixed MDIO Bus: probed

[ 0.853001] usbcore: registered new interface driver r8152

[ 0.858614] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[ 0.865135] ehci-platform: EHCI generic platform driver

[ 0.870676] ehci-platform 1c1a000.usb: EHCI Host Controller

[ 0.876350] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1

[ 0.884288] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000

[ 0.916344] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00

[ 0.923490] hub 1-0:1.0: USB hub found

[ 0.927421] hub 1-0:1.0: 1 port detected

[ 0.931878] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

[ 0.938171] ohci-platform: OHCI generic platform driver

[ 0.943713] ohci-platform 1c1a400.usb: Generic Platform OHCI controller

[ 0.950433] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2

[ 0.958360] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400

[ 1.031375] hub 2-0:1.0: USB hub found

[ 1.035198] hub 2-0:1.0: 1 port detected

[ 1.042745] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers

[ 1.052618] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0

[ 1.059513] sun6i-rtc 1c20400.rtc: RTC enabled

[ 1.064048] i2c /dev entries driver

[ 1.069222] usbcore: registered new interface driver uvcvideo

[ 1.074974] USB Video Class driver (1.1.1)

[ 1.079833] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)

[ 1.087825] Bluetooth: HCI UART driver ver 2.3

[ 1.092273] Bluetooth: HCI UART protocol Three-wire (H5) registered

[ 1.156357] sunxi-mmc 1c0f000.mmc: base:0xc407b000 irq:23

[ 1.162805] usbcore: registered new interface driver usbhid

[ 1.168456] usbhid: USB HID core driver

[ 1.174122] NET: Registered protocol family 17

[ 1.178794] Key type dns_resolver registered

[ 1.183228] Registering SWP/SWPB emulation handler

[ 1.193806] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000

[ 1.204454] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200

[ 1.222854] Console: switching to colour frame buffer device 100x30

[ 1.235317] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!

[ 1.243916] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator

[ 1.255346] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver

[ 1.261186] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3

[ 1.270315] hub 3-0:1.0: USB hub found

[ 1.274184] hub 3-0:1.0: 1 port detected

[ 1.279498] using random self ethernet address

[ 1.283985] using random host ethernet address

[ 1.289160] usb0: HOST MAC 8e:ca:5f:61:47:a8

[ 1.293475] usb0: MAC f2:57:f4:ad:74:af

[ 1.297416] using random self ethernet address

[ 1.301858] using random host ethernet address

[ 1.306400] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008

[ 1.313010] g_ether gadget: g_ether ready

[ 1.317402] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:56:52 UTC (3412)

[ 1.325834] vcc3v0: disabling

[ 1.328911] vcc5v0: disabling

[ 1.331879] ALSA device list:

[ 1.334841] No soundcards found.

[ 1.339241] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19

[ 1.346938] Please append a correct "root=" boot option; here are the available partitions:

[ 1.355286] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)

[ 1.363630] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-licheepi-zero+ #10

[ 1.370926] Hardware name: Allwinner sun8i Family

[ 1.375664] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)

[ 1.383408] [] (show_stack) from [] (dump_stack+0x84/0x98)

[ 1.390632] [] (dump_stack) from [] (panic+0xdc/0x248)

[ 1.397507] [] (panic) from [] (mount_block_root+0x188/0x25c)

[ 1.404985] [] (mount_block_root) from [] (mount_root+0x120/0x128)

[ 1.412894] [] (mount_root) from [] (prepare_namespace+0x150/0x194)

[ 1.420891] [] (prepare_namespace) from [] (kernel_init_freeable+0x1bc/0x1cc)

[ 1.429755] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x108)

[ 1.437927] [] (kernel_init) from [] (ret_from_fork+0x14/0x3c)

[ 1.445499] Rebooting in 5 seconds..

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Nov 26 2017 - 15:10:41)

DRAM: 64 MiB

Trying to boot from sunxi SPICPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

SF: Detected w25q128bv with page size 256 Bytes, erase size 64 KiB, total 16 MiB

*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)

dotclock: 27000kHz = 27000kHz: (1 * 3MHz * 54) / 6

beep 0

beep 1

beep 0

beep 1

beep 0

beep 1

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

CPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

SF: Detected w25q128bv with page size 256 Bytes, erase size 64 KiB, total 16 MiB

*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)

dotclock: 27000kHz = 27000kHz: (1 * 3MHz * 54) / 6

beep 0

beep 1

beep 0

beep 1

beep 0

beep 1

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

Net: No ethernet found.

starting USB...

No controllers found

Hit any key to stop autoboot: 0

SF: Detected w25q128bv with page size 256 Bytes, erase size 64 KiB, total 16 MiB

device 0 offset 0x100000, size 0x10000

SF: 65536 bytes @ 0x100000 Read: OK

device 0 offset 0x110000, size 0x400000

SF: 4194304 bytes @ 0x110000 Read: OK

## Flattened Device Tree blob at 41800000

Booting using the fdt blob at 0x41800000

Loading Device Tree to 42dfa000, end 42dffbfa ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Linux version 4.13.0-licheepi-zero+ (root@bf756b445919) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #95 SMP Mon Nov 27 01:20:31 UTC 2017

[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d

[ 0.000000] CPU: div instructions available: patching division code

[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero XFJ

[ 0.000000] Memory policy: Data cache writealloc

[ 0.000000] percpu: Embedded 15 pages/cpu @c3de7000 s32588 r8192 d20660 u61440

[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883

[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2

[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)

[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

[ 0.000000] Memory: 55708K/64036K available (4096K kernel code, 187K rwdata, 1144K rodata, 1024K init, 232K bss, 8328K 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 : 0xc4000000 - 0xff800000 ( 952 MB)

[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)

[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)

[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)

[ 0.000000] .text : 0xc0008000 - 0xc0500000 (5088 kB)

[ 0.000000] .init : 0xc0700000 - 0xc0800000 (1024 kB)

[ 0.000000] .data : 0xc0800000 - 0xc082ee00 ( 188 kB)

[ 0.000000] .bss : 0xc08332d0 - 0xc086d584 ( 233 kB)

[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[ 0.000000] Hierarchical RCU implementation.

[ 0.000000] RCU event tracing is enabled.

[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.

[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1

[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16

[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).

[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns

[ 0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns

[ 0.000024] Switching to timer-based delay loop, resolution 41ns

[ 0.000214] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns

[ 0.000465] Console: colour dummy device 80x30

[ 0.000506] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)

[ 0.000525] pid_max: default: 32768 minimum: 301

[ 0.000672] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

[ 0.000692] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

[ 0.001393] CPU: Testing write buffer coherency: ok

[ 0.001817] /cpus/cpu@0 missing clock-frequency property

[ 0.001842] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

[ 0.002345] Setting up static identity map for 0x40100000 - 0x40100060

[ 0.002541] Hierarchical SRCU implementation.

[ 0.003148] smp: Bringing up secondary CPUs ...

[ 0.003163] smp: Brought up 1 node, 1 CPU

[ 0.003175] SMP: Total of 1 processors activated (48.00 BogoMIPS).

[ 0.003184] CPU: All CPU(s) started in SVC mode.

[ 0.004066] devtmpfs: initialized

[ 0.007259] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5

[ 0.007578] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[ 0.007614] futex hash table entries: 256 (order: 2, 16384 bytes)

[ 0.007813] pinctrl core: initialized pinctrl subsystem

[ 0.008896] DMA: preallocated 256 KiB pool for atomic coherent allocations

[ 0.010158] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

[ 0.010179] hw-breakpoint: maximum watchpoint size is 8 bytes.

[ 0.022957] SCSI subsystem initialized

[ 0.023159] usbcore: registered new interface driver usbfs

[ 0.023235] usbcore: registered new interface driver hub

[ 0.023362] usbcore: registered new device driver usb

[ 0.023474] Linux video capture interface: v2.00

[ 0.023517] pps_core: LinuxPPS API ver. 1 registered

[ 0.023526] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti

[ 0.023695] Advanced Linux Sound Architecture Driver Initialized.

[ 0.024215] clocksource: Switched to clocksource arch_sys_counter

[ 0.039085] workingset: timestamp_bits=30 max_order=14 bucket_order=0

[ 0.046435] squashfs: version 4.0 (2009/01/31) Phillip Lougher

[ 0.046808] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.

[ 0.048756] random: fast init done

[ 0.052407] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)

[ 0.052432] io scheduler noop registered

[ 0.052442] io scheduler deadline registered

[ 0.052669] io scheduler cfq registered (default)

[ 0.052681] io scheduler mq-deadline registered

[ 0.052690] io scheduler kyber registered

[ 0.057653] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver

[ 0.058150] name=allwinner,sun7i-a20-pwm

[ 0.058168] npwm=2

[ 0.139525] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled

[ 0.143224] console [ttyS0] disabled

[ 0.163532] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A

[ 0.676919] console [ttyS0] enabled

[ 0.702093] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 34, base_baud = 1500000) is a U6_16550A

[ 0.732771] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 35, base_baud = 1500000) is a U6_16550A

[ 0.747219] m25p80 spi32766.0: w25q128 (16384 Kbytes)

[ 0.752288] in cmdline partion

[ 0.755486] p4 : size=100000

[ 0.758369] p4 : size=10000

[ 0.761160] p4 : size=400000

[ 0.764037] p4 : size=ffffffff

[ 0.767126] spi32766.0: parser cmdlinepart: 4

[ 0.771481] 4 cmdlinepart partitions found on MTD device spi32766.0

[ 0.777758] Creating 4 MTD partitions on "spi32766.0":

[ 0.782904] 0x000000000000-0x000000100000 : "uboot"

[ 0.789535] 0x000000100000-0x000000110000 : "dtb"

[ 0.795874] 0x000000110000-0x000000510000 : "kernel"

[ 0.802292] 0x000000510000-0x000001000000 : "rootfs"

[ 0.809706] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0

[ 0.816602] sun6i-rtc 1c20400.rtc: RTC enabled

[ 0.821153] i2c /dev entries driver

[ 0.826715] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)

[ 0.835775] usbcore: registered new interface driver usbhid

[ 0.841355] usbhid: USB HID core driver

[ 0.846926] Registering SWP/SWPB emulation handler

[ 0.856875] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000

[ 0.867547] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200

[ 0.885830] Console: switching to colour frame buffer device 100x30

[ 0.900736] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!

[ 0.908121] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 02:33:59 UTC (9239)

[ 0.916575] vcc3v0: disabling

[ 0.919554] vcc3v3: disabling

[ 0.922519] vcc5v0: disabling

[ 0.925539] ALSA device list:

[ 0.928507] No soundcards found.

[ 0.994326] random: crng init done

[ 1.519199] VFS: Mounted root (jffs2 filesystem) on device 31:3.

[ 1.526365] devtmpfs: mounted

[ 1.530825] Freeing unused kernel memory: 1024K

Starting logging: OK

Starting mdev...

modprobe: can't change directory to '/lib/modules': No such file or directory

Initializing random number generator... done.

Starting network: ip: socket: Function not implemented

ip: socket: Function not implemented

FAIL

Welcome to Lichee Pi

Lichee login:

sunxi-fel v1.4.1-87-g78a7566

Usage: sunxi-fel [options] command arguments... [command...]

-h, --help Print this usage summary and exit

-v, --verbose Verbose logging

-p, --progress "write" transfers show a progress bar

-l, --list Enumerate all (USB) FEL devices and exit

-d, --dev bus:devnum Use specific USB bus and device number

--sid SID Select device by SID key (exact match)

spl file Load and execute U-Boot SPL

If file additionally contains a main U-Boot binary

(u-boot-sunxi-with-spl.bin), this command also transfers that

to memory (default address from image), but won't execute it.

uboot file-with-spl like "spl", but actually starts U-Boot

U-Boot execution will take place when the fel utility exits.

This allows combining "uboot" with further "write" commands

(to transfer other files needed for the boot).

hex[dump] address length Dumps memory region in hex

dump address length Binary memory dump

exe[cute] address Call function address

reset64 address RMR request for AArch64 warm boot

memmove dest source size Copy bytes within device memory

readl address Read 32-bit value from device memory

writel address value Write 32-bit value to device memory

read address length file Write memory contents into file

write address file Store file contents into memory

write-with-progress addr file "write" with progress bar

write-with-gauge addr file Output progress for "dialog --gauge"

write-with-xgauge addr file Extended gauge output (updates prompt)

multi[write] # addr file ... "write-with-progress" multiple files,

sharing a common progress status

multi[write]-with-gauge ... like their "write-with-*" counterpart,

multi[write]-with-xgauge ... but following the 'multi' syntax:

addr file [addr file [...]]

echo-gauge "some text" Update prompt/caption for gauge output

ver[sion] Show BROM version

sid Retrieve and output 128-bit SID key

clear address length Clear memory

fill address length value Fill memory

spiflash-info Retrieves basic information

spiflash-hex[dump] addr length Dumps SPI flash region in hex

spiflash-read addr length file Write SPI flash contents into file

spiflash-write addr file Store file contents into SPI flash

總結(jié)

以上是生活随笔為你收集整理的lichee linux nfs,SPI Flash 系统编译的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。