Commit ecde84a6 authored by Adam Wujek's avatar Adam Wujek 💬

build: use BRVER for buildroot version

Explicitly define which version of buildroot should be used.

It solves problem when there is more than one directory matching build/buildroot-2*
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 304dcae8
...@@ -22,7 +22,7 @@ DEVTAR="$WRS_BASE_DIR/../userspace/devices.tar.gz" ...@@ -22,7 +22,7 @@ DEVTAR="$WRS_BASE_DIR/../userspace/devices.tar.gz"
TMPFS=$(mktemp -d /tmp/rootfs.XXXXXX) TMPFS=$(mktemp -d /tmp/rootfs.XXXXXX)
chmod a+rx $TMPFS chmod a+rx $TMPFS
rootfs_vanilla="$WRS_OUTPUT_DIR/build/buildroot-2016.02/output/target" rootfs_vanilla="$WRS_OUTPUT_DIR/build/buildroot-$BRVER/output/target"
rootfs_override="$WRS_BASE_DIR/../userspace/rootfs_override" rootfs_override="$WRS_BASE_DIR/../userspace/rootfs_override"
TMPSCRIPT=$(mktemp /tmp/rootfs-script.XXXXXX) TMPSCRIPT=$(mktemp /tmp/rootfs-script.XXXXXX)
......
...@@ -101,7 +101,7 @@ wrs_unset_config () { ...@@ -101,7 +101,7 @@ wrs_unset_config () {
# We'll need to set CROSS_COMPILE to the buildroot one, if unset # We'll need to set CROSS_COMPILE to the buildroot one, if unset
wrs_default_compiler () { wrs_default_compiler () {
hostdir=$WRS_OUTPUT_DIR/build/buildroot-2016.02/output/host hostdir=$WRS_OUTPUT_DIR/build/buildroot-$BRVER/output/host
if [ -e $hostdir/usr/bin/arm-linux-gcc ]; then if [ -e $hostdir/usr/bin/arm-linux-gcc ]; then
wrs_setenv_default CROSS_COMPILE $hostdir/usr/bin/arm-linux- wrs_setenv_default CROSS_COMPILE $hostdir/usr/bin/arm-linux-
fi fi
...@@ -182,8 +182,8 @@ else ...@@ -182,8 +182,8 @@ else
fi fi
# buildroot definitions # buildroot definitions
buildroot_zipname="buildroot-2016.02.tar.bz2" buildroot_zipname="buildroot-$BRVER.tar.bz2"
buildroot_dirname="buildroot-2016.02" buildroot_dirname="buildroot-$BRVER"
# and import the configuration variables # and import the configuration variables
. $WRS_CONFIG_DIR/.config . $WRS_CONFIG_DIR/.config
...@@ -48,6 +48,10 @@ fi ...@@ -48,6 +48,10 @@ fi
export WRS_SCRIPTS_DIR=${WRS_BASE_DIR}/scripts export WRS_SCRIPTS_DIR=${WRS_BASE_DIR}/scripts
# Export Buildroot version in use
export BRVER="2016.02"
## Function that show a little help ## Function that show a little help
showhelp() { showhelp() {
echo "" echo ""
......
...@@ -45,7 +45,9 @@ conf: ...@@ -45,7 +45,9 @@ conf:
$(CC) $(CFLAGS) -o $@ $(CONF_LOC)/conf.c \ $(CC) $(CFLAGS) -o $@ $(CONF_LOC)/conf.c \
$(CONF_LOC)/zconf.tab.c $(CONF_LOC)/zconf.tab.c
CURSES_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-2*) # if BRVER not defined use a wildcard
BRVER?=2*
CURSES_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-$(BRVER))
CURSES_BUILD := $(wildcard $(CURSES_BUILD)/output/build/ncurses-*) CURSES_BUILD := $(wildcard $(CURSES_BUILD)/output/build/ncurses-*)
lxdialog := $(CONF_LOC)/lxdialog/checklist.c lxdialog := $(CONF_LOC)/lxdialog/checklist.c
......
# if BRVER not defined use a wildcard
SNMP_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-2*) BRVER?=2*
SNMP_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-$(BRVER))
SNMP_BUILD := $(wildcard $(SNMP_BUILD)/output/build/netsnmp-*) SNMP_BUILD := $(wildcard $(SNMP_BUILD)/output/build/netsnmp-*)
NET_SNMP_CONFIG ?= $(SNMP_BUILD)/net-snmp-config NET_SNMP_CONFIG ?= $(SNMP_BUILD)/net-snmp-config
......
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