[PATCH] buildscript: Remove target binaries from build dir before building
Fabian Bläse
fabian at blaese.de
Mi Okt 2 20:00:23 CEST 2019
Reviewed-by: Fabian Bläse <fabian at blaese.de>
Fabian
On 02.10.19 17:42, Adrian Schmutzler wrote:
> So far, if build fails, but images from last successful build are
> present in OpenWrt build directory (build/bin/targets/...), those
> are copied even after unsuccessful build.
>
> This results in the old images being copied to the bin folder and
> being labelled with the new firmware revision. (!)
> As our error check also only looks at whether images are there,
> the image copying process will look like a success.
>
> This patch deletes old images of the target/subtarget to be built,
> so that the copy-firmware step will find nothing if the build
> stop to early.
>
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
> buildscript | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/buildscript b/buildscript
> index c2de5759..81974a97 100755
> --- a/buildscript
> +++ b/buildscript
> @@ -212,6 +212,8 @@ prebuild() {
> build() {
> prebuild
>
> + rm_firmware
> +
> opath=$(pwd)
> cd "$target"
> cpus=$(grep -c processor /proc/cpuinfo)
> @@ -269,6 +271,12 @@ config() {
> cd "$opath"
> }
>
> +rm_firmware() {
> + [ -n "$subtarget" ] || subtarget="generic"
> +
> + rm -rf $target/bin/targets/${chipset}/${subtarget}
> +}
> +
> cp_firmware() {
> [ -n "$subtarget" ] || subtarget="generic"
>
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 833 bytes
Beschreibung: OpenPGP digital signature
URL : <https://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20191002/7ea5419a/attachment.sig>
Mehr Informationen über die Mailingliste franken-dev