Difference between revisions of "RK3066-U-Boot"

From Rockchip open source Document
Jump to: navigation, search
(Created page with " U-Boot Guide = Download U-Boot = == Upstream U-Boot == You can clone the u-boot repository by running: <pre>git clone git://git.denx.de/u-boot.git</pre> Alternatively you...")
 
(Replaced content with "  ")
 
Line 1: Line 1:
 
U-Boot Guide
 
 
= Download U-Boot =
 
 
== Upstream U-Boot ==
 
 
You can clone the u-boot repository by running:
 
<pre>git clone git://git.denx.de/u-boot.git</pre>
 
 
Alternatively you can use u-boot-rockchip instead which may with some patches not get in mainline:
 
<pre>git clone git://git.denx.de/u-boot-rockchip.git</pre>
 
 
&nbsp;
 
 
== Rockchip U-Boot ==
 
 
You can clone the u-boot repository by running:
 
<pre>git clone https://github.com/rockchip-linux/u-boot.git
 
</pre>
 
 
&nbsp;
 
 
= Configure U-Boot =
 
 
First you need to choose a correct defconfig for your board; (defconfig on uboot/configs)
 
<pre>make CROSS_COMPILE=arm-linux-gnueabi- kylin-rk3036_defconfig</pre>
 
 
You may need to change the U-Boot function/feature support by modify the defconfig file or,
 
 
there is also menuconfig to play with settings if you feel like it:
 
<pre>make CROSS_COMPILE=arm-linux-gnueabi- menuconfig</pre>
 
 
&nbsp;
 
 
= Build U-Boot =
 
 
== Get a toolchain ==
 
 
If you haven't done so before, get a suitable&nbsp;toolchain&nbsp;installed and add it&nbsp;to your PATH.
 
 
In Ubuntu 16.04, you can use below command to install cross compiler for armv7:
 
<pre>sudo apt-get install gcc-arm-linux-gnueabi
 
</pre>
 
 
&nbsp;
 
 
== Start Build ==
 
<pre>make CROSS_COMPILE=arm-linux-gnueabi-
 
</pre>
 
 
In order to support debug in ARM DS-5, you may need add ctags in make command:
 
<pre>CFLAGS='-gdwarf-3'</pre>
 
 
For trust support, we are using FIT image with 'mkimage' cmd in Makefile and its script defined in defconfig:
 
<pre>make u-boot.itb
 
</pre>
 
 
== &nbsp; ==
 
 
== Generate Image: ==
 
<pre>tools/mkimage -n rk3036 -T rksd -d spl/u-boot-spl-nodtb.bin  rk3036_idb.img
 
</pre>
 
<pre>cat u-boot.bin >> rk3036_idb.img
 
cp rk3036_idb.img  ../out/u-boot/</pre>
 
 
&nbsp;
 
 
= Install U-Boot =
 
 
Rockchip SoCs's bootrom need special format named IDBlock at special offset 0x40&nbsp;block for boot, so we need to package&nbsp;SPL(or Rockchip miniloader) &nbsp;in IDB format.
 
 
Rockchip bootrom supports SPL back to bootrom and bootrom load the U-Boot, so the SPL for Rockchip SoCs can option to back to bootrom, usually decided by if the IRAM is enough&nbsp;for driver to load U-Boot.&nbsp;
 
 
<small>(Ensure the board is in&nbsp;maskrom mode.&nbsp;[http://opensource.rock-chips.com/wiki_Rockusb#Maskrom_mode maskrom],&nbsp;Not&nbsp;[http://opensource.rock-chips.com/wiki_Rockusb#Miniloader_Rockusb.C2.A0mode rockusb]! )</small>:
 
<pre>sudo rkdeveloptool db rk3036_loader_v1.07.237.bin
 
sudo rkdeveloptool wl 0x40&nbsp;out/u-boot/rk3036_idb.img</pre>
 
  
 
&nbsp;
 
&nbsp;

Latest revision as of 08:30, 8 December 2017