挖坑网/填坑网 DebugDump Forum

别人挖坑默默填上,自己挖坑含泪填上。天下没有填不了的坑,只有不会填坑的人。来吧,加入我们,挖坑行,填坑你更行! 站长QQ: 516333132 点击这里给我发消息

您尚未登录。

#1 2018-01-11 14:28:21

qianhao
会员
注册时间: 2017-12-14
累计发帖: 66

lichee派BSP内核编译教程

参考链接1: 荔枝派Zero V3s开发板入坑记录
参考链接2: 芒果派全志V3s开发板入坑记录. (第一次收到坑友寄来评测的开发板)

uboot 才用主线的uboot 所以抄袭一段文字说明:

1. 准备工作

1) 安装Ubuntu14.04LTS(长支持版本),如果用虚拟机请安装vmware14(别的虚拟机都不推荐,泪的教训),  然后安装 vmware tools(不是必须,但是方便文件共享)
    2) 安装arm linux 硬件浮点数工具链, 因为V3s支持VFPv4 浮点单元: sudo apt-get install gcc-arm-linux-gnueabihf
    3) 安装git源码管理软件:  sudo apt-get install git
    4) 其他支撑软件 sudo apt-get install device-tree-compiler (.......................)

2. u-boot

首先获取u-boot源码:             git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current
      如果你需要支持spi flash:   git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)
ARCH=arm make menuconfig
执行编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make
多核编译,避免cpu其他内核打酱油, J后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -J3

3.编译 sunxi-tools

sudo apt-get install libusb-1.0-0-dev
cd tool/sunxi-tools
make

4.生成boot.scr文件

新建一个文件 boot.cmd   
写入 :
setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
setenv bootm_boot_mode sec
setenv machid 1029
load mmc 0:1 0x41000000 uImage
load mmc 0:1 0x41d00000 script.bin
bootm 0x41000000
保存
mkimage -C none -A arm -T script -d boot.cmd boot.scr

5.生成 script.bin文件

使用我提供的sys_config.fex
../sunxi-tools/fex2bin sys_config.fex > ../pub/boot/script.bin

6.编译内核

使用我提供的 lichee_BSP_config 说明一下  这里修改了内核支持网口 支持ext4文件系统 就直接给出我配置好的。
cd linux-3.4

cp lichee_BSP_config .config

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j16

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules_install

这时  我们要用的  uImage 在 arch/arm/boot/uImage

7.文件系统:

1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz
    2). 配置buildroot 参数, make menuconfig; make

同 主线文件系统 的生成办法

8.打包

烧录TF卡启动盘:
    1) 删除TF卡所有分区
    2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
        sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
    3) 建立第一个分区,前面空出8MB   大小32M(可以随意填写), 格式FAT16, 把uImage,boot.src,script.bin,拷贝到 这个分区
    4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
        tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
以上资料我使用度盘分享(提供内核的源码和编译好的内核)
链接: https://pan.baidu.com/s/1ghlIl5D  密码:95mp

离线

#2 2018-01-11 14:51:19

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

非常感谢 @qianhao 大侠对小站的支持
有不明白我再跟帖请教。

在线

#3 2018-03-29 10:56:40

heroydx
会员
注册时间: 2018-03-22
累计发帖: 3

Re: lichee派BSP内核编译教程

请问楼主,按照您的方法烧写TF卡启动时,会直接进入grub,您遇到过这种情况吗?

离线

#4 2018-03-29 11:11:56

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

哪里来的 grub ?  是u-boot吗?

在线

#5 2018-03-29 23:27:32

zhuacai
会员
注册时间: 2017-12-16
累计发帖: 167

Re: lichee派BSP内核编译教程

@qianhao哥,bsp内核和sys_config.fex lichee_BSP_config 这两个文件在那里下载呢

离线

#6 2018-03-30 06:38:25

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

荔枝派群公告里面,下载全志官方bsp,搜索里面有。
或者海豚派资料里面也有.

在线

#7 2018-04-02 11:37:11

zhuacai
会员
注册时间: 2017-12-16
累计发帖: 167

Re: lichee派BSP内核编译教程

楼主,以上资料我使用度盘分享(提供内核的源码和编译好的内核)
:链接:https://pan.baidu.com/s/1ghlIl5D 密码:95mp  内核源怎么那里小,只有一百多M

离线

#8 2018-04-02 14:28:33

qianhao
会员
注册时间: 2017-12-14
累计发帖: 66

Re: lichee派BSP内核编译教程

@zhuacai sys_config.fex, lichee_BSP_config在云盘里面都有了 你找找  我已经修改好了

离线

#9 2018-04-02 14:30:50

qianhao
会员
注册时间: 2017-12-14
累计发帖: 66

Re: lichee派BSP内核编译教程

@heroydx  你是说 直接进uboot吗  那你 应该要注意一下 boot.cmd  是不是正确 并且保证在sd卡内核分区里面存在

离线

#10 2018-04-02 14:32:45

qianhao
会员
注册时间: 2017-12-14
累计发帖: 66

Re: lichee派BSP内核编译教程

@zhuacai 就是这么小的 我应该已经完整打包了  还有一个办法 就是你多参与论坛,活跃高了 加入晕哥的下载群,下载海豚派的sdk 。 要用在荔枝派上 需要修改内核的配置。

离线

#11 2018-04-03 11:03:24

BMN李
会员
注册时间: 2018-03-22
累计发帖: 12

Re: lichee派BSP内核编译教程

是哦。玩BSP,期待海豚派的SDK。

