Das U-Boot Port - Compile and Install¶
https://support.criticallink.com/gitweb/?p=u-boot-mityarm-335x.git;a=summary
Please familiarize yourself with the TI port of u-boot described here as the Critical Link MitySOM-335X port is based on the TI port, and many of the AM335X processor specifics are detailed on the TI wiki.
Branch Description¶
u-boot-2019.01: Latest U-Boot supported by Critical Link for the am335x.
Checkout U-Boot¶
Download your own copy of U-Boot (please replace the X's with your desired branch):
git clone git://support.criticallink.com/home/git/u-boot-mityarm-335x.git cd u-boot-mityarm-335x git checkout -b u-boot-XXXX.XX origin/u-boot-XXXX.XX
These commands will download the repository and check out the specified branch from the server. If you intend to make changes you will need to be moderately familiar with Git (See the docs).
Setting up the environment¶
If the MDK is installed to the default directory:
source /opt/criticallink/mitysom-335x_XXXX-XX-XX/environment-setup-cortexa8hf-neon-criticallink-linux-gnueabi
Building U-Boot¶
The U-Boot build needs to be configured depending on which SOM you're using.
mitysom335x_devkit_256MB_defconfig
- Config for 256MB NAND SOMsmitysom335x_devkit_512MB_defconfig
- Config for 512MB NAND SOMsmitysom335x_devkit_1GB_defconfig
- Config for 1GB NAND SOMs
SOMs with no nand can use any of the above configs
make distclean make mitysom335x_devkit_<nand size>_defconfig make
For a faster build, add "
-j$(nproc)
" to build with multiple threads, $(nproc)
will use as many threads as the building machine has cores.
When built successfully, there are several files created in the source directory.
spl/u-boot-spl.bin
- The second-stage bootloader (a stripped down version of u-boot that fits in SRAM)MLO
- spl/u-boot-spl.bin with a GP image header prepended to itu-boot.img
- The full-fledged U-Boot image.
NAND¶
This section outlines the configuration of the NAND device in U-Boot (which corresponds to the NAND MTD parts in the default Critical Link built Linux kernel).
Note: Offset fields must be aligned with 0x800 (2048) bytes. On writing 3000 (0xbb8) bytes, len field can be aligned to 0x1000 ie 4096 bytes.
Offset field should be aligned to page start address, multiple of 2048 bytes.
NAND Layout¶
See UBIFS Nand Boot
Reflashing U-Boot¶
If you need to reflash the U-Boot image to your board, you can follow the instructions below. WARNING: failure to perform this step correctly will "brick" your board. The procedure for recovering a bricked module is dependent on the carrier board setup (or you can return it to Critical Link for service).
If you are using the Critical Link dev board, U-Boot and the MLO are stored on the SD card, and can simply be updated on the card. Check the TI AM335x U-Boot User's Guide if you are booting from flash or other external boot devices.
Writing to NAND¶
See UBIFS Nand Boot for full details on creating a full nand boot scenario on both the 256MB and 512MB Nand parts.
Writing to the SD card¶
If you are booting from an SD card (as shipped from Critical Link), you can simply replace the MLO and u-boot.img files on the first partition of the SD card. This partition is a FAT partition and can be written to from Linux or Windows (or many others).
Go to top