Compile the Firmware

From OpenFSG

Jump to: navigation, search

FSG

image:Yes.png

DTG

image:Yes.png

NDP

image:Yes.png


Contents


Basic Information

This HowTo will explain all main steps to compile a custom firmware. It is recommended to first compile a firmware-version without any changes. You can use every host you like, because we are using a virtual machine (VM) for compiling. I tried all of the following on a GNU Linux/Debian x86 machine and with FSG firmware 4.3.8 (4.4.5 is still unpublished). On the VM we will use Debian. Also other Linux distributions should work, but Debian allows installation of all required compontents very fast and I'm familiar with it.

And now lets go.


Installing the VM: VirtualBox

  • download Virtual Box for your host platform (e.g. Windows, Linux, Unix, Mac) from: http://www.virtualbox.org/
  • install Virtual Box
  • create a new virtual machine: Linux/Debian, create a new dynamic disk with 8 GB


Installing Debian

  • download Debian. Get the first CD-Image or a 'small CD' to install Debian by downloading all during install process: http://debian.org
  • add CD-Image to your Debian VM at VirtualBox
  • start your VM. Now you should see the first page to install Debian.
  • select graphical installation and follow the guide
  • after successfully installing Debian, shutdown your VM an save the current state
  • edit your VM and add a share-folder (e.g. AllData)
  • restart your VM and use the package manager (Synaptic) to install the following packages:
ntpdate
make
gcc
linux-header-"..." (where "..." same as: 'uname -a')
automake
automake1.9
autoconf
libtool
bison
gettext
gawk
subversion
tk8.5
uboot-mkimage
perl
rsync
  • now click on the menu of your running VM window and install the additional VirtualBox-Tools CD-Image
    • now a new Device is shown on your desktop of Debian
    • create a new folder (e.g. cdrom) on your desktop and copy all content of the new device into it
    • start a root-console and change to new folder: cd /home/<username>/Desktop/cdrom/
    • now run install-routine: sh autorun.sh
    • restart your VM
  • open a root-console
  • create a new mount-folder: mkdir /media/vbox/
  • mount your share-folder: mount -t vboxsf AllData /media/vbox/

Get a copy of firmware-source

We host OpenFSG project on Sourceforge. To get a copy of source-code you make a checkout of svn-repository. So create a folder wherever you like (from a user-console):

mkdir ~/Desktop/OpenFSG_build
cd ~/Desktop/OpenFSG_build

and do a checkout and change into folder:

svn co https://openfsg.svn.sourceforge.net/svnroot/openfsg openfsg
cd openfsg/trunk


Compile Firmware

Configure Source

We overworked the whole build-process to be much more generically. First step is to configure the build process to compile the firmware for right device:

make xconfig

Here you only have to select your device and click on 'save and exit'. No lets start...

Compile all

You have to do all following steps as root (enter 'su' to become root), because we need 'ntpdate', which only root can use.

make
  • ... and wait ... wait ... still wait ... now seems to be finished ... no, still wait (as you see a fast pc is what you need :-D )
   By the way (seems that you are still waiting) it is right that compiling with
   a virtual machine, as we do, takes more time than without a VM. But with this method
   compiling on every host (Windows, Mac, Linux, Unix) is always the same.
   If you like to compile directly on your Linux host, then it's possible. Only left the VM out.
   Note that VirtualBox only runs on x86 machines. If you like other platforms to compile
   the firmware you have to use another VM.
  • now your firmware-image should be at your build directorie (e.g. ~/Desktop/OpenFSG_build/openfsg/trunk)

Update FSG with own Firmware

!!! You should not update your device with this firmware, because this source is unfinished and don't work !!!


This is pretty easy. Get your image (.bin) and use the update feature of the web-interface. But be careful. It is possible that your device don't boot anymore if there is something wrong.

So absolutely no warranty from me.

May the Source be with you!

What to do if your FSG becames a brick?


Required reading

Basics

Advanced

Personal tools