All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] add output of 'size' to build
@ 2007-02-26 22:46 Andrew Dyer
  2007-02-26 23:31 ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Dyer @ 2007-02-26 22:46 UTC (permalink / raw)
  To: u-boot

patch adds a call to the appropriate version of 'size' and prints
output like so during make:

cd /home/adyer/Projects/u-boot && arm-linux-size u-boot
   text    data     bss     dec     hex filename
 128878    7843   20532  157253   26645 u-boot

just before making the srec and bin versions.  I find it handy to keep
track of how big things are getting.

Signed-off-by: Andrew Dyer <amdyer@gmail.com>

-- 
Hardware, n.:
        The parts of a computer system that can be kicked.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-size.patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070226/f6945bb0/attachment.txt 

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

* [U-Boot-Users] [PATCH] add output of 'size' to build
  2007-02-26 22:46 [U-Boot-Users] [PATCH] add output of 'size' to build Andrew Dyer
@ 2007-02-26 23:31 ` Wolfgang Denk
  2007-02-27  0:42   ` Andrew Dyer
  2007-02-27  2:45   ` [U-Boot-Users] Boot Image Check MoonMoon Ghosh
  0 siblings, 2 replies; 13+ messages in thread
From: Wolfgang Denk @ 2007-02-26 23:31 UTC (permalink / raw)
  To: u-boot

In message <c166aa9f0702261446g2f449c7bmfe0f76492ac76b94@mail.gmail.com> you wrote:
>
> patch adds a call to the appropriate version of 'size' and prints
> output like so during make:
> 
> cd /home/adyer/Projects/u-boot && arm-linux-size u-boot
>    text    data     bss     dec     hex filename
>  128878    7843   20532  157253   26645 u-boot

NAK.

This patch violates the rule that "make  -s"  must  not  produce  any
output for succcesful builds.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is necessary to have purpose.
	-- Alice #1, "I, Mudd", stardate 4513.3

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

* [U-Boot-Users] [PATCH] add output of 'size' to build
  2007-02-26 23:31 ` Wolfgang Denk
@ 2007-02-27  0:42   ` Andrew Dyer
  2007-02-27  1:26     ` Wolfgang Denk
  2007-02-27  2:45   ` [U-Boot-Users] Boot Image Check MoonMoon Ghosh
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Dyer @ 2007-02-27  0:42 UTC (permalink / raw)
  To: u-boot

On 2/26/07, Wolfgang Denk <wd@denx.de> wrote:
> NAK.
>
> This patch violates the rule that "make  -s"  must  not  produce  any
> output for succcesful builds.

OK.  New version is attached that tests for the silent flag and omits
running the command if it is set.  If you would, maybe add a comment
at the top of the makefile with a note about the silent flag.

-- 
Hardware, n.:
        The parts of a computer system that can be kicked.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-size.patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070226/26384ba2/attachment.txt 

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

* [U-Boot-Users] [PATCH] add output of 'size' to build
  2007-02-27  0:42   ` Andrew Dyer
@ 2007-02-27  1:26     ` Wolfgang Denk
  2007-02-27  1:33       ` Andrew Dyer
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2007-02-27  1:26 UTC (permalink / raw)
  To: u-boot

In message <c166aa9f0702261642q5b2eab1bo852502891af43847@mail.gmail.com> you wrote:
>
> OK.  New version is attached that tests for the silent flag and omits
> running the command if it is set.  If you would, maybe add a comment
> at the top of the makefile with a note about the silent flag.

One more question.  You're  just  duplicating  the  function  of  the
MAKEALL script. Is there any reason you cannot use this instead?

Frankly, I don't think this belongs into the standard make output.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The day-to-day travails of the IBM programmer are so amusing to  most
of us who are fortunate enough never to have been one - like watching
Charlie Chaplin trying to cook a shoe.

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

* [U-Boot-Users] [PATCH] add output of 'size' to build
  2007-02-27  1:26     ` Wolfgang Denk
@ 2007-02-27  1:33       ` Andrew Dyer
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Dyer @ 2007-02-27  1:33 UTC (permalink / raw)
  To: u-boot

On 2/26/07, Wolfgang Denk <wd@denx.de> wrote:
> One more question.  You're  just  duplicating  the  function  of  the
> MAKEALL script. Is there any reason you cannot use this instead?

