Skip to content

Commit f08c53f

Browse files
committed
post-image.sh: Source .config to ensure we always get BR2_DEFCONFIG
When building from distclean it seems make isn't sourcing the .config file properly in time for post-image.sh. So BR2_EXTERNAL was unset, thus leading to an unknown platform => netbox-.img. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
1 parent de08767 commit f08c53f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

board/common/post-image.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/sh
2-
rc=0
2+
# Source .config in case we're building from distclean
3+
. $BR2_EXTERNAL/output/.config
4+
5+
err=0
36
plf=`echo $BR2_DEFCONFIG | sed 's/.*_\(.*\)_defconfig.*$/\1/'`
47

58
if [ -n "$RELEASE" ]; then
@@ -10,7 +13,7 @@ if [ -n "$RELEASE" ]; then
1013
echo "==============================================================================="
1114
echo "WARNING: Release verision '$RELEASE' does not match tag '$ver'!"
1215
echo "==============================================================================="
13-
rc=1
16+
err=1
1417
fi
1518
else
1619
img=$BINARIES_DIR/$BR2_EXTERNAL_ID-$plf.img
@@ -26,4 +29,4 @@ if [ -n "$TFTPDIR" ]; then
2629
scp -B $img $TFTPDIR
2730
fi
2831

29-
exit $rc
32+
exit $err

0 commit comments

Comments
 (0)