当前位置:网站首页>Friendly zeropi uboot, kernel compilation,
Friendly zeropi uboot, kernel compilation,
2022-07-16 06:33:00 【gpp6025】
I tried to compile it before uboot After success , Bought zeropi The board finally arrived , intermittent , Finally compiled and ran successfully ,
although zeropi wiki It is directly provided on windos Completion under img and Burning tools , It can be done with one click .
But as a beginner linux In terms of Meng Xin , It's still necessary to toss about , In this tossing process, I also learned a lot of knowledge , Process twists and turns record sorting ,
The main process reference is wiki:http://wiki.friendlyarm.com/wiki/index.php/Building_U-boot_and_Linux_for_H5/H3/H2%2B/zh
However, there is still a missing link in the process of the above tutorial , Root directory creation .
One 、uboot compile
uboot yes git Branch version downloaded from ,
Downloaded nearly a dozen times, and finally successfully downloaded once :https://github.com/friendlyarm/u-boot.git -b sunxi-v2017.x --depth 1
With the previous exercise , So there is no big problem , Pass smoothly all the way .
Two 、Linux compile
linux4.14 edition Originally, I was going to download git Upper , But this has also been downloaded more than a dozen times without success , Just give up ,
Later, I found a close one on the Internet 4.11 Use the version .
https://www.cnblogs.com/edan/p/9330708.html
meanwhile linux Part of the compilation also refers to this link . After all, allwiner Of bsp It's also a smooth journey
3、 ... and 、busybox compile
In limine , Also for convenience , I found a resource to download casually on the Internet , But the compilation is not a hint :undefined reference to `stime'
Baidu explained the reasons and solutions :https://blog.csdn.net/o_alpha/article/details/113487031
Then I went to the official website to get the latest https://busybox.net/downloads/
Finally, I finally compiled .
Four 、 Record and solve the problems encountered
When everything is ready, burn , Power on and run , Various problems follow :
uboot Stage The board can correctly identify :zeropi But the device tree file shows sun8i-h3-nanopi-m1-pluse Of ,
At the same time, I didn't know at first uboot Also set , Direct hint Unrecognized file system , Forget the screenshot , Probably :unrecognized fs type
To configure bootcmd and bootargs After that, I finally went on , here we are Starting kernel Then there is no more .


I searched the Internet for answers , Also at the same time uboot Stage jump in linux The stage is also understood , And this Starting kernel Should be uboot The last output ,
People's questions on the Internet are in the back Also with uncom.... What decompression image Mirror image What prompt , It's different from mine , My picture above has prompted zImage also Device tree file Has read .
Later, when I learned about the device tree file , I really found a problem , that 4.11 bsp Linux In folder sun8i-h3-nanopi-m1-pluse Device tree and zeropi It's totally different .
zeropi wiki Electrical schematic diagram of http://wiki.friendlyarm.com/wiki/images/7/71/ZeroPi_20190731_Schematic.pdf
state led Of IO mouth It's not right .....
Later, I thought that since uboot Medium device tree file identification sun8i-h3-nanopi-m1-pluse, Is that uboot Device tree file in It should be available , and dtb Is the final binary , So it should be able to be used directly .
Follow this idea to directly replace Device tree file , Unexpectedly, he really continued to run .

But in the end, I made a mistake :end Kernel panic .... No working init found ... At first, I only saw the last error prompt , I didn't want to look back ,
Find it directly from the error prompt :No working init found But few of the same problems , Looked around a lot , However, the general positioning is related to the root file system , I also learned about a wave root file information by the way .
It's also a devil's errand , When turning up the print information of the kernel , Suddenly I saw mmc2 There are some problems here :waiting for root device /dev/mmcblk2p1
Partition recognition is p1 and p2 however p1 Kernel image and device tree file partition , The file area is Zoning is p2
So reset bootargs Parameters , Finally solved .

But there are new problems ,couldn’t execute it (error -8) I searched the Internet ,
There are two main solutions , There are also permissions elf Binary file format atypism , But it's useless for the author to try .
But from the error prompt : Documents exist , Combine the above sentence runaway loop modprobe binfmt-464c see It should be related to binary format .

Later, I found the reason in this :https://www.freesion.com/article/44611148946/

Recompile to solve , Then I finally entered the console , everything ok, Tested it usb mount , Finally, it's successful


边栏推荐
- STM32入门之GPIO详解
- 在中断程序中,需要清中断标志,作用是什么?
- C语言预处理指令大全
- 虚拟内存位置结构(保留区、代码区、栈区、堆区、字面值常量区)与变量修饰符(const、auto、static、register、volatile、extern)
- [paper notes] - conditional motion propagation - self supervised - CMP optical flow prediction - 2019-cvpr
- RT_thread 事件集的使用
- C语言动态内存分配原理以及堆区的使用(malloc、calloc、realloc、free)
- POJ 1330 Nearest Common Ancestors (lca)
- HDU 3592 World Exhibition (差分约束)
- 人事管理系统 c语言版
猜你喜欢
关于物联网毕设须知

第四章 STM32+LD3320+SYN6288+DHT11实现语音获取温湿度数值(上)
![[Verilog] [vivado] counter example](/img/3b/1503717fe5a19b114ce687808cc21d.png)
[Verilog] [vivado] counter example
![[paper notes] - VGg Network - 2014-iclr](/img/dd/1e013c6deb3ab95aea6f082392a7d0.png)
[paper notes] - VGg Network - 2014-iclr

Introduction to common memory
![[paper notes] - googlenet (inception-v1) - 2015-cvpr](/img/fc/c262ac8000c7fd4181daa557453560.png)
[paper notes] - googlenet (inception-v1) - 2015-cvpr

GAN:Generative Adversarial Nets——论文分析及其背后的数学概念

阅读论文——A cnn-rnn framework for crop yield prediction

第十二届蓝桥杯嵌入式模拟题

【云原生|中间件】开源 SPL 轻松应对 T+0
随机推荐
STM32 learning (Introduction)
OPENGL 3D图形开发小记,地形,光照,阴影等
u-boot 2021.01 版本编译
01机器学习:评估指标
HDU 2586 How far away ? (lca倍增法)
【 pcb】 quelques expériences sur la conception du matériel et le dessin des PCB dans le jeu électrique (mise à jour continue)
电脑常规操作
OpenGL ray pickup method
HDU 1522 Marriage is Stable (稳定婚姻匹配)
RTthread-线程的创建
[paper notes] - VGg Network - 2014-iclr
[paper notes] - RESNET - 2015-cvpr
stride for plane for YUV
The 12th Blue Bridge Cup embedded simulation questions
C语言位操作(适用于操作单片机寄存器)
Dhcp-master Automated Deployment
【学习记录】数据增强1
RT_thread互斥量的使用
HDU 3592 World Exhibition (差分约束)
嵌入式软件开发 STM32F407 按键输入 标准库版