PDA

View Full Version : Attention PT-1 - Amendment to DBOX FAQ v1.70



Speedy2206
05-03-2007, 01:01 AM
I would like to further expand on the information that you have in your FAQ about creating an internet update server :)

My submission is below. You are free to use it or modify it as necessary if you wish.



How to create your very own Internet Update Server
*Information for Developers only*

This page explains how you can create your own images and offer others the possibility to download them directly from the DBOX without using a PC.

In /var/tuxbox/config/neutrino.conf you will find a line labelled "softupdate_url_file". Here, you specify the URL to a file on your server which contains a list of updates. As an example, you may wish to enter:
To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. The file "updates.txt" should be present on your server, and will need to be formatted like this:


To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. a8207ee2f8e2c23897fa219c7e3039ec 1201200510201707 Commando v5
To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. 583d46c96c8124b869a2226c5d55a471 1201200512152330 Sportster PRO 1.12

The syntax is simple.
Firstly, we enter the absolute URL to the image.
Secondly, we enter the MD5 value for that image. This is used for error checking.
Thirdly, we enter the date/time that the image was released.
Fourthly, we enter the name of the image.

The MD5 value can be calculated very quickly using this freeware program: To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. The date/time information is easy.
Lets look at this example: 120120052152330

The first two digits are the month.
The second two digits are the day (add a zero for 1 digit numbers)
The next four digits are the year.
The next three digits are the version/release information - I THINK!
The next two digits are the hour (24 hour clock)
The final two digits are the minute.

So in our example, the image was released on 1st December 2005, at 23:30.

Save the file to your webserver and connect to your server through the neutrino interface.
A list will be displayed showing each of your images available for download.

You can have as many lines as you like, representing as many images as you like.

If you want to cheat with the date/time/release information then you can grab the information from the /version file in your image after it has been completed and compiled.

This means that all you need to do is give the URL to the file, calculate its MD5 value, and give it a friendly name to be shown on the menu :)


The version/release information I wasnt too sure about. Its something like - put a 1 for "RELEASE", put a 2 for "BETA", put a 3 for "SNAPSHOT". But its easier to get it from ./version :)

nitr8
05-03-2007, 08:44 AM
Speedy,

where is you information about the release cycle?

see: dbox2 / linux :: Thema anzeigen - releaseCyklus weicht ab ?? (http://tuxbox-forum.dreambox-fan.de/forum/viewtopic.php?t=39046&postdays=0&postorder=asc&highlight=releasecycle&start=20)

also to create a md5 checksum why not just use you linux box you compiled on?



nitr8@jijina:~/tuxbox/dbox2/cdkflash$ md5sum root-neutrino.squashfs
b7b3192a0704f76b4557d672d9e36d53 root-neutrino.squashfs
nitr8@jijina:~/tuxbox/dbox2/cdkflash$


PT-1 i have this compiled into hnd, just need your latest build as mine is out of date since i handed it back to you mate.

--me

nitr8
05-03-2007, 08:58 AM
speedy,

i disagree on your version'ing too:

SBBBYYYYMMTTHHMM is the convention
1150200703050754 is the version info:

S


release - 0
snapshot - 1
internal - 2


BBB


Build Number consisting of 3 digests 150 is version 1.50


YYYY


Year


MM


Month


TT


Is day - i guess Tag in german


HH


Hour


MM


Minute


You can use mkversion.sh to do this for you:


#!/bin/sh

releasetype=3
versionnumber=000
year=`date +%Y`
month=`date +%m`
day=`date +%d`
hour=`date +%H`
minute=`date +%M`

while expr $# > 0 ; do
case "$1" in
-release)
releasetype=0
;;
-snapshot)
releasetype=1
;;
-internal)
releasetype=2
;;
-version)
versionnumber=$2
shift
;;
esac
shift
done

echo $releasetype$versionnumber$year$month$day$hour$min ute


then just



nitr8@jijina:~$ ./mkversion -snapshot -version 150
1150200703050756


you can also create all your lists automatically by using:

make allimages.list

at the end of your build.

I think we should work on this a bit more befor it goes into the document pt-1

--me

nitr8
05-03-2007, 09:55 AM
speedy,

where did you get this info from?

how did you get around the recylce stuff?
http://jijina.nfye.com/dbox/a.jpg

--me

Speedy2206
05-03-2007, 02:48 PM
@nitr8
you're right! :) yours is a much better (and correct) explanation of the digits.

That error message must relate to the current image for which you are upgrading. Compare the strings in ./version to the digits you have entered to see where they differ.

I'll have to investigate further.
I know it used to work fine on Dreambox :)

nitr8
05-03-2007, 02:55 PM
you need to update tuxbox-cvs/apps/tuxbox/neutrino/src/gui/update.cpp

with the relevant RELEASE_CYCLE

for c8 for example


#define RELEASE_CYCLE "8.00"


--me

pt-1
05-03-2007, 04:16 PM
Interesting stuff guys...I am busy with a training course at present but have a proper read tonight

Speedy2206
08-03-2007, 12:28 PM
A quick method I devised

1. Apply these diffs - they reduce 'Software Update' screen, and skip the release cycle checking.
2. In your image, add update=http://your/server to your /.version file.

3. When you release a new image, create/modify the file on your update server:

To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. a8207ee2f8e2c23897fa219c7e3039ec 1201200510201707 Commando v5
To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. 583d46c96c8124b869a2226c5d55a471 1201200512152330 Sportster PRO 1.12

The first section is the URL to the image itself.
The second section is the MD5 of the image file.
To obtain the md5, use your linux machine to run the "md5sum my_image.img" command.

The third section is the versioning information. This follows the SBBBYYYYMMTTHHMM convention.
You can use mkversion on your linux box to create this if you like, or follow this:

S = 0 (Release), 1 (Snapshot), or 2 (Internal/BETA)
BBB = Build Number. For example, "150" means version 1.50
YYYY = Year of release.
MM = Month of release.
TT = Day of release.
HH = Hour that the image was released.
MM = Minute that the image was released.

Finally, the last section on your updates file is a friendly description for the image.
For example, "Commando v9".

Upload this file to your server, and get your DBOX to connect to it.
Success, you now have a working internet update server! :)


Screenshot of reduced menu below:
http://i37.photobucket.com/albums/e91/liamcrayden/netupdate_diff_sample.jpg



Much of this information was accurately provided by nitr8, with thanks.
Hopefully will be seeing some more internet update functionality in images soon :)

Speedy2206
08-03-2007, 12:36 PM
Oops, here are the diffs.
Nothing special; just saves some time and effort :)


Use patch -p1 < net_update.diff in root CVS directory.

nitr8
09-03-2007, 03:01 PM
@speedy

any idea on how i can now remove this
To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. other thank this it works pukka.

--me

Speedy2206
09-03-2007, 03:33 PM
If you set the type of the image upgrade to 0 (Release) then it should just skip that message. Maybe you also need to edit /.version to include the 0 (Release) too (in the existing image that you are upgrading) so that it doesnt think its trying to upgrade/downgrade from a BETA image.

If that doesnt work then we can easily remove that messagebox from the coding and just skip straight to the flashing.

nitr8
09-03-2007, 04:32 PM
cheers for that,

will give it a bash tonight.

--me