linux4.11 problems with kernel device compilation (refer to blog and change)

Source: Internet
Author: User
Tags spl

AllWinnerH3 linux4.11 version of BSP download:
Https://pan.baidu.com/s/1mhU4a8K Password: b375
The H3-LINUX4.11_BSP directory is the required source code and compilation tool.

After downloading, first install the DTC tool in the Tools directory. Unpack Dtc-master.zip and execute "make && make install".

1 Configure the gcc-linaro-7.2.1 cross compiler. The new version of Uboot needs to be larger than the 6.x compiler.
After the configuration is ready to compile uboot and kernel source code.

2 Compiling the Uboot:
After unpacking u-boot source code, enter the source directory: ( under the root user to compile, otherwise it may be wrong )

1Make Arch=arm Cross_compile=arm-linux-gnueabihf-orangepi_lite_defconfig//Configure Uboot2Make Arch=arm cross_compile=arm-linux-gnueabihf-//compiling
There may be errors in compiling here, missing a pathon.h header file, errors such as,
Workaround: Enter the command yum install python-devel 3 4sudo ddif=./spl/sunxi-spl.bin Of=/dev/sdb bs=1k seek=8 //Burn write bl1 to sd card5sudo ddif=./u-boot.bin Of=/dev/sdb bs=1k seek= + //Burn write uboot.bin to sd card

After burning, the SD card boot board should be available normally, and the output information of Uboot on board can be received via UART.

3 Compiling the kernel:
After unpacking the Linux kernel source code, enter the kernel source directory operation:

1 make arch=arm cross_compile=arm-linux-gnueabihf-sunxi_defconfig  // Configure kernel 2 Make Arch=arm cross_compile=arm-linux-gnueabihf-zimage-j4   // compile kernel image 3 Create Arch=arm Cross_compile=arm-linux-gnueabihf-dtbs   // compiling a device tree file 45//  compiling the driver module

After completion, you can put the device tree file, kernel image, file system in the SD card partition.
The file system can follow the previous file system, or the BusyBox file system can be re-compiled.

//I'm here. All required files and file systems are placed in the first partition (EXT4 format) of the SD card, mounted on the/run/media/jk/linux/

1 / Copy the compiled device tree file into the SD card partition and rename it to Orangepi_lite.dtb2 sudo cp arch/arm/boot/dts/ sun8i-h3-orangepi-lite.dtb/run/media/jk/linux/ORANGEPI_LITE.DTB34//  Copy kernel image to SD card partition 5  sudo cp arch/arm/boot/zimage/run/media/jk/linux/zimage6 7 // Install the compiled driver module into the SD card partition 8 sudo make arch=arm  modules_install install_mod_path=/run/media/jk/linux

When the above steps are complete, you can start the system on the SD card board. After entering the uboot, you also need to set the environment variables:

1 // set Uboot boot system automatically after startup 2 " ext4load MMC 0:1 0x46000000 zimage; ext4load mmc 0:1 0x47000000 orangepi_lite.dtb; Bootz 0x46000000 0:0 0x47000000"345//  Set the kernel boot parameters. It is important to note that the SD card is the NO. 0 device on the uboot, but it becomes the 2nd device in the Linux kernel (which can be seen in the kernel log). 6 " root=/dev/mmcblk2p1 RW Console=ttys0,115200n8 "

Once the above steps are complete, you should be able to enter the file system.

linux4.11 problems with kernel device compilation (refer to blog and change)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.