Project

General

Profile

Updating devkit to latest MDK

Start VM and Update L138 to recent versions of U-boot, Kernel, and Filesystem from U-boot.

Get build Virtual Machine up and running

  1. Launch VirtualBox Manager and Press “Start” to run the virtual machine.
  2. Login using the password ‘mitydsp’.
  3. Open a terminal by selecting the terminal icon in the upper right corner, next to the Volume icon. Alternatively can be found in “Applications – Accessories – Terminal Emulator”.
  4. Run ifconfig to get VM's ip adddress. You'll need it later.

Get latest MDK

  1. Grab latest MDK from https://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Board_Support_Package#Releases
    Latest as of writing this is release_2014-01-13.run
  2. Make executable
    chmod +x release_2014-01-13.run
    
  3. Install
    ./release_2014-01-13.run
    

Get updated u-boot-ubl.bin file

A newer u-boot file is needed to support newer SOMs which have a larger NOR. See Module_Product_Change_Notifications.
As well as supporting the SOMs with Artic7 FPGAs.

  1. Download file u-boot-ubl_2022_06_29_gfca022b96949.bin
  2. Rename file to u-boot-ubl.bin

Copy boot files

  1. We are now going to copy the MDK images to where the tftp server can get access to them.
  2. Run the command ‘cd ~/MDK_2014-01-13’. This will change into the MDK_2014-01-13 directory in the home directory of the mitydsp user.
  3. Next we are going to copy the three images. Run the following commands:
    cp images/UBL_SPI_MEM.ais ~/tftpd/
    cp ~/Downloads/u-boot-ubl.bin ~/tftpd/
    cp images/uImage ~/tftpd/
    cp fs/mityomap-full.jffs2 ~/tftpd/
    

    Note: Configuration for tftp is located in /etc/inetd.conf under the line that starts with tftp. It should already be setup.

Note: The files can also be transferred over NFS by replacing the tftp command with nfs in the next sections commands. And placing the above files in the nfs export directory. Loading files over nfs may require the absolute path to where the files are stored. Ex: nfs 0xc0700000 /export/UBL_SPI_MEM.ais

Update L138 NOR and NAND

  1. Power-up the board and press enter before the ‘bootdelay’ timeout to get the U-boot prompt.
  2. For dhcp simply execute the command 'dhcp' otherwise execute the command ‘set ipaddr <devkit ip address>’. Replacing <devkit ip address> with address for devkit. Ex: 192.168.1.101.
  3. Execute the command ‘set serverip <vm ip address>’. Replacing <vm ip address> with the VMs ip you noted earlier. This will set the address to communicate with when tftp-ing the new images.
  4. If this is a new module, you will need to setup the bootcmd
    setenv bootcmd "run flashargs; sf probe 0; sf read 0xc0700000 0x100000 0x300000;bootm 0xc0700000" 
    
  5. Execute the command ‘saveenv’. This saves the environment to NOR.
  6. The following set of commands will transfer the images, erase, and write to the flash NOR. Shotcuts are setup in the flash environment
    UBL:
    tftp 0xc0700000 UBL_SPI_MEM.ais ;
    sf probe 0;
    sf erase 0x0 0x10000;
    sf write 0xc0700000 0x0 ${filesize};
    

    Shortcut: run flashubl
    U-boot:
    tftp 0xc0700000 u-boot-ubl.bin; 
    sf erase 0x10000 0x80000;
    sf write 0xc0700000 0x10000 ${filesize};
    

    Shortcut: run flashuboot
    KERNEL:
    tftp 0xC0700000 uImage
    sf erase 0x100000 0x280000
    sf write 0xC0700000 0x100000 ${filesize};
    

    Shortcut: run flashkernel
  7. The following set of commands will fill memory with 1’s, transfer the images, erase, and write to the flash NAND.
    FILESYSTEM:
    mw.b 0xC2000000 0xFF 0x06000000
    tftp 0xC2000000 mityomap-full.jffs2
    nand erase 0 0x8000000
    nand write.jffs2 C2000000  0 <rounded_filesize>
    

    Please NOTE that the "<rounded_filesize>" must be a hex number of the filesize rounded up to the next page size of the NAND device. In the case of MityDSP, this is 0x800. This is critical as overwriting additional data/pages to NAND will result in the kernel JFFS2 subsystem to inject ECC errors as it begins to write data/files to the partition. For example, if your jffs2 image size is 0x45cde74, then the argument passed to the nand write.jffs2 command must be 0x45ce000. Example using wolframalpha, equation: ceiling(0x45cde74, 0x800)
  8. Boot the new images by cycling the power.

Note: If something goes wrong and you corrupt your UBL and/or u-boot you may end up with a bricked device. To fix this see the following wiki page Reprogramming_a_Dead_Board. And then try the above steps again.

Sources

Go to top
Add picture from clipboard (Maximum size: 1 GB)