Jumat, 30 Agustus 2013

Xathrya Sabertooth

Xathrya Sabertooth


Building Cross Compiler for Raspberry Pi using Crosstool-NG

Posted: 29 Aug 2013 11:07 PM PDT

A cross compiler is a compiler that runs on one platform/architecture but generates binaries for another platform/architecture. With devices like the Raspberry Pi, where you really don't have much CPU or memory to work with, if you're doing any heavy compiling (like when working on the kernel) a cross compiler is the only way to go.

While there are a lot of different methods for building cross-compilers, by far the quickest and easiest is to use crosstool-ng. This is a set of scripts that bring up a menuconfig-like interface to choose your compiler settings, then goes off and downloads what it needs, patches it, configures it, builds it and installs it all for you.

For this article I use:

  1. Slackware64 14.0 (Linux)
  2. crosstool-ng

Crosstool-NG Overview

Crosstool-ng is a set of scripts that bring up a menuconfig-like interface to choose compiler settings. The project aims to build a toolchain. Crosstool-ng also support alternative components such as uClibc, glibc, or eglibc.

Insight

Our example will build a cross compiler toolchain for Raspberry Pi, which use ARMv6 and running Linux as operating system. This will assume our OS on Pi only Linux and we cannot use this toolchain to build for other OS (RISC OS, etc).

Obtain Material

Download crosstool-ng from their official site. The latest version available per August 30th 2013 is crosstool-ng 1.18. Once the download complete, extract the content.

We also need to install crosstool-ng to our system. Let’s say we want to install it to /opt/crosstool-ng

To complete above, do following:

wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.18.0.tar.bz2  tar xjf crosstool-ng-1.18.0.tar.bz2  cd crosstool-ng-1.18.0  ./configure --prefix=/opt/crosstool-ng  make  make install  export PATH="${PATH}:/opt/crosstool-ng/bin"

For installation of crosstool-ng, make sure you do make install using root privileges.

Preparing Environment

We need a working directory for compiling our cross-compiler. This will contain toolchain configuration, downloaded files, and intermediary build results. This is not where the final location the toolchain will end up. You should reserve some space, at least 3.5GB.

Create a directory, you choose it. For example, I will use ~/working as the working directory. Go to that directory.

mkdir ~/working  cd ~/working

Compilation & Installation

Go to working directory.

Run ct-ng script to display you a configuration menu. Make sure /opt/crosstool-ng/bin is in your search path.

ct-ng menuconfig

You should see some configuration options there.

Here is the important stuff:

Path and misc options

  • Enable “Try features marked as EXPERIMENTAL”.
  • Change the prefix directory, from ${HOME}/x-tools/${CT_TARGET} to /opt/cross/x-tools/${CT_TARGET}

Target options

  • Change the “Target Architecture” to arm
  • Change the “Endiannes” to Little endian
  • Change the “Bitness” to 32-bit

Operating System

  • Change “Target OS” to Linux

Binary utilities

  • Change “binutils version” to the latest one you can find which isn’t marked as experimental (at this time 2.22)

C Compiler

  • Enable “Show Linaro versions”
  • In the gcc version field, choose the Linaro version of gcc

Once the configuration done, save it.

To build the toolchain, do following:

ct-ng build

This should take some times, minutes in my case.

Once it done, you should have cross toolchain reside on /opt/cross/x-tools/arm-unknown-linux-gnueabi/bin. You might want to add this to your search path.

Testing

First, test the version

arm-unknown-linux-gnueabi-gcc --version

Now test for the compilation. Write this source code as test.c.

#include <stdio.h>    int main() {      printf("Hello, world!\n");      return 0;  }

and compile it.

arm-unknown-linux-gnueabi-gcc -o test test.c

ARM Development Board – Operating System List

Posted: 29 Aug 2013 07:31 PM PDT

This page will list all operating system and development environment for ARM Development Board (Raspberry Pi, etc).

This page is still incomplete and might be updated periodically.

Category

  1. Android
  2. AROS
  3. BSD Unix
  4. ChibiOS
  5. DexOS
  6. FreeRTOS
  7. GEORGE 3
  8. Haiku
  9. Linux
  10. OpenWrt
  11. Plan9
  12. RISC OS
  13. Windows CE 7

Overview

ARM architecture is a RISC (Reduced Instruction Set Computing) processor designed and licensed by ARM Holdings. First developed in the 1980 by Acorn Computers Ltd.

ARM development board is a board use ARM processor with other component and serve its purpose as development purpose.

Some popular ARM Development Board are: Raspberry Pi, BeagleBone, CubieBoard, etc

[ Android ]

