View Single Post
  #1 (permalink)  
Old 01-21-2005
xphile's Avatar
xphile xphile is offline
Super Moderator
 
Join Date: Aug 2003
Posts: 885
Thanks: 0
Thanked 0 Times in 0 Posts
xphile is on a distinguished road
Understanding the DM7020 - a build-it-from-source exploration of the new Dreambox

In an attempt to understand more about the fundamental differences
in the underlying hardware and software of the DM7020 from it's predecessor the DM7000, I have
decided to start this thread and share with you all what I have discovered, and the experimentations
I have made on this new unit.

I apologise ahead of time if anything I post here is later discovered to be
inaccurate. Please feel free to post any corrections or inaccuracies in this thread so we can
all benefit.

OK, now that the formalities are out of the way here goes....

Let's start by looking at the Flash. The new Dreambox uses NAND flash memory. Being a software
guy myself, im sure I dont fully appreciate the benefits of this hardware. What I do know is
that the new 7020 uses 32MB of NAND flash memory whereas the 7000 uses 8MB of NOR flash memory,
and to me that means MORE SPACE

I have found a nice PDF that helps explain some of the differences.
Check out http://www.semicon.toshiba.co.jp/eng...ash_what_e.pdf

Also this site explains some more www.linux-mtd.infradead.org/tech/nand.html

Moving onto the software side of things, the first thing I wanted to do, was to understand the
7020 boot loader. I found the overview provided by http://developer.elitedvb.net to be very informative.
This is an overview of the boot process (as documented on this site):

On the DM7020, there is a loader called "first-stage" in the bootrom.

1. First, it will look for a answer for the serial "dreamup" protocol
2. Then, it will look in the NAND flash for a valid 2nd stage loader. When found, the loader will be decompressed (gzip) and executed.
3. If no second stage loader was found, the loader will try to boot from a recovery compact flash image. I'll describe this later, but usually you don't need this.
4. If even this doesn't work, the loader will give up.

This means that even if you destroyed your second stage loader, the only thing you need is a serial cable.
NO MORE JTAG.

Already, you should be able to see how much the 7020 has improved and how much more stable it is.

Continuing with software, I decided to understand what actually gets flashed to this new 32MB NAND memory.
To do this, I decided to do what I love most and build the factory image. Full instructions for this process can
be found at the http://developer.elitedvb.net site. Here is my summary.

The first major difference I discovered was that code is no longer based on the tuxbox cdk, but is now
using OpenEmbedded (www.openembedded.org). Also the management of the code assets are no longer using CVS but
now BitKeeper. So first thing you need to do is to install BitKeeper from www.bitmover.com

Once installed, you are almost ready to follow the tutorial at http://developer.elitedvb.net/listpr...hp?curr_dir=81

NOTE, I say ALMOST ready, as there are a couple of little gotcha's. After running the ./install.sh take note of
the following:

- At the end of this post you will find a version of the local.conf file that worked for me. I would advise you use this version instead of the default one. Make sure you change the directories from /home/xphile to something else. It essentially incorporates a bunch of changes to this file as described by tmbinc (thx m8). Just copy my version into {tuxbox-oe-topdir}/build/conf

- Also at the end of this file you will need to get the mtd-snapshot-20041113.tar.bz2 (thx noggie) and put it into {tuxbox-oe-topdir}/sources

During the build I also found that it could not connect to get freetype-2.0.9.tar.bz2. However this file is alot easier
to find on the net and as before, just whack it into {tuxbox-oe-topdir}/sources. This rule applies for any bz2 that fails to
download into your build.

Now you are ready to build the distribution. Perform the source ./env.source and the oemake dreambox-image steps and go
to bed. No seriously, go to bed it takes time

In the morning, if your build was successfully, you should end up with the magic file. Yes the image!!!.

The image is found in the {tuxbox-oe-topdir}/build/tmp/deploy/images directory. In my case it was called
dreambox-image-dreambox-20050120082650.nfi

That's right! an NFI file. What's that you ask?, good question.

The NFI file is the new image format for the 7020. It basically contains 3 partitions:

- The gzipped second stage loader described above (main.bin.gz). At this moment, there is no source code for this binary. It gets
downloaded prebuilt.
- The boot JFFS2 (essentially the kernel)
- The root JFFS2 (essentially the rest)

To flash the image there is really only one option available at this point in time as DreamUp is not available
(well not to me anyway). The one method I found is also described on full at http://developer.elitedvb.net

Here is a summary of the steps:

1. Power down the Dreambox, either using "shutdown" (to enter the deep-standby mode) or by using the power-switch. Standby is not enough!
2. Press and hold the lower frontpanel button.
3. Switch on the dreambox, either by using the powerswitch or, in deep-standby mode, press the power button. Still, hold the lower button.
4. The text "*** STOP ***" should appear. If something like "/flash".. appears, you didn't hold the right button.
5. Now you can release the button. The bootloader entered the "waiting" mode.
6. Above the "*** STOP ***" text, there should appear an IP-address (four decimal values with a dot in between). If there appears the string "dhcp" instead, the box still searches for a DHCP server. Wait a bit. If it doesn't change, something doesn't work with the DHCP server. Check whether network cable is plugged in etc. If it just doesn't work, set an IP using the serial terminal)
7. Now, open a browser on your PC. enter in the address line "http://ip/" (where ip must be replaced with the value in the LCD).
8. On the bottom of the page, there's a link called "firmware upgrade". Click it.
9. On the next page, you can select the flash image you want to flash. be sure that it has the ".nfi" extension. You can't flash other images (like .img)!
10. Click on "FLASH!" and wait. It might take some time to upload and flash the image.
11. Switch the box off again, and on again. The new image should be flashed and working.

It worked well and in my opinion is ALOT nicer than the other Dreambox methods (root.cramfs etc etc)

Well that's all I have to say. I'm sure I bored you all enough already

Please feel free to add your comments to this thread. As I discover more, I will update.

Understanding how frustrating it is to get people to share information I can assure you that anything I learn
will be shared with you all here at the Sat-Industry forum.

I hope this helps someone.
Attached Files
File Type: conf local.conf (768 Bytes, 320 views)
File Type: bz2 mtd-snapshot-20041113.tar.bz2 (885.9 KB, 226 views)

Last edited by xphile : 01-21-2005 at 12:21 PM.
Reply With Quote
Sponsored links
 
Page generated in 0.22709 seconds with 10 queries