All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?
@ 2014-11-06 15:30 harsha kiran
  2014-11-06 15:58 ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: harsha kiran @ 2014-11-06 15:30 UTC (permalink / raw)
  To: u-boot

Hi !

For our project, we are trying to build the Bootloader with a Software
partnumber. and i want it to be displayed on the first U-boot print..


U-Boot 2014.07 (Nov 05 2014 - 16:27:50) PN#12345678-001

I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

I was able to do this by adding the following in the boards.cfg file..

Active  arm         armv7          am33xx      ti             
am335x_abb_uboot    am335x_abb_uboot_npa_dev				
am335x_abb_uboot:SERIAL4,CONS_INDEX=4,NPA_DEV,IDENT_STRING="PN#12345678-001" 

But i want to pass the IDENT_STRING from the command line to build the
u-boot..the command i use is 

sudo make ARCH=arm
CROSS_COMPILE=/abb/compilers/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-
-j8 -s am335x_abb_uboot_npa_dev_config

is there a way i can pass this argument while building the u-boot? 

Thanks,
Harsha






--
View this message in context: http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?
  2014-11-06 15:30 [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot? harsha kiran
@ 2014-11-06 15:58 ` Tom Rini
  2014-11-06 16:43   ` harsha kiran
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2014-11-06 15:58 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 06, 2014 at 08:30:35AM -0700, harsha kiran wrote:

> Hi !
> 
> For our project, we are trying to build the Bootloader with a Software
> partnumber. and i want it to be displayed on the first U-boot print..

Upgrade to current mainline and you can use CONFIG_LOCALVERSION for what
you want.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141106/09042b70/attachment.pgp>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?
  2014-11-06 15:58 ` Tom Rini
@ 2014-11-06 16:43   ` harsha kiran
  2014-11-06 17:22     ` Masahiro YAMADA
  0 siblings, 1 reply; 5+ messages in thread
From: harsha kiran @ 2014-11-06 16:43 UTC (permalink / raw)
  To: u-boot

Thanks Rini,

We have freeze the code base of bootloader for 2014-07 main line.

What can be another alternate approach? i was looking at the make file and i
see that they take everything before _config and is sorted to find all the
right pieces from boards.cfg file

%_config:: outputmakefile
	@$(MKCONFIG) -A $(@:_config=)

i was thinking to add something which can parse the Partnumber after the
_config..i am not sure if its a good approach..

Thanks,
Harsha



--
View this message in context: http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962p194969.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?
  2014-11-06 16:43   ` harsha kiran
@ 2014-11-06 17:22     ` Masahiro YAMADA
  2014-11-06 17:40       ` harsha kiran
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro YAMADA @ 2014-11-06 17:22 UTC (permalink / raw)
  To: u-boot

Hi harsha,



2014-11-07 1:43 GMT+09:00 harsha kiran <kj.h.kiran@us.abb.com>:
> Thanks Rini,
>
> We have freeze the code base of bootloader for 2014-07 main line.
>
> What can be another alternate approach? i was looking at the make file and i
> see that they take everything before _config and is sorted to find all the
> right pieces from boards.cfg file
>
> %_config:: outputmakefile
>         @$(MKCONFIG) -A $(@:_config=)
>
> i was thinking to add something which can parse the Partnumber after the
> _config..i am not sure if its a good approach..
>


Why don't you save your favorite version string into a file "localversion"?
This feature is available in v2014.07.



masahiro at oscar:~/workspace/u-boot$ git describe
v2014.07
masahiro at oscar:~/workspace/u-boot$ echo "PN#1234567" > localversion &&
 make sandbox_config all
Configuring for sandbox board...
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
  GEN     include/generated/generic-asm-offsets.h
    [ snip ]
  CC      test/dm/ut.o
  CC      test/dm/core.o
  CC      test/dm/gpio.o
  LD      test/dm/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot.bin
masahiro at oscar:~/workspace/u-boot$ ./u-boot


U-Boot 2014.07PN#1234567 (Nov 07 2014 - 02:19:30)

DRAM:  128 MiB
Using default environment

In:    serial
Out:   lcd
Err:   lcd
=>




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?
  2014-11-06 17:22     ` Masahiro YAMADA
@ 2014-11-06 17:40       ` harsha kiran
  0 siblings, 0 replies; 5+ messages in thread
From: harsha kiran @ 2014-11-06 17:40 UTC (permalink / raw)
  To: u-boot

Thank you guys.

This is exactly what i wanted.

Thanks,
Harsha



--
View this message in context: http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962p194972.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-06 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 15:30 [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot? harsha kiran
2014-11-06 15:58 ` Tom Rini
2014-11-06 16:43   ` harsha kiran
2014-11-06 17:22     ` Masahiro YAMADA
2014-11-06 17:40       ` harsha kiran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.