离线

#12 2018-04-04 09:37:25

zhuacai
会员
注册时间: 2017-12-16
累计发帖: 167

Re: lichee派BSP内核编译教程

大家好,lichee派BSP内核编译教程可以在荔枝上用视频吗

离线

#13 2018-04-04 09:43:24

awfans
会员
注册时间: 2018-04-03
累计发帖: 69

Re: lichee派BSP内核编译教程

zhuacai 说:

大家好,lichee派BSP内核编译教程可以在荔枝上用视频吗

可以海豚派开发板开机启动一个行车记录录像软件(newcdr), 可以录制h264压缩的mp4文件到tf卡,说明视频采集,压缩,显示是没有问题了,
newcdr有完整的源码,只是要变成自己的知识还需要时日梳理。
我没有找到解码mp4并显示的源码,不过应该问题不大。

离线

#14 2018-04-04 19:23:55

zhuacai
会员
注册时间: 2017-12-16
累计发帖: 167

Re: lichee派BSP内核编译教程

awfans 说:
zhuacai 说:

大家好,lichee派BSP内核编译教程可以在荔枝上用视频吗

可以海豚派开发板开机启动一个行车记录录像软件(newcdr), 可以录制h264压缩的mp4文件到tf卡,说明视频采集,压缩,显示是没有问题了,
newcdr有完整的源码,只是要变成自己的知识还需要时日梳理。
我没有找到解码mp4并显示的源码,不过应该问题不大。


awfans哥,newcdr录像软件用什么什么开发的呢,自己可以开发软件在上面跑么

离线

#15 2018-04-04 19:27:59

落雁
会员
注册时间: 2017-09-06
累计发帖: 60

Re: lichee派BSP内核编译教程

zhuacai 说:
awfans 说:
zhuacai 说:

大家好,lichee派BSP内核编译教程可以在荔枝上用视频吗

可以海豚派开发板开机启动一个行车记录录像软件(newcdr), 可以录制h264压缩的mp4文件到tf卡,说明视频采集,压缩,显示是没有问题了,
newcdr有完整的源码,只是要变成自己的知识还需要时日梳理。
我没有找到解码mp4并显示的源码,不过应该问题不大。


awfans哥,newcdr录像软件用什么什么开发的呢,自己可以开发软件在上面跑么

newcdr用C++写的, 基于全志camdroid平台,大量使用了camdroid 里面的framework.
你照着晕哥的海豚派入坑教程做就就可以编译成功,然后慢慢剪裁newcdr.

离线

#16 2018-04-04 19:35:05

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

落雁 说:
zhuacai 说:
awfans 说:

可以海豚派开发板开机启动一个行车记录录像软件(newcdr), 可以录制h264压缩的mp4文件到tf卡,说明视频采集,压缩,显示是没有问题了,
newcdr有完整的源码,只是要变成自己的知识还需要时日梳理。
我没有找到解码mp4并显示的源码,不过应该问题不大。


awfans哥,newcdr录像软件用什么什么开发的呢,自己可以开发软件在上面跑么

newcdr用C++写的, 基于全志camdroid平台,大量使用了camdroid 里面的framework.
你照着晕哥的海豚派入坑教程做就就可以编译成功,然后慢慢剪裁newcdr.

对。

行车记录仪代码: newcdr_tar.gz
估计不能单独编译成功, 但是仍然可以参考。

在线

#17 2018-04-04 21:29:33

zhuacai
会员
注册时间: 2017-12-16
累计发帖: 167

Re: lichee派BSP内核编译教程

晕哥,camdroid平台 上可以跑qt程序吗

离线

#18 2018-04-04 21:41:55

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

zhuacai 说:

晕哥,camdroid平台 上可以跑qt程序吗

肯定可以,Qt是纯软件的东西, 不过还是建议用MiniGUI, 因为官方的newcdr就是用MiniGUI.

在线

#19 2018-04-10 17:10:57

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

楼主,请问下按照uboot里面的配置文件编译后,启动提示unable to read file zImage,在哪里修改读取uImage??
注:已经按照上面步骤生成了boot.csr,放入第一分区了,但是好像这边没有生效!

离线

#20 2018-04-10 17:53:50

qianhao
会员
注册时间: 2017-12-14
累计发帖: 66

Re: lichee派BSP内核编译教程

@quinncy 你的uboot是怎么编译的  你是按照晕哥的入坑教程的吗  入坑教程里面的uboot带启动参数的

离线

#21 2018-04-10 18:00:53

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

quinncy 说:

楼主,请问下按照uboot里面的配置文件编译后,启动提示unable to read file zImage,在哪里修改读取uImage??
注:已经按照上面步骤生成了boot.csr,放入第一分区了,但是好像这边没有生效!

麻烦贴比较多一点log信息, 应该如 @QianHao 说, 是 sun8i.h没配置好.

在线

#22 2018-04-11 09:39:46

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

@晕哥,qinhao,确实是sun8i.h没配置好,之前我一直修改的是u-boot.cfg里面的启动参数··,现在已经可以进去了,谢谢!

离线

#23 2018-04-11 11:55:02

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

quinncy 说:

@晕哥,qinhao,确实是sun8i.h没配置好,之前我一直修改的是u-boot.cfg里面的启动参数··,现在已经可以进去了,谢谢!

嗯嗯,有什么吃荔枝派过程中有什么使用心得体会可以分享到挖坑网,
我们的口号是为后来者铺路!

在线

#24 2018-04-11 23:34:42

