Commit 242fbd5a authored by Adam Wujek's avatar Adam Wujek

build: remove buildroot packages from download-info

Instead of keeping the list of archives in build/download-info which should be
downloaded for buildroot, we use "make source" to do the same job.
However, the task of building buildroot had to split into 3 tasks:
--init (unpack and configure buildroot)
--download (download the source of used buildroot packages)
--build (compile buildroot packages, etc.)

The reason for this change is to avoid updating the download-info file when
buildroot package is updated. Additionally ltrace is not downloaded as an
archive, but it is cloned git repo. After the clone it is packed into archive.
In the current state our framework cannot do the same.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 8b38b5de
......@@ -26,151 +26,3 @@ wrs-gw-v4.2-20150826.tar.gz 807117326f6d5b1b53ebc95ca093fc44 \
buildroot-2016.02.tar.bz2 fcf10ae55b0831f52d492b6939e95581 \
http://www.buildroot.org/downloads/buildroot-2016.02.tar.bz2
autoconf-2.65.tar.bz2 a6de1cc6434cd64038b0a0ae4e252b33 \
http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.65.tar.bz2
automake-1.11.1.tar.bz2 c2972c4d9b3e29c03d5f2af86249876f \
http://ftp.gnu.org/pub/gnu/automake/automake-1.11.1.tar.bz2
bash-4.1.tar.gz 9800d8724815fd84994d9be65ab5e7b8 \
http://ftp.gnu.org/pub/gnu/bash/bash-4.1.tar.gz
binutils-2.21.1.tar.bz2 bde820eac53fa3a8d8696667418557ad \
http://ftp.gnu.org/pub/gnu/binutils/binutils-2.21.1.tar.bz2
bridge-utils-1.5.tar.gz ec7b381160b340648dede58c31bb2238 \
http://kent.dl.sourceforge.net/sourceforge/bridge/bridge-utils-1.5.tar.gz
busybox-1.19.3.tar.bz2 c3938e1ac59602387009bbf1dd1af7f6 \
http://www.busybox.net/downloads/busybox-1.19.3.tar.bz2
dhcpdump-1.8.tar.gz 099c786997c424f196414f9575f1fb90 \
http://www.mavetju.org/download/dhcpdump-1.8.tar.gz
dropbear-0.53.1.tar.gz 6b8d901859d9b8a18e2f6bfe0a892a03 \
http://matt.ucc.asn.au/dropbear/releases/dropbear-0.53.1.tar.gz
ethtool-3.0.tar.gz a339cbdcbe1c1fbe377c36d84231bda6 \
http://www.kernel.org/pub/software/network/ethtool/ethtool-3.0.tar.gz
expat-2.0.1.tar.gz ee8b492592568805593f81f8cdf2a04c \
http://kent.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
fakeroot_1.9.5.tar.gz 95c0c78c734b9782ec8d47e99c8e3fc8 \
http://snapshot.debian.org/archive/debian/20080427T000000Z/pool/main/f/fakeroot/fakeroot_1.9.5.tar.gz
gcc-4.3.6.tar.bz2 55ddf934bc9f8d1eaff7a77e7d598a85 \
http://ftp.gnu.org/pub/gnu/gcc/gcc-4.3.6/gcc-4.3.6.tar.bz2
gdb-7.3.1.tar.bz2 b89a5fac359c618dda97b88645ceab47 \
http://ftp.gnu.org/pub/gnu/gdb/gdb-7.3.1.tar.bz2
gmp-5.0.2.tar.bz2 0bbaedc82fb30315b06b1588b9077cd3 \
http://ftp.gnu.org/pub/gnu/gmp/gmp-5.0.2.tar.bz2
gperf-3.0.4.tar.gz c1f1db32fb6598d6a93e6e88796a8632 \
http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz
ifplugd-0.28.tar.gz df6f4bab52f46ffd6eb1f5912d4ccee3 \
http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.28.tar.gz
iproute2-2.6.39.tar.gz 8a3b6bc77c2ecf752284aa4a6fc630a6 \
http://devresources.linuxfoundation.org/dev/iproute2/download/iproute2-2.6.39.tar.gz
libdaemon-0.14.tar.gz 509dc27107c21bcd9fbf2f95f5669563 \
http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz
libelf-0.8.12.tar.gz e21f8273d9f5f6d43a59878dc274fec7 \
http://www.mr511.de/software/libelf-0.8.12.tar.gz
libffi-3.0.9.tar.gz 1f300a7a7f975d4046f51c3022fa5ff1 \
ftp://sources.redhat.com/pub/libffi/libffi-3.0.9.tar.gz
libpcap-1.1.1.tar.gz 1bca27d206970badae248cfa471bbb47 \
http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
libtool-2.2.10.tar.gz b745d220e88163fcd9eea0a90ccf21b0 \
http://ftp.gnu.org/pub/gnu/libtool/libtool-2.2.10.tar.gz
lighttpd-1.4.29.tar.gz 4130d2440777b7911e62de6a89c98a90 \
http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.29.tar.gz
linux-3.1.4.tar.bz2 52643e5a013d450ad69627c3cac490cb \
http://www.kernel.org/pub//linux/kernel/v3.x//linux-3.1.4.tar.bz2
lsof_4.85.tar.bz2 102ee2081172bbe76dccaa6cceda8573 \
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof//lsof_4.85.tar.bz2
ltrace_0.5.3.orig.tar.gz 3fa7fe715ab879db08bd06d1d59fd90f \
http://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.3.orig.tar.gz
ltrace_0.5.3-2.1.diff.gz 38bc944c53ab602a7854aa4fa71c1f46 \
http://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.3-2.1.diff.gz
lua-5.1.4.tar.gz d0870f2de55d59c1c8419f36e8fac150 \
http://www.lua.org/ftp/lua-5.1.4.tar.gz
lzo-2.06.tar.gz 95380bd4081f85ef08c5209f4107e9f8 \
http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
make-3.81.tar.bz2 354853e0b2da90c527e35aabb8d6f1e6 \
http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.bz2
m4-1.4.15.tar.bz2 c7c32540bc3842d5550f88d47ef551d8 \
http://ftp.gnu.org/pub/gnu/m4/m4-1.4.15.tar.bz2
mpfr-3.0.1.tar.bz2 bfbecb2eacb6d48432ead5cfc3f7390a \
http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2
mtd-utils-1.4.6.tar.bz2 a0418afcf6026824a5fa5e9051793f3c \
ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.6.tar.bz2
nano-2.2.6.tar.gz 03233ae480689a008eb98feb1b599807 \
http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz
ncurses-5.7.tar.gz cce05daf61a64501ef6cd8da1f727ec6 \
http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz
openssl-1.0.0e.tar.gz 7040b89c4c58c7a1016c0dfa6e821c86 \
http://www.openssl.org/source/openssl-1.0.0e.tar.gz
pcre-7.9.tar.gz 2256d0a1d0a358265165ca70e7cfc47a \
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz
pkg-config-0.25.tar.gz a3270bab3f4b69b7dc6dbdacbcae9745 \
http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz
procps-3.2.8.tar.gz 9532714b6846013ca9898984ba4cd7e0 \
http://procps.sourceforge.net/procps-3.2.8.tar.gz
php-5.2.17.tar.bz2 b27947f3045220faf16e4d9158cbfe13 \
http://sources.buildroot.net//php-5.2.17.tar.bz2
Python-2.7.2.tar.bz2 ba7b2f11ffdbf195ee0d111b9455a5bd \
http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
readline-6.2.tar.gz 67948acb2ca081f23359d0256e9a271c \
http://ftp.gnu.org/pub/gnu/readline/readline-6.2.tar.gz
rsync-3.0.9.tar.gz 5ee72266fe2c1822333c407e1761b92b \
http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz
rsyslog-5.8.0.tar.gz 37562d0e71a24938a9ed7f242bd32d35 \
http://www.rsyslog.com/files/download/rsyslog//rsyslog-5.8.0.tar.gz
screen-4.0.3.tar.gz 8506fd205028a96c741e4037de6e3c42 \
http://ftp.gnu.org/pub/gnu/screen/screen-4.0.3.tar.gz
strace-4.5.20.tar.bz2 64dfe10d9db0c1e34030891695ffca4b \
http://kent.dl.sourceforge.net/sourceforge/strace/strace-4.5.20.tar.bz2
tcpdump-4.1.1.tar.gz d0dd58bbd6cd36795e05c6f1f74420b0 \
http://www.tcpdump.org/release/tcpdump-4.1.1.tar.gz
uClibc-0.9.32.tar.bz2 cfcb6c25d8ebe12817499d8749ee8ae1 \
http://www.uclibc.org/downloads/uClibc-0.9.32.tar.bz2
zlib-1.2.5.tar.bz2 be1e89810e66150f5b0327984d8625a0 \
http://kent.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.5.tar.bz2
monit-5.10.tar.gz 5b5b5cc7939b975bbbef73bd6426750a \
http://mmonit.com/monit/dist/monit-5.10.tar.gz
#!/bin/bash
# check variables, like all scripts herein do
WRS_SCRIPT_NAME=$(basename $0)
if [ -z "$WRS_BASE_DIR" ]; then
echo "$0: Plesae set WRS_BASE_DIR" >& 2
exit 1
fi
. ${WRS_BASE_DIR}/scripts/wrs_functions
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR
wrs_echo "--- Buildroot: compiler and filesystem"
cd $WRS_OUTPUT_DIR/build/${buildroot_dirname}
buildrootdir=$(/bin/pwd)
cd $buildrootdir
# We don't want CC to be pre-set at this point (some of us do :)
unset CC
wrs_echo "Compiling buildroot"
# make 3.82 splits the work differently. When using buildroot with
# the make > 3.81 buildroot uses BR2_JLEVEL= (preferably 0 for automatic number
# of jobs setting).
# For make =< 3.81 BR2_JLEVEL= is ignored and build is done using only one job.
# Passing -j allows to build with many jobs, but many warning messages are
# printed:
# make[2]: warning: -jN forced in submake: disabling jobserver mode.
makefails=$(make -v | awk 'NR==1 {if ($NF <= 3.81) print "oldmake"}')
if [ "x$makefails" = "xoldmake" ]; then
JLEVEL="-j$WRS_MAKE_J_NUMBER"
fi
# tell to buildroot to use our download directory
make BR2_DL_DIR=$WRS_DOWNLOAD_DIR $JLEVEL || wrs_die "buildroot compilation"
#!/bin/bash
# check variables, like all scripts herein do
WRS_SCRIPT_NAME=$(basename $0)
if [ -z "$WRS_BASE_DIR" ]; then
echo "$0: Plesae set WRS_BASE_DIR" >& 2
exit 1
fi
. ${WRS_BASE_DIR}/scripts/wrs_functions
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR
wrs_echo "--- Buildroot: download packages"
cd $WRS_OUTPUT_DIR/build/${buildroot_dirname}
buildrootdir=$(/bin/pwd)
cd $buildrootdir
echo "current dir "`pwd`
# tell to buildroot to use our download directory
make BR2_DL_DIR=$WRS_DOWNLOAD_DIR source || wrs_die "buildroot download"
......@@ -10,17 +10,16 @@ fi
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR
wrs_echo "--- Buildroot compiler and filesystem"
zipname="buildroot-2016.02.tar.bz2"
wrs_download $zipname
wrs_echo "--- Buildroot: unpack and configure"
wrs_download $buildroot_zipname
mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
mkdir -p $WRS_OUTPUT_DIR/images || wrs_die "mkdir images"
# go to the build dir and compile it, using our configuration
cd $WRS_OUTPUT_DIR/build
dirname="buildroot-2016.02"
if [ ! -d $dirname ]; then
if [ ! -d $buildroot_dirname ]; then
unset WRS_NO_REPLACE_BUILDROOT
fi
......@@ -28,8 +27,8 @@ if [ -n "$WRS_NO_REPLACE_BUILDROOT" ]; then
wrs_echo "Preserving current buildroot build"
else
wrs_echo "Uncompressing buildroot"
rm -rf $dirname
tar xjf ${WRS_DOWNLOAD_DIR}/$zipname || wrs_die "untar $zipname"
rm -rf $buildroot_dirname
tar xjf ${WRS_DOWNLOAD_DIR}/$buildroot_zipname || wrs_die "untar $buildroot_zipname"
fi
# select configuration: old default, overridden by Kconfig and environment
......@@ -53,7 +52,7 @@ if [ ! -f "$CFG" ]; then
fi
wrs_echo "Configuring with \"$CFG\""
cd $WRS_OUTPUT_DIR/build/${dirname}
cd $WRS_OUTPUT_DIR/build/${buildroot_dirname}
cp $CFG .config
# If busybox configuration is inside wr-switch-sw (currently it is),
# fix the config filename
......@@ -63,7 +62,7 @@ sed -i "s,__WR_SWITCH_SW__,$WRS_BASE_DIR/../configs/buildroot," .config
# apply any pending patches (only if we untarred a fresh copy)
if [ -z "$WRS_NO_REPLACE_BUILDROOT" ]; then
wrs_echo "Patching buildroot"
cd $WRS_OUTPUT_DIR/build/${dirname}
cd $WRS_OUTPUT_DIR/build/${buildroot_dirname}
for n in $WRS_BASE_DIR/../patches/buildroot/*patch; do
# the shell passes the "*" over if no matches are there, so check
if test -f "$n"; then
......@@ -94,26 +93,3 @@ fi
# re-digest the config we built
wrs_echo "Reconfiguring buildroot"
make oldconfig || wrs_die "buildroot config"
buildrootdir=$(/bin/pwd)
cd $buildrootdir
# We don't want CC to be pre-set at this point (some of us do :)
unset CC
wrs_echo "Compiling buildroot"
# make 3.82 splits the work differently. When using buildroot with
# the make > 3.81 buildroot uses BR2_JLEVEL= (preferably 0 for automatic number
# of jobs setting).
# For make =< 3.81 BR2_JLEVEL= is ignored and build is done using only one job.
# Passing -j allows to build with many jobs, but many warning messages are
# printed:
# make[2]: warning: -jN forced in submake: disabling jobserver mode.
makefails=$(make -v | awk 'NR==1 {if ($NF <= 3.81) print "oldmake"}')
if [ "x$makefails" = "xoldmake" ]; then
JLEVEL="-j$WRS_MAKE_J_NUMBER"
fi
# tell to buildroot to use our download directory
make BR2_DL_DIR=$WRS_DOWNLOAD_DIR $JLEVEL || wrs_die "buildroot compilation"
......@@ -11,7 +11,7 @@ fi
wrs_check_vars WRS_DOWNLOAD_DIR
cd $WRS_DOWNLOAD_DIR
wrs_echo "--- Downloading all files"
wrs_echo "--- Downloading base packages"
# download all files
DLLIST=${WRS_BASE_DIR}/download-info
......
......@@ -181,5 +181,9 @@ else
if [ $? -ne 0 ]; then wrs_die "Configuration failed"; fi
fi
# buildroot definitions
buildroot_zipname="buildroot-2016.02.tar.bz2"
buildroot_dirname="buildroot-2016.02"
# and import the configuration variables
. $WRS_CONFIG_DIR/.config
......@@ -129,23 +129,25 @@ wrs_build_step () {
failed_step=false; # this is set to "true" but the wrs_build_step function
# Now build the stuff one step at a time, only if not already done.
# Steps 0 and 9 are redone in any case:
# Steps 0 and 11 are redone in any case:
# step 0 is downloading, and re-cecking md5sum has no side effects
# step 9 is wrapping the filesystem: we need to re-wrap is something changed
redo_step "0 9"
# step 11 is wrapping the filesystem: we need to re-wrap is something changed
redo_step "0 11"
# done-marker script name
wrs_build_step 00-download wrs_download
wrs_build_step 01-buildroot wrs_build_buildroot
wrs_build_step 01-buildroot_init wrs_buildroot_init
wrs_build_step 02-buildroot_download wrs_buildroot_download
wrs_build_step 03-buildroot_build wrs_buildroot_build
wrs_default_compiler
wrs_build_step 02-at91boot wrs_build_at91boot
wrs_build_step 03-barebox wrs_build_barebox
wrs_build_step 04-kernel wrs_build_kernel
wrs_build_step 05-modules wrs_build_modules
wrs_build_step 06-ptp wrs_build_ptp
wrs_build_step 07-wrs-userspace wrs_build_userspace
wrs_build_step 08-wrs-gateware wrs_build_gateware
wrs_build_step 09-wrap-rootfs wrs_build_wraprootfs
wrs_build_step 04-at91boot wrs_build_at91boot
wrs_build_step 05-barebox wrs_build_barebox
wrs_build_step 06-kernel wrs_build_kernel
wrs_build_step 07-modules wrs_build_modules
wrs_build_step 08-ptp wrs_build_ptp
wrs_build_step 09-wrs-userspace wrs_build_userspace
wrs_build_step 10-wrs-gateware wrs_build_gateware
wrs_build_step 11-wrap-rootfs wrs_build_wraprootfs
if $failed_step; then
wrs_die "One or more build steps failed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment