some content, see the final description.The operation is as follows:#tar etc.tar.gz-c/xxx/rootfsXXX Indicates the directory where you want to make the rootfs.d) Compile the kernel module:The method is as follows:Enter the Linux kernel source directory (linux-2.6.29)#make Modules Arch=arm cross_compile=arm-linux-e) Install the kernel module:#make Modules_install Arch=arm Install_mod_path=/xxx/rootfsXXX Indicates the directory where you want to make the rootfs.f) Configuration BusyBoxGo to
=arm Install_mod_path=/home/rootfsThe installation was successful as follows:V. Compile and install BusyBoxBusyBox is a software that integrates more than 100 of the most commonly used Linux commands and tools. BusyBox includes simple tools such as LS, cat, and Echo, among others, including larger, more complex tools, such as grep, find, Mount, and Telnet. Some people refer to BusyBox as the Swiss Army knif
Cramfs. This is also a new method. More tests are required before embedded systems are used.
3. Create a directory containing all files
1. Create a directory rootfs to install the File System
2. Mkdir bin dev etc lib proc sbin tmp usr var
3. ln-fs bin/busybox linuxrc (using busybox)
4. to the system/dev, pack all the devices and copy them to dev (the most convenient way). Or, to use mknod to build the desi
is as follows:Enter the Linux kernel source directory (linux-2.6.29)#make Modules Arch=arm cross_compile=arm-linux-e) Install the kernel module:#make Modules_install Arch=arm Install_mod_path=/xxx/rootfsXXX Indicates the directory where you want to make the rootfs.f) Configuration BusyBoxGo to BusyBox directory to execute #make menuconfigEnter "Build BusyBox as a static binary" in
Export cross_compile= ... make arch=arm menuconfig
It is important to note here that the build BusyBox as a static binary (no shared libs) must be selected in the BusyBox Settings--> builds Options to indicate that BusyBox is compiled into a static library .
Other keep the default values, and then save
Make
Make Install
The _install folder will be generated
The
This compilation with my sister systemDownload BusyBox and Dropbear,[#73 #13:04:52 [email protected] ~/zybo_demo/xilinxfs] $wget--no-check-certificate https://git.busybox.net/busybox/ snapshot/busybox-1_23_1.tar.gz--2017-08-14 13:04:56-- https://git.busybox.net/busybox/snapshot/bu
Create a linux system running in the memory-general Linux technology-Linux programming and kernel information. The following is a detailed description. Background: Generally, during the linux system startup process, the bootloader written on the MBR loads the kernel and then loads the initial environment, that is, initrd. In initrd, generally, there is a script (or ELF File) called init or linuxrc. After the process is started, it will first read the content under/etc/inittab. This is an initial
into a file by using the Linux Source Code makeMenuconfig, then choose initial Ram filesystem and RAM disk (initramfs/initrd) support, enter our initramfs directory in initramfs source file (s), and then make bzimage.In this way, the kernel has only one file, and you do not need to specify initramfs.
Next we will introduce them in sequence:
Experiment 1: Create a traditional initrd
1.
Static compilation of busybox to generate the _ install directory
first-etcd-Key
Hello World
On core-02, you can read the value corresponding to first-etcd-key:
[Email protected] ~ $ Etcdctl get first-etcd-Key
Hello World
You can also directly provide an API to read the corresponding key:
[Email protected] ~ $ Curl-l http: // 127.0.0.1: 4001/V1/keys/first-etcd-Key
{ Quot; Action quot;: quot; get quot;, quot; Key quot;: quot;/first-etcd-Key quot;, quot; Value quot;: quot; Hello World quot;, quot; index quot;: 2264}
Use fleetctl to manage service
1. Create a directory
(1) mkdir busybox-rootfs
CD busybox-rootfs
Mkdir bin Dev etc home lib MNT opt proc root sbin sys tmp usr VaR
(2) Compile commands and library files compiled from busybox into the corresponding folder.
(3) configure the inittab file under the etc directory
: Sysinit:/etc/init. d/rc. s
: Once:/usr/sbin/telnetd
: Respawn:/sbin/Getty-l ttys0 115
Kubelet nodes in the cluster need to be modified# grep ‘KUBELET_ADDRESS‘ /etc/kubernetes/kubelet KUBELET_ADDRESS="--address=192.168.115.5 --cluster-dns=10.254.16.254 --cluster-domain=cluster.local"# systemctl restart kubeletV. Run a busybox and curl for testing# cat busybox.yaml apiVersion: v1kind: Podmetadata: name: busyboxspec: containers: - name: busybox image: docker.io/
principle is: Linux call so library files, the search path is the current path, and then the system Lib directory. However, a ld_preload system variable is provided to change this order. When the ld_preload is set, the order in which the libraries are loaded is changed to:
The search path is: ld_preload, current path, and then system Lib directoryOf course, this is not the solution, you can also use the online recommendation of another method BusyBox
Su no longer has the above part, so any process can use Su to log in, some of the Android program to use root permissions may be used similar to (this is also a part of the Superuser code):
Copy Code code as follows:
Process process = Runtime.getruntime (). EXEC ("su");
DataOutputStream OS = new DataOutputStream (Process.getoutputstream ());
Os.writebytes ("mount-oremount,rw/dev/block/mtdblock3/system\n");
Os.writebytes ("BusyBox
Start by creating a file system folder that forms the most basic file system directoryvar# mkdir Usr/bin usr/lib usr/sbin lib/modulesCreate a device file# CD rootfs/dev# mknod-m 666 console C 5 # mknod-m 666 NULL C 1 3Compiling BusyBoxDownload the BusyBox tool from http://www.busybox.net/downloads/. Here we download the latest version: BUSYBOX-1.24.2.TAR.BZ2Decompression
To add a serial login password you need to modify the configuration of the/etc/inittab file, but different development board situation is not the same, some do not have this file, BusyBox will check whether the/etc/inittab file exists, if this file does not exist, The BusyBox will use the default Inittab configuration. It will primarily set default actions for system reboots, system hangs, and init restart.
First, Rootfs production:The root file system is the first file system used by Linux to boot, just like the file directory on a PC1. Create the directory of the root file system (directory name Random)mkdir RootfsCD Rootfsmkdir Bin Dev etc lib home proc sbin sys usr MNT tmp varmkdir usr/bin usr/lib Usr/sbin lib/modules2. Create a Device fileCD dev/Mknod-m 666 Console C 5 1Mknod-m 666 NULL C 1 33. Configure BusyBox (Linux is a set of commands and tools
Cramfs Making Method
1. Compile Cramfs production tool Mkcramfs
A. Extract cramfs-1.1.tar.bz2, create cramfs-1.1 folder
B. Use a terminal to enter the cramfs-1.1 folder, run make, compile Cramfs tools
C. Compile and generate Mkcramfs and cramfsck two tools to copy the two tools to the/usr/bin directory.
2. Compile BusyBox
A. Extract busybox-1.20.2.tar.bz2, create busyb
Article Title: describes the 14th step of the BabyLinux production process. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Directory
1. What is BabyLinux?
2. Why is such a linux
3. Who should read this document?
4. Knowledge
V. Introduction to linux boot process
6. Compile the kernel
7. Compile busybox
8. Creat
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.