IMX6 L3035 Compilation Manual

Mingyuan Zhirui MY-IMX6L3035 Compilation Manual

March 15, 2018, 10:03 myzr123

This guide provides a step-by-step process for compiling the u-boot and kernel for the Mingyuan Zhirui MY-IMX6L3035 platform. The following packages are required:

Source Code Preparation (Prepare Source Code Package)

  • u-boot source code (u-boot-source-code): File name: u-boot-2009.08--svn*.tar.xz
  • Kernel source code (kernel-source-code): File name: linux-3.0.35--svn*.tar.xz
  • Cross compiler tool (cross-compiler-tool): File name: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2

IMX6 L3035 Compilation Manual

1) Create a Working Directory

Create the following directories on your Linux development host:

  • ~/my-imx6 as the working directory
  • ~/my-imx6/02_source/imx_3.0.35_4.1.0 as the source code directory
  • ~/my-imx6/03_tools as the tool 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 Package to the Development Host

Copy the following from the network disk to your local directories:

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

3) Decompress the Source Packages

Extract the source files using the following commands:

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

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

4) Configure the Development Environment

Install the necessary packages and tools:

  • aptitude and ia32-libs (if you're using a 64-bit system)
  • uboot-mkimage for u-boot image creation
  • ncurses-dev for menuconfig support

Use these commands:

$ 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) Configure Environment Variables

Create a configuration file to set up environment variables:

$ 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 following commands:

$ 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 myimx6ek200_6q_config
$ make -j4

The compiled file u-boot.bin will be in this directory.

7) Compile the Kernel

Go to the kernel source directory and run:

$ 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 myimx6_defconfig
$ make uImage -j4

The kernel image arch/arm/boot/uImage is the target file.

8) Compile a Linux Application

Create an application like 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) File System Setup

Extract the root filesystem and add your application:

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

This guide covers the full compilation workflow for the MY-IMX6L3035 board, including setting up the environment, compiling u-boot and kernel, and preparing the root filesystem. Make sure to follow each step carefully and check for any errors during the process.

Recommended Products

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