I don't usually run MAKEALL, I didn't even notice it in there.

> Frankly, I don't think this belongs into the standard make output.

It would have been nice had you mentioned it before I took the time to
fix the patch...

-- 
Hardware, n.:
        The parts of a computer system that can be kicked.

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

* [U-Boot-Users] Boot Image Check
  2007-02-26 23:31 ` Wolfgang Denk
  2007-02-27  0:42   ` Andrew Dyer
@ 2007-02-27  2:45   ` MoonMoon Ghosh
  2007-02-27  9:31     ` Daniel Hobi
  1 sibling, 1 reply; 13+ messages in thread
From: MoonMoon Ghosh @ 2007-02-27  2:45 UTC (permalink / raw)
  To: u-boot

Hi,
I want to write a function like
check_iamge(char * iamgefile)
which

Returns 0 if the image file is in u-boot image format
and validated by CRC checksum.
Otherwise it returns non-zero error number.
So someone can help me how to write this function.
I am using X86_64 2.16.X Fedora 5.
and UBoot 1.1.6.
Thanks in advance.
Suhas





 
---------------------------------
Have a burning question? Go to Yahoo! Answers and get answers from real people who know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070226/6689f5a0/attachment.htm 

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

* [U-Boot-Users] Boot Image Check
  2007-02-27  2:45   ` [U-Boot-Users] Boot Image Check MoonMoon Ghosh
@ 2007-02-27  9:31     ` Daniel Hobi
  2007-02-27 11:01       ` [U-Boot-Users] Testing of Uboot image from fedora5 through a c program MoonMoon Ghosh
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Hobi @ 2007-02-27  9:31 UTC (permalink / raw)
  To: u-boot

Hi Suhas,

On 27.02.2007 03:45, MoonMoon Ghosh wrote:
> Hi, I want to write a function like check_iamge(char * iamgefile) 
> which returns 0 if the image file is in u-boot image format and
> validated by CRC checksum. Otherwise it returns non-zero error
> number. So someone can help me how to write this function. I am using
> X86_64 2.16.X Fedora 5. and UBoot 1.1.6.

There already is such a funtion in U-Boot. It is invoked when using the 
command "iminfo" and provides a return value which can be processed by 
(Hush) shell scripts. For an example, see:

http://www.denx.de/wiki/view/DULG/CommandLineParsing

> Content-Type: text/html; charset=iso-8859-1

Please don't post HTML on this list.

Regards,
Daniel

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

* [U-Boot-Users] Testing of Uboot image from fedora5 through a c program
  2007-02-27  9:31     ` Daniel Hobi
@ 2007-02-27 11:01       ` MoonMoon Ghosh
       [not found]         ` <ab648d4b0702270417m6f073a97sea9c940bc781ad69@mail.gmail.com>
  2007-02-27 13:51         ` Wolfgang Denk
  0 siblings, 2 replies; 13+ messages in thread
From: MoonMoon Ghosh @ 2007-02-27 11:01 UTC (permalink / raw)
  To: u-boot

Hi,
Thank you very much Daniel for your information.
But My requirement is quite different.I know the use if iminfo and mkimage but I can not use those commands. Actually I have to test the Uboot kernel Image(checking of crc and other many other fields) from my fedora 5 through a c program in which kernel  image  file need to be passed  as command line argument.I can use the header files of Uboot source code  like  image.h  and  common.h and also the c code of Uboot source but I have to write my own program and need to compile using gcc.
I am trying with the source of mkimage.c but I want also the source of 
iminfo but I can not find it.
Hope my problem is now clear. Want valuable information and advice from 
you.
Thanking you in advance.
 Suhas
 
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070227/a7494005/attachment.htm 

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

* [U-Boot-Users] Testing of Uboot image from fedora5 through a c program
       [not found]         ` <ab648d4b0702270417m6f073a97sea9c940bc781ad69@mail.gmail.com>
