荔枝派Zero 全志V3s,NORFlash xt25f128b的移植
一、简介
官方指导地址:SPI Flash系统编译
大佬指导博客(上)
大佬指导博客(下)
本文基本上都是在上面的资料下指导完成,但是还是踩了一些坑,故总结所有的细节,形成较为详细的步骤,指导萌新一次点亮成功
二、准备工作
硬件准备:
- 焊接好Nor Flash和引脚线
- 接上串口Debug线,多留一根用于进入fel模式
- 接上UART线,注意是T接R,R接T
软件准备:
- u-boot源码Gitee仓库:分支v3s-spi-experimental
- linux源码Gitee仓库:zero-4.10.y分支
- rootfs-brmin压缩包和交叉编译工具Gitee仓库
- 烧写工具Gitee仓库
工具准备:
推荐一个Windows下的串口工具:mobaxterm
三、制作u-boot
1.修改uboot源码
下载uboot源码:
git clone -b v3s-spi-experimental https://gitee.com/cats_eat_big_fish/u-boot.git
在文件 include/configs/sun8i.h 中添加默认bootcmd和bootargs的环境变量设置,注意添加的位置在“ #include <configs/sunxi-common.h> ”的前边。
源码:vim include/configs/sun8i.h
/*
* (C) Copyright 2014 Chen-Yu Tsai <wens@csie.org>
*
* Configuration settings for the Allwinner A23 (sun8i) CPU
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __CONFIG_H
#define __CONFIG_H
/*
* A23 specific configuration
*/
#ifdef CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_SUNXI
#endif
#ifdef CONFIG_MACH_SUN8I_H3
#define CONFIG_SUNXI_USB_PHYS 4
#elif defined CONFIG_MACH_SUN8I_A83T
#define CONFIG_SUNXI_USB_PHYS 3
#elif defined CONFIG_MACH_SUN8I_V3S
#define CONFIG_SUNXI_USB_PHYS 1
#else
#define CONFIG_SUNXI_USB_PHYS 2
#endif
/*
* Include common sunxi configuration where most the settings are
*/
#include <configs/sunxi-common.h>
#endif /* __CONFIG_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"
结果图
为了适配XT25F128B的Nor Flash,还需要修改文件:drivers/mtd/spi/spi_flash_ids.c
const struct spi_flash_info spi_flash_ids[] = {
...
{"w25q128fw", INFO(0xef6018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
{"xt25f128b", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
...
};
修改后的CONFIG_SPI_FLASH_WINBOND有一下这些
#ifdef CONFIG_SPI_FLASH_WINBOND /* WINBOND */
{"w25p80", INFO(0xef2014, 0x0, 64 * 1024, 16, 0) },
{"w25p16", INFO(0xef2015, 0x0, 64 * 1024, 32, 0) },
{"w25p32", INFO(0xef2016, 0x0, 64 * 1024, 64, 0) },
{"w25x40", INFO(0xef3013, 0x0, 64 * 1024, 8, SECT_4K) },
{"w25x16", INFO(0xef3015, 0x0, 64 * 1024, 32, SECT_4K) },
{"w25x32", INFO(0xef3016, 0x0, 64 * 1024, 64, SECT_4K) },
{"w25x64", INFO(0xef3017, 0x0, 64 * 1024, 128, SECT_4K) },
{"w25q80bl", INFO(0xef4014, 0x0, 64 * 1024, 16, RD_FULL | WR_QPP | SECT_4K) },
{"w25q16cl", INFO(0xef4015, 0x0, 64 * 1024, 32, RD_FULL | WR_QPP | SECT_4K) },
{"w25q32bv", INFO(0xef4016, 0x0, 64 * 1024, 64, RD_FULL | WR_QPP | SECT_4K) },
{"w25q64cv", INFO(0xef4017, 0x0, 64 * 1024, 128, RD_FULL | WR_QPP | SECT_4K) },
{"w25q128bv", INFO(0xef4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
{"w25q256", INFO(0xef4019, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) },
{"w25q80bw", INFO(0xef5014, 0x0, 64 * 1024, 16, RD_FULL | WR_QPP | SECT_4K) },
{"w25q16dw", INFO(0xef6015, 0x0, 64 * 1024, 32, RD_FULL | WR_QPP | SECT_4K) },
{"w25q32dw", INFO(0xef6016, 0x0, 64 * 1024, 64, RD_FULL | WR_QPP | SECT_4K) },
{"w25q64dw", INFO(0xef6017, 0x0, 64 * 1024, 128, RD_FULL | WR_QPP | SECT_4K) },
{"w25q128fw", INFO(0xef6018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
{"xt25f128b", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
#endif
还需要添加设备树中关于Flash的声明,添加新增加的Flash型号,修改文件:arch/arm/dts/sun8i-v3s-licheepi-zero.dts
【注意】compatible中需要添加**“winbond, xt25f128b”**这一项
// 新添加的关于FLash的声明
&spi0 {
status = "okay";
xt25f128b:xt25f128b@0 {
compatible = "winbond, xt25f128b", "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
到此为止,uboot的源码修改就完成了
2.修改配置项
这边推荐就采用系统默认的配置项:
LicheePi_Zero_800x480LCD_defconfig
LicheePi_Zero480x272LCD_defconfig
LicheePi_Zero_defconfig
可以根据你的硬件需求选择,我这边是输入:
make ARCH=arm LicheePi_Zero_800x480LCD_defconfig
然后再确认下配置项是否有问题,输入:
make ARCH=arm menuconfig
确保以下几项配置与图片一致,如果不对就修改
1.Architecture select :ARM architecture
2.Device Drivers > SPI Support
3.Device Drivers > SPI Flash Support
3.安装编译环境
按简介中的地址,下载交叉编译器:gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf 下载链接
git clone https://gitee.com/cats_eat_big_fish/rootfs-brmin.git
安装交叉编译器
wget https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
tar xvf gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
mv gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf /opt/
vim /etc/bash.bashrc
# add: PATH="$PATH:/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin"
source /etc/bash.bashrc
arm-linux-gnueabihf-gcc -v
安装dtc编译器
liefyuan@ubuntu:~/allwinner/v3s/u-boot$ sudo apt-get install device-tree-compiler
[sudo] liefyuan 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
linux-headers-4.15.0-112 linux-headers-4.15.0-112-generic linux-headers-4.15.0-118 linux-headers-4.15.0-118-generic
linux-headers-4.15.0-120 linux-headers-4.15.0-120-generic linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic
linux-image-4.15.0-112-generic linux-image-4.15.0-118-generic linux-image-4.15.0-120-generic linux-image-4.15.0-45-generic
linux-modules-4.15.0-112-generic linux-modules-4.15.0-118-generic linux-modules-4.15.0-120-generic linux-modules-4.15.0-45-generic
linux-modules-extra-4.15.0-112-generic linux-modules-extra-4.15.0-118-generic linux-modules-extra-4.15.0-120-generic
linux-modules-extra-4.15.0-45-generic
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
device-tree-compiler
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 134 个软件包未被升级。
需要下载 356 kB 的归档。
解压缩后会消耗 522 kB 的额外空间。
获取:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 device-tree-compiler amd64 1.4.0+dfsg-2 [356 kB]
已下载 356 kB,耗时 2秒 (127 kB/s)
正在选中未选择的软件包 device-tree-compiler。
(正在读取数据库 ... 系统当前共安装有 364901 个文件和目录。)
正准备解包 .../device-tree-compiler_1.4.0+dfsg-2_amd64.deb ...
正在解包 device-tree-compiler (1.4.0+dfsg-2) ...
正在处理用于 doc-base (0.10.7) 的触发器 ...
Processing 2 added doc-base files...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在设置 device-tree-compiler (1.4.0+dfsg-2) ...
4.编译uboot
编译指令:
time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log
如果没有设置交叉便器的环境变量,也可以直接传交叉编译器的绝对路径:
time make ARCH=arm CROSS_COMPILE={YourCrossToolPath}/arm-linux-gnueabihf- 2>&1 | tee build.log
编译成功后会在目录下生成文件:
u-boot-sunxi-with-spl.bin
四、制作内核
1.修改linux源码
下载linux内核源码,由于分支众多,下载全部仓库非常的大,推荐只下载目标分支:
git clone -b zero-4.10.y https://gitee.com/cats_eat_big_fish/linux.git
修改dts配置添加SPI Flash节点,和uboot类似操作
文件路径:arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
// 新添加的SPI Flash设备节点描述
&spi0 {
status ="okay";
xt25f128b:xt25f128b@0 {
compatible = "winbond, xt25f128b", "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
添加对XT25F128B的设备支持
修改文件:drivers/mtd/spi-nor/spi-nor.c中的spi_nor_ids
{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
2.修改配置项
在linux的根目录底下运行默认配置选项设置
make ARCH=arm licheepi_zero_defconfig
然后再进行菜单选项设置
make ARCH=arm menuconfig
保证一下几项配置和图中一致,如果不是则修改为一致
1.Device Drivers ‣ Memory Technology Device (MTD) support ‣ Command line partition table parsing
2.File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
到此就完成了内核的修改和配置了
3.编译内核文件及设备树文件
编译内核文件:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
编译设备树文件
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
编译成功会显示
SHIPPED arch/arm/boot/compressed/fdt_ro.c
SHIPPED arch/arm/boot/compressed/fdt_wip.c
SHIPPED arch/arm/boot/compressed/fdt.c
CC arch/arm/boot/compressed/atags_to_fdt.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
LD [M] drivers/video/backlight/lcd.ko
SHIPPED arch/arm/boot/compressed/ashldi3.S
LD [M] crypto/echainiv.ko
SHIPPED arch/arm/boot/compressed/bswapsdi2.S
AS arch/arm/boot/compressed/hyp-stub.o
CC arch/arm/boot/compressed/fdt_rw.o
CC arch/arm/boot/compressed/fdt_ro.o
CC arch/arm/boot/compressed/fdt_wip.o
CC arch/arm/boot/compressed/fdt.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
AS arch/arm/boot/compressed/bswapsdi2.o
AS arch/arm/boot/compressed/piggy.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
DTC arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb
DTC arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dtb
生成的目标文件分别是:
arch/arm/boot/zImage
arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb
五、制作文件系统镜像
我们还需要文件系统,找到之前连同编译工具一起git下来的文件系统压缩包
rootfs-brmin.tar.gz
将它解压,得到rootfs-brmin文件夹
tar xzvf rootfs-brmin.tar.gz
安装jfft2文件系统制作工具
sudo apt-get install mtd-utils
使用命令生成文件系统镜像
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs-brmin/ -o jffs2.img
具体为什么这么写可以参考简介中的链接,这里不做过多解释
【注意】前面一定要加fakeroot,否则会造成文件系统启动无权限的异常
然后我们就得到了一个jffs2.img的文件
-rw-r--r-- 1 xjc xjc 3080192 Mar 8 18:36 jffs2.img
六、打包刷写
1.打包
到此步骤为止,我们一共获得了以下几个文件:
- uboot文件:u-boot/u-boot-sunxi-with-spl.bin
- linux内核文件:linux/arch/arm/boot/zImage
- dts设备文件:linux/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb
- 文件系统镜像文件:jffs2.img
这时候我们需要将所有文件打包成烧录文件
这里我直接提供一个烧录脚本
dd if=/dev/zero of=./out/flashimg.bin bs=1M count=16
dd if=./u-boot/u-boot-sunxi-with-spl.bin of=./out/flashimg.bin bs=1K conv=notrunc
dd if=./linux/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb of=./out/flashimg.bin bs=1K seek=1024 conv=notrunc
dd if=./linux/arch/arm/boot/zImage of=./out/flashimg.bin bs=1K seek=1088 conv=notrunc
dd if=jffs2.img of=./out/flashimg.bin bs=1K seek=5184 conv=notrunc
执行完过后就会在out里面生成我们的目标文件:flashimg.bin
其中showInfo.sh的脚本内容是查看硬件信息的:
sudo sunxi-fel version
sudo sunxi-fel spiflash-info
其中write.sh的脚本内容是刷写的:
sudo sunxi-fel -p spiflash-write 0 flashimg.bin
以上两个脚本都需要安装sunxi-fel工具
下载sunxi-fel工具
git clone -b spi-rebase https://gitee.com/cats_eat_big_fish/sunxi-tools.git
进入工具目录执行 make && sudo make install
xjc@ubuntu:~/sunxi-tools$ make && sudo make install
cc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ `pkg-config --cflags libusb-1.0` -o sunxi-fel fel.c progress.c soc_info.c fel_lib.c fel-spiflash.c `pkg-config --libs libusb-1.0`
cc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-main.o nand-part-main.c
cc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-a10.o nand-part.c -D A10
cc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-a20.o nand-part.c -D A20
cc -o sunxi-nand-part nand-part-main.o nand-part-a10.o nand-part-a20.o
cc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -o sunxi-pio pio.c
ln -nsf sunxi-fexc bin2fex
ln -nsf sunxi-fexc fex2bin
install -d /usr/local/bin
+ install -m0755 sunxi-fexc /usr/local/bin/sunxi-fexc
+ install -m0755 sunxi-bootinfo /usr/local/bin/sunxi-bootinfo
+ install -m0755 sunxi-fel /usr/local/bin/sunxi-fel
+ install -m0755 sunxi-nand-part /usr/local/bin/sunxi-nand-part
+ install -m0755 sunxi-pio /usr/local/bin/sunxi-pio
+ ln -nfs sunxi-fexc /usr/local/bin/bin2fex
+ ln -nfs sunxi-fexc /usr/local/bin/fex2bin
如果出现:fel_lib.c:26:20: fatal error: libusb.h: No such file or directory,那需要安装libusb:
sudo apt-get install libusb-1.0-0-dev
2.刷写
进入USB下载模式:fel模式
上电时候将SPI_MISO拉低到地,运行showInfo.sh脚本
xjc@ubuntu:~/lichee/out$ ./showInfo.sh
[sudo] password for xjc:
AWUSBFEX soc=00001681(V3s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
No SPI flash detected.
断开SPI_MISO的接地
xjc@ubuntu:~/lichee/out$ ./showInfo.sh
AWUSBFEX soc=00001681(V3s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
Manufacturer: Unknown (0Bh), model: 40h, size: 16777216 bytes.
这里是因为已经刷成功过了,所以能识别,空的可能不是这个样子
这时候可以执行write.sh
等待刷写完就好了,接上调试接口,重新上电,从调试接口就可以指导是否成功了,全部按上面步骤做且硬件一致的话,应该会成功;如果未成功,找找其他的大佬的文章排查问题吧!
下面放出成功结果:
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Mar 08 2022 - 17:23:03)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Mar 08 2022 - 17:23:03 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 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 (Mar 08 2022 - 17:23:03 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 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 xt25f128b with page size 256 Bytes, erase size 4 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 42dff21a ... OK
Starting kernel ...
▒[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.10.15-licheepi-zero+ (xjc@ubuntu) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #19 SMP Tue Mar 8 17:28:54 CST 2022
[ 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
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 14 pages/cpu @c3dea000 s24716 r8192 d24436 u57344
[ 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: 53644K/64036K available (6144K kernel code, 199K rwdata, 1412K rodata, 1024K init, 262K bss, 10392K 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 - 0xc0a31f00 ( 200 kB)
[ 0.000000] .bss : 0xc0a33000 - 0xc0a7484c ( 263 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] arm_arch_timer: Architected 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.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000140] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000349] Console: colour dummy device 80x30
[ 0.000385] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000400] pid_max: default: 32768 minimum: 301
[ 0.000536] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000548] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001254] CPU: Testing write buffer coherency: ok
[ 0.001670] /cpus/cpu@0 missing clock-frequency property
[ 0.001696] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002054] Setting up static identity map for 0x40100000 - 0x40100058
[ 0.002794] smp: Bringing up secondary CPUs ...
[ 0.002811] smp: Brought up 1 node, 1 CPU
[ 0.002820] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002827] CPU: All CPU(s) started in SVC mode.
[ 0.003610] devtmpfs: initialized
[ 0.006445] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006743] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006770] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006929] pinctrl core: initialized pinctrl subsystem
[ 0.007950] NET: Registered protocol family 16
[ 0.008439] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009649] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009666] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.021115] SCSI subsystem initialized
[ 0.021384] usbcore: registered new interface driver usbfs
[ 0.021446] usbcore: registered new interface driver hub
[ 0.021541] usbcore: registered new device driver usb
[ 0.021781] pps_core: LinuxPPS API ver. 1 registered
[ 0.021790] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.021813] PTP clock support registered
[ 0.022019] Advanced Linux Sound Architecture Driver Initialized.
[ 0.023842] clocksource: Switched to clocksource arch_sys_counter
[ 0.024686] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4080000
[ 0.024705] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 0.031553] Console: switching to colour frame buffer device 100x30
[ 0.037710] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 0.047652] NET: Registered protocol family 2
[ 0.048271] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.048304] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.048327] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.048420] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.048467] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.048673] NET: Registered protocol family 1
[ 0.049306] RPC: Registered named UNIX socket transport module.
[ 0.049327] RPC: Registered udp transport module.
[ 0.049333] RPC: Registered tcp transport module.
[ 0.049339] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.051566] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.060597] NFS: Registering the id_resolver key type
[ 0.060651] Key type id_resolver registered
[ 0.060658] Key type id_legacy registered
[ 0.060706] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.065400] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.065423] io scheduler noop registered
[ 0.065430] io scheduler deadline registered
[ 0.065642] io scheduler cfq registered (default)
[ 0.069740] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.137803] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.140974] console [ttyS0] disabled
[ 0.161263] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 31, base_baud = 1500000) is a U6_16550A
[ 0.758441] console [ttyS0] enabled
[ 0.762612] [drm] Initialized
[ 0.768572] m25p80 spi32766.0: xt25f128b (16384 Kbytes)
[ 0.773927] 4 cmdlinepart partitions found on MTD device spi32766.0
[ 0.780186] Creating 4 MTD partitions on "spi32766.0":
[ 0.785354] 0x000000000000-0x000000100000 : "uboot"
[ 0.790868] 0x000000100000-0x000000110000 : "dtb"
[ 0.796072] 0x000000110000-0x000000510000 : "kernel"
[ 0.801450] 0x000000510000-0x000001000000 : "rootfs"
[ 0.807288] libphy: Fixed MDIO Bus: probed
[ 0.811631] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.818242] ehci-platform: EHCI generic platform driver
[ 0.823561] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.829788] ohci-platform: OHCI generic platform driver
[ 0.835517] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.845204] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.851997] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.856621] i2c /dev entries driver
[ 0.861430] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[ 0.871124] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.933881] sunxi-mmc 1c0f000.mmc: base:0xc406b000 irq:23
[ 0.940262] usbcore: registered new interface driver usbhid
[ 0.945924] usbhid: USB HID core driver
[ 0.951426] NET: Registered protocol family 17
[ 0.956145] Key type dns_resolver registered
[ 0.960567] Registering SWP/SWPB emulation handler
[ 0.971744] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.979720] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 0.985572] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 0.996828] hub 1-0:1.0: USB hub found
[ 1.000705] hub 1-0:1.0: 1 port detected
[ 1.005504] using random self ethernet address
[ 1.010000] using random host ethernet address
[ 1.015559] usb0: HOST MAC 3e:07:ee:50:41:aa
[ 1.019884] usb0: MAC f2:cb:5e:70:73:a9
[ 1.023761] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.031342] g_cdc gadget: g_cdc ready
[ 1.035364] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:29 UTC (29)
[ 1.043611] vcc3v0: disabling
[ 1.046658] vcc5v0: disabling
[ 1.049626] ALSA device list:
[ 1.052589] No soundcards found.
[ 1.058128] random: fast init done
[ 1.100514] random: crng init done
[ 3.371662] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 3.378685] devtmpfs: mounted
[ 3.382961] Freeing unused kernel memory: 1024K
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
[ 7.512478] ------------[ cut here ]------------
[ 7.517206] WARNING: CPU: 0 PID: 87 at drivers/mtd/spi-nor/spi-nor.c:1183 spi_nor_write+0x138/0x1b4
[ 7.526282] Writing at offset 200 into a NOR page. Writing partial pages may decrease reliability and increase wear of NOR flash.
[ 7.526287] Modules linked in:
[ 7.540994] CPU: 0 PID: 87 Comm: touch Not tainted 4.10.15-licheepi-zero+ #19
[ 7.548116] Hardware name: Allwinner sun8i Family
[ 7.552847] [<c010e2fc>] (unwind_backtrace) from [<c010b098>] (show_stack+0x10/0x14)
[ 7.560590] [<c010b098>] (show_stack) from [<c03465c4>] (dump_stack+0x84/0x98)
[ 7.567812] [<c03465c4>] (dump_stack) from [<c011b634>] (__warn+0xe8/0x100)
[ 7.574770] [<c011b634>] (__warn) from [<c011b684>] (warn_slowpath_fmt+0x38/0x48)
[ 7.582249] [<c011b684>] (warn_slowpath_fmt) from [<c0452fbc>] (spi_nor_write+0x138/0x1b4)
[ 7.590508] [<c0452fbc>] (spi_nor_write) from [<c044b454>] (mtd_writev+0xa4/0xec)
[ 7.597989] [<c044b454>] (mtd_writev) from [<c02fbec8>] (jffs2_flash_writev+0x414/0x4b0)
[ 7.606076] [<c02fbec8>] (jffs2_flash_writev) from [<c02f4d48>] (jffs2_write_dnode+0xd4/0x328)
[ 7.614680] [<c02f4d48>] (jffs2_write_dnode) from [<c02f9458>] (jffs2_do_setattr+0x280/0x558)
[ 7.623197] [<c02f9458>] (jffs2_do_setattr) from [<c02f9754>] (jffs2_setattr+0x24/0x48)
[ 7.631196] [<c02f9754>] (jffs2_setattr) from [<c020d990>] (notify_change+0x1c4/0x3d0)
[ 7.639109] [<c020d990>] (notify_change) from [<c021e65c>] (utimes_common+0xa8/0x170)
[ 7.646931] [<c021e65c>] (utimes_common) from [<c021e7d4>] (do_utimes+0xb0/0x144)
[ 7.654406] [<c021e7d4>] (do_utimes) from [<c021ea10>] (SyS_futimesat+0xd0/0xfc)
[ 7.661796] [<c021ea10>] (SyS_futimesat) from [<c0107580>] (ret_fast_syscall+0x0/0x3c)
[ 7.669780] ---[ end trace 7493689eb1c4df13 ]---
Initializing random number generator... done.
Starting network: OK
Welcome to Lichee Pi
Lichee login: