📜 ⬆️ ⬇️

Installing and building an Angstrom Linux image for TechNexion Thunder

TechNexion Thunderpack Developer Kit


Thunder
Hello dear reader. Recently, I had the opportunity to work with a set for the developer, a Taiwanese company TechNexion Ltd , called Thunderpack, which includes the TAO-3530 SOM ( System on module ) and the Thunder board.
SOM is based on SoC ( System-on-a-Chip ) TI OMAP3530 from Texas Instruments and contains 256 MB DDR RAM, 512 MB NAND Flash, DSP core TMS320C64 +, and may also contain a Wireless LAN module to support WiFi.
In this post I want to tell you about my experience with this board.
So, let's begin.
TAO-3530

Installing Linux 2.6.37


After a cursory reading of the documentation , building and turning on Thunder, I proceeded to install Linux. I have to say that through the default installation method I could not install. There was a constant restart of the installation procedure. Therefore, I went to TechNexion and downloaded, kindly prepared and uploaded by them, an image containing Linux 2.6.37.
According to the instructions specified in the documentation (Section 9.4.1 Create the SD-card with the image in a Windows environment), I prepared the SD-card for installing Linux 2.6.37 and performed the installation.
After installation, the system booted safely, but I was disappointed because The network did not work. Began to look for information on the network card.
At the end of the documentation for the board, there are diagrams for Thunder (section 16.2 Thunder baseboard schematics) in the diagram you can see that the network card is a USB-Ethernet converter assembled on the Microchip SMSC LAN9500-ABZJ controller. Looking for a driver in the newly installed system, I did not find it. You may have forgotten to enable it during assembly.
image

On the TechNexion site, in addition to the ready-made images, the source codes for manually assembling the image are uploaded. Downloading "TAO-3530 Linux 2.6.37 / TI PSP 04.02.00.07 XUKR Source code" turned out that the driver for the network card I needed was present and enabled for building. It remains only to rebuild the image.

Build Angstrom Linux 2.6.37 Image


I built the image on Ubuntu 12.04, after installing it on VirtualBox. In the documentation for Thunder, developers are advised to build using Toolchain Code Sourcery G ++ 2010.09-50 (gcc 4.5.1). I want to draw attention to the fact that to build the Angstrom Linux 2.6.37 image provided by the TechNexion developers, you should deploy Code Sourcery G ++ 2010.09-50 .
First of all, download arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 or from Mentor Graphics and unpack it into the / opt / codesourcery folder.
$cd /opt $sudo mkdir codesourcery $cd codesourcery $sudo wget ftp://ftp.ru.debian.org/gentoo-distfiles/distfiles/arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 $sudo tar xvf arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 

image
')
We define environment variables. To do this, in the / etc / environment file we add:
 export ARCH=arm export CROSS_COMPILE=/opt/codesourcery/arm-2010.09/bin/arm-none-linux-gnueabi- 


Create the files folder in the root directory, and copy the source codes into it to create an Angstrom Linux 2.6.37 image.
 $cd / $sudo mkdir files $cd files $sudo wget http://technexion.com/images/downloads/ARM_CPU_Modules/xukr-20131014-omap3.tar.xz $sudo tar xvf xukr-20131014-omap3.tar.xz 

image

Install uboot-mkimage.
 $sudo apt-get install uboot-mkimage 


Now it is necessary to reboot the system in order for the set, variable environments to work.

It remains to correct the configuration of the kernel to include the necessary drivers. Since I will be compiling an image for the Thunder board, the path to the configuration file I need is as follows:
 /opt/files/xukr-20131014-omap3/kernel/linux-2.6.37-tn/arch/arm/configs/taotdm_defconfig 


The configuration file must be opened in any convenient editor and include options of interest. I edited the standard Midnight Commander file manager editor.
The first thing I looked at in the configuration file was the presence of the included SMSC95xx network card driver.
 CONFIG_USB_NET_SMSC95XX=y 

Then I turned on the compilation of usb-serial drivers.
 CONFIG_USB_SERIAL=y 

And included support for the most common usb-serial PL2303 and CP210x chips.
 CONFIG_USB_SERIAL_PL2303=y CONFIG_USB_SERIAL_CP210X=y 

Close the editor, after saving changes to the file. Now everything is ready to build the kernel.
Go to the directory xukr-20131014-omap3
 $cd /opt/files/xukr-20131014-omap3 


And run the build script with the name of the platform.
 $sudo ./Build.sh thunder 



This script will build the boot loader, the OS kernel, copy all the necessary files into a previously prepared file structure, etc.

Then clean up the source codes from the created object files.
 $sudo ./Clean.sh 

And a script to build an image with the name of the platform.
 $sudo ./mk_nandimg.sh thunder 

Upon successful completion, you can congratulate yourself on creating an image of Angstrom Linux 2.6.37. The image itself will be in the folder
/ opt / files / xukr-20131014-omap3 / build / thunder.
It remains to prepare the installation SD-disk and install. These actions are described above (see Installing Linux 2.6.37).
After installing the assembled system, I had a network and support for usb-serial devices.
image

Conclusion


The developers of TechNexion have made a very convenient process of assembling and creating an image of a bootable SD-disk that does not require deep knowledge and experience in building the Linux kernel. The scripts prepared by them do everything automatically.
Only, as usual, the documentation does not keep up with the developers. The last, at the time of writing, the documentation version (tao-3530-userguide-097.pdf) contained a description of the build for old sources, which is slightly different.

Thanks for attention. In the next article I’ll write about configuring Eclipse CDT to compile programs under the arm, launch the application on Thunder and debug the program in Eclipse.

See you.

Source: https://habr.com/ru/post/218991/


All Articles