@ 2007-02-27 12:19           ` Amnon Cohen
  0 siblings, 0 replies; 13+ messages in thread
From: Amnon Cohen @ 2007-02-27 12:19 UTC (permalink / raw)
  To: u-boot

have a look at image_info in common/cmd_bootm.c

Good luck,
    Amnon**


>
> On 2/27/07, MoonMoon Ghosh < moonni_86@yahoo.com > wrote:
>
> > Hi,
> > Thank you very much Daniel for your information.
> > But My requirement is quite different.I know the use if iminfo and
> > mkimage but I can not use those commands. Actually I have to test the Uboot
> > kernel Image(checking of crc and other many other fields) from my fedora 5
> > through a c program in which kernel  image  file need to be passed  as
> > command line argument.I can use the header files of Uboot source code
> > like  image.h  and  common.h and also the c code of Uboot source but I
> > have to write my own program and need to compile using gcc.
> > I am trying with the source of mkimage.c but I want also the source of
> > iminfo but I can not find it.
> > Hope my problem is now clear. Want valuable information and advice from
> > you.
> > Thanking you in advance.
> >  Suhas
> >
> > ------------------------------
> > Need Mail bonding?
> > Go to the Yahoo! Mail Q&A<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>for great
> > tips from Yahoo! Answers<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>users.
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net 's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > U-Boot-Users mailing list
> > U-Boot-Users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/u-boot-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070227/12ec3fbf/attachment.htm 

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

* [U-Boot-Users] Testing of Uboot image from fedora5 through a c program
  2007-02-27 11:01       ` [U-Boot-Users] Testing of Uboot image from fedora5 through a c program MoonMoon Ghosh
       [not found]         ` <ab648d4b0702270417m6f073a97sea9c940bc781ad69@mail.gmail.com>
@ 2007-02-27 13:51         ` Wolfgang Denk
  2007-02-28  0:33           ` [U-Boot-Users] Testing of Uboot image passed as command line arg MoonMoon Ghosh
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2007-02-27 13:51 UTC (permalink / raw)
  To: u-boot

In message <332616.23043.qm@web57712.mail.re3.yahoo.com> you wrote:
>
> But My requirement is quite different.I know the use if iminfo and mkimage but I can not use those commands. Actually I have to test the Uboot kernel Image(checking of crc and other many other fields) from my fedora 5 through a c program in which kernel
>   image  file need to be passed  as command line argument.I can use the header files of Uboot source code  like  image.h  and  common.h and also the c code of Uboot source but I have to write my own program and need to compile using gcc.

"mkimage -l" will do this for you. Don't reinvent the wheel.

> I am trying with the source of mkimage.c but I want also the source of 
> iminfo but I can not find it.

Use grep.

> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit

Stop posting HTML!!!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Where would we be without rhetorical questions?

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

* [U-Boot-Users] Testing of Uboot image passed as command line arg
  2007-02-27 13:51         ` Wolfgang Denk
@ 2007-02-28  0:33           ` MoonMoon Ghosh
  2007-02-28  8:06             ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: MoonMoon Ghosh @ 2007-02-28  0:33 UTC (permalink / raw)
  To: u-boot

HI,
Thank you very much Denk and Cohen for your response
and valuable information.
Extremelly sorry for posting HTML message.
My requirements don't allow me to use iminfo or
mkimage -i so I have to write my own code but I can
use code and headers from UBoot source. I have also
got the code of iminfo but then also getting problem
in these two lines- 
addr = simple_strtoul(argv[1],NULL,16);
here what is argv[1]?
and 
memmove(hdr,(char *)addr, sizeof(image_header_t));
I am getting segmentation fault in the above line.

I want to pass the Uboot kernel image as command line
argument and check its header info.
Hope to receive your useful and important advice.

Thanking you in advance.
Suhas Ghosh
Laser5 Co Ltd.
Tokyo
Japan.


 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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

* [U-Boot-Users] Testing of Uboot image passed as command line arg
  2007-02-28  0:33           ` [U-Boot-Users] Testing of Uboot image passed as command line arg MoonMoon Ghosh
@ 2007-02-28  8:06             ` Wolfgang Denk
  2007-02-28  9:08               ` [U-Boot-Users] Testing of Uboot image trough a c program -Solved MoonMoon Ghosh
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2007-02-28  8:06 UTC (permalink / raw)
  To: u-boot

