mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 12:38:27 +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:
parent
1b6d5cccd3
commit
81adfd188d
3
usbboot/debian/.gitignore
vendored
3
usbboot/debian/.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
|
/xburst_stage1.bin
|
||||||
|
/xburst_stage2.bin
|
||||||
|
|
||||||
/files
|
/files
|
||||||
|
|
||||||
/*.debhelper.log
|
/*.debhelper.log
|
||||||
|
21
usbboot/debian/README.source
Normal file
21
usbboot/debian/README.source
Normal 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
10
usbboot/debian/autogen.sh
Executable 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/
|
@ -6,8 +6,12 @@ xburst-tools (0.0+201002-1.1) local; urgency=low
|
|||||||
* Build-Conflicts: automake1.4
|
* Build-Conflicts: automake1.4
|
||||||
* add a Vcs-Git field to debian/control and remove the outdated watch
|
* add a Vcs-Git field to debian/control and remove the outdated watch
|
||||||
file
|
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
|
xburst-tools (0.0+201002-1) unstable; urgency=low
|
||||||
|
|
||||||
|
@ -36,8 +36,7 @@ splitgitignore='#!/usr/bin/awk
|
|||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
gitdir="-type d -name '.*' -prune"
|
offlimits="-type d -name '.*' -prune -o -type d -name debian -prune"
|
||||||
debiandir="-type d -name debian -prune"
|
|
||||||
|
|
||||||
remove_file_globs() {
|
remove_file_globs() {
|
||||||
while read glob
|
while read glob
|
||||||
@ -56,7 +55,7 @@ remove_directory_globs() {
|
|||||||
remove_file_findpatterns() {
|
remove_file_findpatterns() {
|
||||||
while read pat
|
while read pat
|
||||||
do
|
do
|
||||||
find . $gitdir -o \
|
find . $offlimits -o \
|
||||||
'(' -name "$pat" -execdir rm -f '{}' + ')'
|
'(' -name "$pat" -execdir rm -f '{}' + ')'
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -64,12 +63,12 @@ remove_file_findpatterns() {
|
|||||||
remove_directory_findpatterns() {
|
remove_directory_findpatterns() {
|
||||||
while read pat
|
while read pat
|
||||||
do
|
do
|
||||||
find . $gitdir -o \
|
find . $offlimits -o \
|
||||||
'(' -type d -name "$pat" -execdir rm -fr '{}' + ')'
|
'(' -type d -name "$pat" -execdir rm -fr '{}' + ')'
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
find . $gitdir -o $debiandir -o '(' -name .gitignore -print ')' |
|
find . $offlimits -o '(' -name .gitignore -print ')' |
|
||||||
while read file
|
while read file
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
|
@ -6,12 +6,22 @@ build clean install binary-arch binary-indep binary:
|
|||||||
+dh --parallel $(opt_no_act) $@
|
+dh --parallel $(opt_no_act) $@
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
|
test -e debian/xburst_stage1.bin || { \
|
||||||
|
echo >&2 see debian/README.source; \
|
||||||
|
exit 1; \
|
||||||
|
}
|
||||||
dh_auto_clean
|
dh_auto_clean
|
||||||
sh debian/clean.sh
|
sh debian/clean.sh
|
||||||
|
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure: configure
|
||||||
AUTOMAKE="automake --foreign" autoreconf -is
|
dh_auto_configure -- $(opt_optimize) $(opt_quiet) \
|
||||||
dh_auto_configure -- $(opt_optimize) $(opt_quiet) LDFLAGS=-Wl,-z,defs
|
--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_optimize = CFLAGS="-g -O2"
|
||||||
opt_no_act =
|
opt_no_act =
|
||||||
@ -29,3 +39,11 @@ ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS)))
|
|||||||
opt_quiet = --quiet
|
opt_quiet = --quiet
|
||||||
MAKEFLAGS += --quiet
|
MAKEFLAGS += --quiet
|
||||||
endif
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user