All of lore.kernel.org
 help / color / mirror / Atom feed
* How to identity processor architecture
@ 2011-01-27  6:07 prabhu
  2011-01-27  6:26 ` Enrico Granata
  0 siblings, 1 reply; 26+ messages in thread
From: prabhu @ 2011-01-27  6:07 UTC (permalink / raw)
  To: kernelnewbies

Hi Dear,

I just wanna to know my processor architecture(32bit or 64 bit) through 
c programming.

According to me the sizeof of pointer will give the result. Like below 
coding.

int main()
{
    int *ptr;
    printf("%d",sizeof(ptr));
}

Please correct me if i am wrong...

Any suggestion or help would be appreciated.

Thanks,
Prabhu

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

* How to identity processor architecture
  2011-01-27  6:07 How to identity processor architecture prabhu
@ 2011-01-27  6:26 ` Enrico Granata
  2011-01-27  6:31   ` arun kumar
  2011-01-27  6:40   ` prabhu
  0 siblings, 2 replies; 26+ messages in thread
From: Enrico Granata @ 2011-01-27  6:26 UTC (permalink / raw)
  To: kernelnewbies

What if one is compiling 32bit code on a 64bit processor? Would 4 be an acceptable result to you in that case?

Enrico Granata
Computer Science & Engineering Department (EBU3B) - Room 3240
office phone 858 534 9914
University of California, San Diego

On Jan 26, 2011, at 10:07 PM, prabhu wrote:

> Hi Dear,
> 
> I just wanna to know my processor architecture(32bit or 64 bit) through 
> c programming.
> 
> According to me the sizeof of pointer will give the result. Like below 
> coding.
> 
> int main()
> {
>    int *ptr;
>    printf("%d",sizeof(ptr));
> }
> 
> Please correct me if i am wrong...
> 
> Any suggestion or help would be appreciated.
> 
> Thanks,
> Prabhu
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110126/bd71567b/attachment.html 

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

* How to identity processor architecture
  2011-01-27  6:26 ` Enrico Granata
@ 2011-01-27  6:31   ` arun kumar
  2011-01-27  6:40   ` prabhu
  1 sibling, 0 replies; 26+ messages in thread
From: arun kumar @ 2011-01-27  6:31 UTC (permalink / raw)
  To: kernelnewbies

the size of the integer variable will be equal to your processor
architecture(32bit or 64 bit).

On Thu, Jan 27, 2011 at 11:56 AM, Enrico Granata <egranata@ucsd.edu> wrote:

> What if one is compiling 32bit code on a 64bit processor? Would 4 be an
> acceptable result to you in that case?
>
> *Enrico Granata*
> *Computer Science & Engineering Department (EBU3B) - **Room 3240*
> *office phone 858 534 9914*
> *University of California, San Diego*
>
> On Jan 26, 2011, at 10:07 PM, prabhu wrote:
>
> Hi Dear,
>
> I just wanna to know my processor architecture(32bit or 64 bit) through
> c programming.
>
> According to me the sizeof of pointer will give the result. Like below
> coding.
>
> int main()
> {
>    int *ptr;
>    printf("%d",sizeof(ptr));
> }
>
> Please correct me if i am wrong...
>
> Any suggestion or help would be appreciated.
>
> Thanks,
> Prabhu
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/fef7b460/attachment.html 

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

* How to identity processor architecture
  2011-01-27  6:26 ` Enrico Granata
  2011-01-27  6:31   ` arun kumar
@ 2011-01-27  6:40   ` prabhu
  2011-01-27  6:45     ` Mulyadi Santosa
  1 sibling, 1 reply; 26+ messages in thread
From: prabhu @ 2011-01-27  6:40 UTC (permalink / raw)
  To: kernelnewbies

Hi Enrico,

I am not sure.

No, because 32bit code will tell the datatype size and i think pointer 
variable depends on architecture.
So 64 bit processor needs 64 address line to point the data location. So 
pointer variable needs to be 8 byte.

please correct me if i am worng.

Thanks,
Prabhu


Enrico Granata wrote:
> What if one is compiling 32bit code on a 64bit processor? Would 4 be 
> an acceptable result to you in that case?
>
> /Enrico Granata/
> /Computer Science & Engineering Department (EBU3B) - //Room 3240/
> /office phone 858 534 9914/
> /University of California, San Diego/
>
> On Jan 26, 2011, at 10:07 PM, prabhu wrote:
>
>> Hi Dear,
>>
>> I just wanna to know my processor architecture(32bit or 64 bit) through
>> c programming.
>>
>> According to me the sizeof of pointer will give the result. Like below
>> coding.
>>
>> int main()
>> {
>>    int *ptr;
>>    printf("%d",sizeof(ptr));
>> }
>>
>> Please correct me if i am wrong...
>>
>> Any suggestion or help would be appreciated.
>>
>> Thanks,
>> Prabhu
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org <mailto:Kernelnewbies@kernelnewbies.org>
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/37bc8117/attachment-0001.html 

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

* How to identity processor architecture
  2011-01-27  6:40   ` prabhu
@ 2011-01-27  6:45     ` Mulyadi Santosa
  2011-01-27  6:54       ` Enrico Granata
                         ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Mulyadi Santosa @ 2011-01-27  6:45 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
> No, because 32bit code will tell the datatype size and i think pointer
> variable depends on architecture.
> So 64 bit processor needs 64 address line to point the data location. So
> pointer variable needs to be 8 byte.

Please don't top post and please use the new list address, ok? :)

IMO, I second your opinion. And as addition, I think it's worth to
check /proc/cpuinfo too  in "address sizes" field

NB: I was thinking, if in x64, it is operating in full 32 bit mode
(not hybrid one), it is supposed to yield 32 bit address too, right?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* How to identity processor architecture
  2011-01-27  6:45     ` Mulyadi Santosa
@ 2011-01-27  6:54       ` Enrico Granata
  2011-01-27  7:15         ` dharmvir kumar
  2011-01-27  7:24         ` Mandeep Sandhu
  2011-01-27  7:07       ` How to identity processor architecture prabhu
  2011-01-27 19:27       ` mindentropy
  2 siblings, 2 replies; 26+ messages in thread
