This shows you the differences between two versions of the page.
|
tutorials:dvk521:documentations:a20:kernel_porting_and_configuration [2013/12/10 15:01] waveshare created |
tutorials:dvk521:documentations:a20:kernel_porting_and_configuration [2014/03/13 14:40] (current) waveshare |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ==== Kernel Porting ==== | ==== Kernel Porting ==== | ||
| - | Get the linux kernel source code [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/COMMON/|linux-sunxi-sunxi-3.4.61.tar.gz]], | + | The zipped kernel linux-sunxi-sunxi-3.4.61.tar.gz can be found on [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/COMMON/|linux-sunxi-sunxi-3.4.61.tar.gz]], the kernel config file can be found on [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/kernel%20configs/|cubieboard2_defconfig]] |
| Or can be obtained from the internet: | Or can be obtained from the internet: | ||
| https://github.com/linux-sunxi/linux-sunxi/releases , | https://github.com/linux-sunxi/linux-sunxi/releases , | ||
| Line 12: | Line 12: | ||
| #tar -xzvf linux-sunxi-sunxi-3.4.61.tar.gz | #tar -xzvf linux-sunxi-sunxi-3.4.61.tar.gz | ||
| Now we get the original linux-sunxi-sunxi-3.4.61 source code, rename it as linux-sunxi-sunxi-3.4.61_A20, as shown in the picture below: | Now we get the original linux-sunxi-sunxi-3.4.61 source code, rename it as linux-sunxi-sunxi-3.4.61_A20, as shown in the picture below: | ||
| - | {{..:document-5_1.jpg}} | ||
| + | {{:tutorials:dvk521:documentations:a20:a20_1.jpg}} | ||
| - | === Assign the cross compiler === | + | === Assign the cross compiler === |
| - | The purpose of kernel porting is to run the linux-sunxi-sunxi-3.4.61 on Cubieboard. | + | |
| Modify the Makefile under root directory: | Modify the Makefile under root directory: | ||
| - | #cd linux-sunxi-sunxi-3.4.61 | + | #cd linux-sunxi-sunxi-3.4.61_A20 |
| #vi Makefile | #vi Makefile | ||
| Edit the following lines: | Edit the following lines: | ||
| Line 30: | Line 29: | ||
| ARCH specifies the target platform as arm, CROSS_COMPILE assigns the cross compile tool chain. As shown in the picture below: | ARCH specifies the target platform as arm, CROSS_COMPILE assigns the cross compile tool chain. As shown in the picture below: | ||
| - | {{..:document-5_2.jpg}} | + | {{:tutorials:dvk521:documentations:a20:a20_2.jpg}} |
| Note: the vim editor is recommended. | Note: the vim editor is recommended. | ||
| Line 40: | Line 39: | ||
| === Copy the default config file === | === Copy the default config file === | ||
| Under the root directory, enter: | Under the root directory, enter: | ||
| - | #make sun4i_defconfig | + | # cp ../cubieboard2_defconfig .config |
| A hidden .config file will be generated under the root directory. | A hidden .config file will be generated under the root directory. | ||
| Line 47: | Line 46: | ||
| #make menuconfig | #make menuconfig | ||
| Config the kernel on the popup window, as shown in the picture below: | Config the kernel on the popup window, as shown in the picture below: | ||
| - | {{..:document-5_3.jpg}} | + | |
| + | {{:tutorials:dvk521:documentations:a20:a20_3.jpg}} | ||
| === Compile the kernel === | === Compile the kernel === | ||
| Line 53: | Line 53: | ||
| #make uImage | #make uImage | ||
| It will take much time to complete the compiling. | It will take much time to complete the compiling. | ||
| - | When completed, the compressed kernel image will be generated under linux-sunxi-sunxi-3.4.61/arch/arm/boot directory. | + | When completed, the compressed kernel image will be generated under linux-sunxi-sunxi-3.4.61_A20/arch/arm/boot directory. |
| <WRAP noprint> | <WRAP noprint> | ||
| Line 59: | Line 59: | ||
| </WRAP> | </WRAP> | ||
| - | |||