Rockbox Development > Starting Development and Compiling
How to automatically compile a daily build
mikeage:
I know this is not a new build, but it's a general comment for customized builds, so I hope it can stay in this forum.
I wrote a small bash script that automatically downloads, patches, and compiles a build for a given day (or the current day) for a given platform. This way, I can put this in a cron job, and my builds are done automatically. I hope this will help those who want to release customized builds more frequently.
To use this, cut and paste into a file named (for example) rockbox.sh. Edit the list of patches to apply, and cut-and-paste the section labeled
--- Code: ---#BUILDS#
--- End code ---
to select the builds you want (the number needs to be changed to the appropriate number from the configure script, and the filename / directory should be set). Then run
--- Code: ---rockbox.sh 20061005
--- End code ---
to download and build the October 5th build (for example), or
--- Code: ---rockbox.sh -d
--- End code ---
for the current days build. Note that I've only tested this on Linux (Ubuntu Dapper Drake), not on cygwin.
--- Code: ---#!/bin/bash
if [ -z "$1" ]; then
exit
fi
if [ $1 = "-d" ]; then
date=`date "+%Y%m%d"`
else
date=$1
fi
cd /tmp/
wget -c --quiet http://download.rockbox.org/daily/rockbox-daily-$date.tar.gz
tar xvfz rockbox-daily-$date.tar.gz
cd rockbox-daily-$date
# PATCHES #
patch -p0 <
patch -p0 <
#BUILDS#
#iPod 4G#
cd /tmp/
mkdir build-4g
cd build-4g
echo -e "24\n\n" | ../rockbox-daily-$date/tools/configure
make
make zip
mv rockbox.zip /tmp/rockbox-$date-4g.zip
#iPod mini1g#
cd /tmp/
mkdir build-mini1g
cd build-mini1g
echo -e "25\n\n" | ../rockbox-daily-$date/tools/configure
make
make zip
mv rockbox.zip /tmp/rockbox-$date-mini1g.zip
cd /tmp/
rm -rf rockbox-daily-$date build-4g build-mini1g
--- End code ---
Hope this is helpful!
JdGordon:
an alternative way (less download and possibly faste, especially if you dont use ccache)
login to cvs and grab the whole repository (instructions on the wiki)
then put something like this into a script in the rockbox/ direcoty
#!/bin/bash
cvs up -dPC # grab a clean version of the source code
patch -p0 < %PATCHES% #do this for each patch you want
cd build_dir
make
iPodFoo:
Ive been trying out a script of my own similar to these. But something isnt working right.
The script is:
--- Code: ---#!/bin/bash
cvs up -dPC # grab a clean version of the source code
mkdir nano-sim
cd nano-sim
echo -e "21\s\s" | ../tools/configure
make
make install
--- End code ---
I run it as sh ./update.sh in the rockbox-devel folder. It downloads the source but then crashes out to:
--- Quote ---: No such file or directory/tools/configure
: command not foundne 6: make
make: *** No rule to make target `install'. Stop.
user@debian:~/rockbox-devel$
--- End quote ---
Not sure whats hiding behind the second line?
: command not foundne 6: make
EDIT: Think its saying Line 6: make.
Anyway, the nano-sim folder that is made comes out as nano-sim\r and I cant view inside it as it keeps saying file or folder not found. In XP its seen as nano-simâ–¡ a small box after the name, but i can view inside it, though theres nothing there obviously as the configure couldnt run.
I think because debian cant seem to go into that folder it wont run the configure.
Any help much appreciated.
pabouk:
I am almost sure that you edited the script using some Windows editor so it has wrong line ends. Convert it using dos2unix or other conversion utility.
If you want to edit the files in Windows use a better editor (for example notepad2) and save the files with Unix-style ends.
Regarding the problematic directory: Have you tried something like ls -l nano-sim\r ?
iPodFoo:
Excellente ;D
You were right pabouk. I now used textpad to save as unix format now and its fine now.
Quick question, how can I have the script look for the nano-sim folder and create it if one isnt available? Do I need to use the if and else commands?
Thanks.
Navigation
[0] Message Index
[#] Next page
Go to full version