From: Enrico Granata @ 2011-01-27  6:54 UTC (permalink / raw)
  To: kernelnewbies

On Jan 26, 2011, at 10:45 PM, Mulyadi Santosa wrote:

> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
>> No, because 32bit code will tell the datatype size and i think pointer
>> variable depends on architecture.
>> So 64 bit processor needs 64 address line to point the data location. So
>> pointer variable needs to be 8 byte.
> 
> Please don't top post and please use the new list address, ok? :)
> 
> IMO, I second your opinion. And as addition, I think it's worth to
> check /proc/cpuinfo too  in "address sizes" field
> 
> NB: I was thinking, if in x64, it is operating in full 32 bit mode
> (not hybrid one), it is supposed to yield 32 bit address too, right?
> 
> -- 
> regards,
> 
> Mulyadi Santosa
> Freelance Linux trainer and consultant
> 
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

I guess a 64bit processor does need 64bit addresses to reference memory. But at the same time, if 32 bit programs are to run unmodified on 64 bit architectures there needs to be ways in which 32bit pointers can still work. So, I am almost 100% sure that compiling 32bit code, even on a 64bit processor, should yield 4 for sizeof(void*)

Enrico Granata
Computer Science & Engineering Department (EBU3B) - Room 3240
office phone 858 534 9914
University of California, San Diego

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110126/92bcc874/attachment.html 

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

* How to identity processor architecture
  2011-01-27  6:45     ` Mulyadi Santosa
  2011-01-27  6:54       ` Enrico Granata
@ 2011-01-27  7:07       ` prabhu
  2011-01-27  7:13         ` Mulyadi Santosa
  2011-01-27 19:27       ` mindentropy
  2 siblings, 1 reply; 26+ messages in thread
From: prabhu @ 2011-01-27  7:07 UTC (permalink / raw)
  To: kernelnewbies

Hi Mulyadi,
> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
>   
>> No, because 32bit code will tell the datatype size and i think pointer
>> variable depends on architecture.
>> So 64 bit processor needs 64 address line to point the data location. So
>> pointer variable needs to be 8 byte.
>>     
>
> Please don't top post and please use the new list address, ok? :)
>   
Sure, Thanks for your reply.
> IMO, I second your opinion. And as addition, I think it's worth to
> check /proc/cpuinfo too  in "address sizes" field
>   
I am getting below output for /proc/cpuinfo . I hope *cpu family : 6 
*means x86 family(32 bit processor). What if its 64 bit processor. ( I 
dont have system to check this.)

processor : 0
vendor_id : GenuineIntel
*cpu family : 6*
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz
stepping : 13
cpu MHz : 1200.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc 
arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr 
pdcm lahf_lm
bogomips : 3591.05
clflush size : 64
power management:

processor : 1
vendor_id : GenuineIntel
*cpu family : 6*
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz
stepping : 13
cpu MHz : 1200.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc 
arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr 
pdcm lahf_lm
bogomips : 3590.97
clflush size : 64
power management:
> NB: I was thinking, if in x64, it is operating in full 32 bit mode
> (not hybrid one), it is supposed to yield 32 bit address too, right?
>   
I'm sorry . I have no idea about this.

Thanks,
Prabhu

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

* How to identity processor architecture
  2011-01-27  7:07       ` How to identity processor architecture prabhu
@ 2011-01-27  7:13         ` Mulyadi Santosa
  0 siblings, 0 replies; 26+ messages in thread
From: Mulyadi Santosa @ 2011-01-27  7:13 UTC (permalink / raw)
  To: kernelnewbies

Hi...

On Thu, Jan 27, 2011 at 14:07, prabhu <prabhum@msys-tech.com> wrote:
> I am getting below output for /proc/cpuinfo . I hope *cpu family : 6 *means
> x86 family(32 bit processor). What if its 64 bit processor. ( I dont have
> system to check this.)
>
> processor : 0
> vendor_id : GenuineIntel
> *cpu family : 6*
> model : 15
> model name : Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz

according to http://en.wikipedia.org/wiki/Pentium_Dual-Core, yours
falls into Allendale core category, which is already using Intel 64
technology. So, unless I am mistaken somewhere, yours is x64. The
problem is, is it working in hybrid 64/32 bit or in full 32 bit ....?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* How to identity processor architecture
  2011-01-27  6:54       ` Enrico Granata
@ 2011-01-27  7:15         ` dharmvir kumar
  2011-01-27  7:24         ` Mandeep Sandhu
  1 sibling, 0 replies; 26+ messages in thread
From: dharmvir kumar @ 2011-01-27  7:15 UTC (permalink / raw)
  To: kernelnewbies

 64-bit processors  have lm ("long mode") in the flags section of
cpuinfowhereas   32-bit processors have not.
regards
Dharmvir Kumar


On Thu, Jan 27, 2011 at 12:24 PM, Enrico Granata <egranata@ucsd.edu> wrote:

> On Jan 26, 2011, at 10:45 PM, Mulyadi Santosa wrote:
>
> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
>
> No, because 32bit code will tell the datatype size and i think pointer
>
> variable depends on architecture.
>
> So 64 bit processor needs 64 address line to point the data location. So
>
> pointer variable needs to be 8 byte.
>
>
> Please don't top post and please use the new list address, ok? :)
>
> IMO, I second your opinion. And as addition, I think it's worth to
> check /proc/cpuinfo too  in "address sizes" field
>
> NB: I was thinking, if in x64, it is operating in full 32 bit mode
> (not hybrid one), it is supposed to yield 32 bit address too, right?
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> I guess a 64bit processor does need 64bit addresses to reference memory.
> But at the same time, if 32 bit programs are to run unmodified on 64 bit
> architectures there needs to be ways in which 32bit pointers can still work.
> So, I am almost 100% sure that compiling 32bit code, even on a 64bit
> processor, should yield 4 for sizeof(void*)
>
> *Enrico Granata*
> *Computer Science & Engineering Department (EBU3B) - **Room 3240*
> *office phone 858 534 9914*
> *University of California, San Diego*
> *
> *
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/e349ee2a/attachment-0001.html 

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