Free operating system for mobile phone, tablet, and smart device. Designed primarily for touchscreen mobile devices and initially developed by Android, Inc. which bought by Google in 2005.

Official forum:

Related articles:

  • -

[ AROS ]

Open source Amiga like operating system at the api level. This version runs as a task under Linux to take advantage of the drivers available inside the GNU Linux OS Core.

Amiga itself is a family of personal computers sold by Commodore in the 1980s and 1990s. While we can’t say AROS is independent OS (as being built on top of GNU/Linux) we still group it as different OS.

AROS 2013-08-30 GPLv2 and APL < ~50MiB No Binaries and run ../wherever/AEROS/boot/AROSbootstrap pi:raspberry Aros Wanderer

Site:

Download:

Related articles:

  • -

[ BSD Unix ]

FreeBSD


Advanced operating system for modern server, desktop, and embedded computer platform. Developed and maintained by a large team of individuals. FreeBSD provides advanced networking, impressive security features, and world class performance.

This is not an official release, just an image built by FreeBSD community.

Announcement:

Download:

Related articles:

  • -

NetBSD


Free, fast, secure, and highly Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop system to handheld and embedded devices.

NetBSD is based off 4.3BSD and is geared towards embedded systems.

Announcement:

Downloads:

Related articles:

  • -

[ ChibiOS ]

Site:

  • -

Related articles:

  • -

[ DexOS ]

Site:

  • -

Related articles:

  • -

[ FreeRTOS ]

Site:

  • -

Related articles:

  • -

[ GEORGE 3 ]

Site:

  • -

Related articles:

  • -

[ Haiku ]

Site:

  • -

Related articles:

  • -

[ Linux ]

Mostly, embedded system’s operating system use Linux kernel.

ArchLinux ARM 2013-08-30 OSI GPLv2 Yes raw image root:root none
berryTerminal 2013-08-30 No image N/A ltsp
Bodhi Linux 2013-08-30 GPLv2 BSD YES img+md5sum pi:bodhilinux (root:bodhilinux) Enlightenment
Chromium OS 2013-08-30
Debian ARM 2013-08-30
Fedora Remix 2013-08-30 GPLv2 BSD Yes N/A Xfce
Firefox OS 2013-08-30
FishPi 2013-08-30
GeeXboX ARM 2013-08-30
Gentoo Linux 2013-08-30 GPLv2 ~23MiB Yes N/A
ha-pi 2013-08-30
IPFire 2013-08-30 Open Source ~20MiB No N/A none
Kali Linux 2013-08-30 ? ? No image root:toor XFCE4
Meego MER 2013-08-30 GPLv2 BSD ~34MiB + XBMC No N/A XBMC
Moebius 2013-08-30 GPLv2 ~20MiB yes Raw image root:raspi none
Occidentalis 2013-08-30
OpenELEC 2013-08-30 GPLv2 bsd 88 MiB Yes Raw image root:openelec XBMC-PVR
OpenSUSE 2013-08-30 GPLv2 BSD 279MiB (+X11) No Raw Image root:linux icewm via startx
PiBang Linux 2013-08-30 GPLv2 BSD Yes user created at first boot Openbox, i3wm
PiBox 2013-08-30 OSI Mixed Yes image root:pibox Blackbox
piCore 2013-08-30
pipaOS 2013-08-30 GPLv2 BSD ~32 MiB No image sysop:posys, with sudo root privileges none
Pidora 2013-08-30
PiLFS 2013-08-30
PiMAME 2013-08-30 GPLv2 BSD Yes raw image pi:raspberry none
Puppy Linux 2013-08-30
PwnPi 2013-08-30 GPLv3 No Image root:toor xfce
QtonPi 2013-08-30 No Qt5 SDK + sdcard image root:rootme & qtonpi:qtonpi ?
Raspbian 2013-08-30 GPLv2 BSD ~30 MiB w/o desktop Yes installer root:hexxeh, root:raspbian, pi:raspbian LXDE Openbox
Raspbmc 2013-08-30 custom Yes installer pi:raspberry XBMC
RasPBX 2013-08-30
RasPlex 2013-08-30
Red Sleeve Linux 2013-08-30
RetroPie 2013-08-30
rmpREPusb 2013-08-30
RPI-TC 2013-08-30
Slackware ARM 2013-08-30
SlaXBMCRPi 2013-08-30 GPLv2, GPLv3, BSD No raw image root:slaxbmcrpi Fluxbox
SliTaz 2013-08-30 GPLv2 ~10 MiB Yes raw image root:root OpenBox
UCLinux 2013-08-30
WebOS 2013-08-30
XBian 2013-08-30 GPLv2 BSD Yes image xbian:raspberry XBMC

