←  [EN] Third-Party Development

Forums

»

Newbie questions about enigma1 OE compile

jusvu's Photo jusvu 29 Oct 2010

Hi! Could someone give me couple of answers about compiling? I'm able to compile and create image with these (good!) instructions: http://openpli.pli-i...nembeddedBuild. But I'm little bit confused what to do if I want to change something in enigma...

1) Is it possible to compile enigma only? If I change, say, "enigma_main.cpp", how should I compile the enigma (with what command)?
2) Do I need to delete any (binary?) files before compiling or does it recognize automatically that I have changed "enigma_main.cpp"?
3) If I modify Enigma only, can I somehow copy some Enigma binaries to box or should I make new xx.nfi image every time and flash it to the box?

Sorry these questions, I have embedded SW experience, but I'm newbie with linux environment...

Thanks in advance!
Quote

xener's Photo xener 29 Oct 2010

1) Yes, it is possible, use command make in enigma root
2) Yes, you need to clean old objects, use command make
3) Yes, you could copy only enigma files to box if you have DM7020, otherwise you need to make new image
Quote

jusvu's Photo jusvu 29 Oct 2010

Thanks xener, it works!
I did following:
1. Setting path for compiler tools: export PATH="$PATH:/home/aj/openpli/build-dm600pvr/tmp/cross/bin"
2. Enigma root: cd homedir/build-dm600pvr/tmp/work/enigma-openpli+svn164-r5/enigma
3. Deleting file homedir/build-dm600pvr/tmp/work/enigma-openpli+svn164-r5/enigma/enigma_main.o
4. Typing command "make"

...and the file "enigma_main.cpp" was compiled OK!

So compilation is now OK, but how to create image without overwriting modified files (from repository)?

If I use command "make image", my changes are overwritten. How can I just make *.nfi image from compiled binaries?
Quote

ims's Photo ims 29 Oct 2010

make image does not change your changes. Only, if you remove all "stamps" for current revision.
Leave the first 3: unpack, fetch and ... ) and run "make image".

If you remove the first 3 stamps, source is again unpacked...

ad 3) for CDK and testing is possible remove there in /var file .enigma, then killall enigma, copy new enigma into /tmp, set 755 and run it (before run CCcam, if you need it)
Quote

hemispherical1's Photo hemispherical1 29 Oct 2010

make image does not change your changes. Only, if you remove all "stamps" for current revision.
Leave the first 3: unpack, fetch and ... ) and run "make image".

... but if a newer version has been released since you made your changes, for example:

If you made your changes in Enigma Rev. 170 and by the time you run make image rev 171 was released, it would ignore your changes and work with the rev 171 source...

If you just made changes to enigma and nothing else, it is probably safe to just replace the enigma binary in flash on the box. I run init 3 from telnet to stop enigma, FTP the new binary in it's place, then run init 2 to restart enigma.

It's also possible to just test the new enigma binary from /tmp, etc... Just ftp the new enigma to /tmp, run init 3 then run /tmp/enigma to use the new version. If you're happy with it you can copy it to /usr/tmp and run init 2 again to go back to normal operation with the new binary.


--
hemi
Quote