* How to identity processor architecture
  2011-01-27  6:54       ` Enrico Granata
  2011-01-27  7:15         ` dharmvir kumar
@ 2011-01-27  7:24         ` Mandeep Sandhu
  2011-01-27  8:20           ` prabhu
  2011-01-27  9:23           ` Busybox for powerpc doesnt compile Giriprasad Deviprasad
  1 sibling, 2 replies; 26+ messages in thread
From: Mandeep Sandhu @ 2011-01-27  7:24 UTC (permalink / raw)
  To: kernelnewbies

> I guess a 64bit processor does need 64bit addresses to reference memory. But
> at the same time, if 32 bit programs are to run unmodified on 64 bit
> architectures there needs to be ways in which 32bit pointers can still work.
> So, I am almost 100% sure that compiling 32bit code, even on a 64bit
> processor, should yield 4 for sizeof(void*)

You are 100% right. Tried this on  2 laptops:

printf("Is this a %s-bit machine?\n", ((sizeof(void*) == 4) ? "32" : "64"));

32-Bit ubuntu (10.10) on 64-bit proc:
"Is this a 32-bit machine?"

64-Bit ubuntu (10.10) on 64-bit proc:
"Is this a 64-bit machine?"

Regards,
-mandeep

> Enrico Granata
> Computer Science & Engineering Department (EBU3B) -?Room 3240
> office phone 858 534 9914
> University of California, San Diego
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

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

* How to identity processor architecture
  2011-01-27  7:24         ` Mandeep Sandhu
@ 2011-01-27  8:20           ` prabhu
  2011-01-27  8:22             ` Enrico Granata
  2011-01-27  9:23           ` Busybox for powerpc doesnt compile Giriprasad Deviprasad
  1 sibling, 1 reply; 26+ messages in thread
From: prabhu @ 2011-01-27  8:20 UTC (permalink / raw)
  To: kernelnewbies

Mandeep Sandhu wrote:
>> I guess a 64bit processor does need 64bit addresses to reference memory. But
>> at the same time, if 32 bit programs are to run unmodified on 64 bit
>> architectures there needs to be ways in which 32bit pointers can still work.
>> So, I am almost 100% sure that compiling 32bit code, even on a 64bit
>> processor, should yield 4 for sizeof(void*)
>>     
>
> You are 100% right. Tried this on  2 laptops:
>
> printf("Is this a %s-bit machine?\n", ((sizeof(void*) == 4) ? "32" : "64"));
>
> 32-Bit ubuntu (10.10) on 64-bit proc:
> "Is this a 32-bit machine?"
>
> 64-Bit ubuntu (10.10) on 64-bit proc:
> "Is this a 64-bit machine?"
>
> Regards,
> -mandeep
>   

Hi Mandeep,

Thanks a lot.

So is there any other way available to identify the processor 
architecture using c code?? . The program needs to return correct
processor architecture(32bit or 64bit) irrespective to the OS architecture.

Thanks,
Prabhu
>> Enrico Granata
>> Computer Science & Engineering Department (EBU3B) - Room 3240
>> office phone 858 534 9914
>> University of California, San Diego
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>     
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/22de50ff/attachment.html 

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

* How to identity processor architecture
  2011-01-27  8:20           ` prabhu
@ 2011-01-27  8:22             ` Enrico Granata
  2011-01-27  9:53               ` prabhu
  0 siblings, 1 reply; 26+ messages in thread
From: Enrico Granata @ 2011-01-27  8:22 UTC (permalink / raw)
  To: kernelnewbies


Enrico Granata
Computer Science & Engineering Department (EBU3B) - Room 3240
office phone 858 534 9914
University of California, San Diego

On Jan 27, 2011, at 12:20 AM, prabhu wrote:

> Mandeep Sandhu wrote:
>> 
>>> I guess a 64bit processor does need 64bit addresses to reference memory. But
>>> at the same time, if 32 bit programs are to run unmodified on 64 bit
>>> architectures there needs to be ways in which 32bit pointers can still work.
>>> So, I am almost 100% sure that compiling 32bit code, even on a 64bit
>>> processor, should yield 4 for sizeof(void*)
>>>     
>> 
>> You are 100% right. Tried this on  2 laptops:
>> 
>> printf("Is this a %s-bit machine?\n", ((sizeof(void*) == 4) ? "32" : "64"));
>> 
>> 32-Bit ubuntu (10.10) on 64-bit proc:
>> "Is this a 32-bit machine?"
>> 
>> 64-Bit ubuntu (10.10) on 64-bit proc:
>> "Is this a 64-bit machine?"
>> 
>> Regards,
>> -mandeep
>>   
> 
> Hi Mandeep,
> 
> Thanks a lot.
> 
> So is there any other way available to identify the processor architecture using c code?? . The program needs to return correct 
> processor architecture(32bit or 64bit) irrespective to the OS architecture.
> 
> Thanks,
> Prabhu
>>> Enrico Granata
>>> Computer Science & Engineering Department (EBU3B) - Room 3240
>>> office phone 858 534 9914
>>> University of California, San Diego
>>> 
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>> 
>>> 
>>>     
>> 
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> 
>> 
>>   
> 

Someone already hinted at it, I guess:

>  64-bit processors  have lm ("long mode") in the flags section of cpuinfo whereas   32-bit processors have not.
> regards
> Dharmvir Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/6bbf5427/attachment.html 

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

* Busybox for powerpc doesnt compile
  2011-01-27  7:24         ` Mandeep Sandhu
  2011-01-27  8:20           ` prabhu
@ 2011-01-27  9:23           ` Giriprasad Deviprasad
  2011-01-27 10:11             ` yy Hong
  1 sibling, 1 reply; 26+ messages in thread
From: Giriprasad Deviprasad @ 2011-01-27  9:23 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

?I am trying to compile busybox-1.17.1 for mpc8250 based powerpc architecture. My settings are as :

export LDFLAGS="-nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/"
export LIBRARY_PATH=/opt/mpc8250/tools/ppc_6xx/usr/lib/

echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/opt/mpc8250/tools/usr/bin/:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin

?I specified in menuconfig:
CFLAGS as -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/

