-
Book Overview & Buying
-
Table Of Contents
Embedded Linux Projects Using Yocto Project Cookbook
By :
Most professional i.MX6 boards will have an internal embedded MMC (eMMC) flash memory, and that would be the recommended way to boot firmware. The Wandboard is not really a product meant for professional use, so it does not have one. But neither the eMMC nor the microSD card are ideal for development work, as any system change would involve a reprogramming of the firmware image.
The ideal setup for development work is to use both TFTP and NFS servers in your host system and to only store the U-Boot bootloader in either the eMMC or a microSD card. With this setup, the bootloader will fetch the Linux kernel from the TFTP server and the kernel will mount the root filesystem from the NFS server. Changes to either the kernel or the root filesystem are available without the need to reprogram. Only bootloader development work would need you to reprogram the physical media.
If you are not already running a TFTP server, follow the next steps to install and configure a TFTP server on your Ubuntu 14.04 host:
$ sudo apt-get install tftpd-hpa
The tftpd-hpa configuration file is installed in /etc/default/tftpd-hpa. By default, it uses /var/lib/tftpboot as the root TFTP folder. Change the folder permissions to make it accessible to all users using the following command:
$ sudo chmod 1777 /var/lib/tftpboot
Now copy the Linux kernel and device tree from your build directory as follows:
$ cd /opt/yocto/fsl-community-bsp/wandboard- quad/tmp/deploy/images/wandboard-quad/ $ cp zImage-wandboard-quad.bin zImage-imx6q-wandboard.dtb /var/lib/tftpboot
If you are not already running an NFS server, follow the next steps to install and configure one on your Ubuntu 14.04 host:
$ sudo apt-get install nfs-kernel-server
We will use the /nfsroot directory as the root for the NFS server, so we will "untar" the target's root filesystem from our Yocto build directory in there:
$ sudo mkdir /nfsroot $ cd /nfsroot $ sudo tar xvf /opt/yocto/fsl-community-bsp/wandboard- quad/tmp/deploy/images/wandboard-quad/core-image-minimal-wandboard- quad.tar.bz2
Next, we will configure the NFS server to export the /nfsroot folder:
/etc/exports: /nfsroot/ *(rw,no_root_squash,async,no_subtree_check)
We will then restart the NFS server for the configuration changes to take effect:
$ sudo service nfs-kernel-server restart
Boot the Wandboard and stop at the U-Boot prompt by pressing any key on the serial console. Then run through the following steps:
> dhcp
Alternatively, you can configure a static IP address with:
> setenv ipaddr <static_ip>
> setenv serverip <host_ip>
> setenv nfsroot /nfsroot
> setenv image zImage-wandboard-quad.bin > setenv fdt_file zImage-imx6q-wandboard.dtb
> setenv ip_dyn no
> saveenv
> run netboot
The Linux kernel and device tree will be fetched from the TFTP server, and the root filesystem will be mounted by the kernel from the NFS share after getting a DHCP address from your network (unless using static IP addresses).
You should be able to log in with the root user without a password prompt.
Change the font size
Change margin width
Change background colour