当前位置:网站首页>Buildroot system for making raspberry pie cm3
Buildroot system for making raspberry pie cm3
2022-07-05 08:10:00 【Nanbolwan】
I wrote an article about how to pass buildroot Make raspberry pie CM3 System image file of , The whole compilation process is carried out according to the previous article, and you can get an image file smoothly (sdcard.img). But this file is burned to sd After the card can be in raspberry pie 3+ Start normally on the board, but switch to the actual raspberry pie CM3 Can't start when on the board .
I have consulted many materials on the Internet , But it really involves CM3 There is little content . I can only search my own articles , After a long time of research, I finally successfully compiled and ran . The solution process is recorded below :
1. Why raspberry pie 3+ and CM3 Of CPU It is the same compiled system that can be started in the former but cannot be started in the latter ?
This question has been lingering in my brain since I first encountered this problem , I know that as long as I find the answer to this problem, the problem may be solved . So I burned my compiled system to SD In addition, the card will burn the system of the official website to another SD In the card , stay windows Compare the differences between the two in the system .
The obvious difference is that there are bcm2710-rpi-cm3.dtb File this file does not exist in our own system .
After consulting the materials, I learned ,*.dtb The file in Linux The function of system startup is to define the board level device tree , To be clear, this document tells CPU The system I am currently starting contains those peripherals , There are several I2C,UART etc. . although CPU identical , But raspberry pie 3+ and CM3 Different peripherals . So during system startup uboot The loaded device tree file is different . So when we start our own system uboot Unable to find bcm2710-rpi-cm3.dtb This file .
Then I put the official system bcm2710-rpi-cm3.dtb Can I copy the file to my compiled system ?
The answer is no , If you can, there is no content below , I tried, and it turned out that I couldn't . as a result of , Device tree in overload There are a series of files in the folder to support . In fact, what we lack is not only bcm2710-rpi-cm3.dtb A file , But a series of related documents to define CM3 External equipment of .
How to solve this problem ? Don't buildroot You can't make it CM3 Your system ?
2. Find a way out
The first command we execute when compiling the system
make raspberrypi3_64_defconfig
I guess the relevant configuration may be raspberrypi3_64_defconfig This configuration file reflects . So I checked this file .
BR2_aarch64=y
BR2_cortex_a53=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_SYSTEM_DHCP="eth0"
# Linux headers same as kernel, a 5.4 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,9a1dd17906692f1ab76e45b9f59976b063b37034)/linux-9a1dd17906692f1ab76e45b9f59976b063b37034.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
# Build the DTB from the kernel sources
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2837-rpi-3-b"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_RPI_FIRMWARE=y
# Required tools to create the SD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
# Filesystem / image
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay"
So I found that there are relevant definitions in this file , So I copied it to buildroot In this file under the root directory broadcom/bcm2837-rpi-cm3. Reconfigure the compiler . But it didn't work , It is found that there is still no bcm2710-rpi-cm3.dtb This file .
3. Once gave up using buildroot
I once gave up using buildroot, Instead, I try to recompile the raspberry kernel and then upgrade the kernel to the official system to achieve the effect of cutting the kernel module . If readers want to know about this aspect, they can check the relevant tutorials on the official website :https://www.raspberrypi.org/documentation/linux/kernel/building.md
I found the following steps when trying the above tutorial :
sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
sudo cp arch/arm64/boot/Image mnt/fat32/$KERNEL.img
sudo cp arch/arm64/boot/dts/broadcom/*.dtb mnt/fat32/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
sudo cp arch/arm64/boot/dts/overlays/README mnt/fat32/overlays/
sudo umount mnt/fat32
sudo umount mnt/ext4
So I learned that , After the system is compiled, the kernel source code arch/arm64/dts/broadcom/ The following part of and generates all dtb, Just choose which device trees are included in the process of making the image . Inspired by this , I realized that there was no problem with my operation in the second step , But there must be some problems during the operation, which led to the final failure .
4. An unexpected discovery
I'm trying to reconfigure buildroot when , perform make menuconfig after
stay kernel I found raspberrypi3_64_defconfig The path of the configuration file is in buildroot In the root directory configs In the catalog raspberrypi3_64_defconfig file . That is to say, we implement make raspberrypi3_64_defconfig The configuration file that works when this command is configs Under the table of contents , I changed the root directory before raspberrypi3_64_defconfig The document didn't work . Try again and finally succeed !!
5. summary buildroot Make raspberry pie CM3 Steps for
1. change configs In the catalog raspberrypi3_64_defconfig The changed file is as follows :
BR2_aarch64=y
BR2_cortex_a53=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_SYSTEM_DHCP="eth0"
# Linux headers same as kernel, a 5.4 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,9a1dd17906692f1ab76e45b9f59976b063b37034)/linux-9a1dd17906692f1ab76e45b9f59976b063b37034.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
# Build the DTB from the kernel sources
BR2_LINUX_KERNEL_DTS_SUPPORT=y
# Add... After this parameter broadcom/bcm2837-rpi-cm3
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2837-rpi-3-b broadcom/bcm2837-rpi-cm3"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_RPI_FIRMWARE=y
# Required tools to create the SD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
# Filesystem / image
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay"
2. stay buildroot Execute... In the root directory make raspberrypi3_64_defconfig.
3. perform make menuconfig Just follow my previous blog
https://blog.csdn.net/BLUCEJIE/article/details/104653770
边栏推荐
- Slist of linked list
- Network port usage
- About yolov3, conduct map test directly
- Zero length array in GNU C
- [trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
- Compilation warning solution sorting in Quartus II
- C WinForm [exit application] - practice 3
- Hardware and software solution of FPGA key chattering elimination
- OLED 0.96 inch test
- Gradle复合构建
猜你喜欢
Ble encryption details
DokuWiki deployment notes
FIO测试硬盘性能参数和实例详细总结(附源码)
Beijing Winter Olympics opening ceremony display equipment record 3
【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
Factors affecting the quality of slip rings in production
Summary -st2.0 Hall angle estimation
Interview catalogue
L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
随机推荐
Explication de la procédure stockée pour SQL Server
Circleq of linked list
Talk about the circuit use of TVs tube
Shell脚本基本语法
Basic embedded concepts
C WinForm [view status bar -- statusstrip] - Practice 2
About yolov3, conduct map test directly
Detailed explanation of SQL server stored procedures
DokuWiki deployment notes
Fundamentals of C language
The firmware of the connected j-link does not support the following memory access
List of linked lists
My-basic application 1: introduction to my-basic parser
Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
Live555 push RTSP audio and video stream summary (I) cross compilation
Train your dataset with yolov4
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
Network communication process