make
ARCH=powerpc CROSS_COMPILE=powerpc-linux-
--include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
PREFIX=/home/user/target/mpc8250/rootfs
? LD????? applets/built-in.o
? LINK??? busybox_unstripped
Trying libraries: crypt
 m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
powerpc-linux-gcc
-Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused
-Wunused-parameter -Wunused-function -Wunused-value
-Wmissing-prototypes -Wmissing-declarations
-Wdeclaration-after-statement -Wold-style-definition
-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer
-ffunction-sections -fdata-sections -fno-guess-branch-probability
-funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1
-falign-labels=1 -falign-loops=1 -Os
-I/opt/mpc8250/tools/ppc_6xx/usr/include/
-L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
-L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
-Wl,--start-group applets/built-in.o archival/lib.a
archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a
editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a
loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a
networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a
printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a
sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a
archival/built-in.o archival/libunarchive/built-in.o
console-tools/built-in.o coreutils/built-in.o
coreutils/libcoreutils/built-in.o debianutils/built-in.o
e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o
init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
modutils/built-in.o networking/built-in.o
networking/libiproute/built-in.o networking/udhcp/built-in.o
printutils/built-in.o procps/built-in.o runit/built-in.o
selinux/built-in.o shell/built-in.o sysklogd/built-in.o
util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
-Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1



Also tried:
make
ARCH=powerpc CROSS=powerpc-linux-
--include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
PREFIX=/home/user/target/mpc8250/rootfs
? LINK??? busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
powerpc-linux-gcc
-Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused
-Wunused-parameter -Wunused-function -Wunused-value
-Wmissing-prototypes -Wmissing-declarations
-Wdeclaration-after-statement -Wold-style-definition
-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer
-ffunction-sections -fdata-sections -fno-guess-branch-probability
-funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1
-falign-labels=1 -falign-loops=1 -Os
-I/opt/mpc8250/tools/ppc_6xx/usr/include/
-L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
-L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
-Wl,--start-group applets/built-in.o archival/lib.a
archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a
editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a
loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a
networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a
printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a
sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a
archival/built-in.o archival/libunarchive/built-in.o
console-tools/built-in.o coreutils/built-in.o
coreutils/libcoreutils/built-in.o debianutils/built-in.o
e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o
init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
modutils/built-in.o networking/built-in.o
networking/libiproute/built-in.o networking/udhcp/built-in.o
printutils/built-in.o procps/built-in.o runit/built-in.o
selinux/built-in.o shell/built-in.o sysklogd/built-in.o
util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
-Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1


Any clues as to why this happens?

Thanks & Regards,
D.Giriprasad



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/0a0dbaac/attachment-0001.html 

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

* How to identity processor architecture
  2011-01-27  8:22             ` Enrico Granata
@ 2011-01-27  9:53               ` prabhu
  2011-01-27 11:15                 ` Henry Gebhardt
  0 siblings, 1 reply; 26+ messages in thread
From: prabhu @ 2011-01-27  9:53 UTC (permalink / raw)
  To: kernelnewbies


>>  64-bit processors  have lm ("long mode") in the flags section 
>> of cpuinfo whereas   32-bit processors have not.
>> regards
>> Dharmvir Kumar
Thanks a lot folks.

Adding more detail on this.

Below detail helps to understand CPU architecture.
_*
*__*Finding CPU Arch*_

    $ grep flags /proc/cpuinfo | uniq | egrep -o -w "rm|tm|lm"

    Under "Flags" section in /proc/cpuinfo, you will find any of the 
flags "tm" or

    "rm" or "lm"

        * rm (Real Mode) means it is a 16 bit processor
        * tm (Transparent Mode) means it is a 32 bit processor
        * lm (Long Mode) means it is a 64 bit processor


Is this only way to find the processor architecture ????

Any C programming technique apart from using this /proc/cpuinfo detail?

Thanks,
Prabhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/732cd8c0/attachment.html 

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

* Busybox for powerpc doesnt compile
  2011-01-27  9:23           ` Busybox for powerpc doesnt compile Giriprasad Deviprasad
@ 2011-01-27 10:11             ` yy Hong
  2011-01-27 13:47               ` Anuz Pratap Singh Tomar
                                 ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: yy Hong @ 2011-01-27 10:11 UTC (permalink / raw)
  To: kernelnewbies

2011/1/27 Giriprasad Deviprasad <g_pr21@yahoo.in>

>   Hi All,
>
>  I am trying to compile busybox-1.17.1 for mpc8250 based powerpc
> architecture. My settings are as :
>
> export LDFLAGS="-nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/"
> export LIBRARY_PATH=/opt/mpc8250/tools/ppc_6xx/usr/lib/
>
> echo $PATH
>
> /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/opt/mpc8250/tools/usr/bin/:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin
>
>  I specified in menuconfig:
> CFLAGS as -I/opt/mpc8250/tools/ppc_6xx/usr/include/
> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/
>
> make ARCH=powerpc CROSS_COMPILE=powerpc-linux-
> --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
> PREFIX=/home/user/target/mpc8250/rootfs
>   LD      applets/built-in.o
>   LINK    busybox_unstripped
> Trying libraries: crypt m
> Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
> Output of:
> powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef
> -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function
> -Wunused-value -Wmissing-prototypes -Wmissing-declarations
> -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen
> -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections
> -fno-guess-branch-probability -funsigned-char -static-libgcc
> -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
> -I/opt/mpc8250/tools/ppc_6xx/usr/include/
> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
> -Wl,--start-group applets/built-in.o archival/lib.a
> archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
> coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a
> findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a
> mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
> networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a
> procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a
> util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o
> archival/libunarchive/built-in.o console-tools/built-in.o
> coreutils/built-in.o coreutils/libcoreutils/built-in.o
> debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o
> findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
> loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
> modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
> networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o
> runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o
> util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
> -Wl,--start-group -lcrypt -lm -Wl,--end-group
> ==========
> /opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld:
> cannot find -lcrypt
> collect2: ld returned 1 exit status
> make: *** [busybox_unstripped] Error 1
>
> It seems you toolchian dosen't contain libcrypt.you can compile it into
> your toolchain and try again.
>
> Also tried:
> make ARCH=powerpc CROSS=powerpc-linux-
> --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
> PREFIX=/home/user/target/mpc8250/rootfs
>   LINK    busybox_unstripped
> Trying libraries: crypt m
> Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
> Output of:
> powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef
> -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function
> -Wunused-value -Wmissing-prototypes -Wmissing-declarations
> -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen
> -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections
> -fno-guess-branch-probability -funsigned-char -static-libgcc
> -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
> -I/opt/mpc8250/tools/ppc_6xx/usr/include/
> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
> -Wl,--start-group applets/built-in.o archival/lib.a
> archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
> coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a
> findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a
> mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
> networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a
> procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a
> util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o
> archival/libunarchive/built-in.o console-tools/built-in.o
> coreutils/built-in.o coreutils/libcoreutils/built-in.o
> debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o
> findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
> loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
> modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
> networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o
> runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o
> util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
> -Wl,--start-group -lcrypt -lm -Wl,--end-group
> ==========
> /opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld:
> cannot find -lcrypt
> collect2: ld returned 1 exit status
> make: *** [busybox_unstripped] Error 1
>
>
> Any clues as to why this happens?
>
> Thanks & Regards,
> D.Giriprasad
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/4634ba0a/attachment.html 

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

