![]() |
|
|||
|
|
||||
|
||||||
| Dbox Tuts If your Stuck Unregistered TRY here first! |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008 ![]() Location: Leatherhead
Posts: 188
iTrader: (0)
Casino cash: $64049
Thanks: 80
Thanked 257 Times in 112 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
|
I just wanted to make sure everyone knew about a few tips and tricks with the CVS, in regards to making changes and compiling.
Some people are under the impression that to make changes once a compile has failed you have to start again, which can take several hours. Why do this to yourself, when the build was only 10 minutes away from completion?? A few shortcuts that I know of: ONCE YOU HAVE COMPILED AN IMAGE, YOU CAN STILL MAKE CHANGES AND COMPILE THOSE WITHOUT HAVING TO START FROM SCRATCH SIMPLY ADD --enable-maintainer-mode TO THE END OF YOUR CONFIGURE COMMAND Examples: If you want to add code (maybe for testing, or as a last minute extra feature that you forgot to include) to the: Linux Kernel Code:
rm .deps/linuxkernel or rm .deps/linuxdir make linuxkernel make flash-neutrino-jffs2-all Code:
rm .deps/neutrino rm ../apps/tuxbox/neutrino/src/.libs/neutrino at this point if you want to add a new menu for example, modify MAKEFILE.AM to include the new .cpp file, and write the code. make neutrino make flash-neutrino-jffs2-all Code:
rm .deps/zapit rm ../apps/dvb/zapit/src/.libs/zapit make any changes to ZAPIT at this point make zapit make flash-neutrino-jffs2-all ----------------------------------------------------------------------------------------------- My personal way of making quick changes to neutrino without having to start from scratch or flash a new image. For this technique you will need a Neutrino image already on your DBOX. Also you will need to add the path to your compiler. Lets say you downloaded the CVS to /home/me/myimage. If your configure line was ./configure --prefix=/home/me/myimage/output --with-cvsdir=/home/me/myimage then I would write the following Code:
export PATH="$PATH:/home/me/myimage/output/cdk/bin" Basically you take the path from the --prefix part of the configure line, and add /cdk/bin to the end of it. This basically just gives us quick access to the compiler and strip functions. OK, moving on from that. Lets say I built neutrino once, and that image is flashed on my DBOX already. But I want to add something else to the neutrino binary without starting again. I would do: Code:
cd ../apps/tuxbox/neutrino/src ... at this point I would make any changes to the source code, including Makefile.am (you should never adjust Makefile itself, Makefile.am will rebuild Makefile correctly if it detects changes) rm .libs/neutrino make cd .libs powerpc-tuxbox-linux-gnu-strip neutrino cp neutrino /home/me Code:
killall -9 start_neutrino killall -9 neutrino chmod 755 /tmp/neutrino /tmp/neutrino & ...keep the telnet window open... closing it will kill /tmp/neutrino!... If the original image I made was great, but was missing the (for example) Zapit Config menu that renwich has just completed. I could add that by modifying /home/me/myimage/apps/tuxbox/neutrino/src/gui/Makefile.am to include my zapitconf.cpp file. I could then copy the zapitconf.cpp and zapitconf.h files into the gui directory, and add a link to that menu within neutrino_menu.cpp. I then run the make command again, which detects and compiles my changes, and gives me a neutrino binary file (in src/.libs) which I can FTP to my DBOX2 to see my new changes. I move the neutrino file to /home/me because any folder with a . before it is hidden by default, and putting it in my home directory also gives me quick and easy access to it. Voila! Hope that helps somebody ![]() Any other tips to speed things up to prevent you having to do a whole re-compile from scratch just ask me and I'll probably have the answer. For each image I do I probably only download the CVS once, patch and modify as much as I like, then flash to box to test. If it all works I take the raw neutrino-jffs2.img2x and upload it here. But lets just say that my image would have probably been flashed only once on my DBOX and then individual binary files FTP'd to it later for testing ![]() - Speedy |
|
|
|
| The Following 5 Users Say Thank You to Speedy2206 For This Useful Post: | Derekwd (05-01-2009), FreddyFr0g (06-01-2009), PaphosAL (04-01-2009), renwich (04-01-2009), Tyke (06-03-2009) |
|
|
#2 (permalink) |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008 ![]() Location: Leatherhead
Posts: 188
iTrader: (0)
Casino cash: $64049
Thanks: 80
Thanked 257 Times in 112 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
|
Also if you make alot of command-line programs like I do (makefta for example), by doing the following trick.....
Code:
export PATH="$PATH:/home/me/myimage/output/cdk/bin" Simply type (for example): Code:
powerpc-tuxbox-linux-gnu-g++ makefta.c -o makefta powerpc-tuxbox-linux-gnu-strip makefta |
|
|
|
| The Following User Says Thank You to Speedy2206 For This Useful Post: | renwich (04-01-2009) |
|
|
#3 (permalink) |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008 ![]() Location: Leatherhead
Posts: 188
iTrader: (0)
Casino cash: $64049
Thanks: 80
Thanked 257 Times in 112 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
|
Similarly I talked about shrinking files (see here: http://www.ukcvs.org/Forums/showthread.php?t=12379)
To achieve those results I done the following. Anyone can do this if they have a linux box and have previously compiled a whole image. Even if the image is old and you have made new directories containing more up-to-date CVS trees, you can still use this trick. Simply grab a file out of an existing image that you want to shrink (I would suggest trying /lib/modules/2.4.36.6/fs/cifs/cifs.o as a starting point), copy it to your linux machine (I chose a folder called /home/me/shrink), and type: Code:
export PATH="$PATH:/home/me/myimage/output/cdk/bin" cd /home/me/shrink powerpc-tuxbox-linux-gnu-strip cifs.o |
|
|
|
| The Following User Says Thank You to Speedy2206 For This Useful Post: | renwich (04-01-2009) |
|
|
#4 (permalink) |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008 ![]() Location: Leatherhead
Posts: 188
iTrader: (0)
Casino cash: $64049
Thanks: 80
Thanked 257 Times in 112 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
|
And finally, if you find that you're using this trick alot (like me), it might be worth copying the files to a seperate directory, for example:
Code:
mkdir /home/me/dbox2compile cd /home/me/myimage/output/cdk/bin cp -r * /home/me/dbox2compile Code:
export PATH="$PATH:/home/me/myimage/dbox2compile" Remember, the EXPORT line only needs to be typed once per session. So unless you shut down or reboot your machine, you should only type it once. |
|
|
|
| The Following User Says Thank You to Speedy2206 For This Useful Post: | renwich (04-01-2009) |
|
|
#5 (permalink) | |
|
Moderator
UkCvs Senior Member
Join Date: Sep 2008
Posts: 350
iTrader: (0)
Casino cash: $146980
Thanks: 105
Thanked 379 Times in 171 Posts
Nominated 10 Times in 3 Posts
TOTW/F/M Award(s): 2Groans: 0
Groaned at 0 Times in 0 Posts
|
Quote:
|
|
|
|
|
|
|
#6 (permalink) | |
|
Nagging Old Git
Team-UkCvs Senior Member
Join Date: Aug 2008 Location: A park bench, near you
Age: 75
Posts: 3,108
iTrader: (0)
Casino cash: $848260
Thanks: 2,645
Thanked 1,586 Times in 876 Posts
Nominated 2 Times in 2 Posts
TOTW/F/M Award(s): 2Groans: 1
Groaned at 0 Times in 0 Posts
|
Quote:
Cheers- AL ![]() Should have added- this was not with shrink! Last edited by PaphosAL; 04-01-2009 at 04:24 PM.. Reason: forgot something |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|