In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how the raspberry pie compiles the source code of the operating system". It is easy to understand and well organized. I hope it can help you solve your doubts. Let me lead you to study and learn the article "Raspberry pie how to compile the source code of the operating system".
1. Obtain the source code required for upgrade
1) download address:
Official website:
All the open source software of raspberry pie is listed above:
Firmware: raspberry pie cross-compiled binary kernels, modules, libraries, bootloaderlinux: kernel source code tools: tools needed to compile the kernel and other source code-cross compilers, etc.
We only need the above three documents, and we can learn about the following projects.
Documentation: raspberry pie offline help documents, teach you how to use and deploy raspberry pie (raspberry pie official use tutorial) userland:arm end user space some application library source code-vc video hard floating point, EGL, mmal, openVG and other hats:Hardware Attached on Top, raspberry pie B+ board expansion board material maynard: a gtk written desktop environment scratch: a simple, visual programming environment noobs: a raspberry pie image management tool It allows you to deploy multiple mirror weston on a raspberry pie: an application target_fs: raspberry pie minimum file system, using busybox to make quake3: Raytheon Hammer 3 wired development source firmwareb
2) download method:
A. download the web page directly:
Click to the project you need to download, select the version in the upper left corner, and there is a download ZIP button on the right that can be downloaded directly. (after the download is completed, there is an error in the decompression prompt in linux, and windows is very slow. It is recommended not to decompress the kernel in windows environment, so I do not recommend this method.)
B. Download using git
$mkdir raspeberrypi_src$ cd raspberrypi_src$ git clone git://github.com/raspberrypi/firmware.git$ git clone git://github.com/raspberrypi/linux.git$ git clone git://github.com/raspberrypi/tools.git
You will get three folders: firmware, linux, and tools.
2. Compile and extract the kernel and its modules
1) get the kernel configuration file
Run in a running raspberry pie:
$ls / proc/
You can see a file called config.gz, which is the current raspberry pie configuration options record file. We will copy it out and put it in our kernel source directory tree.
$cp / proc/config / home/pi
Here we use the samba handed in earlier to copy out and copy into the kernel source directory. People who are not familiar with it can refer to the previous article.
Execute under the linux kernel source code:
$zcat config.gz > .config
2) configure and compile the kernel
A. Modify kernel source code makefile ARCH type and compiler path
$vi Makefile + 195
Find the similar code above and change it as shown in the figure
B. View and modify configuration options
$make menuconfig
The following interface can appear
If you do not modify it, just select exit (pay attention to using the keyboard)
C. Compile the kernel image
$make
You can see a file called zImage in the arch/arm/boot directory, which is our new kernel.
But raspberry pie needs to be mirrored in another format and needs to be processed by executing the following command
$cd tools/mkimage$./imagetool-uncompressed.py. /.. / linux/arch/arm/boot/zImage
You can see a file called kernel.img under the current folder, which is the new kernel we need.
D. Extract modules
In the previous step, not only the kernel source code has been compiled, but also some module files have been compiled. Let's extract it here.
$cd raspberrypi_src$mkdir modules$cd linux$ make modules_install INSTALL_MOD_PATH=../modules
You can get the module files we need in modules.
2. Upgrade kernel, Firmware and lib of RPi
Unplug the SD card and plug it into the computer (you can use the card reader)
1) upgrade the kernel
Copy the newly compiled kernel into the SD card and rename it to: kernel_new.img
Open the boot directory
Find the config.txt file and add the line: kernel=kernel_new.img
2) upgrade boot
Copy the following files under the firmware/boot/ directory into the SD card boot directory: fbootcode.bin fixup.dat fixup_cd.dat start.elf
3) update the vc library and kernel modules
Copy the modules/lib/modules compiled in step 3 d into the raspberry pie file system / lib
The above is all the contents of the article "how to compile the source code of the operating system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.