* How to identity processor architecture
  2011-01-27  9:53               ` prabhu
@ 2011-01-27 11:15                 ` Henry Gebhardt
  2011-01-27 11:32                   ` Thirugnanam Balamurugan
  2011-01-27 11:44                   ` Pravin Shedage
  0 siblings, 2 replies; 26+ messages in thread
From: Henry Gebhardt @ 2011-01-27 11:15 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote:
> Any C programming technique apart from using this /proc/cpuinfo detail?

What about using the machine field of uname(2):

   $ man 2 uname

Quoting from that man page:

   [...] the operating system  presumably  knows  its name,  release
   and version.   It also knows what hardware it runs on.

Perhaps a downside, it returns the machine type as a string.  Does that
do what you want?

I also find "man linux32" rather interesting:

    setarch  -  change reported architecture in new program environment
    and set personality flags

Might be useful for testing.


Greetings,
Henry

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

* How to identity processor architecture
  2011-01-27 11:15                 ` Henry Gebhardt
@ 2011-01-27 11:32                   ` Thirugnanam Balamurugan
  2011-01-27 11:44                   ` Pravin Shedage
  1 sibling, 0 replies; 26+ messages in thread
From: Thirugnanam Balamurugan @ 2011-01-27 11:32 UTC (permalink / raw)
  To: kernelnewbies

Also , the below one could help.

$ getconf LONG_BIT
64
$

Regards,
Bala


-----Original Message-----
From: kernelnewbies-bounces@kernelnewbies.org
[mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Henry
Gebhardt
Sent: Thursday, January 27, 2011 4:46 PM
To: prabhu
Cc: Enrico Granata; kernelnewbies
Subject: Re: How to identity processor architecture

On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote:
> Any C programming technique apart from using this /proc/cpuinfo
detail?

What about using the machine field of uname(2):

   $ man 2 uname

Quoting from that man page:

   [...] the operating system  presumably  knows  its name,  release
   and version.   It also knows what hardware it runs on.

Perhaps a downside, it returns the machine type as a string.  Does that
do what you want?

I also find "man linux32" rather interesting:

    setarch  -  change reported architecture in new program environment
    and set personality flags

Might be useful for testing.


Greetings,
Henry

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* How to identity processor architecture
  2011-01-27 11:15                 ` Henry Gebhardt
  2011-01-27 11:32                   ` Thirugnanam Balamurugan
@ 2011-01-27 11:44                   ` Pravin Shedage
  2011-01-27 12:33                     ` prabhu
  1 sibling, 1 reply; 26+ messages in thread
From: Pravin Shedage @ 2011-01-27 11:44 UTC (permalink / raw)
  To: kernelnewbies

Hi,

This C program might help you.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/utsname.h>

int main()
{
    struct utsname *buf = NULL;



    buf = malloc(sizeof(struct utsname));
    if (buf == NULL) {
        fprintf(stderr,"Memory Allocation Error: %s \n", strerror(errno));
        exit(-1);
    }

    if (uname(buf) < 0) {
        fprintf(stderr,"UName Error: %s \n", strerror(errno));
        exit(-1);
    }

    printf ("Processor arch =:>) %s \n", buf->machine);

    return 0;
}




On Thu, Jan 27, 2011 at 4:45 PM, Henry Gebhardt
<hsggebhardt@googlemail.com>wrote:

> On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote:
> > Any C programming technique apart from using this /proc/cpuinfo detail?
>
> What about using the machine field of uname(2):
>
>   $ man 2 uname
>
> Quoting from that man page:
>
>   [...] the operating system  presumably  knows  its name,  release
>   and version.   It also knows what hardware it runs on.
>
> Perhaps a downside, it returns the machine type as a string.  Does that
> do what you want?
>
> I also find "man linux32" rather interesting:
>
>    setarch  -  change reported architecture in new program environment
>    and set personality flags
>
> Might be useful for testing.
>
>
> Greetings,
> Henry
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 


Thanks & Regards,
---------PraviN---------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/39c367d2/attachment.html 

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

* How to identity processor architecture
  2011-01-27 11:44                   ` Pravin Shedage
