Linux kernel cutting transplant learn to share

22. The core crop transplant
kernel source code is a collection of a number of modules of code!
Each module code is a lot of .c and .h files of!
The kernel is the set of all functions of the system!
Kernel image is a binary file, is a large executable program!

Core migration steps:
1) copy the source packet to the next kernel / work / linux system directory, and extract!
Command:
cp /mnt/hgfs/xxxxx/linux-3.5.buildok.tar.gz / Work /
cd / Work
tar XF Linux-3.5.buildok.tar.gz
2) After extraction is completed, enter the unpacked directory.
Command:
CD-Linux 3.5 of /
. 3) cut kernel source, remove unwanted module, reservation module need!
Command:
the make Clean
the make distclean
cp .config tiny4412_linux_defconfig
the make menuconfig
to enter the configuration menu:
System of the type
-> Support TrustZone-Enabled Trusted Execution Environment [remove the option]
to save and exit!
4) compiled kernel source, generating a kernel image zImage. Path: arch / arm / boot / zImage
command:
the make -j8
5) into the directory where the kernel image, write a script burn, burn zImage mirror!
Command:
cd Arch / ARM / the Boot /
vim sd_fusing.sh
Editor:
#!/bin/bash

if [ -e /dev/sdb ]
then
echo fusing...
dd iflag=dsync oflag=dsync if=./zImage of=/dev/sdb seek=1057
else
echo /dev/sdb is not find!
exit -1
fi

echo fused OK!!!

chmod 777 sd_fusing.sh
burn: Insert the SD card
./sd_fusing.sh
6) burning is complete, remove the SD card!

Added:
kernel source code is the default configuration file: .config
kernel configuration There are three ways:
Method 1: In a terminal function inquiry!
make config
Method 2: Qt kernel configuration menu style
make xconfig
Method 3: sketched out by the shell script kernel configuration menu
the make menuconfig
menuconfig menu Usage:
down key: Switch between the options
left and right keys: switching operation mode between a <select exit help>
spacebar: The option to select <select / Clear>
enter key: Action <enter the submenu (select), return to the previous menu (exit)>

Embedded Linux learning exchange group: 195 723 435
kernel source code is a collection of a number of modules of code!
Each module code is a lot of .c and .h files of!
The kernel is the set of all functions of the system!
Kernel image is a binary file, is a large executable program!

Kernel packages: linux-3.5.buildok.tar.gz
kernel migration steps:
1) copy the source packet to the next kernel / work / linux system directory, and extract!
Command:
cp /mnt/hgfs/xxxxx/linux-3.5.buildok.tar.gz / Work /
cd / Work
tar XF Linux-3.5.buildok.tar.gz
2) After extraction is completed, enter the unpacked directory.
Command:
CD-Linux 3.5 of /
. 3) cut kernel source, remove unwanted module, reservation module need!
Command:
the make Clean
the make distclean
cp .config tiny4412_linux_defconfig
the make menuconfig
to enter the configuration menu:
System of the type
-> Support TrustZone-Enabled Trusted Execution Environment [remove the option]
to save and exit!
4) compiled kernel source, generating a kernel image zImage. Path: arch / arm / boot / zImage
command:
the make -j8
5) into the directory where the kernel image, write a script burn, burn zImage mirror!
Command:
cd Arch / ARM / the Boot /
vim sd_fusing.sh
editor:
# / bin / bash!

if [ -e /dev/sdb ]
then
echo fusing...
dd iflag=dsync oflag=dsync if=./zImage of=/dev/sdb seek=1057
else
echo /dev/sdb is not find!
exit -1
fi

echo fused OK!!!

chmod 777 sd_fusing.sh
burn: Insert the SD card
./sd_fusing.sh
6) burning is complete, remove the SD card!

Added:
kernel source code is the default configuration file: .config
kernel configuration There are three ways:
Method 1: In a terminal function inquiry!
make config
Method 2: Qt kernel configuration menu style
make xconfig
Method 3: sketched out by the shell script kernel configuration menu
the make menuconfig
menuconfig menu Usage:
down key: Switch between the options
left and right keys: switching operation mode between a <select exit help>
spacebar: The option to select <select / Clear>
enter key: Action <enter the submenu (select), return to the previous menu (exit)>

Guess you like

Origin blog.51cto.com/13258379/2481849