UBoot with iMX6 - Part 1

UBoot On iMX6 - Part 1

This tutorial series just including u-boot, no kernel and image will be mentioned.

Platform

  1. iMX6 customized board
  2. Sabre SD platform
  3. LPDDR2 bases
  4. RS232 output
  5. Both Windows and Ubuntu PC is needed.

Introduction

What is u-boot?
For me, I'll consider it as a BIOS or boot loader in short.
For detial you can see the ref. below:

In this tutorial I'll focus on how uboot setup the controller and drive DRAM up for used.
With minimum devices, only processer, DRAM and output / control with RS232,
we can bootup the board and load OS with very simple hardware.

If you wondering the setting of other devices like PCIe, USB .etc. you can work on those after 
you finished or understand this series.
Cuz this are the minimum requirement of a system, after this series you can understand tutorial like
THIS rapidly.
(Chinese)

Create a u-boot image

Ok! Let's start it!

To build a uboot image, we need Ubuntu bases PC an with cross-compile tool installed.
sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
Note: DON'T installed gcc5 version! It will failed without a doubt!

Add system path with export
export CROSS_COMPILE = arm-linux-gnueabihf-

export ARCH = arm

Download uboot source code, from NXP git or freescale git.
Since my board is MX6q series, a pretty old one, I download from freescale using version of 2015.
here is the index of the source code(I already compile it so...some extra stuff ):

Note: ver.2013 & 2015 & 2017 are all with different source code, make sure which version really fit your requirements! for me, it's 2015.

In order to select right config file for ur platform,
the default config of boards can be found in ./configs/
you have to make config with:
#make <your_platform_config> 
make mx6qsabresd_defconfig
and run make to compile
make
Final stuff is dd your image to the SD card, since we used Sabre SD platform.
dd if=u-boot.imx of=/dev/<your-sd-card> bs=1k seek=1
sync

build_uboot.sh

Here provide my short script after all setup is done.
export CROSS_COMPILE = arm-linux-gnueabihf-
export ARCH = arm
make distclean;
make mx6qsabresd_defconfig
make -j 12
make mx6qsabresd_defconfig make -j12 This is the briefly tutorial that NXP tell you. (Link)
But, if you using customized embedded board like me, the uboot will output nothing at all.

So... that's why we moved on to the next stage!
Customized your uboot! Let's mess up the config file! lol.

To be continues...
                                                                                                                     
                                                                                                                                           provide

Comments

Popular posts from this blog

Install chrome on CentOS

Can't find pip3 ? Here is it!