yocto image on mmc

Yocto related software discussions are here

yocto image on mmc

Postby catalin » Sun Feb 05, 2017 4:25 pm

Hi,

I've been struggling to make an ok workflow of developing software for the wandboard, even if it means destructive means, like modifying the Kernel.
If you guys are using the latest yocto distro, here is a workflow that uses ethernet connection to get the image on the board and then write it on the mmc.
Keep in mind that by always rewriting the mmc, you overwrite the u-boot variables, as it seems they are stored on the mmc.

0. Install a tftp server on your workstation
Example for Ubuntu based distros (I used Linux Mint 18):
http://askubuntu.com/a/581891

1. Being in the main build folder, I use the following script to copy my image to the tftp folder:
Code: Select all
#!/bin/bash
                                                                         
cd tmp/deploy/images/wandboard                                                 
rm *.wic
# using the "atool" package from Ubuntu repos                                                                       
aunpack core-image-minimal-wandboard.wic.gz                                     
cp ./core-image-minimal-wandboard.wic /tftpboot/wandboard.wic         

I've used a "core-image-minimal" image (bitbake core-image-minimal).

3. Reboot the board and press any key to enter u-boot.

4. Set the following IP on the ethernet interface on your workstation that is connected to the wandboard: 10.0.0.1/24

5. Run these commands in the u-boot console on the wandboard:

Code: Select all
setenv ipaddr 10.0.0.2                                                         
setenv netmask 255.255.255.0                                                   
setenv serverip 10.0.0.1                                                       
tftp $loadaddr wandboard.wic                                                   
setexpr no_blocks 0x$filesize / 0x200                                           
setexpr no_blocks 0x$no_blocks + 0x1                                           
mmc write 0x12000000 0 $no_blocks


6. When the board is now reset, it will contain the new image on the mmc.
catalin
 
Posts: 1
Joined: Sun Feb 05, 2017 1:34 am

Re: yocto image on mmc

Postby ClayMontgomery » Sun Feb 12, 2017 4:23 pm

Another approach would be to mount the folder on your workstation with your kernel image with nfs, since u-boot supports nfs. What is the advantage of your tftp approach over nfs?

Regards, Clay
ClayMontgomery
 
Posts: 59
Joined: Tue Nov 19, 2013 9:14 pm


Return to Software - Yocto

Who is online

Users browsing this forum: No registered users and 6 guests

cron