Buildroot for Vortex86EX (2016/04/20)



Similar documents
Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

How to Backup XenServer VM with VirtualIQ

APPLICATION NOTE. How to build pylon applications for ARM

USB 2.0 Flash Drive User Manual

ARMSDK-VM Virtual Appliance A preconfigured Linux system

Getting started with ARM-Linux

Using Buildroot for real projects

How to Restore a Linux Server Using Bare Metal Restore

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

Version 1.0. File System. Network Settings

[HOW TO RECOVER AN INFINITI/EVOLUTION MODEM IDX ] 1

«Disaster Recovery» A DOM Restore Guide for Thecus NAS

Navigating the Rescue Mode for Linux

HOWTO configure Xinu under Virtual Box

SheevaPlug Development Kit README Rev. 1.2

IPMI Firmware Update (AMI) In WEB-GUI/DOS/WIN/Linux

Intel Do-It-Yourself Challenge Lab 2: Intel Galileo s Linux side Nicolas Vailliet

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

ECT362 Installing Linux Virtual Machine in KL322

Upgrade your Software

Demo of Data transferring (.CSV Files) from EGX300 to Our local PC/Laptop using- FTP

An Embedded Wireless Mini-Server with Database Support

BackTrack Hard Drive Installation

Matrix 510/520 User Guide

1. Downloading. 2. Installation and License Acquiring. Xilinx ISE Webpack + Project Setup Instructions

OCS Virtual image. User guide. Version: Viking Edition

Embedded System Design Tutorial: Installing Quartus and Related Tools

ODP REGIONAL NODE DEPLOYMENT QUICK GUIDE FOR TRAININGS

Student installation of TinyOS

USB Bare Metal Restore: Getting Started

II. Installing Debian Linux:

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

Installing Proview on an Windows XP machine

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

GeBro-BACKUP. Die Online-Datensicherung. Manual Pro Backup Client on a NAS

Computer Forensics using Open Source Tools

Embedded Linux development with Buildroot training 3-day session

Chapter 1 Hardware and Software Introductions of pcduino

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

SmartFiler Backup Appliance User Guide 2.0

RapidSeed for Replicating Systems Version 7.4

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

BeagleBone Black: Installing Operating Systems

Planning for an Amanda Disaster Recovery System

Raspberry Pi Kernel-o-Matic

Utilizing MBARI s Software Infrastructure and Application for MOOS (SIAM) for NOAA s Real-time Environmental Coastal Observing Network (RECON)

EXPLORING LINUX KERNEL: THE EASY WAY!

The Virtual Environment

Hyper-V Installation Guide for Snare Server

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Keystone 600N5 SERVER and STAND-ALONE INSTALLATION INSTRUCTIONS

SIRIS. Bare Metal Restore Guide

SmartFiler Backup Appliance User Guide 2.1

Backup of ESXi Virtual Machines using Affa

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

Operating System Installation Guidelines

CS 103 Lab Linux and Virtual Machines

System administration basics

How Do I Recover infiniti Remotes and Line Cards?

WES 9.2 DRIVE CONFIGURATION WORKSHEET

AlienVault. Unified Security Management x Offline Update and Software Restoration Procedures

Using Keil software with Linux via VirtualBox

Expresso Quick Install

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Using Internet or Windows Explorer to Upload Your Site

Also you need the C-MOR ISO file. This file you will find following this link:

The embedded Linux quick start guide lab notes

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Sistemi ad agenti Principi di programmazione di sistema

Procedure to Create and Duplicate Master LiveUSB Stick

ESX System Analyzer Version 1.0 Installation Guide

Linux Development Environment Description Based on VirtualBox Structure

EZblue BusinessServer The All - In - One Server For Your Home And Business

RocketRAID 174x SATA Controller Ubuntu Linux Installation Guide

NI Real-Time Hypervisor for Windows

Pwn Plug Community Edition 1.1 Installation Guide

USB HSPA Modem. User Manual

An Oracle White Paper July Oracle VM 3: Building a Demo Environment using Oracle VM VirtualBox

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

CS179i: Guide - Virtual Machine Setup and Internal Networking in Alpha Lab

Intelligent Video Analytics. Server Installation Guide. - Windows - Linux

Linux Labs: mini survival guide

Technical Note TN_146. Creating Android Images for Application Development

Allworx Installation Course

Apache and Virtual Hosts Exercises

TE100-P21/TEW-P21G Windows 7 Installation Instruction

DRO-210i LOAD BALANCING ROUTER. Review Package Contents

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

Section 5: Connecting the Laser to Your Computer

Qsync Install Qsync utility Login the NAS The address is :8080 bfsteelinc.info:8080

ipac-5010 User Guide + -

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Digitus DN / DN / DN-13018

Hadoop Lab - Setting a 3 node Cluster. Java -

Transcription:

Buildroot for Vortex86EX (2016/04/20)