Arch Linux ARM


Based on Arch Linux, which aims for simplicity and full control to the end user. Provides a lightweight base structure that allows user to shape the system to their needs.

ArchLinux ARM is a rolling-release cycle that can be updated daily through small packages instead of huge updates every few months.

Site:

Related articles:

  • -

BerryTerminal


Minimal Linux distribution designed to turn the Raspberry Pi mini computer into a low-cost thin client. It allows users to login to a central Edubuntu or other LTSP server, and run applications on the central server

Site:

Download:

Related articles:

  • -

Bodhi Linux


Small Linux distribution using the Enlightenment window manager and the ARM build is based on Debian.

Site:

  • -

Related articles:

  • -

Chromium OS


Site:

  • -

Related articles:

  • -

Debian ARM


Default distribution on the Alpha boards.

Site:

  • -

Related articles:

  • -

Fedora Remix


Linux software distribution for the Raspberry Pi. It contains software packages from the Fedora Project (specifically, the Fedora ARM secondary architecture project), packages which have been specifically written for or modified for the Raspberry Pi, and proprietary software provided by the Raspberry Pi Foundation for device access.

Wiki:

Related articles:

  • -

Firefox OS


Site:

  • -

Related articles:

  • -

FishPi


Site:

  • -

Related articles:

  • -

GeeXboX ARM


Free and Open Source Media-Center purposed Linux distribution for embedded devices and desktop computers. GeeXboX is not an application, it's a full-featured OS, that one can boot as a LiveCD, from a USB key, an SD/MMC card or install on its regular HDD. The GeeXboX distribution is lightweight and designed for one single goal: embed all major multimedia applications as to turn your computer into an HTPC.

Site:

Related articles:

  • -

Gentoo Linux


Source based rolling-release distribution which emphasizes choice and flexibility. Gentoo ARM aims to be the most up to date and fastest ARM distribution available.

Site:

Related articles:

  • -

ha-pi


This debian squeeze image created to perform “pwn plug” type of attacks using Raspberry pi.

Site:

Related articles:

  • -

IPFire


Open source firewall distribution for x86 and ARM-based systems. An OS to turn device into small router for home network and very small business.

The generally small system that provides essential services for networks can be enhanced by addons which add new features to IPFire. So the system can be turned into a file server and much more.

Site:

Related articles:

  • -

Kali Linux


The successor of well-known BackTrack Linux. It is a complete rebuild, adhering completely to Debian development standards. All new infrastructure has been put in place, all tools were reviewed and packaged, and we use Git for our VCS.

Site:

Related articles:

  • -

Meego MER


Site:

  • -

Related articles:

  • -

Moebius


Very compact ARM HF debian based distribution. it fits in a 1GB SD card, has auto resizing feature to better adapt to SD card size and use Raspbian huge repositories for installing everything.

Site:

Related articles:

  • -

Occidentalis


Derived from Raspbian Wheezy, Adafruit make a few key changes to make it more hardware-hacker friendly.

Site:

  • -

Related articles:

  • -

OpenELEC


Embedded operating system built specifically to run XBMC, the open source entertainment media hub. The idea behind OpenELEC is to allow people to use their Home Theatre PC (HTPC) like any other device you might have attached to your TV, like a DVD player or Sky box. Instead of having to manage a full operating system, configure it and install the packages required to turn it into a hybrid media center, OpenELEC is designed to be simple to install, manage and use, making it more like running a set-top box than a full-blown computer.

Site:

Download:

  • -

Related articles:

  • -

OpenSUSE


Site:

  • -

Related articles:

  • -

PiBang Linux


PiBang linux is a Raspbian based distribution. PiBang is inspired by Crunchbang Linux, an i686 and x86_68 Debian based distribution. It comes preconfigured with many helpful scripts and pipemenus as well as a fork of Raspi-config with increases functions such as support for changing the user and hostname. PiBang is also one of the heavier Rasperry Pi distributions boasting a complete package set with favorites such as Abiword, OMXPlayer, GIMP, and VLC all pre-installed.

Site:

Related articles:

  • -

PiBox


Provides a build system based on Crosstool-NG, Buildroot/Busybox (mdev), the Linux kernel, Rasperry Pi firmware and installation tools to create a base system that can be installed to an SD card to boot a Raspberry Pi. The base system serves as a minimal foundation on which opkg based extensions such as XBMCBox can be installed. The build system provides an easy to customize environment for creating custom software platforms for purpose-built systems based on the Raspberry Pi.

Site:

Related articles:

  • -

piCore


Site:

  • -

Related articles:

  • -

