Thanks Thanks:  0
Likes Likes:  0
Results 1 to 1 of 1
  1. #1
    Legend for now
    Join Date
    Jun 2006
    Location
    Leatherhead
    Posts
    697
    Post Thanks
    Chats
    0
    Rep Power
    18

    [HOWTO] Compile your own DBOX2 image on an Apple Mac

    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
    Last edited by DessertDog; 30-11-2008 at 04:35 PM.
    Take a peek at my Frequently Asked DBOX2 questions:
    Hidden Content

    NEW! Want to become a next-generation DBOX2 image developer? PM me

Similar Threads

  1. Dbox2 - Which image?
    By nmittra in forum Cable Dbox2
    Replies: 4
    Last Post: 21-12-2008, 08:55 PM
  2. Apple Mac - what software is available for DBOX2?
    By Speedy2206 in forum Cable Dbox2
    Replies: 7
    Last Post: 04-12-2008, 01:10 AM
  3. Replies: 0
    Last Post: 30-11-2008, 04:02 PM
  4. Noob 7025 compile question
    By Satsearching in forum D7025 models
    Replies: 1
    Last Post: 26-11-2007, 09:19 PM
  5. dbox2 image help
    By ktailor in forum Cable Dbox2
    Replies: 6
    Last Post: 16-10-2006, 10:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •