Skip to contentSkip to conversation

Build Output

Buildroot Dan Pattison 3 participants 5 messages Jun 5, 2014

lore
Share & tools
lore
#0 lore raw

Hello,

I am using the post image script feature to compile and install various custom packages. In my shell and make files I want to make the ouput show the various stages of package installation like buildroot does with text that has a highlighted back ground. This helps in debugging to see where certain programs start their build process.

For instance, when the post-image script fires it outputs the line below with a highlighted back ground that is easy to spot.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/ethertek/ws/post-build.sh

I tried the line below in my own post-build.sh, but get a command not found error.
$(call MESSAGE,"Building Package FOO");

Is it possible to make the call command above work in my own shell scripts that reside in the board folder? If yes, what do I include to make that work?

Thank you,

Signature · 2 lines
Dan Pattison
Ethertek Circuits
#1 lore raw
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dan" == Dan Pattison <[email protected]> writes:

Hello,
I am using the post image script feature to compile and install various custom packages. In my shell and make files I want to make the ouput show the various stages of package installation like buildroot does with text that has a highlighted back ground. This helps in debugging to see where certain programs start their build process.

For instance, when the post-image script fires it outputs the line below with a highlighted back ground that is easy to spot.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/ethertek/ws/post-build.sh

Quoted 7 lines

I tried the line below in my own post-build.sh, but get a command not found error.
$(call MESSAGE,"Building Package FOO");

Is it possible to make the call command above work in my own shell scripts that reside in the board folder? If yes, what do I include to make that work?

Not really. MESSAGE is a make macro, so you cannot use it from a shell script.

But you can take a look at the implementation in package/pkg-utils.mk and create a similar shell function, something like:

MESSAGE() {
    tput smso
    echo ">>> $*"
    tput rmso
}

MESSAGE hello world

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw
Quoted 26 lines · Peter Korsgaard
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dan" == Dan Pattison <[email protected]> writes:

Hello,
I am using the post image script feature to compile and install various custom packages. In my shell and make files I want to make the ouput show the various stages of package installation like buildroot does with text that has a highlighted back ground. This helps in debugging to see where certain programs start their build process.

For instance, when the post-image script fires it outputs the line below with a highlighted back ground that is easy to spot.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/ethertek/ws/post-build.sh

Quoted 7 lines

I tried the line below in my own post-build.sh, but get a command not found error.
$(call MESSAGE,"Building Package FOO");

Is it possible to make the call command above work in my own shell scripts that reside in the board folder? If yes, what do I include to make that work?

Not really. MESSAGE is a make macro, so you cannot use it from a shell script.

But you can take a look at the implementation in package/pkg-utils.mk and create a similar shell function, something like:

Quoted 8 lines
MESSAGE() {
     tput smso
     echo ">>> $*"
     tput rmso
}

MESSAGE hello world

Hello Peter,

Thanks for the reply. I will try that.

Dan Pattison
Ethertek Circuits

#3 lore raw
In reply to Dan Pattison

Dear Dan Pattison,

Quoted 2 lines · Dan Pattison

I am using the post image script feature to compile and install various custom packages. In my shell and make files I want to make the ouput

Why don't you create additional Buildroot packages instead? That would be a lot more logical that doing this in a post-image script.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw
Quoted 10 lines · Thomas Petazzoni

Dear Dan Pattison,

Quoted 2 lines · Dan Pattison

I am using the post image script feature to compile and install various custom packages. In my shell and make files I want to make the ouput

Why don't you create additional Buildroot packages instead? That would be a lot more logical that doing this in a post-image script.

Thomas

Hello Thomas,

Thank you for the reply. I found the need to run some custom scripts just before the images are created to do various things like add a firmware build number file, tar up the /etc folder for use in a factory reset situation, and a few other product specific jobs. As it is doing each step, it's nice to get the highlighted output for debugging. For whatever reason, I started building some custom packages from the post-image script also. Peter showed me a way to do the highlight from my shell script by making a custom MESSAGE() function.

MESSAGE() {
     tput smso
     echo ">>> $*"
     tput rmso
}

MESSAGE hello world

Thanks,
Dan Pattison
EtherTek Circuits