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¶
- Launch VirtualBox Manager and Press “Start” to run the virtual machine.
- Login using the password ‘mitydsp’.
- 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”.
- Run
ifconfig
to get VM's ip adddress. You'll need it later.
Get latest MDK¶
- 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 - Make executable
chmod +x release_2014-01-13.run
- 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.
- Download file u-boot-ubl_2022_06_29_gfca022b96949.bin
- Rename file to u-boot-ubl.bin
Copy boot files¶
- We are now going to copy the MDK images to where the tftp server can get access to them.
- 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.
- 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¶
- Power-up the board and press enter before the ‘bootdelay’ timeout to get the U-boot prompt.
- 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.
- 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.
- 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"
- Execute the command ‘saveenv’. This saves the environment to NOR.
- 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
- 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)
- 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