sunwei
会员
注册时间: 2018-04-09
累计发帖: 58

Re: lichee派BSP内核编译教程

请问有没可能做到spi里放系统。并且内核很小。小到系统只占一半dde内存。又能支持大部分liunx程序

离线

#25 2018-04-12 11:19:36

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

楼主,请问下在linux3.4目录下,make menuconfig里面ov5647_mipi前面为什么只能是M,不能是*??我现在想直接把它编译进去,而不是手动insmod,这个是在哪里设置的呢??
注:配置文件是使用你的lichee_BSP_config

离线

#26 2018-04-12 13:32:58

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

应该是可以直接编译进去的,你先试一试,看会有什么错误。

在线

#27 2018-04-12 14:46:45

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

@晕哥,问题解决了,是因为上层的sunxi video front end (camera and etc)driver这一项前面被设置成了M,所以下面的都必须是M。修改方法是直接将这一项前面的M换成*就可以设置ov5647_mipi编译进内核了。(手动insmod的话需要额外拷贝很多关于v4l2的.ko文件,建议还是直接编译进内核)

离线

#28 2018-04-12 14:54:48

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

对, 做产品建议编译到内核。
做开发板,或者开发中的产品可以先使用 insmod ko的方式.

在线

#29 2018-04-13 16:33:14

camelshoko
会员
注册时间: 2018-04-13
累计发帖: 2

Re: lichee派BSP内核编译教程

请教题主,我采用外部spi启动 使用您提供的包编译出来无法启动
spi启动已经使用主线kernel验证过了,可以起来的。


U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 13 2018 - 13:04:14 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

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 mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
=> bootm 0x4100000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2434096 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

离线

#30 2018-04-13 16:38:14

camelshoko
会员
注册时间: 2018-04-13
累计发帖: 2

Re: lichee派BSP内核编译教程

使用BBCode重新发下启动信息

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 13 2018 - 13:04:14 +0800) Allwinner Technology
CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
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 mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK

=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2434096 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Starting kernel ...

离线

#31 2018-04-13 16:38:59

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

你仿照这个帖子: 我的全志Allwinner V3s板子跑linux4.13-y程序,控制台不显示 Uncompressing Linux... done

改一下BSP里面的 arch/arm/boot/compressed/misc.c,
不知道是不是同样的问题。

主线的kernel没有显示解压成功或者失败。

在线

#32 2018-04-14 11:28:59

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

请问下,在这个教程生成的文件系统下,执行我在ubuntu上交叉编译后的hello.out,显示-sh:./hello.out: not found,这个应该怎么解决??
(网上查看了一下,是缺少对应可执行文件用到的动态链接库,我用arm-linux-readlf指令查看后,自己添加了libc.so.6之后发现系统就进不去了,一直重启)
这个可以直接在编译文件系统时配置生成吗??

离线

#33 2018-04-14 12:20:23

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

quinncy 说:

请问下,在这个教程生成的文件系统下,执行我在ubuntu上交叉编译后的hello.out,显示-sh:./hello.out: not found,这个应该怎么解决??
(网上查看了一下,是缺少对应可执行文件用到的动态链接库,我用arm-linux-readlf指令查看后,自己添加了libc.so.6之后发现系统就进不去了,一直重启)
这个可以直接在编译文件系统时配置生成吗??

可以用静态链接, 一定可以运行。

arm-linux-gcc -o test test.c -static ###静态链接
arm-linux-strip test  ###去除调试符号

在线

#34 2018-04-14 15:13:29

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

@晕哥,-static是可以,只不过想研究下能不能把那个问题解决掉! tonguetongue

最近编辑记录 quinncy (2018-04-14 15:16:24)

离线

#35 2018-04-14 15:37:58

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

一个应用程序可以把系统搞定重启?有没有日日志,我强烈围观一下

在线

#36 2018-04-14 16:41:46

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

@晕哥,文件系统已经被我重新刷了,等把手上事情忙完再回来搞这个哈 lol

离线

#37 2018-04-15 00:43:59

tiger_sherry
会员
注册时间: 2018-04-15
累计发帖: 10

Re: lichee派BSP内核编译教程

膜拜高手!!!

离线

#38 2018-04-16 18:22:12

小猪佩奇
会员
注册时间: 2018-03-19
累计发帖: 46

Re: lichee派BSP内核编译教程

跪求大神们帮忙看看, 我进不去内核是怎么回事

starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
290 bytes read in 18 ms (15.6 KiB/s)
## Executing script at 41900000
reading uImage
Invalid FAT entry
262144 bytes read in 31 ms (8.1 MiB/s)
reading script.bin
Invalid FAT entry
2048 bytes read in 20 ms (99.6 KiB/s)
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2451016 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.

离线

#39 2018-04-16 19:47:28

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

内核校验出错,检查zImage是否完整,存储地址是不是有问题。

在线

#40 2018-04-17 10:15:23

小猪佩奇
会员
注册时间: 2018-03-19
累计发帖: 46

Re: lichee派BSP内核编译教程

你的问题解决了吗,我现在跟你的问题一样~改了misc.c.以后只是多了一句

Uncompressing Linux... done, booting the kernel.

停留在这里不往下进行

camelshoko 说:

使用BBCode重新发下启动信息

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 13 2018 - 13:04:14 +0800) Allwinner Technology
CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
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 mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK

=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2434096 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Starting kernel ...

离线

#41 2018-04-17 10:25:45

小猪佩奇
会员
注册时间: 2018-03-19
累计发帖: 46

