IMX6 L3035 Compilation Manual

Mingyuan Zhirui MY-IMX6L3035 Compilation Manual

March 15, 2018, 10:03 myzr123

This guide provides a step-by-step procedure for compiling the U-Boot and Linux kernel for the Mingyuan Zhirui MY-IMX6L3035 platform. It includes instructions on preparing source code packages, setting up the cross-compilation environment, and building the system components.

Prepare the Source Package

Version 3.0.35 of the source code is required. The following files are needed:

  • U-Boot Source Code: u-boot-2009.08--svn*.tar.xz
  • Kernel Source Code: linux-3.0.35--svn*.tar.xz
  • Cross Compiler Tool: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2

IMX6 L3035 Compilation Manual

1. Create Working Directories

Create the following directories in your home directory:

  • ~/my-imx6 – as the main working directory
  • ~/my-imx6/02_source/imx_3.0.35_4.1.0 – as the source code directory
  • ~/my-imx6/03_tools – as the toolchain directory

Use the following commands:

$ mkdir ~/my-imx6
$ mkdir ~/my-imx6/02_source/imx_3.0.35_4.1.0
$ mkdir ~/my-imx6/03_tools

2. Copy the Source Packages to the Development Host

Copy the source packages from the network disk to the appropriate directories:

  • 02_source to ~/my-imx6/02_source/imx_3.0.35_4.1.0
  • 03_tool/toolchain to ~/my-imx6/03_tools

3. Extract the Source Packages

Extract the U-Boot and kernel source code using the following commands:

$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0
$ tar xvf u-boot-2009.08--svn*.tar.xz
$ tar xvf linux-3.0.35--svn*.tar.xz

Extract the cross-compiler tool:

$ cd ~/my-imx6/03_tools/
$ tar jxvf gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2

4. Configure the Development Environment

Update the package list and install necessary tools:

$ sudo apt-get update
$ sudo apt-get -y install aptitude
$ sudo aptitude -y install ia32-libs
$ sudo apt-get -y install uboot-mkimage
$ sudo aptitude -y install ncurses-dev

5. Set Up Environment Variables

Create a configuration file to set the architecture and cross-compiler path:

$ echo "export ARCH=arm" >> ~/my-imx6/03_tools/myimx6_3035_build_env
$ cd ~/my-imx6/03_tools/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/
$ sed -i "$aIMX6_GCC462_PATH=$PWD" ~/my-imx6/03_tools/myimx6_3035_build_env
$ sed -i "$aexport CROSS_COMPILE=\$IMX6_GCC462_PATH/arm-none-linux-gnueabi-" ~/my-imx6/03_tools/myimx6_3035_build_env

6. Compile U-Boot

Navigate to the U-Boot source directory and run the build:

$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0/u-boot-2009.08/
$ source ~/my-imx6/03_tools/myimx6_3035_build_env
$ make distclean
$ make myimx6ek200_6q_config
$ make -j4

The compiled file will be u-boot.bin.

7. Compile the Kernel

Navigate to the kernel source directory and run the build:

$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0/linux-3.0.35/
$ source ~/my-imx6/03_tools/myimx6_3035_build_env
$ make distclean
$ make myimx6_defconfig
$ make uImage -j4
$ make -j4

The kernel image will be located at arch/arm/boot/uImage.

8. Compile a Simple Application

Create a simple C application, such as hello.c:

#include <stdio.h>
int main(int argc, char** argv) {
    printf("Hello, MYZR!");
    return 0;
}

Compile it using the cross-compiler:

$ ${CROSS_COMPILE}gcc hello.c -o hello.out

9. Prepare the File System

Extract the root file system and add your application:

$ mkdir ~/my-imx6/04_rootfs
$ cp rootfs-linux.tar.bz2 ~/my-imx6/04_rootfs/
$ tar jxvf rootfs-linux.tar.bz2 -C rootfs
$ cp hello.out rootfs/app_test/
$ tar cjf rootfs-linux.tar.bz2 -C rootfs .

This guide covers the essential steps to compile and prepare the system for the MY-IMX6L3035 platform. Ensure all steps are followed carefully to avoid errors during the build process.

USB4 80Gbps Data Cable

Usb4 80Gbps Data Cable,Tpe Pd Fast Cherger Cable,Thunderbolt4 80Gbps Data Cable,High-Speed Data Cable

Dongguan Pinji Electronic Technology Limited , https://www.iquaxusb4cable.com