Because the Apple Macintosh runs a Unix-style operating system, you can compile a DBOX2 image on it natively using just the terminal that is built in to OSX. This eliminates the need to run a virtual Linux machine or create any obscure methods of compiling.
I have based these instructions on Mac OSX 10.5.4 (Leopard) but they should still be applicable to all other versions above OS9. This has been tested using a Neutrino JFFS2 image only - I have not yet had a chance to play with squashFS or enigma on OSX.
Since these instructions make it REALLY EASY for anyone with an Apple Macintosh to create their own DBOX image I would expect alot more mac developers stepping up to contribute to the scene.
Step 1 - obtaining the required files
The easiest way to get the majority of the tools required to build a DBOX image is to download the "XCode Developers Package" from Apple themselves. Click Hidden Content and download the "Xcode for Mac Development" package. You may be required to register (just once, and its free).
When the download is complete (the package is quite large, almost 1GB, so be patient!), simply mount the DMG image and install the developer tools to their default location (which is /Developer).
There will be no obviously visible icons to start the XCode package after installation but that is fine - we wont actually be using XCode, we just need a few tools out of that package to help us build our image.
Next you will need to download two packages - libtool and wget.
Click here to download libtool 2.2
Click here to download wget 1.9
Download these two files to your HOME DIRECTORY but do not open them just yet.
Finally, open up a terminal (can be found on the Utilties menu or Applications Menu depending on your version)
Type the following commands, pressing enter after each one:
Code:
cd $home
tar zxf libtool-2.2.tar.gz
cd libtool-2.2
./configure
make
sudo make install
Code:
cd $home
tar zxf wget-1.9.tar.gz
cd wget-1.9
./configure
make
sudo make install
Once these steps have been completed successfully, delete the downloaded files and the remaining directories from your Home folder using the Finder. They are no longer required as the parts we need have already been installed to the system at this point.
[b]THESE STEPS ONLY NEED TO BE PERFORMED ONCE - YOU WILL NEVER NEED TO DO THE ABOVE EVER AGAIN UNLESS YOU REINSTALL OR RESTORE YOUR MAC FOR WHATEVER REASON.
Step 2 - setting up the environment
Setting up the environment is easy, as it just involves creating a directory for the files to go in whilst we work with them. For simplity I would recommend that you close the terminal at this point and then open up another instance of it so that you are starting from a blank screen, thus preventing confusion.
In this guide we will create the folder structure for the image in a folder called DBOX2. First however we need to download a patch to prevent problems with compiling the kernel.
Download the attached osxbuild2.diff file to your home directory and leave it there.
Type the following into the terminal window, pressing enter after each line, to set up the directory:
Code:
cd /
mkdir /dbox2
cd dbox2
cvs -d Hidden Content :/cvs/tuxbox -z3 co -f -r newmake -P .
cd cdk
mv $home/osxbuild2.diff /dbox2/cdk
patch -p1 < osxbuild2.diff
./autogen.sh
./configure --prefix=/dbox2/output --with-cvsdir=/dbox2 --enable-cdkVcInfo --disable-ext3 --enable-upnp
The OSX build patch has now been applied - basically this needs to be done because OSX does not have a working expr that we can use - although it is POSIX-compliant it is not GNU compatible and therefore we need to change a few liens of code in order for the mac to see what we are trying to do.
As an extra step we also need to redirect a few files so that the dbox2 compiler knows where things are - this is because files on OSX are stored in a slightly different place than that of Linux distributions.
Continue typing these commands into the terminal:
Code:
ln -s /usr/bin/true /bin/true
ln -s /usr/bin/false /bin/false
The build environment is now set up and all the files required to build your DBOX2 image are ready to go. At this point you can apply other diffs or modify files to customize your image. All the files you will need to edit can be found by using the Finder.
Simply navigate to: Computer -> Hard Disk -> dbox2 > apps > tuxbox > neutrino > src
... and open any files in there that you wish to view with TextEdit.
Step 3 - compiling the image
Once all your modifications have been done (I would recommend not patching any files or modifying anything the first time you try this, just to make things easier for you) then the image is ready to be compiling.
In the terminal, type:
Code:
make flash-neutrino-jffs2-all
This step will take up between 2 and 3 hours to complete and you will need an active internet connection throughout the entire process. When everything is complete, and you see no errors in the terminal window, you have successfully made your first DBOX2 image!
Using the Finder, navigate to Computer -> Hard Disk -> dbox2 -> output
You will find two files: neutrino-jffs2.img.1x and neutrino-jffs2.img.2x
These are the 1xI and 2xI image files and can be FTP'd or flashed to your box. Done!!!
Find them here:Hidden Content
Bookmarks