How To Compile Custom Software; How To Setup The Toolchain; How To Use The Toolchain To Compile Custom Software - Eurotech ReliaGATE 10-12-6 Series User Manual

Iot edge gateway ti am335x, lte cat 1
Table of Contents

Advertisement

ReliaGATE 10-12 User manual Rev. 2-1
13
H
OW TO COMPILE CUSTOM SOFTWARE
13.1

How to setup the toolchain

To setup the toolchain, complete the following steps:
1. Make sure you're using the correct toolchain version corresponding to the Yocto image installed on
your gateway.
The latest toolchain and Yocto image for your ReliaGATE 10-12 are available here:
https://eurotech.github.io/linux-releases/
2. Download the binary file (x86_64 version tested) on a Virtual/physical machine running Ubuntu
(14.04 tested), execute it and select appropriate installation options
3. Once the installation is complete, switch to superuser (sudo su)
4. To setup the correct environment variables, run:
5. Exit superuser mode
13.2

How to use the toolchain to compile custom software

To use the toolchain to compile custom software, complete the following steps:
1. Setup the environment variables using:
2. To directly compile a user-space C source file hello_world.c, use
3. To compile a kernel module kernel_module.c, configure your Makefile to point to the kernel
directory and include the .config file in the kernel directory. Here's an example of Makefile:
source /opt/poky/2.3.2/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
cd /opt/poky/2.3.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/kernel
make scripts
source /opt/poky/2.3.2/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
$CC hello_world.c
KBLD := /opt/poky/2.3.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/kernel -
include $(KBLD/.config)
obj-m :=kernel_module.o
all : modules
modules clean :
$(MAKE) -C $(KBLD) M=$(PWD) $@

13 How to compile custom software

91 / 118

Advertisement

Table of Contents
loading

This manual is also suitable for:

Regate-10-12-65gRegate-10-12-66gRegate-10-12-67gDynagate 10-12-6 series

Table of Contents