@ 2011-01-27 12:33                     ` prabhu
  0 siblings, 0 replies; 26+ messages in thread
From: prabhu @ 2011-01-27 12:33 UTC (permalink / raw)
  To: kernelnewbies

Pravin Shedage wrote:
> Hi,
>
> This C program might help you.
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <errno.h>
> #include <sys/utsname.h>
>
> int main()
> {
>     struct utsname *buf = NULL;
>
>
>
>     buf = malloc(sizeof(struct utsname));
>     if (buf == NULL) {
>         fprintf(stderr,"Memory Allocation Error: %s \n", strerror(errno));
>         exit(-1);
>     }
>
>     if (uname(buf) < 0) {
>         fprintf(stderr,"UName Error: %s \n", strerror(errno));
>         exit(-1);
>     }
>
>     printf ("Processor arch =:>) %s \n", buf->machine);
>
>     return 0;
> }
>
>
>
>
> On Thu, Jan 27, 2011 at 4:45 PM, Henry Gebhardt 
> <hsggebhardt at googlemail.com <mailto:hsggebhardt@googlemail.com>> wrote:
>
>     On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote:
>     > Any C programming technique apart from using this /proc/cpuinfo
>     detail?
>
>     What about using the machine field of uname(2):
>
>       $ man 2 uname
>
>     Quoting from that man page:
>
>       [...] the operating system  presumably  knows  its name,  release
>       and version.   It also knows what hardware it runs on.
>
>     Perhaps a downside, it returns the machine type as a string.  Does
>     that
>     do what you want?
>
>     I also find "man linux32" rather interesting:
>
>        setarch  -  change reported architecture in new program environment
>        and set personality flags
>
>     Might be useful for testing.
>
>
>     Greetings,
>     Henry
>

Both Ideas give the  Kernel architecture not cpu architecture.

You can get exact cpu architecture through lshw command.

*-cpu
          product: Intel(R) Pentium(R) Dual  CPU  E2160  @ 1.80GHz
          vendor: Intel Corp.
          physical id: 1
          bus info: cpu at 0
          version: 6.15.13
          serial: 0000-06FD-0000-0000-0000-0000
          size: 1200MHz
          capacity: 1200MHz
          width: 64 bits
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce 
cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 
ss ht tm pbe nx x86-64 constant_tsc arch_perfmon pebs bts pni dtes64 
monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm cpufreq
          configuration: id=1
        *-logicalcpu:0
             description: Logical CPU
             physical id: 1.1
             width: 64 bits
             capabilities: logical
        *-logicalcpu:1
             description: Logical CPU
             physical id: 1.2
             width: 64 bits
             capabilities: logical

>     _______________________________________________
>     Kernelnewbies mailing list
>     Kernelnewbies at kernelnewbies.org
>     <mailto:Kernelnewbies@kernelnewbies.org>
>     http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> -- 
>
>
> Thanks & Regards,
> ---------PraviN---------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/e8f6faf3/attachment.html 

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

* Busybox for powerpc doesnt compile
  2011-01-27 10:11             ` yy Hong
@ 2011-01-27 13:47               ` Anuz Pratap Singh Tomar
  2011-01-29  5:50               ` Giriprasad Deviprasad
  2011-01-30 13:23               ` Giriprasad Deviprasad
  2 siblings, 0 replies; 26+ messages in thread
From: Anuz Pratap Singh Tomar @ 2011-01-27 13:47 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 27, 2011 at 10:11 AM, yy Hong <yaanhyy@gmail.com> wrote:

>
>
> 2011/1/27 Giriprasad Deviprasad <g_pr21@yahoo.in>
>
>>   Hi All,
>>
>>  I am trying to compile busybox-1.17.1 for mpc8250 based powerpc
>> architecture. My settings are as :
>>
>> export LDFLAGS="-nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/"
>> export LIBRARY_PATH=/opt/mpc8250/tools/ppc_6xx/usr/lib/
>>
>> echo $PATH
>>
>> /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/opt/mpc8250/tools/usr/bin/:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin
>>
>>  I specified in menuconfig:
>> CFLAGS as -I/opt/mpc8250/tools/ppc_6xx/usr/include/
>> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/
>>
>> make ARCH=powerpc CROSS_COMPILE=powerpc-linux-
>> --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
>> PREFIX=/home/user/target/mpc8250/rootfs
>>   LD      applets/built-in.o
>>   LINK    busybox_unstripped
>> Trying libraries: crypt m
>> Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
>> Output of:
>> powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef
>> -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function
>> -Wunused-value -Wmissing-prototypes -Wmissing-declarations
>> -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen
>> -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections
>> -fno-guess-branch-probability -funsigned-char -static-libgcc
>> -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
>> -I/opt/mpc8250/tools/ppc_6xx/usr/include/
>> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
>> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
>> -Wl,--start-group applets/built-in.o archival/lib.a
>> archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
>> coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a
>> findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a
>> mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
>> networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a
>> procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a
>> util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o
>> archival/libunarchive/built-in.o console-tools/built-in.o
>> coreutils/built-in.o coreutils/libcoreutils/built-in.o
>> debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o
>> findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
>> loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
>> modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
>> networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o
>> runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o
>> util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
>> -Wl,--start-group -lcrypt -lm -Wl,--end-group
>> ==========
>> /opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld:
>> cannot find -lcrypt
>> collect2: ld returned 1 exit status
>> make: *** [busybox_unstripped] Error 1
>>
>> It seems you toolchian dosen't contain libcrypt.you can compile it into
>> your toolchain and try again.
>>
>>
>> Also tried:
>> make ARCH=powerpc CROSS=powerpc-linux-
>> --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/
>> PREFIX=/home/user/target/mpc8250/rootfs
>>   LINK    busybox_unstripped
>> Trying libraries: crypt m
>> Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
>> Output of:
>> powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef
>> -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function
>> -Wunused-value -Wmissing-prototypes -Wmissing-declarations
>> -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen
>> -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections
>> -fno-guess-branch-probability -funsigned-char -static-libgcc
>> -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
>> -I/opt/mpc8250/tools/ppc_6xx/usr/include/
>> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib
>> -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped
>> -Wl,--start-group applets/built-in.o archival/lib.a
>> archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a
>> coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a
>> findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a
>> mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
>> networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a
>> procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a
>> util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o
>> archival/libunarchive/built-in.o console-tools/built-in.o
>> coreutils/built-in.o coreutils/libcoreutils/built-in.o
>> debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o
>> findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o
>> loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o
>> modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
>> networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o
>> runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o
>> util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
>> -Wl,--start-group -lcrypt -lm -Wl,--end-group
>> ==========
>> /opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld:
>> cannot find -lcrypt
>> collect2: ld returned 1 exit status
>> make: *** [busybox_unstripped] Error 1
>>
>>
>> Any clues as to why this happens?
>>
> Wrong mailing list, you should ask such question on busybox mailing list,
besides this is a kernel related mailing list or gcc-powerpc mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/f5fdc130/attachment-0001.html 

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

* How to identity processor architecture
  2011-01-27  6:45     ` Mulyadi Santosa
  2011-01-27  6:54       ` Enrico Granata
  2011-01-27  7:07       ` How to identity processor architecture prabhu
