IoTGateway/BSP/Linux/AM335x/AM335x LBV2 User Guide
Contents
Start Guide
Generally,to do Linux development, you’ll need a host PC running Linux. In the development with the advantech SDK, it would be strongly recommend to use Ubuntu 12.04 LTS 64 bit/ Ubuntu 14.04 LTS 64 bit as developing environment. Because we have successfully tested our BSP on these OS version. Please install the Ubuntu 12.04 LTS 64 bit / Ubuntu 14.04 LTS 64 bit at your PC/NB in advance.
Configure your Linux Host
Please refer to Configure your Linux Host to configure your Linux Host.
Install Advantech SDK
Please refer to Install Advantech SDK to install advantech SDK.
BSP Building Guide
Please refer to BSP Building Guide to build advantech BSP.
Update Linux OS
All advantech products based on AM335x platform support boot from SD card or onboard flash. This section will guide you how to build an image for Linux system boot media.
Debug Message
All advantech risc products can connect to a host PC (Linux or Windows) by using console cable and debug port adapter. In order to communicate with host PC, serial communication program such as HyperTerminal, Tera Term or PuTTY is must required. Suggest use PuTTY on your host PC. Below is the detail instruction of how to setup PuTTY on ubuntu 14.04 hosts:
Install putty as below
- Connect target board to your ubuntu PC by using console cable.
- Open putty on your ubuntu PC.
- power up the target board.
- Setting putty as follows.
Select correct serial line, then click open. Then you will see the console information:
Type root to login in system.
Storage Information (eMMC/SD card)
The storages devices name as following:
Device | Node Name |
---|---|
SD caed | /dev/mmcblk0 |
eMMC | /dev/mmcblk1 |
If Linux os exists in both SD card and eMMC flash, the linux in SD is default boot option. If no SD card inserted, the eMMC node is "/dev/mmcblk0".
Create a Linux SD Card System
1. Create system from Pre-built System Image
You are able to find the pre-built image from Advantech website. Please follow below steps to create a SD card for boot up. we still use the RSB-4220 as demo:
- Copy “4420LIVxxxx_yyyy-mm-dd.tar.gz” package to your /root/.
- Open "Terminal" on Ubuntu host PC.
- $sudo su (Change to “root” authority)
- Input your password.
- cd /root/
- tar xzvf 4220LIVxxxx_yyyy-mm-dd.tar.gz (Unzip files)
- Insert one SD card to your developing computer
- Check the SD card location, like /dev/sdb
- cd ./4220LIVxxxx_yyyy-mm-dd/scripts
- ./mksd-linux.sh /dev/sdb
- Type “y” (Start to copy files, wait until it shows [Done] )
Then insert the Linux system SD card to target board (like RSB-4220), it will boot up with Linux environment.
2.Create system from Source Code Package
When you receive the advantech Linux source code package, you can refer following steps to create a Linux system SD card for booting up from it.we still use the RSB-4220 as demo:
- Open "Terminal" on Ubuntu host PC.
- $sudo su (Change to “root” authority)
- Input your password.
- Insert one SD card to your developing computer
- Check the SD card location, like: /dev/sdb
- Ensure that you have built the uboot and kernel
- cd $(BSP)/scripts
- ./mksd-linux.sh /dev/sdb
- Type “y” (Start to copy files, wait until it shows [Done] )
Then insert the Linux system SD card to target board's (such as RSB-4220) SD card slot, it will boot up with Linux environment.
Boot from Onboard Flash
If you’ve already had a Linux system SD card, you can refer following steps to copy the content to onboard flash and then boot from onboard flash. Advantech also provide you a script “mkinand-linux.sh” to speed up the process of installing system image to onboard flash.
- Ensure you have created a linux system on SD card
- Insert this Linux system SD card to target board and connect serial console.
- On your target system, type #root (Login)
- On your target system, type #cd /mk_inand
- On your target system, type #./mkinand-linux.sh /dev/mmcblk1
- Type “y” (Start to copy files, wait until it shows [Done] )
- After done, Power off and remove this SD card.
Then you can boot from onboard flash without SD card.