Table of Contents Introduction...1 Prepare...1 Install Virtual Machine (optional)...1 Install Buildroot...3 Config Buildroot for VEX-SOM (optional)...4 Generate Linux kernel and rootfs image...4 Use Buildroot toolchain for Vortex86EX...5 Create the USB Flash Drive (USBLINUX)...6 Use the USBLINUX on Vortex86EX...7 Access the files in PC from USBLINUX...7 Install Linux kernel, rootfs image, and bootloader...8 Finish...8 i

Introduction Buildroot is a software tool to generate toolchain, Linux Kernel, and rootfs for Embedded Linux system. User can use Buildroot to customize the tools and features for his own Embedded Linux system by it's simple UI. ( For the detail about Buildroot, please refer to Buildroot user manual on it's official website) From this document, we will show you how to make a simple Embedded Linux by Buildroot, and use USB Flash Drive to install the Embedded Linux on Vortex86EX platfrom. Prepare One PC with internet connected. One Vortex86EX platform. ( This demo use ICOP VEX-6254) ICOP VEX-6254 brief specification: DMP SoC Vortex86EX 128MB DDR3 onboard Support microsd card or 512MB emmc One USB Flash Drive. One microsd. (ICOP VEX-6254 support either microsd or emmc depends on the different model, please use onboard emmc if there is no microsd) One LAN cable (ICOP VEX-6254 should in the same network with PC) Install Virtual Machine (optional) Buildroot only works under Linux, if you are using a Windows PC, please install the Virtual Machine and then install Linux distribution. We suggest to use Debian 7 (or later version) for development. 1

1. Download and install Virtual Machine ( we use Virtualbox as example). VirtualBox Website: <https://www.virtualbox.org/> 2. Download the file for VM application. ftp://vxex:gc301@ftp.dmp.com.tw/software/linux/debian8.3.0_vexsomstandard_develop_env.ova 3. Open [ Oracle VM VirtualBox ], Click [ file ] - > [ Import appliance... ]. 4. Click the icon, choose the debian8.3.0_vexsom-standard_develop_env.ova, then open the file. 5. Modify the VM setting ( Name, CPUs, RAM...etc) according to your PC's specification or click the Import directly to use the default setting. 6. When the 'Import' is completed, you will see the new imported Virtual Machine on the left side of [ Oracle VM VirtualBox Manager ]. Please click that to open the selected VM. 2

After user login, you can 'make' the image directly. (Please refer to the chapter in this document called 'Generate Linux kernel and rootfs image' ). Install Buildroot 1. We assume working directory is in $HOME. $ cd $HOME 2. Download buildroot-2015.02.tar.gz. $ wget ftp://vxex:gc301@ftp.dmp.com.tw/software/linux/buildroot- 2015.02.tar.gz 3. Download buildroot-vortex86ex.tar.gz. $ wget ftp://vxex:gc301@ftp.dmp.com.tw/software/linux/buildrootvortex86ex.tar.gz 4. Uncompress the download files. $ tar -xf buildroot-2015.02.tar.gz $ tar -xf buildroot-vortex86ex.tar.gz 5. Rename buidlroot directory. $ mv buildroot-2015.02 buildroot-2015.02-vexsom 6. Export the necessary environment variables. $ export BR2_EXTERNAL=$HOME/buildroot-external $ export BR2_DL_DIR=$HOME/downloads 3

7. Change directory to buildroot-2015.02-vexsom, then adapt the defconfig of vexsom. $ cd buildroot-2015.02-vexsom $ make vexsom_defconfig Config Buildroot for VEX-SOM (optional) Buildroot provides many configuration options, you can use 'make menuconfig' to start the configuration menu. The items in 'Target packages' can be selected for installing to target platform. If you don't need to config the Buildroot, please skip this chapter directly. $ make menuconfig Please run 'make linux-menuconfig' to modify the Linux Kernel configuration. $ make linux-menuconfig Please run 'make busybox-menuconfig' to modify the Busybox configuration. $ make busybox-menuconfig If you need to add extra files in 'rootfs', please copy files to the 'fs_overlay' directory. After the 'make' is completed, Buildroot will copy or overwrite the files in 'fs_overlay' to 'rootfs' automatically. Below is the demo for installing 'hello' to '/usr/bin/' directory in 'rootfs'. $ mkdir -p $HOME/buildroot-external/board/icop/vexsom/fs_overlay/usr/bin $ cp hello $HOME/buildroot-external/board/icop/vexsom/fs_overlay/usr/bin/ Generate Linux kernel and rootfs image After complete configration, you can go for 'make', it will take time for 'make' process depends on the performance of your PC. When Buildroot finish everything, the image will be in the 'output/images/' directory. $ make $ ls output/image bzimage rootfs.tar rootfs.tar.gz 4