pipaOS


Site:

  • -

Related articles:

  • -

Pidora Linux


Site:

  • -

Related articles:

  • -

PiLFS


Site:

  • -

Related articles:

  • -

PiMAME


Raspberry Pi distribution geared towards emulating video games.

Site:

Related articles:

  • -

Puppy Linux


Site:

  • -

Related articles:

  • -

PwnPi


Linux-based penetration testing dropbox distribution for the Raspberry Pi. It currently has 181 network security tools pre-installed to aid the penetration tester. It is built on the debian squeeze image from the raspberry pi foundation’s website and uses Xfce as the window manager

Site:

Related articles:

  • -

QtonPi


Site:

  • -

Related articles:

  • -

Raspbian


Raspberry Pi + Debian = Raspbian.

This project is to create a hard float port of Debian Wheezy (7.x) armhf for the Raspberry Pi. The intent of Raspbian is to bring to the Raspberry Pi user 10,000s of pre-built Debian packages specifically tuned for optimal performance on the Raspberry Pi hardware. The project is still in it’s early phases, but the major push to rebuild nearly all Debian packages for the Raspberry Pi is expected to be completed by early June, 2012 (only several hundred packages remain as of June 1st). After that, efforts will focus on making Raspbian the easiest to use, most stable and best performing Linux distribution available for the Raspberry Pi.

Site:

Related articles:

  • -

Raspbmc


Minimal Linux distribution based on Debian that brings XBMC to your Raspberry Pi. This device has an excellent form factor and enough power to handle media playback, making it an ideal component in a low HTPC setup, yet delivering the same XBMC experience that can be enjoyed on much more costly platforms. Raspbmc is brought to you by the developer of the Crystalbuntu Linux Distribution, which brings XBMC and 1080p decoding to the 1st generation Apple TV.

Site:

Related articles:

  • -

RasPBX


Site:

  • -

Related articles:

  • -

RasPlex


Entertainment Center Solution for Raspberry Pi Simply put, RasPlex lets you turn your TV into a Smart TV. Similar to the AppleTV, but completely free and open source, RasPlex is basically a set-top box. Once RasPlex is stable, it will have support for legacy console game emulation (NES, SNES, etc), as well as Plex Channels (Netflix, Crackle, Youtube, etc). RasPlex is a Plex Home Theater Client More technically stated, RasPlex is a complete port of Plex Home Theater (formerly Plex Media Center) for Raspberry Pi. RasPlex currently runs on OpenELEC for reasons of limited man power, but there is a working raspbian port that just needs some time to be brought up to speed. RasPlex was created on Gentoo linux, but that port has since been abandoned for performance reasons. We regularly merge in changes from Plex Home Theater and OpenELEC. Once things cool off a bit and we are more stable (or we get the man power), we will maintain a raspbian release as well. RasPlex is the Perfect Companion to a Plex Media Server Many people will use expensive computers as Plex Clients, or have to go through the inconvenient of plugging a computer in to their TV every time they want to use Plex. With RasPlex, just plug it in and you’re media is always ready. Put one on every TV, and have your media everywhere! You can even put RasPlex on your friend’s TV’s, and watch your media remotely.

Site:

Related articles:

  • -

Red Sleeve Linux


Linux distribution that aims to bring RHEL clone design to the ARM architecture.

Site:

Download:

Related articles:

  • -

RetroPie


Site:

  • -

Related articles:

  • -

rmpREPusb


Site:

  • -

Related articles:

  • -

RPI-TC


Raspberry Pi Thin Client Project, is a project which aims to create a very low price thin client over Raspberry Pi board.

Site:

Related articles:

Slackware ARM


Site:

  • -

Related articles:

  • -

SlaXBMCRPi


Minimal Linux distribution based on Slackware ARM that brings a full featured XBMC solution to your Raspberry Pi. It allow the user to exit from XBMC to the Desktop should he need to perform typical desktop tasks (browsing, text editing etc.).
There are two pre-built images available:

Developer: It is 3.2GB and contain all development packages required to compile the Linux kernel, XBMC and other XBMC related (or not) packages
Minimal: It is 1.8GB and contain only the packages required to run XBMC. (Does not include firefox and other GUI apps)

Site:

  • http://slaxbmc.blogspot.co.uk/

Download:

Source Code:

Related articles:

  • -

SliTaz


Site:

  • -

Related articles:

  • -

UCLinux


Site:

  • -

Related articles:

  • -

WebOS


Site:

  • -

Related articles:

  • -

XBian