Re: lichee派BSP内核编译教程

找到问题了,是sys_config.fex没配置好

小猪佩奇 说:

你的问题解决了吗,我现在跟你的问题一样~改了misc.c.以后只是多了一句

Uncompressing Linux... done, booting the kernel.

停留在这里不往下进行

camelshoko 说:

使用BBCode重新发下启动信息

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 13 2018 - 13:04:14 +0800) Allwinner Technology
CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
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 mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK

=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2434096 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Starting kernel ...

离线

#42 2018-04-17 10:38:53

daydayup
会员
注册时间: 2017-10-09
累计发帖: 268

Re: lichee派BSP内核编译教程

跟大神们脚步学习主线uboot引导bsp kernel.

离线

#43 2018-04-18 14:14:54

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

请问下,内核文件和文件系统在linux下面可以通过挂载目录然后直接cp,如果是windows上面的虚拟机呢??是不是需要打包成镜像再烧录??用什么工具呢??

离线

#44 2018-04-18 14:35:06

沉鱼
Administrator
注册时间: 2017-09-06
累计发帖: 155

Re: lichee派BSP内核编译教程

quinncy 说:

请问下,内核文件和文件系统在linux下面可以通过挂载目录然后直接cp,如果是windows上面的虚拟机呢??是不是需要打包成镜像再烧录??用什么工具呢??

是要打包成镜像, 然后用sunxi-fel烧录, 有windows、也有linux下版本.
前面两个问题没看懂.

离线

#45 2018-04-18 14:41:57

quinncy
会员
注册时间: 2018-04-10
累计发帖: 12

Re: lichee派BSP内核编译教程

用什么工具打包成镜像呢,我是用的BSP内核??
linux(ubuntu)下面我可以看到不同分区sdb1和sdb2,然后分别挂载到本机目录下之后cp内核文件和文件系统
但是在windows上面看不到tf卡的分区,应该只能直接烧录镜像吧
现在就是不知道怎么做镜像...

离线

#46 2018-04-18 14:56:23

达克罗德
会员
注册时间: 2018-04-10
累计发帖: 69

Re: lichee派BSP内核编译教程

quinncy 说:

用什么工具打包成镜像呢,我是用的BSP内核??
linux(ubuntu)下面我可以看到不同分区sdb1和sdb2,然后分别挂载到本机目录下之后cp内核文件和文件系统
但是在windows上面看不到tf卡的分区,应该只能直接烧录镜像吧
现在就是不知道怎么做镜像...

做dd镜像,荔枝派网盘有个脚本
windows下然后按照这个烧
http://www.orangepi.org/Docs/SDcardinstallation.html

离线

#47 2018-04-18 15:02:40

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

windows本身系统不支持两个及其以上u盘分区吧.

主线Linux可以从参考: 荔枝派Zero V3s开发板入坑记录
从tf卡引导系统,
但是bsp linux还不会。

建议全部用bsp那一套,包括u-boot、设备树、kernel、文件系统。

用芒果派的git代码即可: 芒果派全志V3s开发板入坑记录. (第一次收到坑友寄来评测的开发板)
我已经测试OK, 没有问题。

在线

#48 2018-05-01 19:45:58

waley8318
会员
注册时间: 2018-04-30
累计发帖: 4

Re: lichee派BSP内核编译教程

楼主,你好,请问下我按照您的步骤:
cp lichee_BSP_config .config

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j16

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules_install

后没有找到uImage文件啊

离线

#49 2018-05-01 20:16:11

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

那编译成功了吗?

在线

#50 2018-05-01 23:03:59

waley8318
会员
注册时间: 2018-04-30
累计发帖: 4

Re: lichee派BSP内核编译教程

没有报错啊,应该是成功了吧,您帮我看下,但是就是没有uImage文件,正常的话直接make 后就可以生成吧?

最近编辑记录 waley8318 (2018-05-01 23:05:42)

离线

#51 2018-05-01 23:07:22

awfans
会员
注册时间: 2018-04-03
累计发帖: 69

Re: lichee派BSP内核编译教程

那你看下有没有生成 zImage,
现在我比较喜欢用 camdroid,
详情搜一下本站  芒果派

离线

#52 2018-05-02 00:19:28

waley8318
会员
注册时间: 2018-04-30
累计发帖: 4

Re: lichee派BSP内核编译教程

晕哥 说:

那编译成功了吗?

刚发现了没有成功,报了个错误:
arch/arm/mach-sunxi/pm/standby/gen_check_code: 1: arch/arm/mach-sunxi/pm/standby/gen_check_code: Syntax error: end of file unexpected (expecting ")")
make[3]: *** [arch/arm/mach-sunxi/pm/standby/resume1.code] 错误 2
make[2]: *** [arch/arm/mach-sunxi/pm/standby/standby.code] 错误 2
make[1]: *** [arch/arm/mach-sunxi/pm] 错误 2
make[1]: *** 正在等待未完成的任务....
这个是什么问题呢?

离线

#53 2018-05-02 00:20:31

waley8318
会员
注册时间: 2018-04-30
累计发帖: 4

Re: lichee派BSP内核编译教程

awfans 说:

那你看下有没有生成 zImage,
现在我比较喜欢用 camdroid,
详情搜一下本站  芒果派

我新手,荔枝派先玩下看看,芒果派和荔枝派都是V3S吗?

离线

#54 2018-05-02 06:46:47

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

https://debugdump.com/t_561.html
新手从这里开始。

在线