In the 'output/images/' directory, you will need two files which are Linux kernel image and rootfs image: 'bzimage' : Linux kernel image 'rootfs.tar.gz' : rootfs image (contains all files for root filesystem) Use Buildroot toolchain for Vortex86EX After Buildroot 'make' the image, all the files related to toolchain will be put in 'output/host/' directory, for example gcc is at 'output/host/usr/bin/i686-buildroot-linux-gnu-gcc', and toolchain sysroot will be in 'output/host/usr/i686-buildroot-linux-gnu/sysroot/' ( Buildroot has a link at output/staging/ ). Below is the demo for how to use Buildroot toolchain to compile the hello.c program, and install to root filesytem. 1. Set the PATH $ export PATH=$PATH:$HOME/buildroot-2015.02-vexsom/output/host/usr/bin 2. Create and compile 'hello.c' $ cat >hello.c <<EOF #include <stdio.h> int main() { printf("hello Buildroot!\n"); return 0; } EOF $ i686-buildroot-linux-gnu-gcc -o hello hello.c 3. Put the hello program in 'fs_overlay', and then 'make' again. $ mkdir -p $HOME/buildroot-external/board/icop/vexsom/fs_overlay/usr/bin $ cp hello $HOME/buildroot-external/board/icop/vexsom/fs_overlay/usr/bin/ $ make 5

4. After 'make' finished, the hello program will be in the 'target/usr/bin/ directory' and 'rootfs.tar.gz'. Create the USB Flash Drive (USBLINUX) As the images are ready, below will show you how to create a bootable USB Flash Drive with Linux kernel and rootfs images. 1. Change directory to $HOME. $ cd $HOME 2. Uncompress buildroot-2015.02.tar.gz. $ tar -xf buildroot-2015.02.tar.gz 3. Rename buildroot directory. $ mv buildroot-2015.02 buildroot-2015.02-usblinux 4. Export the necessary environment variables. $ export BR2_EXTERNAL=$HOME/buildroot-external $ export BR2_DL_DIR=$HOME/downloads 5. Change directory to buildroot-2015.02-usblinux, adapt the defconfig of usblinux, then make the image. $ cd buildroot-2015.02-usblinux $ make usblinux_defconfig $ make 6. After the 'make' is completed, you will see the 'usblinux.iso' in 'the output/images' directory. $ ls output/images bzimage rootfs.cpio rootfs.cpio.gz syslinux usblinux.iso 7. Plug the USB Flash Drive to PC, mount it in Virtual Machine, then you can use 'dd' to write the usblinux.iso to USB Flash Drive. (Assume the USB Flash Drive is at '/dev/disk/by-label/usbdrive') 6

$ dd if=output/images/usblinux.iso of=/dev/disk/by-label/usbdrive bs=4k 8. Please take the USB Flash Drive from the PC. Use the USBLINUX on Vortex86EX Please plug-in the microsd and USB Flash Drive then power-on the VEX-6254. It will automatically set the IP and Netmask (as shown below) of the first ethernet interface then start the SSH server. IP : 192.168.100.100 Netmask: 255.255.255.0 If the PC and VEX-6254 are on the same Network, you can login the USBLINUX from PC by SSH client. $ ssh root@192.168.100.100 ( password : vortex86ex ) root@usblinux:~# Access the files in PC from USBLINUX The USBLINUX does not support NFS but support SSHFS and CurlFtpFS, you can use SSHFS or CurlFtpFS to mount the SSH server or FTP server to the directory you need. (hostip is the IP for PC) root@usblinux:~# mkdir /mnt/host root@usblinux:~# sshfs user@hostip:~/buildroot-vexsom/output/images /mnt/host or root@usblinux:~# curlftpfs ftp://hostip/buildroot-vexsom/output/images /mnt/host 7

Install Linux kernel, rootfs image, and bootloader Here will show how to use the automatic installation program in USBLINUX. The program will automatically format the microsd as a single partition, create ext3 filesystem in this partition, install Linux kernel, root filesystem, and then install extlinux (syslinux) bootloader. Before the automatic installation program running, please copy Linux kernel and rootfs image in ~/ directory. In the example below, we assume 'output/images' directory on PC is mounted to the '/mnt/host' directory on USBLINUX (ICOP VEX-6254). root@usblinux:~# cp /mnt/host/bzimage ~/ root@usblinux:~# cp /mnt/host/rootfs.tar.gz ~/ Also, you need to assign the target disk for installation. Usually the microsd should be the '/dev/sda' ( The first Block device which the Kernel detected). Different platforom might have different name, you can use 'fdisk -l' or 'lsblk -S' command to confirm it. Finally, please run 'make-target' then the installation process will be done automatically. root@usblinux:~# /opt/bin/make-target /dev/sda Finish After complete 'make-target' installation process, your own Embedded Linux images are installed on microsd. Now you can remove the USB Flash Disk, and reset the power to enjoy your Embedded Linux. If you have any question, please contact <soc@dmp.com.tw> by e-mail. 8