In message <423675.69544.qm@web57709.mail.re3.yahoo.com> you wrote:
>
> use code and headers from UBoot source. I have also
> got the code of iminfo but then also getting problem
> in these two lines- 
> addr = simple_strtoul(argv[1],NULL,16);
> here what is argv[1]?

I'm afraid you need a basic understanding of the C programming
language before you can handle such a task.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The nice thing about  standards  is that there are  so many to choose
from.                                           - Andrew S. Tanenbaum

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

* [U-Boot-Users] Testing of Uboot image trough a c program -Solved
  2007-02-28  8:06             ` Wolfgang Denk
@ 2007-02-28  9:08               ` MoonMoon Ghosh
  0 siblings, 0 replies; 13+ messages in thread
From: MoonMoon Ghosh @ 2007-02-28  9:08 UTC (permalink / raw)
  To: u-boot

Hi,
Thank you very much Denk for your response.
I have already solved the problem today.I used the
source code from Uboot source(image.h and crc32.c) and
create my own code though I modified crc32.c It is
working well.My code tests for ARM cpu and linux
kernel image.
I am giving my sample test result.

[suhas at l5ac197 Imagecheck]$ gcc -o ucheck Sample.c
[suhas at l5ac197 Imagecheck]$ ./ucheck uImage

-----Kernel Image Information---------
Correct Magic Number--
crc check is OK
Kernel  Image Type=2
Correct image type!!
Cpu Arch=2
Correct cpu architecture type!!
OS type=5
Correct os type!!
Compression Type=1
Correct compression type!!
----------------------------------
<Check Pass>
[suhas at l5ac197 Imagecheck]$ ./ucheck uImage2

-----Kernel Image Information---------
Correct Magic Number--
crc is OK
Kernel Image Type=2
Correct image type!!
Cpu Arch=7
Bad architecture type

OS type=5
Correct os type!!
Compression Type=1
Correct compression type!!
----------------------------------
<Check Fail>
[suhas at l5ac197 Imagecheck]$ ./ucheck uImage3

-----Kernel Image Information---------
Correct Magic Number--
crc is OK
Kernel Image Type=2
Correct image type!!
Cpu Arch=7
Bad architecture type

OS type=5
Correct os type!!
Compression Type=1
Correct compression type!!
----------------------------------
[suhas at l5ac197 Imagecheck]$ ./ucheck uImage3bad

-----Kernel Image Information---------
Bad magic number--

Bad header crc

Kernel Image Type=133
Bad image type

Cpu Arch=184
Bad architecture type

OS type=34
Bad os type

Compression Type=180
Bad compression type
----------------------------------
<Check Fail>
[suhas at l5ac197 Imagecheck]$ ./ucheck uImagebad

-----Kernel Image Information---------
Bad magic number--

Bad header crc

Kernel Image Type=146
Bad image type

Cpu Arch=178
Bad architecture type

OS type=19
Bad os type

Compression Type=121
Bad compression type
----------------------------------
<Check Fail>

*Note: for uImagebad and uImage3bad I have deleted
some data and then save it. 

Thanking you again
WITH REGARDS
Suhas Ghosh


 


 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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

end of thread, other threads:[~2007-02-28  9:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 22:46 [U-Boot-Users] [PATCH] add output of 'size' to build Andrew Dyer
2007-02-26 23:31 ` Wolfgang Denk
2007-02-27  0:42   ` Andrew Dyer
2007-02-27  1:26     ` Wolfgang Denk
2007-02-27  1:33       ` Andrew Dyer
2007-02-27  2:45   ` [U-Boot-Users] Boot Image Check MoonMoon Ghosh
2007-02-27  9:31     ` Daniel Hobi
2007-02-27 11:01       ` [U-Boot-Users] Testing of Uboot image from fedora5 through a c program MoonMoon Ghosh
     [not found]         ` <ab648d4b0702270417m6f073a97sea9c940bc781ad69@mail.gmail.com>
2007-02-27 12:19           ` Amnon Cohen
2007-02-27 13:51         ` Wolfgang Denk
2007-02-28  0:33           ` [U-Boot-Users] Testing of Uboot image passed as command line arg MoonMoon Ghosh
2007-02-28  8:06             ` Wolfgang Denk
2007-02-28  9:08               ` [U-Boot-Users] Testing of Uboot image trough a c program -Solved MoonMoon Ghosh

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.