Difference between revisions of "U-boot PVT Notes"

From Studio Kousagi Wiki
Jump to: navigation, search
(Deploying)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Building=
+
==Overview==
   git clone git://github.com/sutajiokousagi/u-boot-imx6.git
+
 
  # make sure you have installed the local tooclhain and sourced the environment file (see below)
+
Novena uses a two-stage U-Boot architecture.  The Secondary Program Loader, called SPL, is built using the same build system as the main U-Boot image.
   cd u-boot-imx6
+
 
 +
SPL is responsible for setting up DDR3 memory (i.e. calibrating it and measuring trace lengths), loading the main U-Boot image from disk, and jumping to it.  The rest is handled by the primary U-Boot image.
 +
 
 +
To customize U-Boot, modify include/configs/novena.h and change #define messages.
 +
 
 +
==Building==
 +
   git clone https://github.com/xobs/u-boot-novena.git
 +
   cd u-boot-novena
 
   make novena_config  # sets up u-boot for novena configuration
 
   make novena_config  # sets up u-boot for novena configuration
   make
+
   make -j3
 +
 
 +
Note: If you edit include/configs/novena.h, you should run "make novena_config" again.
 +
 
 +
==Deploying==
 +
 
 +
To install the primary U-Boot image, copy u-boot.img to /boot/.  You do not need to do anything further.
  
=Deploying=
+
If you're modifying very early code, such as DDR3 setup or booting from SATA, you'll need to install a new SPL file.  To install the SPL image, you need to copy the file "SPL" to an offset 1024 bytes from the start of the disk.  If you're running on Novena, use "novena-install-spl". See "man novena-install-spl" for more information. Otherwise, use dd:
To copy u-boot onto the boot media, you need to use a linux machine with dd:
 
  sudo dd if=u-boot.imx of=/dev/sdX seek=2
 
  
Replace /dev/sdX with the drive node of your SD card. seek=2 locates u-boot in the expected location for loading.
+
sudo dd if="SPL" of="/dev/disk/by-path/platform-2198000.usdhc" bs=1024 seek=1 conv=notrunc

Latest revision as of 00:58, 8 June 2015

Overview

Novena uses a two-stage U-Boot architecture. The Secondary Program Loader, called SPL, is built using the same build system as the main U-Boot image.

SPL is responsible for setting up DDR3 memory (i.e. calibrating it and measuring trace lengths), loading the main U-Boot image from disk, and jumping to it. The rest is handled by the primary U-Boot image.

To customize U-Boot, modify include/configs/novena.h and change #define messages.

Building

 git clone https://github.com/xobs/u-boot-novena.git
 cd u-boot-novena
 make novena_config   # sets up u-boot for novena configuration
 make -j3

Note: If you edit include/configs/novena.h, you should run "make novena_config" again.

Deploying

To install the primary U-Boot image, copy u-boot.img to /boot/. You do not need to do anything further.

If you're modifying very early code, such as DDR3 setup or booting from SATA, you'll need to install a new SPL file. To install the SPL image, you need to copy the file "SPL" to an offset 1024 bytes from the start of the disk. If you're running on Novena, use "novena-install-spl". See "man novena-install-spl" for more information. Otherwise, use dd:

sudo dd if="SPL" of="/dev/disk/by-path/platform-2198000.usdhc" bs=1024 seek=1 conv=notrunc