前言
之前参考Licheepi_Nano官方的SDK做出了可以从Nor-Flash启动并进入系统的镜像,然而Nor-Flash的容量一般不会做的很大(市面上以1~16MB为主),且更大容量的Nor-Flash往往意味着更贵的成本。因此,使用Nand-Flash来代替Nor-Flash,不仅可以提高系统的存储容量,还能有效节约成本。关于Nor-Flash与Nand-Flash的具体参数对比可以参考以下链接:nor Flash和nand Flash的区别 - 博客园 (cnblogs.com)
要制作适用F1C200S的Nand-Flash镜像,需要分为以下几步,这也是本篇文章的目录:
- 明确F1c200s的启动流程,即芯片上电从BROM引导至SPL的流程
- 制作支持从spi-nand-flash启动的uboot-sunxi-with-spl镜像
- 制作支持从spi-nand-flash读文件系统的linux-kernel镜像
- 制作适用于该spi-nand-flash的根文件系统镜像
- 制作最终的系统镜像并烧录到spi-nand-flash
一、SUNXI-BROM引导NAND的原理
参考V3s手册可知
故F1C200s在启动后,默认会先执行片内BROM中的内容,该部分程序段在初始化完片内的部分外设后会去检查BSP引脚的状态是否为0,如果为0,则直接进入FEL模式。否则,则会按照以下优先级去依次启动SPL:
BROM -> MMC0 -> SPI_NOR -> SPI_NAND -> FEL。
因此,只要设法在Nand-Flash中写入SPL,那么BROM就可以通过Nand-Flash找到SPL,并将其加载如SRAM中,进而引导f1c200s载入U-boot主体执行bootloader。那么BROM会以什么样的形式去读取Nand中的数据?详细可以参考以下这段话:
Some SoCs can also boot from SPI NAND flash. Here the BROM tries to read a valid first stage bootloader starting from page number 0, 32, 64, 96, 128, 160, 192 and 224. It only reads the first 1024 bytes from every page. Since it simply sends the standard SPI NAND flash commands, it is a good idea to use a flash with ECC turned on by default and is performed by the flash itself, since errors cannot otherwise be corrected.
出自:linux-sunxi.org/Bootable_SP…
从中可以知道,BROM从spi-nand中读取程序段时,代码存放的起始位置必须是页号0, 32, 64, 96, 128, 160, 192,224。且每次读取1k字节。因此只把整个bootloader直接烧入Nand-Flash的话BROM是不会去引导的,我们依然要对uboot-sunxi-with-spl.bin进行重新制作,制作脚本可以参考gen_sunxi_spinand_onlyboot_img.sh,或者也可以用笔者自己写的脚本如下:
import sys
import struct
def read_u32_le(b, off):
return struct.unpack_from("<I", b, off)[0]
def read_u32_be(b, off):
return struct.unpack_from(">I", b, off)[0]
def main(argv):
#入参检查
if len(argv) != 5:
print("SYNTAX: {} <outputfile> <u-boot-with-sunxi-spl image> <nand page size in B> <uboot-offset in KB>".format(argv[0]))
print("Given:", " ".join(argv[1:]))
return 1
#参数定义
OUTPUT = argv[1] #输出路径
UBOOT_PATH = argv[2] #输入u-boot路径
PAGESIZE = int(argv[3], 0) #nand页大小(e.g. 1024, 2048, 4096)
UBOOT_OFFSET = int(argv[4], 0) #读取uboot偏移
#自动管理文件声明周期
with open(UBOOT_PATH, "rb") as fp:
uboot_bin = fp.read()
#uboot长度合法校验
if len(uboot_bin) < 20:
print("u-boot file too small")
return 1
# SPLSIZE: uint32 at spl base offset 16, little-endian (mimic od -t u4 default used earlier)
SPLSIZE = read_u32_le(uboot_bin, 16)
# UBOOTSIZE: located at uboot base offset + 16, read as big-endian (mimic od --endian=big in original)
uboot_offset = UBOOT_OFFSET * 1024
#检查页大小是否符合1k对齐
if PAGESIZE % 1024 != 0:
print("Page-size is not 1k alignable and thus not supported by EGON")
return 1
SPLBLOCKS = (SPLSIZE + 1023) // 1024 #容纳spl所需要的1KiB块数量
print(f"spl size:{SPLSIZE}")
print(f"spl blocks:{SPLBLOCKS}")
# 生成输出文件(填充 0xff,保证对齐)
final_size = len(uboot_bin)
#初始化输出文件
with open(OUTPUT, "wb") as fp:
fp.write(b"\xff" * final_size)
#写入SPL
with open(OUTPUT, "r+b") as f:
# 按照1k写入
for i in range(0, SPLBLOCKS):
f.seek(PAGESIZE * i)
f.write(uboot_bin[i*1024:(i+1)*1024])
# 写入 Proper
f.seek(uboot_offset)
f.write(uboot_bin[uboot_offset:])
print(f"Generated single SPL+Proper image: {OUTPUT}")
if __name__ == "__main__":
main(sys.argv)
用法:
python3 nand-spilit-spl.py u-boot-sunxi-with-spilit-spl.bin u-boot-sunxi-with-spl.bin 2048 64
二、制作支持从spi-nand-flash启动的uboot镜像
由于Spieed所提供SDK的uboot没有支持从spi-nand启动的驱动程序,因此需要一个可以从spi-nand引导SPL,以及带有spi-nand驱动的uboot。
用到的u-boot作者仓库:hcly/f1c100s: f1c100s source code (github.com)
进入uboot顶层目录后,执行以下命令:
./build.sh
即可得到已经重新划分好支持spi-nand启动格式的uboot-with-spl-spinand.bin
关于SPL是如何从BROM得到启动设备相关信息的,以及如何向SPL添加Image Loader可以查看该篇文章,分析得很清楚: F1C100s支持从Nand启动了,顺便说下如何向 U-Boot SPL 添加一个Image Loader - IotaHydrae - 博客园 (cnblogs.com)
三、制作支持从spi-nand-flash读文件系统的linux-kernel镜像
解决uboot问题后,配置内核就没什么大碍了,可以下载lichee pi官方提供的linux-nano-5.2.0,我们还需在此基础上为该内核配置nand-flash驱动和手动添加设备树节点。
spi-nand设备树节点如下:
&spi0 {
status ="okay";
spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
partition@0 {
label = "uboot";
reg = <0x0 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x20000>;
read-only;
};
partition@120000 {
label = "kernel";
reg = <0x120000 0x500000>;
read-only;
};
partition@620000 {
label = "rootfs";
reg = <0x620000 0x7800000>;
};
};
};
找不到spi0节点的话请修改suniv-f1c100s.dtsi文件。
注:如果uboot没能在运行过程中向dtb添加memory节点,会导致启动失败。
要注意的是,rootfs分区的开头和结尾需要和nand-flash的块大小对齐,否则在启动时内核会有如下警告
接下来配置内核,在顶层执行
make licheepi_nano_defconfig && make ARCH=arm menuconfig
Device Drivers > Memory Technology Device (MTD) support 目录下,勾选SPI NAND device Support ---- 以及 Enable UBI - Unsorted block images --->
快捷键:
SPI NAND device Support:按下'/',输入'spi_nand',按‘1’。
ENABLE UBI:按下'/',输入'ubi',按'5'。
进入File systems > Miscellaneous filesystems目录,选中UBIFS file system support
快捷键:
UBIFS file system support:按下'/',输入'ubifs',按'2'
均配置完后,在顶层使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12来编译内核,完成后将arch/arm/boot/dts/下的.dtb与arch/arm/boot/zImage拷贝到Image文件夹,以便稍后制作镜像。
四、制作适用于该spi-nand-flash的根文件系统镜像
UBI-rootfs制作
此处以官方提供的buildroot为例,故不需要什么改动,直接编译,然后将output/images目录下的文件镜像拷贝至Images文件夹。重点是制作UBI格式的文件系统,UBIFS的概念以及相关指令用法在可以查看该文:UBI文件系统和制作命令使用mkfs、ubinize-CSDN博客
此次需使用mkfs.ubifs工具与ubinize。
使用以下命来创建ubi
sudo mkfs.ubifs -x lzo -F -m 2048 -e 126976 -c 732 -o rootfs_ubifs.img -r rootfs
sudo ubinize -o ubi.img -m 2048 -p 131072 -O 2048 -s 2048 ./ubinize.cfg -v
mkfs.ubifs --help
mkfs.ubifs -r rootfs -m 0x800 -e 129024 -c 511 -x zlib -o rootfs.imgbak
Examples:
Build file system from directory /opt/img, writting the result in the ubifs.img file
mkfs.ubifs -m 512 -e 128KiB -c 100 -r /opt/img ubifs.img
The same, but writting directly to an UBI volume
mkfs.ubifs -r /opt/img /dev/ubi0_0
Creating an empty UBIFS filesystem on an UBI volume
mkfs.ubifs /dev/ubi0_0
Options:
-r, -d, --root=DIR build file system from directory DIR
-m, --min-io-size=SIZE minimum I/O unit size //Nand Flash的最小读写单元,一般为page size
-e, --leb-size=SIZE logical erase block size //逻辑块擦除大小,即物理块大小-2页大小
-c, --max-leb-cnt=COUNT maximum logical erase block count
最大逻辑块数量。以分区物理块数量起始,比如128MB的mtd分区,物理块数
量是128MiB/2048/64 = 1024个,减去2个坏块保留块,减去1个wear-leveling
块,还要减去1个eba的块,等等,比如最终的值是1022,注意,如果物理上
这个分区有坏块的话,kernel会扫描到的,这时候,我们计算的这个值就要
减去坏块数了,否则会有逻辑块大于物理块数的内核问题mount失败,确切知
道坏块数是比较困难的,一般做法是做一个坏块容忍数,比如20个,这样我们
再减去20个坏块,不要担心这个会浪费空间,ubinize的autoresize选项就是
解决这个问题的。具体的这个值需要计算。
-o, --output=FILE output to FILE
-j, --jrn-size=SIZE journal size
-R, --reserved=SIZE how much space should be reserved for the super-user
-x, --compr=TYPE compression type - "lzo", "favor_lzo", "zlib" or
"none" (default: "lzo") //zlib压缩率高些,但是lzo压缩解压速度快
-X, --favor-percent may only be used with favor LZO compression and defines
how many percent better zlib should compress to make
mkfs.ubifs use zlib instead of LZO (default 20%)
-f, --fanout=NUM fanout NUM (default: 8)
-F, --space-fixup file-system free space has to be fixed up on first mount
(requires kernel version 3.0 or greater)
-k, --keyhash=TYPE key hash type - "r5" or "test" (default: "r5")
-p, --orph-lebs=COUNT count of erase blocks for orphans (default: 1)
-D, --devtable=FILE use device table FILE
-U, --squash-uids squash owners making all files owned by root
-l, --log-lebs=COUNT count of erase blocks for the log (used only for
debugging)
-v, --verbose verbose operation
-V, --version display version information
-g, --debug=LEVEL display debug information (0 - none, 1 - statistics,
2 - files, 3 - more details)
-h, --help display this help text
ubinize --help
Usage: ubinize [-o filename] [-p <bytes>] [-m <bytes>] [-s <bytes>] [-O <num>] [-e
<num>][-x <num>] [-Q <num>] [-v] [-h] [-V] [--output=<filename>]
[--peb-size=<bytes>] [--min-io-size=<bytes>] [--sub-page-size=<bytes>]
[--vid-hdr-offset=<num>] [--erase-counter=<num>] [--ubi-ver=<num>]
[--image-seq=<num>] [--verbose] [--help] [--version] ini-file
Example: ubinize -o ubi.img -p 16KiB -m 512 -s 256 cfg.ini - create UBI image
'ubi.img' as described by configuration file 'cfg.ini'
-o, --output=<file name> output file name
-p, --peb-size=<bytes> size of the physical eraseblock of the flash
this UBI image is created for in bytes,
kilobytes (KiB), or megabytes (MiB)
(mandatory parameter)物理可擦除块大小
-m, --min-io-size=<bytes> minimum input/output unit size of the flash
in bytes
-s, --sub-page-size=<bytes> minimum input/output unit used for UBI
headers, e.g. sub-page size in case of NAND
flash (equivalent to the minimum input/output
unit size by default)子页大小
-O, --vid-hdr-offset=<num> offset if the VID header from start of the
physical eraseblock (default is the next
minimum I/O unit or sub-page after the EC
header)VID头部偏移量,默认是512
-e, --erase-counter=<num> the erase counter value to put to EC headers (default is 0)
-x, --ubi-ver=<num> UBI version number to put to EC headers (default is 1)
-Q, --image-seq=<num> 32-bit UBI image sequence number to use
(by default a random number is picked)
-v, --verbose be verbose
-h, --help print help message
-V, --version print program version
例:
ubinize –o ubi.img -m 2KiB -p 128KiB -s 2048 $system_cfg_file –v
-m最小输入输出大小为2KiB(2048bytes),一般为页大小
-p物理可擦出块大小为128KiB=每块的页数*页大小=64*2KiB=128KiB
-s用于UBI头部信息的最小输入输出单元,一般与最小输入输出单元(-m参数)大小一样。
此命令生成的ubi.img可直接使用NAND FLASH的烧写命令烧写到FLASH上(带有UBI文件系统镜像卷标)。
其中涉及到的ubinize.cfg如下:
[rootfs-volume]
mode=ubi
image=rootfs_ubifs.img 生成的源镜像
vol_id=0 卷序号
vol_size=92946432 卷大小
vol_type=dynamic 动态卷
vol_name=rootfs 卷名
vol_flags=autoresize mtd分区充足时自动调整大小
vol_alignment=1
以上我们便可以得到ubi.img,即要烧入rootfs分区的ubi镜像。
Nand镜像制作
可以使用以下两种方式制作镜像:
1.使用dd命令制作镜像
可以使用以下建议脚本来制作最终镜像。
#!/bin/sh
dd if=/dev/zero of=suniv-f1c200s.img bs=1M count=16
dd if=uboot-with-spl-spinand.bin of=suniv-f1c200s.img
dd if=suniv-f1c200s-pzk.dtb of=suniv-f1c200s.img bs=1M seek=1
dd if=zImage of=suniv-f1c200s.img bs=128K seek=9
sudo mkfs.ubifs -F -m 2048 -x lzo -r rootfs -o rootfs_ubifs.img -c 732 -e 126976
sudo ubinize -m 2048 -o ubi.img -p 131072 -O 2048 -s 2048 ./ubinize.cfg -v
dd if=ubi.img of=suniv-f1c200s.img bs=128K seek=49
hexdump -C suniv-f1c200s.img > suniv-f1c200s.img.log
2.使用genimage制作镜像
genimage传送门:pengutronix/genimage: tool to generate multiple filesystem and flash images from a tree
sudo apt-get install libconfuse-dev
git clone https://github.com/pengutronix/genimage.git
cd genimage
./autogen.sh
./configure
make
sudo make install
安装完成后即可使用genimage命令来生成管理镜像分区
编写genimage配置文件mk_sunxi_nand_image.config
include("flash-types.config")
image f1c200s_pzk_nandflash.bin { //最终拼接得到完整镜像名称
flash {} //声明存储介质为flash
flashtype = "nand-128M-2k-ubifs" //flash类型
partition u-boot { //分区0,uboot
image = "u-boot-sunxi-with-spilit-spl.bin" //依赖u-boot-sunxi-with-spilit-spl.bin
size = 1M //分区大小1M
}
partition dtb { //分区1,dtb
image = "suniv-f1c200s-jiadi-spinand.dtb" //依赖文件
size = 1M //分区大小1M
}
partition linux-kernel { //分区2,linux kernel
image = "zImage" //依赖u-boot-sunxi-with-spilit-spl.bin
size = 5M //分区大小5M
}
partition rootfs { //分区3,rootfs
image = "rootfs.ubi" //分区里存放的文件,依赖rootfs.ubi
size = 120M //分区大小120M
}
}
image rootfs.ubifs { //rootfs.ubifs制作规则
flashtype = "nand-128M-2k-ubifs" //使用到的flash参数
size = 100M //分区大小100M,需要预留一定空间用于UBI的坏块恢复,不能直接占用整个mtd大小
ubifs {
space-fixup = true //第一次启动时整理空闲块,必须加上
}
mountpoint = "/"
}
image rootfs.ubi { //rootfs.ubi制作规则
flashtype = "nand-128M-2k-ubifs" //使用到的flash参数
ubi{ } //制作ubi镜像
partition rootfs {
image = "rootfs.ubifs" //依赖rootfs.ubifs
autoresize = true //ubi镜像大小自动扩展至mtd分区大小
}
}
另外贴上flash-types.config内容:
flash nand-64M-512 {
pebsize = 16384
lebsize = 15360
numpebs = 4096
minimum-io-unit-size = 512
vid-header-offset = 512
sub-page-size = 512
}
flash nor-64M-128k {
pebsize = 131072
lebsize = 130944
numpebs = 256
minimum-io-unit-size = 1
vid-header-offset = 64
sub-page-size = 1
}
flash nor-16M-64k-jffs2 {
pebsize = 65536
lebsize = 65536
numpebs = 256
minimum-io-unit-size = 1
vid-header-offset = 64
sub-page-size = 1
}
flash nand-128M-2k-ubifs {
pebsize = 131072 //PEB = page_size * page_counts
lebsize = 126976 //LEB = PEB - ECC(1 page) - VID(1 page)
numpebs = 1024 //block counts
minimum-io-unit-size = 2048 //page size
vid-header-offset = 2048 //vid offset = page size
sub-page-size = 2048 //no sub page
}
最后执行命令
python3 nand-spilit-spl.py u-boot-sunxi-with-spilit-spl.bin u-boot-sunxi-with-spl.bin 2048 64
genimage --config mk_sunxi_nand_image.config --rootpath rootfs/ --inputpath ./
即可
Linux下Nand-Flash镜像烧录
安装Xfel工具:github.com/xboot/xfel
下载完后直接执行make命令,之后当前目录下会出现xfel工具,下面直接使用即可。
sudo ../xfel-master/xfel spinand erase 0 0x8000000
sudo ../xfel-master/xfel spinand write 0 suniv-f1c200s.img
此处全片擦除,是因为重复烧录UBIFS时如果原有块序列号没有随当前的UBIFS更新而更新,则会出现以下错误,必须要全片擦除后再写入,不要踩坑。
Windows下Nand-Flash镜像烧录
在win环境下安装sunxi-fel工具,详情安装过程可以看之前的博客。这次要在上一次的基础上继续安装驱动。
1.打开Zadig工具
选择Device -> Create New Device
2.输入USB ID,再安装
安装成功提示
3.插入要烧录设备,进入FEL模式 设备进入FEL模式时系统设备管理器中应该会有显示,如图:
4.打开sunxi-fel,烧录u-boot-with-sunxi-spl
./sunxi-fel.exe -p uboot ./u-boot-sunxi-with-spl.bin
此时设备管理器会变成如图:
5.使用刷机工具:dfu-util烧录nand镜像
将suniv-f1c200s.img 放入dfu-util.exe 同一目录下:
./dfu-util.exe -R -a all -D ./suniv-f1c200s.img
烧录完后即可运行程序。
五、运行日志:
U-Boot SPL 2018.01 (Aug 30 2023 - 23:17:42)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2018.01 (Aug 30 2023 - 23:17:42 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: PZK Nand Test
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SPI-NAND: MX35LF1GE4AB is found size: 128MB.
*** 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: 0
SPI-NAND: MX35LF1GE4AB is found size: 128MB.
SPI-NAND: 5242880 bytes @ 0x120000 Read: OK
SPI-NAND: 65536 bytes @ 0x100000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816ffe95 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0-licheepi-nano (ender@Ubuntu18) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #8 Tue Aug 29 23:12:27 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: PZK_Test
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi0.0:1M(uboot)ro,128k(dtb)ro,5M(kernel)ro,-(rootfs) ubi.mtd=3 root=ubi0:rootfs rw rootfstype=ubifs
[ 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: 56240K/65536K available (5120K kernel code, 214K rwdata, 1332K rodata, 1024K init, 223K bss, 9296K reserved, 0K cma-reserved, 0K highmem)
[ 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/0x42c with crng_init=0
[ 0.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000125] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000652] Console: colour dummy device 80x30
[ 0.000742] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070244] pid_max: default: 32768 minimum: 301
[ 0.070664] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070705] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.072283] CPU: Testing write buffer coherency: ok
[ 0.074228] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076449] devtmpfs: initialized
[ 0.082667] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.082722] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.083010] pinctrl core: initialized pinctrl subsystem
[ 0.085859] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.087842] cpuidle: using governor menu
[ 0.144321] SCSI subsystem initialized
[ 0.144660] usbcore: registered new interface driver usbfs
[ 0.144808] usbcore: registered new interface driver hub
[ 0.144986] usbcore: registered new device driver usb
[ 0.145448] pps_core: LinuxPPS API ver. 1 registered
[ 0.145474] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.145967] Advanced Linux Sound Architecture Driver Initialized.
[ 0.146480] clocksource: Switched to clocksource timer
[ 0.175548] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.177707] Initialise system trusted keyrings
[ 0.178257] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.202017] Key type asymmetric registered
[ 0.202057] Asymmetric key parser 'x509' registered
[ 0.202219] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.202248] io scheduler mq-deadline registered
[ 0.202265] io scheduler kyber registered
[ 0.214216] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.392615] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.398290] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.400022] printk: console [ttyS0] disabled
[ 0.420278] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.746867] printk: console [ttyS0] enabled
[ 0.754782] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 0.772791] SCSI Media Changer driver v0.25
[ 0.780555] spi-nand spi0.0: Macronix SPI NAND was found.
[ 0.785979] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[ 0.795425] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.801897] Creating 4 MTD partitions on "spi0.0":
[ 0.806794] 0x000000000000-0x000000100000 : "uboot"
[ 0.816794] 0x000000100000-0x000000120000 : "dtb"
[ 0.823518] 0x000000120000-0x000000620000 : "kernel"
[ 0.830252] random: fast init done
[ 0.850600] 0x000000620000-0x000007e20000 : "rootfs"
[ 1.262275] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.268930] ehci-platform: EHCI generic platform driver
[ 1.274434] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.280740] ohci-platform: OHCI generic platform driver
[ 1.286386] usbcore: registered new interface driver usb-storage
[ 1.293133] udc-core: couldn't find an available UDC - added [zero] to list of pending drivers
[ 1.302109] i2c /dev entries driver
[ 1.307431] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.345304] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.354527] usbcore: registered new interface driver usbhid
[ 1.360221] usbhid: USB HID core driver
[ 1.381618] Loading compiled-in X.509 certificates
[ 1.398023] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.409415] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[ 1.420309] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0637c14)
[ 1.429382] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc063686c)
[ 1.437164] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.443768] [drm] No driver support for vblank timestamp query.
[ 1.451071] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.706770] Console: switching to colour frame buffer device 100x30
[ 1.746386] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[ 1.754831] ubi0: attaching mtd3
[ 1.760241] random: crng init done
[ 3.368256] ubi0: scanning is finished
[ 3.398753] ubi0: attached mtd3 (name "rootfs", size 120 MiB)
[ 3.404580] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 3.411563] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 3.418396] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 3.425378] ubi0: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
[ 3.431423] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 3.438691] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 796571091
[ 3.447749] ubi0: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 20
[ 3.457521] ALSA device list:
[ 3.460509] #0: Loopback 1
[ 3.464145] ubi0: background thread "ubi_bgt0d" started, PID 86
[ 3.473771] UBIFS (ubi0:0): Mounting in unauthenticated mode
[ 3.483850] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 87
[ 3.591472] UBIFS (ubi0:0): recovery needed
[ 3.854868] UBIFS (ubi0:0): recovery completed
[ 3.859731] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 3.867234] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 3.877236] UBIFS (ubi0:0): FS size: 91549696 bytes (87 MiB, 721 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[ 3.887714] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[ 3.893552] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 48D593DA-55F8-4C1F-B6D9-8415F5D12632, small LPT model
[ 3.911250] VFS: Mounted root (ubifs filesystem) on device 0:13.
[ 3.922084] devtmpfs: mounted
[ 3.932535] Freeing unused kernel memory: 1024K
[ 3.937420] Run /sbin/init as init process
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: OK
Starting network: ip: socket: Function not implemented
ip: socket: Function not implemented
FAIL
Welcome to PZK's test kernel
PZK login: