Exynos4412 Uboot usage and flashing

Publisher:独行于世Latest update time:2021-12-07 Source: eefocusKeywords:Exynos4412  Uboot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Uboot version: u-boot-2013.01

Development board: Exynos4412

 

      This article is mainly to familiarize yourself with the use of U-boot and how to burn U-boot into Exynos4412. Of course, before that, you must first ensure that U-boot is already on the development board. If not, please burn a compiled Uboot.bin first, you can use JTAG or DNW.


1. Environment Construction

        In order to facilitate development, data is transmitted over the network, mainly using tftp and nfs. tftp is used for data transmission, and nfs is used to mount the root file system.


1. TFTP mode settings

      For specific configuration, please visit http://blog.csdn.net/zqixiao_09/article/details/50319877 . There are two modes of using tftp here: a. interactive mode (manual) b. automatic mode.


a -- interactive mode

       Enter the following command in the Uboot interface:

       tftp 41000000 uImage //Copy the tftp host uImage to 4412 memory address 41000000

       tftp 42000000 exynos4412-fs4412.dtb

       bootm 41000000 - 420000000

b-- Automatic mode:

      Set bootcmd, so that after Uboot is loaded successfully, the bootcmd command will be executed to automatically download the file and boot the kernel

      setenv bootcmd tftp 41000000 uImage ; tftp 42000000     exynos4412-fs4412.dtb; bootm 41000000 - 42000000

      to clay

Bootcmd uses '' between each command to input multiple commands.

 

2. Mount the root file system via NFS

1) Configure nfs

     a -- Download

             sudo apt-get install nfs-kernel-server

     b -- Configuration

            sudo vi /etc/exports

            Add your nfs shared directory in the last line

            /nfsboot *(rw,sync,no_subtree_check) note: Make sure this directory exists (permissions: 777)

     c -- Restart nfs service

            sudo /etc/init.d/nfs-kernel-server restart
  
     d -- test 

            Method 1) showmount -e

            The second method) mount it yourself

                                   mount -t nfs 127.0.0.1:/nfsboot  /mnt/xxx

For specific configuration, please visit http://blog.csdn.net/zqixiao_09/article/details/50337933


2) Copy and decompress the created root file system

      cp xxx/rootfs.tar.xz  /nfsboot

      tar xvf rootfs.tar.xz


3) Set the development board bootargs

     setenv bootargs root=/dev/nfs nfsroot=virtual machine ip:/nfsboot/rootfs rw console=ttySAC2,115200 ip=development board ip init=/linuxrc

     to clay

Note: root=/dev/nfs means the root file system is on /dev/nfs; nfsroot=virtual machine ip:/nfsboot/rootfs is the location of the virtual machine file system; init=/linuxrc is the first process started after booting;


4) Testing

     Write a program and run it on the development board

 

2. Detailed explanation of commonly used Uboot commands

1. Environment setting commands

a -- View current environment variables

      printenv

b -- Add environment variables

      setenv

例: set ipaddr 192.168.1.1 ====>ipaddr=192.168.1.1

c -- Modify environment variables

      setenv variable name value

d -- delete environment variables

      setenv variable name

e--Common environment variables

   ipaddr: set the development platform ip
   serverip: tftp server ip
   netmask: subnet mask
   gatewayip: gateway
   bootcmd: start kernel variables (commands executed during automatic startup)
   bootargs: parameters transmitted to the kernel (at the kernel stage, the original environment variables have no effect)
   bootdelay: set the interaction delay

 

2. Data transmission command

a -- Network

       tftp memory address file name (use TFTP protocol to transfer files)

b -- Serial port 

       loadb memory address (using Kermit transport protocol)

 

3. Memory access commands

a -- Memory:

      md Display memory contents

      Format: md 41000000

      mm Modify memory value (address automatically increases by one)

      Format: mm 41000000    
            ends with .
           mm.w (2B) mm.l (4B, default)

       mw Fills memory with the specified data

       Format: mw 41000000 12345678 10

       Write 0x10 times 0x12345678 to the starting address 0x41000000

 

b-- External memory:

1) -- nand:

    nand write 20008000 0 40000 
    nand read 20008000 0 40000
    nand erase 0 40000

2) -- emmc:

    movi write kernel 41000000

    Write memory 41000000 data to the kernel partition of emmc

    movi  read kernel 41000000

    Load the contents of the kernel partition of emmc into the memory address 41000000

Note: Exynos4412 uses eMMC for external memory, no NAND flash or NOR flash.

 

4. Run

a -- bootm 

       The bootm command is specifically used to start the memory image processed by the U-boot mkimage tool in SDRAM (pointing the pc pointer to the memory address, and other operations)

b -- go

       Point the pc pointer to the memory address

c -- boot

       Restart the development board

 

5. Others

 Run: Run the content of the specified environment variable

 help: View all commands

 

3. Download and Burn

1. Product model:

Product mode means that Uboot, Kernel, and rootfs have been successfully transplanted and can be burned into external memory for direct use.

The following is mainly the method of burning uboot, kernel, dtb, and rootfs to emmc. The method of loading uboot, kernel, dtb, and rootfs into memory here uses tftp. Of course, there are other methods, such as nfs and SD card.

1) -- uboot burning:

      a) -- uboot already exists in emmc

         via Internet :

                         tftp 41000000 u-bootxxx.bin
                         movi write u 41000000

         Restart to take effect.

      b) -- emmc is empty

         Burn via SD card:

               1: Pull the switch to 1000 (SD card boot)
                       and enter the command: sdfuse flashall
               2: Pull the switch back to 0110 (emmc boot)

        Restart to take effect

 

 2)-- Kernel and dtb burning

         via network tftp 41000000 uImage
                         movi write k 41000000

         Through the network tftp 41000000 exynos4412-fs4412.dtb
                         movi write d 41000000

 

3) -- Burn ramdisk (image of rootfs)

        via network tftp 41000000 ramdisk.img
                        movi write r 41000000 300000

 

4) -- Set the boot parameter bootcmd

          setenv bootcmd movi read k 41000000; movi read d 42000000;movi read r 43000000 300000; bootm 41000000 43000000 42000000  

          NOTE: If the data in the middle of bootm is '-', it means it is mounted from nfs [see bootargs]. If it is a memory address, the file system is loaded from the address.

Keywords:Exynos4412  Uboot Reference address:Exynos4412 Uboot usage and flashing

Previous article:How does the GPIO of the iTOP-4412 development board work?
Next article:Chapter 12: Tiny4412 U-BOOT transplantation 12 DDR3 initialization sequence

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号