SomLabs NAND programming

Short manual how to write a Linux image to NAND flash on SomLabs module

Assumption:

The tutorial is dedicated to Linux users

 

1. Download and compile “imx_usb_loader”

git clone https://github.com/boundarydevices/imx_usb_loader.git
cd imx_usb_loader
make

2. Compile U-Boot using

export ARCH=arm
export CROSS_COMPILE=/.../gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
make somlabs_visionsom_6ull_nand_defconfig

     Note: Align CROSS_COMPILE path

3. Product of  U-Boot compilation is “u-boot-dtb.imx” file

4. If using Yocto comment following lines

#UBOOT_CONFIG ??= "sd"
#UBOOT_CONFIG[sd] = "somlabs_visionsom_6ull_config, sdcard"
#UBOOT_CONFIG[mfgtool] = "somlabs_visionsom_6ull_config"

and replace it by

UBOOT_CONFIG ??= "nand"
UBOOT_CONFIG[nand] = "somlabs_visionsom_6ull_nand_config, nand"
UBOOT_CONFIG[mfgtool] = "somlabs_visionsom_6ull_nand_config"

and finally compile using

bitbake -c compile u-boot
bitbake -c deploy u-boot

or using image generation option like

bitbake qt5-image
bitbake console-image

5. Board preparation

Assumption: For this tutorial VisionCB-STD board used plus SomLabs with NAND option

Note: Make sure if micro USB connector named J202 is mounted. If not populated try to mount it or consider using other baseboard dedicated for SomLabs

6. The prepared board should look like on the following picture

7. First, connect Linux Console + PWR-C micro USB connector to power board and get console messages. Next, connect J202 micro USB connector do upload U-Boot image to DDR

8. Open console using minicom application, for instance,

minicom ttyUSB

9. To upload U-Boot image to DDR use following syntax

./imx_usb u-boot-dtb.imx

Note: Be sure that PWD is set in an imx_usb application and copy u-boot-dtb.imx image to an imx_usb application location

10. Immediately after issue mentioned in point 8 try to stop console on minicom(or other terminals) window

U-Boot 2018.09-36885-g39a273d (Dec 04 2018 - 22:51:36 +0100) 

CPU: Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz) 
CPU: Industrial temperature grade (-40C to 105C) at 42C 
Reset cause: POR 
Model: SomLabs i.MX6 ULL Visionsom 
Board: SomLabs visionsom 6ull 
DRAM: 512 MiB 
NAND: 512 MiB 
Loading Environment from NAND... *** Warning - bad CRC, using default environmet

Video: 800x480x24 
In: serial 
Out: serial 
Err: serial 
Net: FEC0 [PRIME] 
Warning: FEC0 (eth0) using random MAC address - 52:fc:90:b3:be:70 

Hit any key to stop autoboot: 0 
=>

11. Next set tftpboot server host IP and assign for SomLabs local ipaddress by

=> setenv ipaddr 192.168.1.130 
=> setenv serverip 192.168.1.209

12. Copy U-Boot image and rootfs image to tftpboot folder on host

 

Leave a Reply

Close Menu