#55 2018-05-11 17:54:07

小猪佩奇
会员
注册时间: 2018-03-19
累计发帖: 46

Re: lichee派BSP内核编译教程

@qianhao 请问楼主大神,不知道你有没有用BSP内核配置MIPI摄像头?是否成功?我配置完了之后 出现
Check open /system/etc/hawkview/ov5648/isp_test_param.ini failed!                                                                                                   

[    1.134553] [VFE]vfe_init end
[    1.139000] platform reg-15-cs-ldo0: Driver reg-15-cs-ldo0 requests probe def                                                                                                           erral
[    1.147745] [VFE]probe_work_handle start!
[    1.152339] [VFE]..........................vfe clk open!.....................                                                                                                           ..
[    1.160854] platform reg-15-cs-aldo1: Driver reg-15-cs-aldo1 requests probe d                                                                                                           eferral
[    1.169790] platform reg-15-cs-aldo2: Driver reg-15-cs-aldo2 requests probe d                                                                                                           eferral
[    1.178853] [VFE]v4l2 subdev register input_num = 0
[    1.184522] [VFE]vfe sensor detect start! input_num = 0
[    1.190457] [VFE]Find sensor name is "ov5648", i2c address is 6c, type is "RA                                                                                                           W" !
[    1.199006] [VFE]Sub device register "ov5648" i2c_addr = 0x6c start!
[    1.206192] [VFE]v4l2_device_register_subdev return 0
[    1.212044] [VFE]registered sensor subdev is OK!
[    1.217287] [VFE]Check sensor!
[    1.220800] [VFE]Sub device register "ov5648" is OK!
[    1.226701] platform reg-15-cs-dldo1: Driver reg-15-cs-dldo1 requests probe d                                                                                                           eferral
[    1.235708] platform reg-15-cs-dldo2: Driver reg-15-cs-dldo2 requests probe d                                                                                                           eferral
[    1.244626] platform reg-15-cs-buck1: Driver reg-15-cs-buck1 requests probe d                                                                                                           eferral
[    1.253605] platform reg-15-cs-buck2: Driver reg-15-cs-buck2 requests probe d                                                                                                           eferral
[    1.262584] platform reg-15-cs-buck3: Driver reg-15-cs-buck3 requests probe d                                                                                                           eferral
[    1.271360] [VFE]Check open /system/etc/hawkview/ov5648/isp_test_param.ini fa                                                                                                           iled!
[    1.271369] Match isp cfg  start!
[    1.283831] [VFE]read ini start
[    1.287641] [VFE]Fetch ini file form "/system/etc/hawkview/ov5648/isp_test_pa                                                                                                           ram.ini"
[    1.296718] platform reg-15-cs-buck4: Driver reg-15-cs-buck4 requests probe d                                                                                                           eferral
[    1.305736] platform reg-15-cs-ldoio0: Driver reg-15-cs-ldoio0 requests probe                                                                                                            deferral
[    1.314813] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.324709] [VFE_WARN]read ini info fail
[    1.329864] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->sta                                                                                                           rt 0x01c20ca0, res->end 0x01c20cbf
[    1.341192] [VFE]V4L2 device registered as video0
[    1.347048] [VFE]..........................vfe clk close!....................                                                                                                           ...
[    1.355709] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.363126] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.369547] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual ti                                                                                                           meout 16 sec
[    1.378808] [VFE]probe_work_handle end!

离线

#56 2018-05-11 18:31:01

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

文件不存在

在线

#57 2018-05-30 09:20:33

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

怎么打包成spi的呢

离线

#58 2018-05-30 09:52:46

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

lijianjian135 说:

怎么打包成spi的呢

spi?
是不是说img烧录文件?

在线

#59 2018-05-30 10:01:19

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

是的,晕哥,怎么把uboot和bsp的内核打包成烧录文件呢,我想用摄像头

离线

#60 2018-05-30 10:09:54

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

楼主这种做法只能用 sunxi-fel 烧录。

https://debugdump.com/t_970.html

这个就是完全按照 官方做法搞的.

在线

#61 2018-05-30 10:14:11

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

只能用坑卓吗,楼主用的不是坑卓啊

离线

#62 2018-05-30 10:26:03

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

楼主用的是 主线u-boot + 官方linux3.4 + 自作文件系统,
这种需要用 sunxi-fel 烧录,
不是camdroid那个套路了。

在线

#63 2018-05-30 10:34:31

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

晕哥,我就是想用楼主这种方式,用主线uboot和官方的3.4内核还有文件系统,我这几个都编译好了,只是不知道怎么打包成烧写文件

离线

#64 2018-05-30 10:39:25

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

sunxi-fel 用过吗?

在线

#65 2018-05-30 10:43:14

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

sunxi-fel这个用过,我也用过芒果派提供的linux4.10

离线

#66 2018-05-30 10:45:48

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

那你是想把楼主这种做法移植到spi nor flash对吧,
我晚点研究一下。
难度应该不大,你可以试一试,有什么好消息可以分享上来。

在线

#67 2018-05-30 10:46:16

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

嗯,好的,谢谢晕哥,我也看看,有进展分享出来

离线

#68 2018-05-30 16:08:20

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

