Skip to contentSkip to conversation

Building tools without building firmware

U-Boot Matt Sealey 2 participants 6 messages Nov 11, 2008 – Nov 17, 2008

lore
Share & tools
lore
#0 lore raw

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#1 lore raw
Quoted 8 lines · On Tuesday 11 November 2008 15:15:09 Matt Sealey wrote:

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

you can see the method we use in Gentoo here:
http://sources.gentoo.org/dev-embedded/u-boot-tools/

but i'd agree that i wish it were easier to just build the helper utilities. and if they werent so tightly intertwined with the rest of the u-boot code ... atm you cant build mkimage on a non-Linux system due to the libfdt stuff. -mike

#2 lore raw
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Tuesday 11 November 2008 15:15:09 Matt Sealey wrote:

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Quoted 5 lines
Quoted 2 lines

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

you can see the method we use in Gentoo here:
http://sources.gentoo.org/dev-embedded/u-boot-tools/

Ouch.

Quoted 3 lines

but i'd agree that i wish it were easier to just build the helper utilities. and if they werent so tightly intertwined with the rest of the u-boot code ... atm you cant build mkimage on a non-Linux system due to the libfdt stuff.

Am I reading this right.. I'm using SUSE 11.0 here so I guess I do

touch include/config.h include/config.mk
make HOSTSTRIP=echo BIN_FILES="mkimage"

And that'd do it? I'll have to check it out later..

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#3 lore raw
Quoted 22 lines · On Monday 17 November 2008 16:05:44 Matt Sealey wrote:
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Tuesday 11 November 2008 15:15:09 Matt Sealey wrote:

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Quoted 6 lines
Quoted 3 lines

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

you can see the method we use in Gentoo here:
http://sources.gentoo.org/dev-embedded/u-boot-tools/

Ouch.

Quoted 4 lines

but i'd agree that i wish it were easier to just build the helper utilities. and if they werent so tightly intertwined with the rest of the u-boot code ... atm you cant build mkimage on a non-Linux system due to the libfdt stuff.

Quoted 6 lines

Am I reading this right.. I'm using SUSE 11.0 here so I guess I do

touch include/config.h include/config.mk
make HOSTSTRIP=echo BIN_FILES="mkimage"

And that'd do it? I'll have to check it out later..

should be ... seemed to work for me

btw, we do HOSTSTRIP=echo in Gentoo only because we dont let packages strip things themselves ... it's not like u-boot will break things otherwise -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081117/bf707cab/attachment.pgp

#4 lore raw
Quoted 25 lines · Mike Frysinger
Quoted 24 lines · On Monday 17 November 2008 16:05:44 Matt Sealey wrote:
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Tuesday 11 November 2008 15:15:09 Matt Sealey wrote:

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Quoted 5 lines
Quoted 3 lines

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

you can see the method we use in Gentoo here:
http://sources.gentoo.org/dev-embedded/u-boot-tools/

Ouch.

Quoted 4 lines

but i'd agree that i wish it were easier to just build the helper utilities. and if they werent so tightly intertwined with the rest of the u-boot code ... atm you cant build mkimage on a non-Linux system due to the libfdt stuff.

Am I reading this right.. I'm using SUSE 11.0 here so I guess I do

touch include/config.h include/config.mk
make HOSTSTRIP=echo BIN_FILES="mkimage"

Quoted 6 lines
Quoted 1 line

And that'd do it? I'll have to check it out later..

should be ... seemed to work for me

btw, we do HOSTSTRIP=echo in Gentoo only because we dont let packages strip things themselves ... it's not like u-boot will break things otherwise

It doesn't work; I get a lot of errors about asm/blah.h include files being missing.

make MPC8610HPCN_config
make BIN_FILES="mkimage"

this works fine though. I also tried filling out ARCH=ppc into config.mk just in case, but it's obvious some weird arch setup is being done to glue in the right includes. So, I symlinked asm-ppc to asm, just like mkconfig does, and this made it at least get to compile.

So the correct solution is;

touch include/config.h include/config.mk
ln -sf include/asm-ppc include/asm
make BIN_FILES="mkimage" tools

(this also builds bmp_logo for some reason.. I don't quite understand why?)

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#5 lore raw
Quoted 48 lines · On Monday 17 November 2008 17:39:31 Matt Sealey wrote:
Quoted 28 lines · Mike Frysinger
Quoted 27 lines · On Monday 17 November 2008 16:05:44 Matt Sealey wrote:
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Tuesday 11 November 2008 15:15:09 Matt Sealey wrote:

We have a need to build and package at the very least 'mkimage' for SuSE 11.1 and since we have multiple board targets in mind (MPC8641D, MPC8610, MPC5121e) it does not make any sense to pick any in particular or build the entire u-boot.bin just for a few kilobytes we need to prep kernels and initrd images.

Quoted 6 lines
Quoted 3 lines

Is it possible to simply build the tools/ directory (a make target that works would be great) without building a firmware from BLAH_config first?

you can see the method we use in Gentoo here:
http://sources.gentoo.org/dev-embedded/u-boot-tools/

Ouch.

Quoted 4 lines

but i'd agree that i wish it were easier to just build the helper utilities. and if they werent so tightly intertwined with the rest of the u-boot code ... atm you cant build mkimage on a non-Linux system due to the libfdt stuff.

Am I reading this right.. I'm using SUSE 11.0 here so I guess I do

touch include/config.h include/config.mk
make HOSTSTRIP=echo BIN_FILES="mkimage"

Quoted 7 lines
Quoted 1 line

And that'd do it? I'll have to check it out later..

should be ... seemed to work for me

btw, we do HOSTSTRIP=echo in Gentoo only because we dont let packages strip things themselves ... it's not like u-boot will break things otherwise

It doesn't work; I get a lot of errors about asm/blah.h include files being missing.

make MPC8610HPCN_config
make BIN_FILES="mkimage"

this works fine though. I also tried filling out ARCH=ppc into config.mk just in case, but it's obvious some weird arch setup is being done to glue in the right includes. So, I symlinked asm-ppc to asm, just like mkconfig does, and this made it at least get to compile.

Quoted 7 lines

So the correct solution is;

touch include/config.h include/config.mk
ln -sf include/asm-ppc include/asm
make BIN_FILES="mkimage" tools

(this also builds bmp_logo for some reason.. I don't quite understand why?)

while yes, you'll see a lot of errors, they dont actually matter. just ignore them and you'll get the right tools built up.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081117/0364ae55/attachment.pgp