@ 2011-01-27 19:27       ` mindentropy
  2011-01-27 20:01         ` Denis Kirjanov
  2 siblings, 1 reply; 26+ messages in thread
From: mindentropy @ 2011-01-27 19:27 UTC (permalink / raw)
  To: kernelnewbies

On Thursday 27 Jan 2011 12:15:47 pm Mulyadi Santosa wrote:
> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
> > No, because 32bit code will tell the datatype size and i think pointer
> > variable depends on architecture.
> > So 64 bit processor needs 64 address line to point the data location. So
> > pointer variable needs to be 8 byte.
> 
> Please don't top post and please use the new list address, ok? :)
> 
> IMO, I second your opinion. And as addition, I think it's worth to
> check /proc/cpuinfo too  in "address sizes" field
> 
> NB: I was thinking, if in x64, it is operating in full 32 bit mode
> (not hybrid one), it is supposed to yield 32 bit address too, right?
Why not simply use CPUID ?

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

* How to identity processor architecture
  2011-01-27 19:27       ` mindentropy
@ 2011-01-27 20:01         ` Denis Kirjanov
  0 siblings, 0 replies; 26+ messages in thread
From: Denis Kirjanov @ 2011-01-27 20:01 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 27, 2011 at 10:27 PM, mindentropy <mindentropy@gmail.com> wrote:
> On Thursday 27 Jan 2011 12:15:47 pm Mulyadi Santosa wrote:
>> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@msys-tech.com> wrote:
>> > No, because 32bit code will tell the datatype size and i think pointer
>> > variable depends on architecture.
>> > So 64 bit processor needs 64 address line to point the data location. So
>> > pointer variable needs to be 8 byte.
>>
>> Please don't top post and please use the new list address, ok? :)
>>
>> IMO, I second your opinion. And as addition, I think it's worth to
>> check /proc/cpuinfo too ?in "address sizes" field
>>
>> NB: I was thinking, if in x64, it is operating in full 32 bit mode
>> (not hybrid one), it is supposed to yield 32 bit address too, right?
> Why not simply use CPUID ?

In this case solution is not portable and uses arch specific methods.
I think most 64-bit systems today use LP64 data model.

> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Regards,
Denis

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

* Busybox for powerpc doesnt compile
  2011-01-27 10:11             ` yy Hong
  2011-01-27 13:47               ` Anuz Pratap Singh Tomar
@ 2011-01-29  5:50               ` Giriprasad Deviprasad
  2011-01-30 13:23               ` Giriprasad Deviprasad
  2 siblings, 0 replies; 26+ messages in thread
From: Giriprasad Deviprasad @ 2011-01-29  5:50 UTC (permalink / raw)
  To: kernelnewbies

Hi,

?I am trying to install glibc for the busybox required libs:
echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
export CFLAGS="-I /opt/mpc8250/tools/ppc_6xx/usr/include"
../glibc-2.8/configure --prefix=/opt/mpc8250/tools/ppc_6xx/glibc-2.8 --host=powerpc-linux --without-tls --without-cvs --disable-profile --disable-debug --disable-shared --enable-threads=no --with-headers=/opt/mpc8250/tools/ppc_6xx/usr/include/ --cache-file=config.cache

checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... configure: error: cannot compute sizeof (long double)
See `config.log' for more details.

Any clues on why?

Regards,
D.Giriprasad


--- On Thu, 27/1/11, yy Hong <yaanhyy@gmail.com> wrote:

From: yy Hong <yaanhyy@gmail.com>
Subject: Re: Busybox for powerpc doesnt compile
To: "Giriprasad Deviprasad" <g_pr21@yahoo.in>
Cc: Kernelnewbies at kernelnewbies.org
Date: Thursday, 27 January, 2011, 10:11 AM




2011/1/27 Giriprasad Deviprasad <g_pr21@yahoo.in>





Hi All,

?I am trying to compile busybox-1.17.1 for mpc8250 based powerpc architecture. My settings are as :

export LDFLAGS="-nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/"
export LIBRARY_PATH=/opt/mpc8250/tools/ppc_6xx/usr/lib/


echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/opt/mpc8250/tools/usr/bin/:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin

?I specified in menuconfig:

CFLAGS as -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/

make ARCH=powerpc CROSS_COMPILE=powerpc-linux- --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/ PREFIX=/home/user/target/mpc8250/rootfs

? LD????? applets/built-in.o
? LINK??? busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
 networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group

==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1

It seems you toolchian dosen't contain libcrypt.you can compile it into your toolchain and try again.


Also tried:
make ARCH=powerpc CROSS=powerpc-linux- --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/ PREFIX=/home/user/target/mpc8250/rootfs
? LINK??? busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group

Output of:
powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
 networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group

==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1


Any clues as to why this happens?


Thanks & Regards,
D.Giriprasad



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org

http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-----Inline Attachment Follows-----

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110129/b462bdb0/attachment-0001.html 

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

* Busybox for powerpc doesnt compile
  2011-01-27 10:11             ` yy Hong
  2011-01-27 13:47               ` Anuz Pratap Singh Tomar
  2011-01-29  5:50               ` Giriprasad Deviprasad