添加uboot和uimage,在uboot加上boot.scr的内容可以启动内核,但是识别不了文件系统

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (root@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #23 Wed May 30 00:39:54 PDT 2018
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 earlyprintk rw
[    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: 64MB = 64MB total
[    0.000000] Memory: 30720k/30720k available, 34816k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc042e000   (4248 kB)
[    0.000000]       .init : 0xc042e000 - 0xc044f000   ( 132 kB)
[    0.000000]       .data : 0xc0450000 - 0xc04934c0   ( 270 kB)
[    0.000000]        .bss : 0xc04934e4 - 0xc052c84c   ( 613 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000159] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000182] pid_max: default: 32768 minimum: 301
[    0.000322] Mount-cache hash table entries: 512
[    0.000825] CPU: Testing write buffer coherency: ok
[    0.001084] Setting up static identity map for 0x403189e0 - 0x40318a38
[    0.001733] devtmpfs: initialized
[    0.003320] pinctrl core: initialized pinctrl subsystem
[    0.003809] NET: Registered protocol family 16
[    0.004077] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004127] script_sysfs_init success
[    0.004876] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.005764] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006133] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.006861] persistent_ram: found existing buffer, size 17671, start 17671
[    0.086674] console [ram-1] enabled
[    0.087570] Not Found clk pll_isp in script 
[    0.087685] Not Found clk pll_video in script 
[    0.087876] Not Found clk pll_ve in script 
[    0.087980] Not Found clk pll_periph0 in script 
[    0.088084] Not Found clk pll_de in script 
<[    0.091696] bio: create slab <bio-0> at 0
[    0.092061] pwm module init!
[    0.094252] SCSI subsystem initialized
[    0.094599] usbcore: registered new interface driver usbfs
[    0.094769] usbcore: registered new interface driver hub
[    0.095097] usbcore: registered new device driver usb
[    0.095322] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.095516] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.096315] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.096524] axp20_board 0-0034: failed reading at 0x03
[    0.096656] axp20_board: probe of 0-0034 failed with error -70
[    0.096889] Linux video capture interface: v2.00
[    0.097085] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.097591] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.098308] Switching to clocksource arch_sys_counter
[    0.100000] NET: Registered protocol family 2
[    0.100000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.100104] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.100312] TCP: Hash tables configured (established 2048 bind 2048)
[    0.100418] TCP: reno registered
[    0.100610] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.100726] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.101190] NET: Registered protocol family 1
[    0.101482] standby_mode = 1. 
[    0.101587] wakeup src cnt is : 3. 
[    0.101797] pmu1_enable = 0x1. 
[    0.101899] pmux_id = 0x1. 
[    0.102011] config_pmux_para: script_parser_fetch err. 
[    0.102199] pmu2_enable = 0x0. 
[    0.102306] add_sys_pwr_dm: get ldo name failed
[    0.102409] add_sys_pwr_dm: get ldo name failed
[    0.102598] add_sys_pwr_dm: get ldo name failed
[    0.102701] add_sys_pwr_dm: get ldo name failed
[    0.102891] add_sys_pwr_dm: get ldo name failed
[    0.102992] add_sys_pwr_dm: get ldo name failed
[    0.103094] add_sys_pwr_dm: get ldo name failed
[    0.103283] add_sys_pwr_dm: get ldo name failed
[    0.103388] add_sys_pwr_dm: get ldo name failed
[    0.103577] add_sys_pwr_dm: get ldo name failed
[    0.103680] after inited: sys_mask config = 0x0. 
[    0.103785] dynamic_standby enalbe = 0x0. 
[    0.104029] sunxi_reg_init enter
[    0.105788] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.106028] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.106320] msgmni has been set to 60
[    0.107482] io scheduler noop registered
[    0.107599] io scheduler deadline registered
[    0.107773] io scheduler cfq registered (default)
[    0.108357] [DISP]disp_module_init
[    0.108844] cmdline,disp=
[    0.109491] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.109789] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.111668] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.114312] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.115392] [DISP]disp_module_init finish
[    0.115788] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.116307] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.116422] sw_uart_pm()890 - uart0 clk is already enable
[    0.116622] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.230271] console [ttyS0] enabled
[    0.747767] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.755748] spi spi0: master is unqueued, this is deprecated
[    0.762416] m25p_probe()966 - Use the Dual Mode Read.
[    0.768219] m25p80 spi0.0: found mx25l12805d, expected at25df641
[    0.775097] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.782311] partitions_register()853 - Invalid partitions count: -352315891
[    0.790542] Creating 1 MTD partitions on "spi0.0":
[    0.795992] 0x000000000000-0x000001000000 : "NorFlash part0"
[    0.803537] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.831051] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.840272] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.848893] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.870033] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.877438] hub 1-0:1.0: USB hub found
[    0.881758] hub 1-0:1.0: 1 port detected
[    0.886627] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.892359] usb usb1: USB disconnect, device number 1
[    0.898749] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.915289] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.942366] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.951091] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.959626] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    1.024621] hub 1-0:1.0: USB hub found
[    1.028898] hub 1-0:1.0: 1 port detected
[    1.033837] sunxi-ohci sunxi-ohci.1: remove, state 1
[    1.039478] usb usb1: USB disconnect, device number 1
[    1.045999] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.062487] Initializing USB Mass Storage driver...
[    1.068083] usbcore: registered new interface driver usb-storage
[    1.074951] USB Mass Storage support registered.
[    1.080473] file system registered
[    1.085884] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.093674] android_usb gadget: Number of LUNs=1
[    1.098997]  lun0: LUN: removable file: (no medium)
[    1.104965] android_usb gadget: android_usb ready
[    1.110532] sunxikbd_script_init: key para not found, used default para. 
[    1.119140] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.127629] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.136532] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.145450] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.154163] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.162794] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.171494] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.180205] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.189179] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.196437] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.207854] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.215599] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.221898] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.235513] sunxi_leds_fetch_sysconfig_para leds is not used in config
[    1.242929] =========script_get_err============
[    1.248351] usbcore: registered new interface driver usbhid
[    1.254666] usbhid: USB HID core driver
[    1.259740] ashmem: initialized
[    1.263516] logger: created 256K log 'log_main'
[    1.268807] logger: created 32K log 'log_events'
[    1.274268] logger: created 32K log 'log_radio'
[    1.279497] logger: created 32K log 'log_system'
[    1.286139] script_get_item return audio_pa_ctrl type err
[    1.293134] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.300906] TCP: cubic registered
[    1.304790] NET: Registered protocol family 17
[    1.309915] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.318761] ThumbEE CPU extension supported.
[    1.323622] Registering SWP/SWPB emulation handler
[    1.330074] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.339028] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.347722] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.356362] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.364910] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.373610] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.382440] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.391229] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 05:36:33 UTC (20193)
[    1.401724] ALSA device list:
[    1.405171]   #0: audiocodec
[    1.409071] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.418402] Backtrace: 
[    1.421365] [<c0013410>] (dump_backtrace+0x0/0x110) from [<c031387c>] (dump_stack+0x18/0x1c)
[    1.430925]  r6:00008000 r5:c183d000 r4:c183d000 r3:00000001
[    1.437793] [<c0313864>] (dump_stack+0x0/0x1c) from [<c0313c60>] (panic+0x78/0x1cc)
[    1.446407] [<c0313be8>] (panic+0x0/0x1cc) from [<c042ecc4>] (mount_block_root+0x240/0x290)
[    1.455868]  r3:00000000 r2:00000001 r1:c1821f38 r0:c03bb299
[    1.462730]  r7:c044a258
[    1.465742] [<c042ea84>] (mount_block_root+0x0/0x290) from [<c042ed6c>] (mount_root+0x58/0x68)
[    1.475496] [<c042ed14>] (mount_root+0x0/0x68) from [<c042eea0>] (prepare_namespace+0x124/0x184)
[    1.485350]  r5:c044a250 r4:c0493564
[    1.489704] [<c042ed7c>] (prepare_namespace+0x0/0x184) from [<c042e8f0>] (kernel_init+0x16c/0x1a8)
[    1.499837]  r5:c044a250 r4:00000007
[    1.504106] [<c042e784>] (kernel_init+0x0/0x1a8) from [<c0031d20>] (do_exit+0x0/0x660)
[    1.513090] Rebooting in 5 seconds..