XBian is a small, fast and lightweight media center distro for the Raspberry Pi, based on a minimal Raspbian image. It’s slogan is “XBMC on raspberry pi, bleeding edge” and thus it’s main focus is delivering the fastest XBMC solution for the Raspberry Pi. Thereby making most of the commercial media-center products obsolete…

Site:

Related articles:

  • -

[ OpenWrt ]

OpenWrt 2013-08-30 GPLv2 BSD 3.3MiB No Image first login with telnet set your SSH pw LuCI

Site:

  • -

Related articles:

  • -

[ Plan9 ]

The successor of Unix. Plan 9 is a distributed operating system originally designed and implemented by Ken Thompson, Rob Pike, Dave Presotto, and Phil Winterbottom @ Bell Labs. It is a lean operating system that has been ported to super computers such as IBM’s Blue Gene down to tiny boards such the RaspberryPi.

Plan9 2013-08-30 Lucent Yes raw image Rio

Site:

Download:

Related articles:

  • -

[ RISC OS ]

RISC OS is a fast and lightweight computer operating system designed in Cambridge, England by Acorn. First released in 1987, its origins can be traced back to the original team that developed the ARM microprocessor. RISC OS includes BBC BASIC which was primarily conceived to teach programming skills as part of the BBC computer literacy project.

RISC OS 2013-08-30 Shared Source No Image RISC OS WMP

Site:

Related articles:

  • -

[ Windows CE 7 ]

Site:

  • -

Related articles:

  • -

Testing the QEMU

Posted: 29 Aug 2013 07:28 PM PDT

QEMU, a popular emulation and simulation application used for simulating most architecture, from embedded processor such as ARM to common x86_64 processor. QEMU is available to various host operating system: Linux, Windows. To test QEMU capability, we can provide it with a testing disk image which has a guest operating system inside.

In this article, we will list all testing disk image available for QEMU. You can download some of the guest image from QEMU website, including a simple 8MB image of a linux distro (which is meant primarily for testing and might lacks some drivers). We will also list other QEMU test disk image we found so far on this site.

You also might interested to basic guide about QEMU disk image:

  1. Mounting QEMU disk image

QEMU Disk Images

Collection of disk images which can be used to test system emulation.

linux-0.2.img.bz2 [ mirror ] Small Linux image containing a 2.6.20 Linux kernel, X11, and various utilities to test QEMU
odin1440.img [ mirror ] FreeDOS floppy disk image from ODIN
small.ffs.bz2 [ mirror ] Small NetBSD Image
minix204.tar.bz2 [ mirror ]
Minix 2.0.4
efi-bios.tar.bz2 [ mirror ]
EFI BIOS for QEMU
sparc-test-0.2.tar.gz [ mirror ]
SPARC Linux 2.6 test kernel and initrd disk image
arm-test-0.2.tar.gz [ mirror ]
ARM Linux 2.6 test kernel and initrd disk image
mips-test-0.2.tar.gz [ mirror ]
MIPS Linux 2.6 test kernel and initrd disk image
mipsel-test-0.2.tar.gz [ mirror ]
MIPS Little Endian Linux 2.6 test kernel and initrd disk image
coldfire-test-0.1.tar.bz2 [ mirror ]
Coldfire Linux 2.6 test kernel and initrd disk image
sh-test-0.2.tar.bz2 [ mirror ]
SH4 Linux 2.6 test kernel and initrd disk image
cris-axisdev88-img-linux2_6_33.tgz [ mirror ]
CRIS AXIS Devboard88 Linux 2.6 test kernel and initrd disk image
mb-s3adsp1800-linux-2_6_34_tgz [ mirror ]
Microblaze S3ADSP1800 Linux 2.6 test kernel and initrd disk image
ppc-virtexml507-linux-2_6_34.tgz [ mirror ]
PPC-440 Virtex-ML507 Linux 2.6 test kernel and initrd disk image
xtensa-dc232b_kernel_rootfs.tgz [ mirror ]
Xtensa Linux 2.6.29 test kernel and initrd disk image

QEMU User Mode Emulation

These executables can be used to test Linux user mode emulation

linux-user-test-0.3.tar.gz [ mirror ]
Distribution of shared libraries and various shell executables for almost all Linux target architecture that QEMU simulates. It is used to make regression tests on the Linux user mode emulation

Dynamic Code Analysis

This includes any test to detect memory leaks, reads of uninitialized memory, buffer overflows, or other forms of illegal memory access. Typically these kind of tests are done using Valgrind on a Linux host. Any of the disk images and executables listed above can be used in such tests.

# Simple i386 boot test (BIOS Only) with Valgrind  valgrind --leak-check=full --track-origin=yes --verbose qemu-system-i386

Tidak ada komentar:

Posting Komentar