1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-25 16:11:53 +02:00

Do not build firmware on buildds

There is no mipsel cross-compiler packaged for Debian, so building
the firmware on arbitrary build machines is not possible.

So let packagers build firmware when generating the source package.
The built firmware is kept in the debian/ directory and then
copied verbatim to <staging directory>/usr/share/xburst-tools
at the appropriate time.

The commands to prepare the firmware are in a script named
debian/autogen.sh, which could be taught to do other things (such as
generate a changelog) later.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
Jonathan Nieder 2010-04-04 22:45:12 -05:00 committed by Xiangfu Liu
parent 1b6d5cccd3
commit 81adfd188d
6 changed files with 64 additions and 9 deletions

View File

@ -1,3 +1,6 @@
/xburst_stage1.bin
/xburst_stage2.bin
/files
/*.debhelper.log

View File

@ -0,0 +1,21 @@
This Debian package is developed in a Git repository (see the Vcs-Git field
of debian/control). To build from a git checkout:
debian/autogen.sh
debuild
This requires a mipsel-openwrt-linux- cross-toolchain in your $PATH. You
can get one by building the development environment from Qi Hardware, for
example.
git://projects.qi-hardware.com/openwrt-xburst.git xburst
See the Qi Hardware wiki for details.
http://en.qi-hardware.com/wiki/Building_Software_Image
To build a released version of this package, no special instructions apply.
“dpkg-buildpackage” or “apt-get -b source xburst-tools” should work as
usual.
-- Jonathan Nieder <jrnieder@gmail.com> Sun, 04 Apr 2010 22:08:28 -0500

10
usbboot/debian/autogen.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Generate debian/xburst_stage1.bin and debian/xburst_stage2.bin
#
# Requires a mipsel-openwrt-linux- toolchain on the $PATH.
set -e
debian/rules firmware
cp -f xburst_stage1/xburst_stage1.bin debian/
cp -f xburst_stage2/xburst_stage2.bin debian/

View File

@ -6,8 +6,12 @@ xburst-tools (0.0+201002-1.1) local; urgency=low
* Build-Conflicts: automake1.4
* add a Vcs-Git field to debian/control and remove the outdated watch
file
* debian/README.source: add instructions for re-building the firmware
* debian/autogen.sh: new script
* debian/rules: install firmware built at packaging time, to avoid
requiring a mipsel cross-compiler on buildds
-- Jonathan Nieder <jrnieder@gmail.com> Sun, 04 Apr 2010 21:45:57 -0500
-- Jonathan Nieder <jrnieder@gmail.com> Sun, 04 Apr 2010 22:08:47 -0500
xburst-tools (0.0+201002-1) unstable; urgency=low

View File

@ -36,8 +36,7 @@ splitgitignore='#!/usr/bin/awk
}
'
gitdir="-type d -name '.*' -prune"
debiandir="-type d -name debian -prune"
offlimits="-type d -name '.*' -prune -o -type d -name debian -prune"
remove_file_globs() {
while read glob
@ -56,7 +55,7 @@ remove_directory_globs() {
remove_file_findpatterns() {
while read pat
do
find . $gitdir -o \
find . $offlimits -o \
'(' -name "$pat" -execdir rm -f '{}' + ')'
done
}
@ -64,12 +63,12 @@ remove_file_findpatterns() {
remove_directory_findpatterns() {
while read pat
do
find . $gitdir -o \
find . $offlimits -o \
'(' -type d -name "$pat" -execdir rm -fr '{}' + ')'
done
}
find . $gitdir -o $debiandir -o '(' -name .gitignore -print ')' |
find . $offlimits -o '(' -name .gitignore -print ')' |
while read file
do
(

View File

@ -6,12 +6,22 @@ build clean install binary-arch binary-indep binary:
+dh --parallel $(opt_no_act) $@
override_dh_auto_clean:
test -e debian/xburst_stage1.bin || { \
echo >&2 see debian/README.source; \
exit 1; \
}
dh_auto_clean
sh debian/clean.sh
override_dh_auto_configure:
AUTOMAKE="automake --foreign" autoreconf -is
dh_auto_configure -- $(opt_optimize) $(opt_quiet) LDFLAGS=-Wl,-z,defs
override_dh_auto_configure: configure
dh_auto_configure -- $(opt_optimize) $(opt_quiet) \
--disable-firmware LDFLAGS=-Wl,-z,defs
override_dh_auto_install:
dh_auto_install
: install firmware from source package
dh_install debian/xburst_stage1.bin usr/share/xburst-tools/
dh_install debian/xburst_stage2.bin usr/share/xburst-tools/
opt_optimize = CFLAGS="-g -O2"
opt_no_act =
@ -29,3 +39,11 @@ ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS)))
opt_quiet = --quiet
MAKEFLAGS += --quiet
endif
configure: configure.ac
AUTOMAKE="automake --foreign" autoreconf -is
firmware: configure
./configure --enable-firmware
$(MAKE) -C src ../xburst_stage1/xburst_stage1.bin \
../xburst_stage2/xburst_stage2.bin