[Buildroot] [Feature Request] script to run after build completion

Bjørn Forsman bjorn.forsman at gmail.com
Thu Jun 9 11:21:08 UTC 2011


2011/6/8 Alper Yıldırım <yildirimalper at gmail.com>:
> Hello,
>
> A feature i want to see in buildroot is to have a post build script to
> run after image creation process, in other words just before "make"
> returns to console. This way i can put my post build commands inside
> this script. It will definitely ease my buildroot usage.
>
> Some examples to put in this script are:
>
> - Printing some king of a "build completed" message,
> - Printing build time,
> - Nfs directory creation from rootfs.tar file,
> - Copying necessary images to some other locations,
> - Playing some sound when build is completed.
>
> Also, it will be nice to pass a build failed/completed parameter to
> this script, so different actions could be taken, (i.e. different
> sounds could be played)

I do this on the command line:

make && echo Buildroot success || echo Buildroot error

You can easily extend this by creating a small script, e.g. build.sh:

----8<----
#!/bin/sh

handle_success()
{
  echo Buildroot built successfully
  # ...
}

handle_failure()
{
  echo Buildroot failed
  # ...
}

make && handle_success || handle_failure
----8<----

Best regards,
Bjørn Forsman



More information about the buildroot mailing list