当前位置:网站首页>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
边栏推荐
- My-basic application 2: my-basic installation and operation
- Sql Server的存储过程详解
- The firmware of the connected j-link does not support the following memory access
- Soem EtherCAT source code analysis II (list of known configuration information)
- Arduino uses nrf24l01+ communication
- Simple design description of MIC circuit of ECM mobile phone
- Solutions to compilation warnings in Quartus II
- Fundamentals of C language
- Step motor generates S-curve upper computer
- 【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
猜你喜欢

Process communication mode between different hosts -- socket

【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl

Consul安装

Explain task scheduling based on Cortex-M3 in detail (Part 2)

Connection mode - bridge and net

Record the opening ceremony of Beijing Winter Olympics with display equipment

More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
![[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen](/img/43/7f8becc09c5ce7fe401bed140608f3.jpg)
[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen

My-basic application 2: my-basic installation and operation

Let's briefly talk about the chips commonly used in mobile phones - OVP chips
随机推荐
Define in and define out
solver. Learning notes of prototxt file parameters
Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
[paper reading] the latest transfer ability in deep learning: a survey in 2022
Compilation warning solution sorting in Quartus II
Hardware and software solution of FPGA key chattering elimination
WiFi wpa_ Detailed description of supplicant hostpad interface
Correlation based template matching based on Halcon learning [II] find_ ncc_ model_ defocused_ precision. hdev
Stablq of linked list
The research found that the cross-border e-commerce customer service system has these five functions!
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine
UEFI development learning 2 - running ovmf in QEMU
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
Explain task scheduling based on Cortex-M3 in detail (Part 2)
Working principle and type selection of common mode inductor
如何将EasyCVR平台RTSP接入的设备数据迁移到EasyNVR中?
L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
Detailed explanation of pragma usage
FIO测试硬盘性能参数和实例详细总结(附源码)