页次: 1
编译uboot,执行cat build.sh,输出
if [ $1 == "nand" ]
then
echo "#define DOPI_SPI_NAND ">include/configs/dopi.h
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- hi3516ev200_config
echo "DOPI_SPI_NAND=y">>./.config
make ARCH=arm CROSS_COMPILE=arm-himix100-linux-
cp reg_info.bin .reg
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- u-boot-z.bin
echo " build spi nand flash version"
else
echo "build spi nor flash version"
echo "#define DOPI_SPI_NOR ">include/configs/dopi.h
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- hi3516ev200_config
make ARCH=arm CROSS_COMPILE=arm-himix100-linux-
cp reg_info.bin .reg
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- u-boot-z.bin
fi
dopi板载是Nand Flash,所以需要输入参数 Nand,执行的也就是在include/configs/dopi.h中写入宏定义,以及./.config中加个配置。
这里可以修改下,既然板载默认是Nand,可以不输入参数,默认选nand。
if [ $1 == "nor" ]
then
echo "#define DOPI_SPI_NOR ">include/configs/dopi.h
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- hi3516ev200_config
make ARCH=arm CROSS_COMPILE=arm-himix100-linux-
cp reg_info.bin .reg
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- u-boot-z.bin
echo " build spi nor flash version"
else
echo "build spi nand flash version"
echo "#define DOPI_SPI_NADN ">include/configs/dopi.h
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- hi3516ev200_config
echo "DOPI_SPI_NAND=y">>./.config
make ARCH=arm CROSS_COMPILE=arm-himix100-linux-
cp reg_info.bin .reg
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- u-boot-z.bin
fi
编译内核,查看cat build.sh,输出
cp arch/arm/configs/hi3516ev200_full_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- uImage
copy了一个配置文件过来,然后编译。
也可以自己做一个配置,输入 make menuconfig
HOSTCC scripts/kconfig/mconf.o
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: 没有那个文件或目录
compilation terminated.
scripts/Makefile.host:124: recipe for target 'scripts/kconfig/mconf.o' failed
make[2]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:546: recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
Makefile:525: recipe for target '__build_one_by_one' failed
make: *** [__build_one_by_one] Error 2
执行
sudo apt-get install libncurses5-dev
安装完成后,再次执行,make menuconfig,可以去配置内核了
拿到板子,一直没顾上测试,把编译好的uboot、kernel、rootfs下载,结果运行不起来,先记录下
烧写log
Current Serial port selection: COM8
####################################################### ---- 10%
##################################################### ---- 20%
##################################################### ---- 30%
##################################################### ---- 40%
##################################################### ---- 50%
##################################################### ---- 60%
##################################################### ---- 70%
##################################################### ---- 80%
##################################################### ---- 90%
################################################### ---- 100%
Boot download completed!
start download process.
Boot started successfully!
Send command: getinfo version
version: U-Boot 2016.11-dirty
[EOT](OK)
Send command: getinfo bootmode
nand
[EOT](OK)
Send command: getinfo nand
Block:128KB Chip:128MB*1 Page:2KB OOB:64B ECC:4bit/512
ID:0xEF 0xAA 0x21
Name:"W25N01GV"
[EOT](OK)
Send command: nand erase 0x0 0x80000
NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x0 -- 25% complete.
Erasing at 0x20000 -- 50% complete.
Erasing at 0x40000 -- 75% complete.
Erasing at 0x60000 -- 100% complete.
OK
[EOT](OK)
Send command: nand write 0x41000000 0x0 0x40000
NAND write: device 0 offset 0x0, size 0x40000
pure data length is 262144, len_incl_bad is 262144
262144 bytes written: OK
[EOT](OK)
Send command: mw.b 0x41000000 0xFF 0x3a0000
[EOT](OK)
Send command: Downloading File : uImage
[Download File by usb]
file = Z:\ubuntu\uImage
address = 0x41000000
fileLength = 3699928 B
#
done
Send command: nand erase 0x80000 0x500000
NAND erase: device 0 offset 0x80000, size 0x500000
Erasing at 0x80000 -- 2% complete.
Erasing at 0xa0000 -- 5% complete.
Erasing at 0xc0000 -- 7% complete.
Erasing at 0xe0000 -- 10% complete.[EOT](OK)
Send command: nand write 0x41000000 0x80000 0x3a0000
NAND write: device 0 offset 0x80000, size 0x3a0000
pure data length is 3801088, len_incl_bad is 3801088
3801088 bytes written: OK
[EOT](OK)
Partition kernel burnt successfully!
Send command: getinfo nand
Block:128KB Chip:128MB*1 Page:2KB OOB:64B ECC:4bit/512
ID:0xEF 0xAA 0x21
Name:"W25N01GV"
[EOT](OK)
Send command: mw.b 0x41000000 0xFF 0x20d2400
[EOT](OK)
Send command: Downloading File : yaffs2-root-v2.12.img
[Download File by usb]
file = Z:\ubuntu\yaffs2-root-v2.12.img
address = 0x41000000
fileLength = 34415616 B
#########
done
Send command: nand erase 0x580000 0x3200000
NAND erase: device 0 offset 0x580000, size 0x3200000
Erasing at 0x580000 -- 0% complete.
Erasing at 0x5e0000 -- 1% complete.
Erasing at 0x660000 -- 2% complete.
Erasing at 0x6e0000 -- 3% complete.[EOT](OK)
Send command: nand write.yaffs 0x41000000 0x580000 0x20d2400
NAND write: device 0 offset 0x580000, size 0x20d2400
!!! yaffs2 filesystem image ecctype(28bits/1K) is NOT consistent with hardware ecctype(8bit).
Please remake yaffs2 filesystem image, make sure your yaffs2 filesystem image pagesize and ecctype is consistent with hardware config.
[EOT](OK)
Partition rootfs burnt successfully!
Send command: reset
reset success!
Partition burnt completed!
USB channels were closed successfully.
启动log
System startup
Uncompress Ok!
U-Boot 2016.11-dirty (Jun 25 2020 - 11:40:18 +0800)hi3516ev200
Relocation Offset is: 03734000
Relocating to 43f34000, new gd at 43e93ef0, sp at 43e93ed0
SPI Nor: Boot Media isn't SPI Nor
NAND: SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21 Name:"W25N01GV"
Block:128KB Page:2KB OOB:64B ECC:4bit/512
Chipsize:128 MiB
MMC:
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0
Warning: eth0 (eth0) using random MAC address - 7a:fc:90:53:6a:41
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x80000, size 0x500000
5242880 bytes read: OK
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-4.9.37
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3699864 Bytes = 3.5 MiB
Load Address: 40008000
Entry Point: 40008000
Loading Kernel Image ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 4.9.37 (sdong@sdong-Parallels-Virtual-Platform) (gcc version 6.3.0
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Hisilicon HI3516EV200 DEMO Board
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 10160
Kernel command line: mem=40M console=tty0 console=ttyAMA0,115200 root=/dev/mtdb)
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 33012K/40960K available (5475K kernel code, 190K rwdata, 1332K rodata, )
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc3000000 - 0xff800000 ( 968 MB)
lowmem : 0xc0000000 - 0xc2800000 ( 40 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0560f48 (5476 kB)
.init : 0xc06b0000 - 0xc06dc000 ( 176 kB)
.data : 0xc06dc000 - 0xc070bae0 ( 191 kB)
.bss : 0xc070d000 - 0xc074e6a8 ( 262 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:16 16
Gic dist init...
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, s
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
Switching to timer-based delay loop, resolution 20ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6s
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x40008200 - 0x40008258
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191s
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 2
console [ttyAMA0] enabled
SCSI subsystem initialized
ssp-pl022 12071000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 12071000.spi: mapped registers from 0x12071000 to c306b000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
clocksource: Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=14 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pl061_gpio 120b0000.gpio_chip: PL061 GPIO chip @0x120b0000 registered
pl061_gpio 120b1000.gpio_chip: PL061 GPIO chip @0x120b1000 registered
pl061_gpio 120b2000.gpio_chip: PL061 GPIO chip @0x120b2000 registered
pl061_gpio 120b4000.gpio_chip: PL061 GPIO chip @0x120b4000 registered
pl061_gpio 120b5000.gpio_chip: PL061 GPIO chip @0x120b5000 registered
pl061_gpio 120b6000.gpio_chip: PL061 GPIO chip @0x120b6000 registered
pl061_gpio 120b7000.gpio_chip: PL061 GPIO chip @0x120b7000 registered
pl061_gpio 120b8000.gpio_chip: PL061 GPIO chip @0x120b8000 registered
brd: module loaded
loop: module loaded
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: unrecognized Manufacturer ID
hisi-sfc hisi_spi_nor.0: spi nor register fail!
hisi-sfc: probe of hisi_spi_nor.0 failed with error -2
SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21
nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
nand: Winbond W25N01GV
nand: 128MiB, SLC, page size: 2048
Nand(Auto): OOB:64B
ECC:4bit/512 nand: ECC provided by Flash Memory Controller
3 cmdlinepart partitions found on MTD device hinand
Creating 3 MTD partitions on "hinand":
0x000000000000-0x000000080000 : "boot"
0x000000080000-0x000000580000 : "kernel"
0x000000580000-0x000008000000 : "rootfs"
FEPHY:addr=1, la_am=0xb, ldo_am=0x4, r_tuning=0x1d
libphy: hisi_femac_mii_bus: probed
libphy: Fixed MDIO Bus: probed
Generic PHY 10041100.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_ad)
phy_id=0x20669903, phy_mode=mii
hisi-femac 10040000.ethernet: using random MAC address 96:3a:64:f7:65:fe
dwc3 10030000.hidwc3: Configuration mismatch. dr_mode forced to gadget
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
hibvt_rtc 120e0000.rtc: rtc core: registered 120e0000.rtc as rtc0
hibvt_rtc 120e0000.rtc: RTC driver for hibvt enabled
i2c /dev entries driver
hibvt-i2c 12060000.i2c: hibvt-i2c0@100000hz registered
hibvt-i2c 12061000.i2c: hibvt-i2c1@100000hz registered
hibvt-i2c 12062000.i2c: hibvt-i2c2@100000hz registered
uvcvideo: Unable to create debugfs directory
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy e
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy e
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
hibvt_rtc 120e0000.rtc: setting system clock to 1970-01-01 00:00:04 UTC (4)
uart-pl011 12040000.uart: no DMA platform data
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: error mounting -2
Freeing unused kernel memory: 176K (c06b0000 - c06dc000)
This architecture does not have kernel memory protection.
Kernel panic - not syncing: No working init found. Try passing init= option to.
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.37 #1
Hardware name: Generic DT based system
Backtrace:
[<c0012870>] (dump_backtrace) from [<c0012b2c>] (show_stack+0x18/0x1c)
r7:00000000 r6:00000000 r5:00000000 r4:c070d2e8
[<c0012b14>] (show_stack) from [<c024f10c>] (dump_stack+0x24/0x28)
[<c024f0e8>] (dump_stack) from [<c00736a0>] (panic+0xd0/0x238)
[<c00735d4>] (panic) from [<c055c61c>] (__irq_alloc_descs+0x0/0x22c)
r3:00000000 r2:0000097e r1:c27eea00 r0:c0619208
r7:00000000
[<c055c520>] (kernel_init) from [<c000f7e8>] (ret_from_fork+0x14/0x2c)
r5:c055c520 r4:00000000
---[ end Kernel panic - not syncing: No working init found. Try passing init= .
环境及编译流程:http://www.dopi.vip/tutorial/markdown/
环境:虚拟机64位ubuntu16.04lts
安装软件包:
sudo apt-get update && sudo apt-get install -y bzip2 build-essential libc6-dev-i386 ia32-libs lib32z1-dev libncurses5 libncurses5-dev u-boot-tools vim squashfs-tools gettext git zip subversion bc
这里提示两个问题:
1:
E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
解决:
sudo rm /var/lib/dpkg/lock
2:
没有可用的软件包 ia32-libs,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
然而下列软件包会取代它:
lib32ncurses5 lib32z1
E: 软件包 ia32-libs 没有可安装候选
解决:
sudo apt-get install lib32z1 lib32ncurses5
同时安装(没测试是否必须):
sudo apt-get install lib32stdc++6
安装工具链:
tar zxvf arm-himix100-linux.tgz
cd arm-himix100-linux
sudo ./arm-himix100-linux.install
完成后由提示:
export path /opt/hisi-linux/x86-arm/arm-himix100-linux/bin
需要使能环境变量:
source /etc/profile
然后可以arm-himix100-linux-gcc -v查看版本信息
分别clone uboot、内核和文件系统,按照说明编译
在编译内核时报错:
"mkimage" command not found - U-Boot images will not be built
arch/arm/boot/Makefile:87: recipe for target 'arch/arm/boot/uImage' failed
make[1]: *** [arch/arm/boot/uImage] Error 1
arch/arm/Makefile:334: recipe for target 'uImage' failed
make: *** [uImage] Error 2
需要安装工具:
sudo apt-get install u-boot-tools
再次编译完成
cheng880126 说:触屏调起来了么???o(* ̄︶ ̄*)o
https://whycan.cn/t_1008.html#p4839
支持 4.3寸 480x272 液晶屏了.
只是屏幕显示还有点点问题。
晕哥,请问gt911搞定了吗?效果如何?
重新编译文件系统,可以启动,但文件系统还是有问题,输出
U-Boot SPL 2018.01-05679-g013ca45-dirty (Feb 02 2019 - 14:23:59)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01-05679-g013ca45-dirty (Feb 02 2019 - 14:23:59 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** 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: 2 ... 1 ... 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816fff3e ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (sdong@shangdong) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #10 Sat Feb 2 12:36:58 CST 2019
[ 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: 8128
[ 0.000000] Kernel command line: cconsole=ttyS0,115200 panic=5 rootwait root=31:03 rw rootfstype=jffs2
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 22696K/32768K available (6144K kernel code, 217K rwdata, 1328K rodata, 1024K init, 244K bss, 10072K 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 : 0xc2800000 - 0xff800000 ( 976 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc2000000 ( 32 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) ( 218 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.000043] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000106] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000631] Console: colour dummy device 80x30
[ 0.001537] console [tty0] enabled
[ 0.001630] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070278] pid_max: default: 32768 minimum: 301
[ 0.070622] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070712] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.072170] CPU: Testing write buffer coherency: ok
[ 0.073843] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076422] devtmpfs: initialized
[ 0.082803] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.082972] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.083271] pinctrl core: initialized pinctrl subsystem
[ 0.085292] NET: Registered protocol family 16
[ 0.086681] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.088515] cpuidle: using governor menu
[ 0.110992] SCSI subsystem initialized
[ 0.111327] pps_core: LinuxPPS API ver. 1 registered
[ 0.111406] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.111551] PTP clock support registered
[ 0.112082] Advanced Linux Sound Architecture Driver Initialized.
[ 0.113603] clocksource: Switched to clocksource timer
[ 0.140069] NET: Registered protocol family 2
[ 0.141559] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.141718] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.141807] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.142120] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.142229] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.142754] NET: Registered protocol family 1
[ 0.144136] RPC: Registered named UNIX socket transport module.
[ 0.144248] RPC: Registered udp transport module.
[ 0.144300] RPC: Registered tcp transport module.
[ 0.144345] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.146072] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.147889] Initialise system trusted keyrings
[ 0.148522] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.165676] NFS: Registering the id_resolver key type
[ 0.165863] Key type id_resolver registered
[ 0.165924] Key type id_legacy registered
[ 0.166072] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.180510] Key type asymmetric registered
[ 0.180623] Asymmetric key parser 'x509' registered
[ 0.180860] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.180954] io scheduler noop registered
[ 0.181001] io scheduler deadline registered
[ 0.181789] io scheduler cfq registered (default)
[ 0.181885] io scheduler mq-deadline registered
[ 0.181938] io scheduler kyber registered
[ 0.191585] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.361721] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.388707] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.840181] console [ttyS0] enabled
[ 0.850567] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.860063] SCSI Media Changer driver v0.25
[ 0.867876] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.872726] 4 ofpart partitions found on MTD device spi0.0
[ 0.878367] Creating 4 MTD partitions on "spi0.0":
[ 0.883226] 0x000000000000-0x000000100000 : "u-boot"
[ 0.889497] 0x000000100000-0x000000110000 : "dtb"
[ 0.895443] 0x000000110000-0x000000510000 : "kernel"
[ 0.901494] 0x000000510000-0x000001000000 : "rootfs"
[ 0.908308] i2c /dev entries driver
[ 0.973724] sunxi-mmc 1c0f000.mmc: base:0x6abb823b irq:19
[ 0.998635] NET: Registered protocol family 17
[ 1.003400] Key type dns_resolver registered
[ 1.009953] Loading compiled-in X.509 certificates
[ 1.023344] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07391b8)
[ 1.032352] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073849c)
[ 1.040236] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.046965] [drm] No driver support for vblank timestamp query.
[ 1.101005] Console: switching to colour frame buffer device 60x34
[ 1.124711] sun4i-drm display-engine: fb0: frame buffer device
[ 1.132180] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.152421] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.182006] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.200941] vcc3v3: disabling
[ 1.209984] ALSA device list:
[ 1.218965] #0: Loopback 1
[ 1.228614] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.249048] cfg80211: failed to load regulatory.db
[ 1.357471] random: crng init done
[ 1.670755] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 1.690629] devtmpfs: mounted
[ 1.704437] Freeing unused kernel memory: 1024K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
# ls
.[1;34mbin.[0m .[1;34mlib.[0m .[1;34mmedia.[0m .[1;34mproc.[0m .[1;34msbin.[0m .[1;34musr.[0m
.[1;34mdev.[0m .[1;36mlib32.[0m .[1;34mmnt.[0m .[1;34mroot.[0m .[1;34msys.[0m .[1;34mvar.[0m
.[1;34metc.[0m .[1;36mlinuxrc.[0m .[1;34mopt.[0m .[1;34mrun.[0m .[1;34mtmp.[0m
#
# cd b
# cd bin/.[J
#
# ls
.[1;36mash.[0m .[1;36mdumpkmap.[0m .[1;36mlinux64.[0m .[1;36mnice.[0m .[1;36msh.[0m
.[1;32mbusybox.[0m .[1;36mecho.[0m .[1;36mln.[0m .[1;36mpidof.[0m .[1;36msleep.[0m
.[1;36mcat.[0m .[1;36megrep.[0m .[1;36mlogin.[0m .[1;36mping.[0m .[1;36mstty.[0m
.[1;36mchattr.[0m .[1;36mfalse.[0m .[1;36mls.[0m .[1;36mpipe_progress.[0m .[1;36msu.[0m
.[1;36mchgrp.[0m .[1;36mfdflush.[0m .[1;36mlsattr.[0m .[1;36mprintenv.[0m .[1;36msync.[0m
.[1;36mchmod.[0m .[1;36mfgrep.[0m .[1;36mmkdir.[0m .[1;36mps.[0m .[1;36mtar.[0m
.[1;36mchown.[0m .[1;36mgetopt.[0m .[1;36mmknod.[0m .[1;36mpwd.[0m .[1;36mtouch.[0m
.[1;36mcp.[0m .[1;36mgrep.[0m .[1;36mmktemp.[0m .[1;36mrm.[0m .[1;36mtrue.[0m
.[1;36mcpio.[0m .[1;36mgunzip.[0m .[1;36mmore.[0m .[1;36mrmdir.
@没事逛荡
bootargs改成这样:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
或这样:
console=ttyS0,115200 panic=5 rootwait root=31:03 rw rootfstype=jffs2
这个可以到rootfs了
console=ttyS0,115200 panic=5 rootwait root=31:03 rw rootfstype=jffs2
当又是
Welcome to Buildroot
buildroot login:
要重新配置编译个文件系统。。。搞完再来请教,谢谢!
没事逛荡 说:山无棱 说:这就有点尴尬了, 肯定不是 rootfs 问题, rootfs 会提示运行 /init /linuxrc 失败之类的信息
不大懂,刚才以为是文件系统问题...我再找找内核问题,谢谢~
感觉你这个bootargs有点问题:
Waiting for root device /dev/mtdblock31:03
要不你把 整个 log 用 code 标签包起来传上, 我看下。
U-Boot SPL 2018.01-05679-g013ca45-dirty (Feb 02 2019 - 11:08:54)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01-05679-g013ca45-dirty (Feb 02 2019 - 11:08:54 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** 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: 2 ... 1 ... 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816fff3e ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (sdong@shangdong) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #10 Sat Feb 2 12:36:58 CST 2019
[ 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: 8128
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock31:03 rw rootfstype=jffs2
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 22696K/32768K available (6144K kernel code, 217K rwdata, 1328K rodata, 1024K init, 244K bss, 10072K 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 : 0xc2800000 - 0xff800000 ( 976 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc2000000 ( 32 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) ( 218 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.000044] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000108] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000630] Console: colour dummy device 80x30
[ 0.000717] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070226] pid_max: default: 32768 minimum: 301
[ 0.070522] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070561] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.071964] CPU: Testing write buffer coherency: ok
[ 0.073572] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076062] devtmpfs: initialized
[ 0.082376] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.082443] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.082690] pinctrl core: initialized pinctrl subsystem
[ 0.084658] NET: Registered protocol family 16
[ 0.085965] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.087715] cpuidle: using governor menu
[ 0.110036] SCSI subsystem initialized
[ 0.110414] pps_core: LinuxPPS API ver. 1 registered
[ 0.110443] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.110522] PTP clock support registered
[ 0.111005] Advanced Linux Sound Architecture Driver Initialized.
[ 0.112459] clocksource: Switched to clocksource timer
[ 0.138871] NET: Registered protocol family 2
[ 0.140283] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.140359] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.140409] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.140680] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.140734] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.141196] NET: Registered protocol family 1
[ 0.142358] RPC: Registered named UNIX socket transport module.
[ 0.142398] RPC: Registered udp transport module.
[ 0.142415] RPC: Registered tcp transport module.
[ 0.142552] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.144249] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.145985] Initialise system trusted keyrings
[ 0.146543] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.163570] NFS: Registering the id_resolver key type
[ 0.163676] Key type id_resolver registered
[ 0.163696] Key type id_legacy registered
[ 0.163804] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.178158] Key type asymmetric registered
[ 0.178199] Asymmetric key parser 'x509' registered
[ 0.178394] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.178425] io scheduler noop registered
[ 0.178444] io scheduler deadline registered
[ 0.179191] io scheduler cfq registered (default)
[ 0.179223] io scheduler mq-deadline registered
[ 0.179241] io scheduler kyber registered
[ 0.188811] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.358774] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.365485] console [ttyS0] disabled
[ 0.385733] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.838352] console [ttyS0] enabled
[ 0.848707] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.858092] SCSI Media Changer driver v0.25
[ 0.865823] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.870602] 4 ofpart partitions found on MTD device spi0.0
[ 0.876190] Creating 4 MTD partitions on "spi0.0":
[ 0.881005] 0x000000000000-0x000000100000 : "u-boot"
[ 0.887212] 0x000000100000-0x000000110000 : "dtb"
[ 0.893067] 0x000000110000-0x000000510000 : "kernel"
[ 0.899033] 0x000000510000-0x000001000000 : "rootfs"
[ 0.905760] i2c /dev entries driver
[ 0.972579] sunxi-mmc 1c0f000.mmc: base:0x6abb823b irq:19
[ 0.997376] NET: Registered protocol family 17
[ 1.002068] Key type dns_resolver registered
[ 1.008548] Loading compiled-in X.509 certificates
[ 1.021825] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07391b8)
[ 1.030729] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073849c)
[ 1.038518] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.045184] [drm] No driver support for vblank timestamp query.
[ 1.099246] Console: switching to colour frame buffer device 60x34
[ 1.122563] sun4i-drm display-engine: fb0: frame buffer device
[ 1.129756] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.138287] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.155843] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.162713] vcc3v3: disabling
[ 1.165700] ALSA device list:
[ 1.168667] #0: Loopback 1
[ 1.172429] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.181191] cfg80211: failed to load regulatory.db
[ 1.186543] Waiting for root device /dev/mtdblock31:03...
[ 194.796052] random: crng init done
这个是log,大神帮忙看下,感谢感谢~
没事逛荡 说:山无棱 说:这几处都已经修改了,还是不行。。。
请问发到这里来看,是linux内核问题,还是rootfs问题?这就有点尴尬了, 肯定不是 rootfs 问题, rootfs 会提示运行 /init /linuxrc 失败之类的信息
不大懂,刚才以为是文件系统问题...我再找找内核问题,谢谢~
这几处都已经修改了,还是不行。。。
请问发到这里来看,是linux内核问题,还是rootfs问题?
按照教程编译,系统没能起来。。。
最终到:
[ 0.876230] Creating 4 MTD partitions on "spi0.0":
[ 0.881040] 0x000000000000-0x000000100000 : "u-boot"
[ 0.887252] 0x000000100000-0x000000110000 : "dtb"
[ 0.893118] 0x000000110000-0x000000510000 : "kernel"
[ 0.899099] 0x000000510000-0x000001000000 : "rootfs"
[ 0.905824] i2c /dev entries driver
[ 0.972547] sunxi-mmc 1c0f000.mmc: base:0x00fe434a irq:19
[ 0.997364] NET: Registered protocol family 17
[ 1.002049] Key type dns_resolver registered
[ 1.008527] Loading compiled-in X.509 certificates
[ 1.021817] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07391b8)
[ 1.030722] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073849c)
[ 1.038512] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.045179] [drm] No driver support for vblank timestamp query.
[ 1.099209] Console: switching to colour frame buffer device 60x34
[ 1.122527] sun4i-drm display-engine: fb0: frame buffer device
[ 1.129713] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.138254] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.155782] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.162661] vcc3v3: disabling
[ 1.165648] ALSA device list:
[ 1.168616] #0: Loopback 1
[ 1.172398] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.181163] cfg80211: failed to load regulatory.db
[ 1.186502] Waiting for root device /dev/mtdblock31:03...
[ 194.796012] random: crng init done
大神帮忙看下?
页次: 1