LilleMama
22-07-2007, 15:44
Openembedded Enigma1 Image Mod How-To
So you have built your first cvs image. Now you will want to add your own bits and pieces. Here are some tips to help you on the way.
(1) How to patch enigma
Let us assume your openembedded folder is $HOME/tuxbox-OE. Go to the $HOME/tuxbox-OE/sources folder. There you will find folder cvs. Copy it there and name it cvs-mod. Insert all your amended and new files into cvs-mod. Now in the console, write this command :-
>diff -u --recursive --new-file $HOME/tuxbox-OE/sources/cvs/enigma/apps/tuxbox/enigma $HOME/tuxbox-OE/sources/cvs-mod/enigma/apps/tuxbox/enigma > $HOME/tuxbox-OE/sources/patch1.txt
Now you will find the file patch1.txt in /sources. Next, this is important ! At the top of each diff section you will see two lines like these (for example):-
--- /$HOME/tuxbox-OE/sources/cvs/enigma/apps/tuxbox/enigma/data/resources/rcdm7000.xml 2004-06-15 11:35:49.000000000 +0100
+++ /$HOME/tuxbox-OE/sources/cvs-mod/enigma/apps/tuxbox/enigma/data/resources/rcdm7000.xml 2006-02-12 13:46:49.000000000 +0000
Edit these to (for example) :-
--- enigma/data/resources/rcdm7000.xml 2004-06-15 11:35:49.000000000 +0100
+++ enigma/data/resources/rcdm7000.xml 2006-02-12 13:46:49.000000000 +0000
Rename patch1.txt to oe_enigma_diff.patch and copy it to /openembedded/packages/enigma folder. Next, in /openembedded/packages/enigma/enigma_cvs.bb amend the line :-
SRC_URI= etc.... to add file://oe_enigma_diff.patch;patch=1;pnum=1 to the list there.
Now at the console write commands :-
>cd $HOME/tuxbox-OE/build
>source ./env.source
>bitbake -cclean enigma
>bitbake enigma
If there are compile errors you will find them in the .log file which will be referred to. If all goes well, write console commands :-
>cd $HOME/tuxbox-OE/build
>source ./env.source
>bitbake dreambox-image
The patched image will be ready.
Note :- If you have a single patched file, change the above patch command to give the paths to that file. Then insert the diff file (remember to amend the 2 top lines) to oe_enigma_diff.patch.
(2) How to insert a folder or file into the compiled image
Say you want to install a new folder script and file crontab in folder /etc. First make a folder imports (any name will do) in /build/tmp/work and copy your crontab file in import. Then insert the following two lines :-
install -d ${D}/etc/script
install -m 0755 $HOME/tuxbox-OE/build/tmp/work/imports/etc/crontab ${D}/etc
in file /openembedded/packages/dreambox/dreambox-dvb-modules.bb in the install list after :-
do_install_dm600pvr() {
do_install_dm7020() {
as appropriate. Finally write console commands:-
>cd $HOME/tuxbox-OE/build
>. env.source && bitbake -Db ../openembedded/packages/dreambox/dreambox-dvb-modules.bb -c clean && bitbake -Db ../openembedded/packages/dreambox/dreambox-dvb-modules.bb
(3) How to start a daemon at boot-up
Say you want crond to start at boot-up. Install crond in ${D}/usr/bin as described before. May have to install /usr/bin first if it is not there. Then insert the following 3 lines in file file /openembedded/packages/dreambox/dreambox-dvb-modules.bb :-
inherit update-rc.d
INITSCRIPT_NAME = "crond"
INITSCRIPT_PARAMS = "start 40 S ."
after the line :-
S = "${WORKDIR}"
(4) How to put soft-links in image /var folder
Make the soft-links in folder /build/tmp/work/base-files-3.0.14-r54/install/base-files/var, make a var.tar.gz from it and replace the original var.tar.gz in the /base-files folder. Then add the install line :-
install -m 0755 $HOME/tuxbox-OE/build/tmp/work/base-files-3.0.14-r54/install/base-files/var.tar.gz ${D}/etc/
in dreambox-dvb-modules.bb and bitbake this as before and make the image. The new var.tar.gz should now be in folder /home/pcd/tuxbox-cvsE2/build/tmp/rootfs/etc.
(5) How to change the bootlogo
Download the program TMPGEnc and the plugin easylogo.
Make your bootlogo picture as .bmp with 720 x 576 pixels. Next you need to change this picture to a .mvi file. I used the following procedure, but there may be other ways.
Copy from the easylogo 1.0 folder the file tmpgenc_template.mcf to tmpgenc/template or drag and drop in the tmpgenc main window. Start the tmpgenc software and click on video stream browse. Select your own bootlogo. Then select load (right-under your screen) and click on tmpgenc_template.mcf . Select 'Start' in tmpgenc window. Rename the output file to bootlogo_dm600pvr.mvi or bootlogo_dm7020.mvi as appropriate and replace the original in folder /sources. Then write the following console commands :-
>>cd $HOME/tuxbox-OE/build
>. env.source && bitbake -Db ../openembedded/packages/dreambox/dreambox-bootlogo.bb -c clean && bitbake -Db ../openembedded/packages/dreambox/dreambox-bootlogo.bb
Have fun LilleMama
So you have built your first cvs image. Now you will want to add your own bits and pieces. Here are some tips to help you on the way.
(1) How to patch enigma
Let us assume your openembedded folder is $HOME/tuxbox-OE. Go to the $HOME/tuxbox-OE/sources folder. There you will find folder cvs. Copy it there and name it cvs-mod. Insert all your amended and new files into cvs-mod. Now in the console, write this command :-
>diff -u --recursive --new-file $HOME/tuxbox-OE/sources/cvs/enigma/apps/tuxbox/enigma $HOME/tuxbox-OE/sources/cvs-mod/enigma/apps/tuxbox/enigma > $HOME/tuxbox-OE/sources/patch1.txt
Now you will find the file patch1.txt in /sources. Next, this is important ! At the top of each diff section you will see two lines like these (for example):-
--- /$HOME/tuxbox-OE/sources/cvs/enigma/apps/tuxbox/enigma/data/resources/rcdm7000.xml 2004-06-15 11:35:49.000000000 +0100
+++ /$HOME/tuxbox-OE/sources/cvs-mod/enigma/apps/tuxbox/enigma/data/resources/rcdm7000.xml 2006-02-12 13:46:49.000000000 +0000
Edit these to (for example) :-
--- enigma/data/resources/rcdm7000.xml 2004-06-15 11:35:49.000000000 +0100
+++ enigma/data/resources/rcdm7000.xml 2006-02-12 13:46:49.000000000 +0000
Rename patch1.txt to oe_enigma_diff.patch and copy it to /openembedded/packages/enigma folder. Next, in /openembedded/packages/enigma/enigma_cvs.bb amend the line :-
SRC_URI= etc.... to add file://oe_enigma_diff.patch;patch=1;pnum=1 to the list there.
Now at the console write commands :-
>cd $HOME/tuxbox-OE/build
>source ./env.source
>bitbake -cclean enigma
>bitbake enigma
If there are compile errors you will find them in the .log file which will be referred to. If all goes well, write console commands :-
>cd $HOME/tuxbox-OE/build
>source ./env.source
>bitbake dreambox-image
The patched image will be ready.
Note :- If you have a single patched file, change the above patch command to give the paths to that file. Then insert the diff file (remember to amend the 2 top lines) to oe_enigma_diff.patch.
(2) How to insert a folder or file into the compiled image
Say you want to install a new folder script and file crontab in folder /etc. First make a folder imports (any name will do) in /build/tmp/work and copy your crontab file in import. Then insert the following two lines :-
install -d ${D}/etc/script
install -m 0755 $HOME/tuxbox-OE/build/tmp/work/imports/etc/crontab ${D}/etc
in file /openembedded/packages/dreambox/dreambox-dvb-modules.bb in the install list after :-
do_install_dm600pvr() {
do_install_dm7020() {
as appropriate. Finally write console commands:-
>cd $HOME/tuxbox-OE/build
>. env.source && bitbake -Db ../openembedded/packages/dreambox/dreambox-dvb-modules.bb -c clean && bitbake -Db ../openembedded/packages/dreambox/dreambox-dvb-modules.bb
(3) How to start a daemon at boot-up
Say you want crond to start at boot-up. Install crond in ${D}/usr/bin as described before. May have to install /usr/bin first if it is not there. Then insert the following 3 lines in file file /openembedded/packages/dreambox/dreambox-dvb-modules.bb :-
inherit update-rc.d
INITSCRIPT_NAME = "crond"
INITSCRIPT_PARAMS = "start 40 S ."
after the line :-
S = "${WORKDIR}"
(4) How to put soft-links in image /var folder
Make the soft-links in folder /build/tmp/work/base-files-3.0.14-r54/install/base-files/var, make a var.tar.gz from it and replace the original var.tar.gz in the /base-files folder. Then add the install line :-
install -m 0755 $HOME/tuxbox-OE/build/tmp/work/base-files-3.0.14-r54/install/base-files/var.tar.gz ${D}/etc/
in dreambox-dvb-modules.bb and bitbake this as before and make the image. The new var.tar.gz should now be in folder /home/pcd/tuxbox-cvsE2/build/tmp/rootfs/etc.
(5) How to change the bootlogo
Download the program TMPGEnc and the plugin easylogo.
Make your bootlogo picture as .bmp with 720 x 576 pixels. Next you need to change this picture to a .mvi file. I used the following procedure, but there may be other ways.
Copy from the easylogo 1.0 folder the file tmpgenc_template.mcf to tmpgenc/template or drag and drop in the tmpgenc main window. Start the tmpgenc software and click on video stream browse. Select your own bootlogo. Then select load (right-under your screen) and click on tmpgenc_template.mcf . Select 'Start' in tmpgenc window. Rename the output file to bootlogo_dm600pvr.mvi or bootlogo_dm7020.mvi as appropriate and replace the original in folder /sources. Then write the following console commands :-
>>cd $HOME/tuxbox-OE/build
>. env.source && bitbake -Db ../openembedded/packages/dreambox/dreambox-bootlogo.bb -c clean && bitbake -Db ../openembedded/packages/dreambox/dreambox-bootlogo.bb
Have fun LilleMama