This document will guide you from importing the virtual machine to build an customized Linux distribution you will generate with OpenEmbedded/Yocto system.
The development environment is provided as a virtual disk (to be used by a VirtualBox virtual machine) which you can download from this page:
Important
Compute the MD5SUM value of the zip file you downloaded and compare it to the golden one you find in the download page.
Uncompress the file, and you will get a .vdi file that is our virtual disk image. The environment contains the SDK for all the boards provided by Architech, TWR-LS1021A included.
For being able to use it, you first need to install VirtualBox (version 4.2.10 or higher). You can get VirtualBox installer from here:
https://www.virtualbox.org/wiki/Downloads
Download the version that suits your host operating system. You need to download and install the Extension Pack as well.
Important
Make sure that the extension pack has the same version of VirtualBox.
Install the software with all the default options.
We need to setup a port forwarding rule to let you (later) use the virtual machine as a local repository of packages.
Note
The virtual machine must be off
Building an entire system from the ground up is a business that can take up to several hours. To improve the performances of the overall build process, you can, if your computer has enough resources, assign more than one processor to the virtual machine.
Note
The virtual machine must be off
The VBox addictions add functionalities to the virtual machine such as better graphic driver and more. It is already installed in the SDK but is important re-install it to configuring correctly the virtual machine with your operating system.
2. Click on the virtual box menu to the voice Devices and select Insert Guest Additions CD Images.... A message box will appear at the start of the installation, click on run button
Important
A working internet connection, several GB of free disk space and several hours are required by the build process
bitbake fsl-image-core
At the end of the build process, the image will be saved inside directory:
/home/architech/architech_sdk/architech/ls1021atwr/yocto/build/tmp/deploy/images/ls1021atwr
sudo tar -xzf /home/architech/architech_sdk/architech/ls1021atwr/yocto/build_ls1021atwr_release/tmp/deploy/images/ls1021atwr/fsl-image-core-ls1021atwr.tar.gz -C /home/architech/architech_sdk/architech/ls1021atwr/sysroot/
Note
sudo password is: “architech“
Warning
The following instruction will make you overwrite your SD card content, it will be lost forever! If you have important data on it, make sure you do a backup of your data on the SD card before catching up with the next steps.
cp tmp/deploy/images/ls1021atwr/fsl-image-core-ls1021atwr.ext2.gz.u-boot /path/your/sd
cp tmp/deploy/images/ls1021atwr/uImage /path/your/sd
cp tmp/deploy/images/ls1021atwr/uImage-ls1021a-twr.dtb /path/your/sd
Important
sudo password is architech
Make sure everything has been written on the SD card:
sync
and unmount the SD card from your system.
Make sure that SW2 and SW3 switches are set like in the following picture:
and the J20 and J19 jumpers as well.
Insert the SD card you just prepared inside socket J16.
Connect the mini-USB cable from your PC to TWR-LS1021A connector J5.
And now proceed by setting up the serial console.
On TWR-LS1021A the USB-UART port J5 is used for serial console.
which you can connect, by means of a mini-USB cable, to your personal computer.
Note
Every operating system has its own killer application to give you a serial terminal interface. In this guide, we are assuming your host operating system is Ubuntu.
On a Linux (Ubuntu) host machine, the console is seen as a ttyACMX device and you can access to it by means of an application like minicom.
Minicom needs to know the name of the serial device. The simplest way for you to discover the name of the device is by looking to the kernel messages, so:
sudo dmesg -c
dmesg
[ 5522.462414] usb 2-1.1: new full-speed USB device number 6 using ehci_hcd
[ 5522.557574] cp210x 2-1.1:1.0: cp210x converter detected
[ 5522.630151] usb 2-1.1: reset full-speed USB device number 6 using ehci_hcd
[ 5522.723501] usb 2-1.1: cp210x converter now attached to /dev/ttyACM0
As you can see, here the device has been recognized as /dev/ttyACM0.
Now that you know the device name, run minicom:
sudo minicom -ws
If minicom is not installed, you can install it with:
sudo apt-get install minicom
then you can setup your port with these parameters:
+-----------------------------------------------------------------------+
| A - Serial Device : /dev/ttyACM0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
If on your system the device has not been recognized as /dev/ttyACM0, just replace /dev/ttyACM0 with the proper device.
Once you are done configuring the serial port, you are back to minicom main menu and you can select exit.
Warning
The next procedure changes the boot mode of the u-boot. This step is necessary in order to use the files built by Yocto but could make not usable others sd-card built with other SDK.
Before starting to work with the SD-Card built by SDK, it is necessary modify u-boot environment variables. Turn on the board and before the countdown ends press Enter key. Will be shown the u-boot prompt, then insert the following commands:
=> setenv bootargs root=/dev/ram rw console=ttyS0,115200
=> fatload mmc 0 0x82000000 uImage
=> fatload mmc 0 0x8f000000 uImage-ls1021a-twr.dtb
=> fatload mmc 0 0x88000000 fsl-image-core-ls1021atwr.ext2.gz.u-boot
=> bootm 0x82000000 0x88000000 0x8f000000
ls1021atwr login: root
and press Enter.
Note
Sometimes, the time you spend setting up minicom makes you miss all the output that leads to the login and you see just a black screen, press Enter then to get the login prompt.