@ 2011-01-30 13:23               ` Giriprasad Deviprasad
  2 siblings, 0 replies; 26+ messages in thread
From: Giriprasad Deviprasad @ 2011-01-30 13:23 UTC (permalink / raw)
  To: kernelnewbies

Hi,

?Thanks for the details. Glibc configures, makes, and installs fine:
../glibc-2.9/configure
--host=powerpc-linux --target=powerpc-linux-
--prefix=/opt/mpc8250/tools/glibc2.9 --build=i686-pc-linux-gnu
--with-headers=/opt/mpc8250/tools/ppc_6xx/usr/include/
--cache-file=config.cache

Now, I try to compile busybox.1.17.1 as : 
?make ARCH=powerpc CROSS_COMPILE=powerpc-linux-

At the very end, errors as :
Trying libraries: crypt m
?Library crypt is not needed, excluding it
?Library m is not needed, excluding it
Final link with: <none>
powerpc-linux-strip: there are no sections to be copied!
make: *** [busybox] Error 1

.config:
CONFIG_EXTRA_CFLAGS="-I/opt/mpc8250/tools/ppc_6xx/usr/include/
-L/opt/mpc8250/tools/ppc_6xx/usr/lib/
-L/opt/mpc8250/tools/glibc2.9/opt/mpc8250/tools/glibc2.9/lib -nostdlib"


Can any please suggest why?

Thanks & Regards,
D.Giriprasad


--- On Thu, 27/1/11, yy Hong <yaanhyy@gmail.com> wrote:

From: yy Hong <yaanhyy@gmail.com>
Subject: Re: Busybox for powerpc doesnt compile
To: "Giriprasad Deviprasad" <g_pr21@yahoo.in>
Cc: Kernelnewbies at kernelnewbies.org
Date: Thursday, 27 January, 2011, 10:11 AM




2011/1/27 Giriprasad Deviprasad <g_pr21@yahoo.in>





Hi All,

?I am trying to compile busybox-1.17.1 for mpc8250 based powerpc architecture. My settings are as :

export LDFLAGS="-nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/"
export LIBRARY_PATH=/opt/mpc8250/tools/ppc_6xx/usr/lib/


echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/opt/mpc8250/tools/usr/bin/:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin

?I specified in menuconfig:

CFLAGS as -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/

make ARCH=powerpc CROSS_COMPILE=powerpc-linux- --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/ PREFIX=/home/user/target/mpc8250/rootfs

? LD????? applets/built-in.o
? LINK??? busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
 networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group

==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1

It seems you toolchian dosen't contain libcrypt.you can compile it into your toolchain and try again.


Also tried:
make ARCH=powerpc CROSS=powerpc-linux- --include-dir=/opt/mpc8250/tools/ppc_6xx/usr/include/ PREFIX=/home/user/target/mpc8250/rootfs
? LINK??? busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group

Output of:
powerpc-linux-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -I/opt/mpc8250/tools/ppc_6xx/usr/include/ -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -static -nostdlib -L/opt/mpc8250/tools/ppc_6xx/usr/lib/ -o busybox_unstripped -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a
 networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group

==========
/opt/mpc8250/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1


Any clues as to why this happens?


Thanks & Regards,
D.Giriprasad



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org

http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-----Inline Attachment Follows-----

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110130/1c8d4abb/attachment-0001.html 

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

* How to identity processor architecture
  2011-01-26 18:08 most likely, i'll be giving a kernel talk at ottawa LUG next week Robert P. J. Day
@ 2011-01-27  6:17 ` prabhu
  0 siblings, 0 replies; 26+ messages in thread
From: prabhu @ 2011-01-27  6:17 UTC (permalink / raw)
  To: kernelnewbies

Hi Dear,

I just wanna to know my processor architecture(32bit or 64 bit) through 
c programming.

According to me the sizeof of pointer will give the result. Like below 
coding.

int main()
{
int *ptr;
printf("%d",sizeof(ptr));
}

If the result is 4 then it is 32 bit processor... If it is 8 then it is 
64 bit processor.

Please correct me if i am wrong... (I do not have system to check this.)

Any suggestion or help would be appreciated.

Thanks,
Prabhu

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

* How to identity processor architecture
  2011-01-27  3:28 Added about new kernel on old distro (was Re: most likely, i'll be giving a kernel talk at ottawa LUG next week) Mulyadi Santosa
@ 2011-01-27  6:09 ` prabhu
  0 siblings, 0 replies; 26+ messages in thread
From: prabhu @ 2011-01-27  6:09 UTC (permalink / raw)
  To: kernelnewbies

Hi Dear,

I just wanna to know my processor architecture(32bit or 64 bit) through 
c programming.

According to me the sizeof of pointer will give the result. Like below 
coding.

int main()
{
   int *ptr;
   printf("%d",sizeof(ptr));
}

Please correct me if i am wrong...

Any suggestion or help would be appreciated.

Thanks,
Prabhu

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

end of thread, other threads:[~2011-01-30 13:23 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27  6:07 How to identity processor architecture prabhu
2011-01-27  6:26 ` Enrico Granata
2011-01-27  6:31   ` arun kumar
2011-01-27  6:40   ` prabhu
2011-01-27  6:45     ` Mulyadi Santosa
2011-01-27  6:54       ` Enrico Granata
2011-01-27  7:15         ` dharmvir kumar
2011-01-27  7:24         ` Mandeep Sandhu
2011-01-27  8:20           ` prabhu
2011-01-27  8:22             ` Enrico Granata
2011-01-27  9:53               ` prabhu
2011-01-27 11:15                 ` Henry Gebhardt
2011-01-27 11:32                   ` Thirugnanam Balamurugan
2011-01-27 11:44                   ` Pravin Shedage
2011-01-27 12:33                     ` prabhu
2011-01-27  9:23           ` Busybox for powerpc doesnt compile Giriprasad Deviprasad
2011-01-27 10:11             ` yy Hong
2011-01-27 13:47               ` Anuz Pratap Singh Tomar
2011-01-29  5:50               ` Giriprasad Deviprasad
2011-01-30 13:23               ` Giriprasad Deviprasad
2011-01-27  7:07       ` How to identity processor architecture prabhu
2011-01-27  7:13         ` Mulyadi Santosa
2011-01-27 19:27       ` mindentropy
2011-01-27 20:01         ` Denis Kirjanov
  -- strict thread matches above, loose matches on Subject: below --
2011-01-27  3:28 Added about new kernel on old distro (was Re: most likely, i'll be giving a kernel talk at ottawa LUG next week) Mulyadi Santosa
2011-01-27  6:09 ` How to identity processor architecture prabhu
2011-01-26 18:08 most likely, i'll be giving a kernel talk at ottawa LUG next week Robert P. J. Day
2011-01-27  6:17 ` How to identity processor architecture prabhu

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.