Archive for February, 2014

Tool chain for the TWR-MPC5125

This is a followup to the previous write-up (as some information have become outdated):

https://tthtlc.wordpress.com/2011/01/06/unboxing-my-freescale-board-mpc5125

MPC5125 as provided here:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5125

https://linuxlink.timesys.com/docs/gsg/mpc5125_twr

https://community.freescale.com/thread/74066

http://cache.freescale.com/files/soft_dev_tools/software/board_support_packages/TWRMPC5125LinuxBSP.rar?fpsp=1&WT_TYPE=Board%20Support%20Packages&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=rar&WT_ASSET=Downloads&sr=5

http://www.freescale.com/webapp/sps/download/license.jsp?colCode=CWF-MPC512xADS&nodeId=0127260061033202A5621E&location=overview&WT_TYPE=Board%20Support%20Packages&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=iso&WT_ASSET=Downloads&Parent_nodeId=123481170878772616621E&Parent_pageType=overview

https://community.freescale.com/thread/127394

http://www.freescale.com/files/microcontrollers/doc/fact_sheet/MPC5125FS.pdf

The following is an attempt to recompile the source codes using ELDK toolchain:

https://community.freescale.com/message/342028#342028

I downloaded the following files (from http://ftp.denx.de/pub/eldk/5.3/targets/powerpc/):

eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh
powerpc.sha256
target.conf
install.sh

Then I installed them by doing the following:

$ mkdir eldk-download
$ cd eldk-download
$ mkdir -p targets/powerpc
$ wget ftp://ftp.denx.de/pub/eldk/5.3/install.sh
$ cd targets/powerpc
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/target.conf
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/powerpc.sha256
$ sha256sum -c armv7a.sha256
eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh: OK
target.conf: OK

$ cd ../..
$ chmod a+x install.sh
$ ./install.sh -s gmae -r – powerpc

That resulted in ‘gmae’ selected as the cross compiler toolchain and ‘none’ selected as the root file system (I’m using LimeOS on the development board).

Then I cross-compiled “Hello World” with the following:

$ source opt/eldk-5.3/powerpc/environment-setup-powerpc-linux
$ powerpc-gcc helloworld.c

How to compile Firefox OS?

First it got started as a project to build Firefox OS for APC-IO (http://apc.io/):

Instruction is given here:

https://github.com/apc-io/apc-firefox-os/blob/master/building-guide.md

You can get a free APC-IO if you submit a pull request (see here: http://apc.io/software/)!!

First is to identify your own build environment – mine is 64-bit Ubuntu 12.04 LTS, and so the requirements is decribed below:

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites

or:

https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites

The following is just a very brief introduction:

https://developer.mozilla.org/en/docs/Simple_Firefox_build

Better guide is follows:

https://developer.mozilla.org/en-US/Firefox_OS/Preparing_for_your_first_B2G_build#Configuring_B2G_for_your_device

As explained below, the configuration device for API-IO is "wmid":

https://github.com/apc-io/apc-firefox-os/blob/master/building-guide.md

And so the compilation started and ended successfully:

<…>
make[3]: Entering directory `/home/tteikhua/Downloads/apc-firefox-os/B2G/objdir-gecko/b2g/installer’

make[3]: Nothing to be done for `tools’.
make[3]: Leaving directory `/home/tteikhua/Downloads/apc-firefox-os/B2G/objdir-gecko/b2g/installer’
make[2]: Leaving directory `/home/tteikhua/Downloads/apc-firefox-os/B2G/objdir-gecko/b2g/installer’
make[1]: Leaving directory `/home/tteikhua/Downloads/apc-firefox-os/B2G/objdir-gecko’
Install dir: out/target/product/wmid/system/b2g
rm -rf out/target/product/wmid/system/b2g/user.js
mkdir -p out/target/product/wmid/system/b2g/defaults/pref
cp -r /home/tteikhua/Downloads/apc-firefox-os/B2G/gaia/profile/defaults/* out/target/product/wmid/system/b2g/defaults/
cd out/target/product/wmid/system && tar xvfz /home/tteikhua/Downloads/apc-firefox-os/B2G/out/target/product/wmid/obj/DATA/gecko_intermediates/gecko
b2g/
b2g/libnss3.so
b2g/libxul.so
b2g/libmozglue.so
b2g/dependentlibs.list
b2g/Throbber-small.gif
b2g/precomplete
b2g/platform.ini
b2g/updater
b2g/crashreporter.ini
b2g/libnssckbi.so
b2g/libsoftokn3.so
b2g/omni.ja
b2g/plugin-container
b2g/application.ini
b2g/run-mozilla.sh
b2g/b2g
b2g/libfreebl3.so
b2g/dictionaries/
b2g/dictionaries/en-US.dic
b2g/dictionaries/en-US.aff
b2g/ua-update.json
b2g/removed-files
Finding NOTICE files: out/target/product/wmid/obj/NOTICE_FILES/hash-timestamp
Combining NOTICE files: out/target/product/wmid/obj/NOTICE.html
Installed file list: out/target/product/wmid/installed-files.txt
Target system fs image: out/target/product/wmid/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/wmid/system.img

real 29m31.984s
user 120m40.144s
sys 9m22.456s
Creating rootfs tarball ..
Done. Please copy boot.img, recovery.img and rootfs.b2g_140218.0829.tgz to SDCARD and flash to the device.

More compilation bugs related information:

http://rg4.net/archives/1056.html

http://askubuntu.com/questions/392058/usr-bin-ld-cannot-find-lx11-building-firefox-os

Vickblöm

Research scattered with thoughts, ideas, and dreams

Penetration Testing Lab

Offensive Techniques & Methodologies

Astr0baby's not so random thoughts _____ rand() % 100;

@astr0baby on Twitter for fresh randomness

The Data Explorer

playing around with open data to learn some cool stuff about data analysis and the world

Conorsblog

Data | ML | NLP | Python | R

quyv

Just a thought

IFT6266 - H2017 Deep Learning

A Graduate Course Offered at Université de Montréal

Deep Learning IFT6266-H2017 UdeM

Philippe Paradis - My solutions to the image inpainting problem

IFT6266 – H2017 DEEP LEARNING

Pulkit's thoughts on the course project

Thomas Dinsmore's Blog

No man but a blockhead ever wrote except for money -- Samuel Johnson

the morning paper

a random walk through Computer Science research, by Adrian Colyer

The Spectator

Shakir's Machine Learning Blog