离线

#69 2018-05-30 16:11:39

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 earlyprintk rw

看这个, 你没有指定 vfs, 也就是bootargs 里面的 root=/dev/mmcblk0p2

在线

#70 2018-05-30 16:20:01

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

我不是TF卡启动,所以没用/dev/mmcblk0p2这个设备节点啊,而且我刚开始是有加这个的,会一直提示等待

离线

#71 2018-05-30 16:25:47

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

lijianjian135 说:

我不是TF卡启动,所以没用/dev/mmcblk0p2这个设备节点啊,而且我刚开始是有加这个的,会一直提示等待

Linux启动必需要有根文件系统, 你必需指定一个根文件系统,
比如你可以把spi flash划分一块出来, 使用jffs2, 作为根文件系统.

在线

#72 2018-05-30 17:22:28

lijianjian135
会员
注册时间: 2018-05-30
累计发帖: 9

Re: lichee派BSP内核编译教程

内核识别到分区了,但是还是不行

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (root@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #26 Wed May 30 02:08:21 PDT 2018
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    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: 64MB = 64MB total
[    0.000000] Memory: 30388k/30388k available, 35148k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc047f000   (4572 kB)
[    0.000000]       .init : 0xc047f000 - 0xc04a2000   ( 140 kB)
[    0.000000]       .data : 0xc04a2000 - 0xc04e67e0   ( 274 kB)
[    0.000000]        .bss : 0xc04e6804 - 0xc057fda4   ( 614 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000160] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000182] pid_max: default: 32768 minimum: 301
[    0.000309] Mount-cache hash table entries: 512
[    0.000817] CPU: Testing write buffer coherency: ok
[    0.001089] Setting up static identity map for 0x4035b768 - 0x4035b7c0
[    0.001751] devtmpfs: initialized
[    0.003431] pinctrl core: initialized pinctrl subsystem
[    0.003914] NET: Registered protocol family 16
[    0.004219] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004275] script_sysfs_init success
[    0.005026] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.005917] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006287] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007036] persistent_ram: found existing buffer, size 18860, start 18860
[    0.091124] console [ram-1] enabled
[    0.091940] Not Found clk pll_isp in script 
[    0.092057] Not Found clk pll_video in script 
[    0.092248] Not Found clk pll_ve in script 
[    0.092353] Not Found clk pll_periph0 in script 
[    0.092542] Not Found clk pll_de in script 
[    0.096422] bio: create slab <bio-0> at 0
[    0.096792] pwm module init!
[    0.099093] SCSI subsystem initialized
[    0.099424] usbcore: registered new interface driver usbfs
[    0.099595] usbcore: registered new interface driver hub
[    0.099919] usbcore: registered new device driver usb
[    0.100161] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.100359] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.101135] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.101346] axp20_board 0-0034: failed reading at 0x03
[    0.101480] axp20_board: probe of 0-0034 failed with error -70
[    0.101713] Linux video capture interface: v2.00
[    0.101918] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.102428] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.103530] cfg80211: Calling CRDA to update world regulatory domain
[    0.104485] Switching to clocksource arch_sys_counter
[    0.109978] NET: Registered protocol family 2
[    0.109978] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109978] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.110154] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.110365] TCP: Hash tables configured (established 2048 bind 2048)
[    0.110473] TCP: reno registered
[    0.110669] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.110785] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.111252] NET: Registered protocol family 1
[    0.111689] standby_mode = 1. 
[    0.111796] wakeup src cnt is : 3. 
[    0.112003] pmu1_enable = 0x1. 
[    0.112108] pmux_id = 0x1. 
[    0.112220] config_pmux_para: script_parser_fetch err. 
[    0.112409] pmu2_enable = 0x0. 
[    0.112515] add_sys_pwr_dm: get ldo name failed
[    0.112619] add_sys_pwr_dm: get ldo name failed
[    0.112807] add_sys_pwr_dm: get ldo name failed
[    0.112911] add_sys_pwr_dm: get ldo name failed
[    0.113015] add_sys_pwr_dm: get ldo name failed
[    0.113203] add_sys_pwr_dm: get ldo name failed
[    0.113306] add_sys_pwr_dm: get ldo name failed
[    0.113495] add_sys_pwr_dm: get ldo name failed
[    0.113598] add_sys_pwr_dm: get ldo name failed
[    0.113701] add_sys_pwr_dm: get ldo name failed
[    0.113890] after inited: sys_mask config = 0x0. 
[    0.113994] dynamic_standby enalbe = 0x0. 
[    0.114228] sunxi_reg_init enter
[    0.116032] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.116200] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.116566] msgmni has been set to 59
[    0.117601] io scheduler noop registered
[    0.117807] io scheduler deadline registered
[    0.117990] io scheduler cfq registered (default)
[    0.118484] [DISP]disp_module_init
[    0.119075] cmdline,disp=
[    0.119712] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.120068] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.121889] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.124516] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.125584] [DISP]disp_module_init finish
[    0.125984] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.126439] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.126641] sw_uart_pm()890 - uart0 clk is already enable
[    0.126756] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.240393] console [ttyS0] enabled
[    0.768017] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.775963] spi spi0: master is unqueued, this is deprecated
[    0.782562] m25p_probe()986 - Use the Dual Mode Read.
[    0.788456] m25p80 spi0.0: found mx25l12805d, expected at25df641
[    0.795261] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.803002] Creating 4 MTD partitions on "spi0.0":
[    0.808430] 0x000000000000-0x000000100000 : "uboot"
[    0.814972] 0x000000100000-0x000000110000 : "script"
[    0.821561] 0x000000110000-0x000000510000 : "kernel"
[    0.828210] 0x000000510000-0x000001000000 : "rootfs"
[    0.836322] Failed to alloc md5
[    0.839961] eth0: Use random mac address
[    0.844546] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.872206] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.881336] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.889959] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.910030] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.917443] hub 1-0:1.0: USB hub found
[    0.921872] hub 1-0:1.0: 1 port detected
[    0.926768] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.932418] usb usb1: USB disconnect, device number 1
[    0.939803] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.956252] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.983429] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.992164] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    1.000744] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    1.064777] hub 1-0:1.0: USB hub found
[    1.069059] hub 1-0:1.0: 1 port detected
[    1.073970] sunxi-ohci sunxi-ohci.1: remove, state 1
[    1.079675] usb usb1: USB disconnect, device number 1
[    1.085971] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.102480] Initializing USB Mass Storage driver...
[    1.108082] usbcore: registered new interface driver usb-storage
[    1.114950] USB Mass Storage support registered.
[    1.120515] file system registered
[    1.126014] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.133866] android_usb gadget: Number of LUNs=1
[    1.139202]  lun0: LUN: removable file: (no medium)
[    1.145206] android_usb gadget: android_usb ready
[    1.150713] sunxikbd_script_init: key para not found, used default para. 
[    1.159334] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.167829] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.176698] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.185629] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.194336] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.202973] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.211682] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.220376] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.229276] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.236605] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.248011] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.255678] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.262066] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.275749] sunxi_leds_fetch_sysconfig_para leds is not used in config
[    1.283144] =========script_get_err============
[    1.288582] usbcore: registered new interface driver usbhid
[    1.294889] usbhid: USB HID core driver
[    1.299882] ashmem: initialized
[    1.303775] logger: created 256K log 'log_main'
[    1.309012] logger: created 32K log 'log_events'
[    1.314383] logger: created 32K log 'log_radio'
[    1.319726] logger: created 32K log 'log_system'
[    1.326407] script_get_item return audio_pa_ctrl type err
[    1.333543] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.341342] TCP: cubic registered
[    1.345136] NET: Registered protocol family 17
[    1.350453] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.359238] ThumbEE CPU extension supported.
[    1.364113] Registering SWP/SWPB emulation handler
[    1.370550] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.379624] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.388314] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.396879] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.405509] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.414143] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.422881] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.431757] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 07:00:57 UTC (25257)
[    1.442314] ALSA device list:
[    1.445711]   #0: audiocodec
[    1.449386] Waiting for root device /dev/mmcblk0p2...

离线

#73 2018-05-30 17:54:07

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,505

Re: lichee派BSP内核编译教程

root=/dev/mmcblk0p2
改成
root=/dev/mtdblock3

同时你的 /dev/mtd3 应该有可以识别的文件系统才行。

在线

页脚