荔枝派Nano
内核版本: Linux version 4.15.0-rc8-licheepi-nano+
自己编译
启动时卡到了
Waiting for root device /dev/mtdblock3...
跪求好心人帮我。
离线
本站搜一下,很多这种帖子
谢谢晕哥
已经解决了,
是我没有按官网步骤来。
离线
我也遇到一样的问题,是哪个步骤不对?
离线
我也遇到一样的问题,是哪个步骤不对?
贴log看下.
离线
[ 0.853546] console [ttyS0] enabled
[ 0.863832] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.873182] SCSI Media Changer driver v0.25
[ 0.878835] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.885367] ehci-platform: EHCI generic platform driver
[ 0.890955] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.897244] ohci-platform: OHCI generic platform driver
[ 0.902839] usbcore: registered new interface driver usb-storage
[ 0.909847] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.918886] i2c /dev entries driver
[ 0.975887] sunxi-mmc 1c0f000.mmc: base:0x403ca28c irq:19
[ 0.983255] usbcore: registered new interface driver usbhid
[ 0.988951] usbhid: USB HID core driver
[ 1.010475] NET: Registered protocol family 17
[ 1.015152] Key type dns_resolver registered
[ 1.021706] Loading compiled-in X.509 certificates
[ 1.036650] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739498)
[ 1.045402] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073877c)
[ 1.053191] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.059851] [drm] No driver support for vblank timestamp query.
[ 1.113843] Console: switching to colour frame buffer device 60x34
[ 1.137202] sun4i-drm display-engine: fb0: frame buffer device
[ 1.144327] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.153495] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.165377] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.171300] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.181465] hub 1-0:1.0: USB hub found
[ 1.185384] hub 1-0:1.0: 1 port detected
[ 1.190974] using random self ethernet address
[ 1.195507] using random host ethernet address
[ 1.201827] usb0: HOST MAC 4e:65:ae:9c:8e:cc
[ 1.206355] usb0: MAC 02:17:03:3e:ee:1c
[ 1.210354] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.217917] g_cdc gadget: g_cdc ready
[ 1.222484] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.240093] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.246956] vcc3v3: disabling
[ 1.249939] ALSA device list:
[ 1.252906] #0: Loopback 1
[ 1.256717] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.265385] cfg80211: failed to load regulatory.db
[ 1.271009] Waiting for root device /dev/mtdblock3...
[ 202.875895] random: crng init done
离线
没有生成 mtd 分区吧
没看到 mtd, 倒是有这句:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2,
离线
没有生成 mtd 分区吧
另外: #define CONFIG_BOOTCOMMAND "sf probe 0:50000000; "
这个我改为 #define CONFIG_BOOTCOMMAND "sf probe 0; "
要不然启动内核时,卡住
离线
又一个掉坑里面的,那个冒号要去掉,本来是个空格的
#define CONFIG_BOOTCOMMAND "sf probe 0:50000000; " \
这个改为,#define CONFIG_BOOTCOMMAND "sf probe 0 50000000; " \
吗?
有没有 0x的?
离线
不用 0x
离线
不用 0x
太感谢了! 正在试试
离线
打包脚本用这个,对不对?
#! /bin/bash
rm -rf ./output
mkdir ./output
cd ./output
OUT_FILENAME="flashimg.bin"
UBOOT_FILE=../u-boot/u-boot-sunxi-with-spl.bin
KERNEL_DIR=../linux
KERNEL_MODULES_DIR=$KERNEL_DIR/out/*
DTB_FILE=$KERNEL_DIR/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
#DTB_FILE=../u-boot/arch/arm/dts/suniv-f1c100s-licheepi-nano.dtb
KERNEL_FILE=$KERNEL_DIR/arch/arm/boot/zImage
ROOTFS_FILE=../buildroot-2017.08/output/images/rootfs.tar
SPEC_FILE=./custom/*
SCRIPTES=./scripts/*.sh
dd if=/dev/zero of=$OUT_FILENAME bs=1M count=16
dd if=$UBOOT_FILE of=$OUT_FILENAME bs=1K conv=notrunc
dd if=$DTB_FILE of=$OUT_FILENAME bs=1K seek=1024 conv=notrunc
dd if=$KERNEL_FILE of=$OUT_FILENAME bs=1K seek=1088 conv=notrunc
mkdir rootfs
tar xf $ROOTFS_FILE -C ./rootfs
cp -r $KERNEL_MODULES_DIR rootfs/usr/
cp -r $SPEC_FILE rootfs/
# add some custom modify
#for f in $SCRIPTES; do
# ROOTFS_PATH=./rootfs bash "$f" -H
#done
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -r rootfs -o rootfs.img -D rootfs
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -D overlay
dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=5184 conv=notrunc
dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
rm -rf rootfs rootfs.img jffs2.img
打包结果,这样有没有问题?
root@ubuntu:~/Documents/F1C100S_NEW# ./build.sh
16+0 records in
16+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 0.0107207 s, 1.6 GB/s
984+0 records in
984+0 records out
1007616 bytes (1.0 MB, 984 KiB) copied, 0.00136088 s, 740 MB/s
7+1 records in
7+1 records out
7583 bytes (7.6 kB, 7.4 KiB) copied, 9.7571e-05 s, 77.7 MB/s
3796+1 records in
3796+1 records out
3888056 bytes (3.9 MB, 3.7 MiB) copied, 0.0068818 s, 565 MB/s
cp: cannot stat '../linux/out/*': No such file or directory
cp: cannot stat './custom/*': No such file or directory
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: mkfs.jffs2: not found
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: mkfs.jffs2: not found
dd: failed to open 'rootfs.img': No such file or directory
dd: failed to open 'jffs2.img': No such file or directory
最近编辑记录 nufing (2020-01-02 11:29:48)
离线
mkfs.jffs2: not found
sudo apt-get install mtd-utils
离线
没有生成 mtd 分区吧
<*> OpenFirmware partitioning information support
<*> Caching block device access to MTD devices
<*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)
< > Microchip 23K256 SRAM
< > Support SST25L (non JEDEC) SPI Flash chips
< > Uncached system RAM
< > Physical system RAM
< > Test driver using RAM
<*> MTD using block device
*** Disk-On-Chip Device Drivers ***
< > M-Systems Disk-On-Chip G3
这样勾选了同学 是生成不了 MTD
离线
mkfs.jffs2: not found
sudo apt-get install mtd-utils
加了这两个,生成的文件好大,100M, 我把 build.sh 的,
#fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -r rootfs -o rootfs.img -D rootfs
#fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -D overlay
#dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=5184 conv=notrunc
#dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
这两句屏蔽了,就和以前一样了,可能不需要这几句
离线
加了这两个,生成的文件好大,100M, 我把 build.sh 的,
你的目标文件夹target/太大吧?
离线
你的目标文件夹target/太大吧?
安装这个 sudo apt-get install mtd-utils
编译后就很大了 , 搞不懂哈
离线
安装这个 sudo apt-get install mtd-utils
编译后就很大了 , 搞不懂哈
和这个没关系, 你是你的 target/ 目录太大了。
离线
和这个没关系, 你是你的 target/ 目录太大了。
T_T 为什么我生成的目标文件这么大
#! /bin/bash
rm -rf ./output
mkdir ./output
cd ./output
OUT_FILENAME="flashimg.bin"
UBOOT_FILE=../u-boot/u-boot-sunxi-with-spl.bin
KERNEL_DIR=../linux
KERNEL_MODULES_DIR=$KERNEL_DIR/out/*
DTB_FILE=$KERNEL_DIR/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
KERNEL_FILE=$KERNEL_DIR/arch/arm/boot/zImage
ROOTFS_FILE=../buildroot-2017.08/output/images/rootfs.tar
SPEC_FILE=./custom/*
SCRIPTES=./scripts/*.sh
dd if=/dev/zero of=$OUT_FILENAME bs=1M count=16
dd if=$UBOOT_FILE of=$OUT_FILENAME bs=1K conv=notrunc
dd if=$DTB_FILE of=$OUT_FILENAME bs=1K seek=448 conv=notrunc
dd if=$KERNEL_FILE of=$OUT_FILENAME bs=1K seek=512 conv=notrunc
mkdir rootfs
tar xf $ROOTFS_FILE -C ./rootfs
cp -r $KERNEL_MODULES_DIR rootfs/usr/
cp -r $SPEC_FILE rootfs/
# add some custom modify
for f in $SCRIPTES; do
ROOTFS_PATH=./rootfs bash "$f" -H
done
fakeroot mksquashfs rootfs/ rootfs.img -no-exports -no-xattrs -all-root
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -d overlay/
dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=4608 conv=notrunc
dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
rm -rf rootfs rootfs.img jffs2.img
离线
.config 里面选了一些不需要的组件,比如 Qt, ffmpeg, mplayer 等吧?
离线
.config 里面选了一些不需要的组件,比如 Qt, ffmpeg, mplayer 等吧?
都是按官方教程一步步来的,不管了, 再按 https://whycan.cn/t_2179.html
这里的教程,全部重来一遍. 有点心憔力悴
离线
另外我的, ubuntu 版本是 64位的 18版本,不知道有没有影响
离线
另外我的, ubuntu 版本是 64位的 18版本,不知道有没有影响
这个问题 和 ubuntu 版本一点关系都没有
离线
这个问题 和 ubuntu 版本一点关系都没有
找到问题了 用一个更新的版本 buildroot , 手动配置一下, 编译出来再生成 img文件体积就正常了
MTD 也正常了,不过还有坑.....
离线
[ 0.923270] 0x000000000000-0x000000070000 : "u-boot"
[ 0.930955] 0x000000070000-0x000000080000 : "dtb"
[ 0.938202] 0x000000080000-0x000000480000 : "kernel"
[ 0.945814] 0x000000480000-0x000000c00000 : "rootfs"
[ 0.953431] 0x000000c00000-0x000001000000 : "overlayfs"
[ 0.961801] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.968533] ehci-platform: EHCI generic platform driver
[ 0.974142] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.980516] ohci-platform: OHCI generic platform driver
[ 0.986201] usbcore: registered new interface driver usb-storage
[ 0.993304] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.002445] i2c /dev entries driver
[ 1.068475] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:19
[ 1.075973] usbcore: registered new interface driver usbhid
[ 1.081738] usbhid: USB HID core driver
[ 1.103411] NET: Registered protocol family 17
[ 1.108165] Key type dns_resolver registered
[ 1.114772] Loading compiled-in X.509 certificates
[ 1.130104] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739cb8)
[ 1.139110] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f9c)
[ 1.146867] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.153611] [drm] No driver support for vblank timestamp query.
[ 1.207614] Console: switching to colour frame buffer device 60x34
[ 1.231292] sun4i-drm display-engine: fb0: frame buffer device
[ 1.238842] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.259667] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.289135] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.307200] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.330226] hub 1-0:1.0: USB hub found
[ 1.340830] hub 1-0:1.0: 1 port detected
[ 1.352912] using random self ethernet address
[ 1.363921] using random host ethernet address
[ 1.376556] usb0: HOST MAC 7e:7b:3d:f3:4e:82
[ 1.387339] usb0: MAC 92:2a:53:ab:08:31
[ 1.397489] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.417198] g_cdc gadget: g_cdc ready
[ 1.428086] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.457997] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.477266] vcc3v3: disabling
[ 1.486541] ALSA device list:
[ 1.495707] #0: Loopback 1
[ 1.505478] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.526180] cfg80211: failed to load regulatory.db
[ 1.539015] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[ 1.559040] Please append a correct "root=" boot option; here are the available partitions:
[ 1.579475] 1f00 448 mtdblock0
[ 1.579488] (driver?)
[ 1.597887] 1f01 64 mtdblock1
[ 1.597899] (driver?)
[ 1.615901] 1f02 4096 mtdblock2
[ 1.615914] (driver?)
[ 1.633498] 1f03 7680 mtdblock3
[ 1.633510] (driver?)
[ 1.650737] 1f04 4096 mtdblock4
[ 1.650749] (driver?)
[ 1.667502] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.686010] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano #2
[ 1.703834] Hardware name: Allwinner suniv Family
[ 1.714091] [<c010e584>] (unwind_backtrace) from [<c010b6cc>] (show_stack+0x10/0x14)
[ 1.732874] [<c010b6cc>] (show_stack) from [<c0116880>] (panic+0xb8/0x230)
[ 1.750844] [<c0116880>] (panic) from [<c0901190>] (mount_block_root+0x170/0x250)
[ 1.769568] [<c0901190>] (mount_block_root) from [<c0901364>] (mount_root+0xf4/0x120)
[ 1.788642] [<c0901364>] (mount_root) from [<c09014b8>] (prepare_namespace+0x128/0x188)
[ 1.808181] [<c09014b8>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x174/0x1b8)
[ 1.828995] [<c0900dc0>] (kernel_init_freeable) from [<c0666410>] (kernel_init+0x8/0x10c)
[ 1.849179] [<c0666410>] (kernel_init) from [<c0107de0>] (ret_from_fork+0x14/0x34)
[ 1.868781] Rebooting in 5 seconds..
[ 7.853959] Reboot failed -- System halted
MTD不错OK了就是还有问题
离线
没有生成 mtd 分区吧
十分感谢指导
现在离成功更近一步了
[ 1.542665] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 1.566491] devtmpfs: mounted
[ 1.580350] Freeing unused kernel memory: 1024K
[ 1.827494] random: crng init done
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: SKIP (read-only file system detected)
Starting network: OK
离线
离线
非常感谢,已经可以正常运行了,现在在测试其它功能。
离线
非常感谢,已经可以正常运行了,现在在测试其它功能。
请问是怎么解决的呢?
离线
离线
又一个掉坑里面的,那个冒号要去掉,本来是个空格的
你好,晕哥,现在编译好的 linux 烧录后运行正常,在window 下,通过串来控制 这系统,目前用 DNW 这工具,
返回的,数据不好看,
# ls
[1;36mbin[m [1;36mlib[m [1;34mmedia[m [1;34mproc[m [1;36msbin[m [1;34musr[m
[1;34mdev[m [1;36mlib32[m [1;34mmnt[m [1;34mroot[m [1;34msys[m [1;34mvar[m
[1;34metc[m [1;36mlinuxrc[m [1;34mopt[m [1;34mrun[m [1;34mtmp[m
请问一般为什么串口工具来了?
离线
mobaxterm 好用,用免费版就可以了。
非常非常感谢,真想发个微信红包给你, 怎么发哈
离线