Re: Cross Compiling a different architechture

2013-01-09 Thread Anuz Pratap Singh Tomar
On Wed, Jan 9, 2013 at 3:30 AM, Ganesh B ganeshsu...@yahoo.com wrote:

 I do not know why but whether ncurses or menuconfig the build fails at
 some modules (specially hardware architecture ones), specially at cross
 compiling architecture build stage. It went smoothly for same system
 architecture like i386 or x86 but not for arm or arm64.

 Where is the doc's for Kernel defconfig and kconfig in Kernel.org? I am
 trying to make and edit each manually for each architecture and then run
 make all. The problem is it is not allowing me to assemble all
 sub-architectures for say arm or arm64 as a dynamic module. I have to
 specify and select each option (sub-hardware architecture) specifically
 during build of defconfig for the architecture. My x86 is also blocking the
 build at times. I did not get anything good on my google search.

 I would say a wiser choice would be getting a .config from somewhere and
editing options which you really need to change.
I am not sure if you understand this or not, but you need to have a series
of toolchains for each arch you need to cross compile at different
locations.
For different binaries of different arch, I would suggest you use different
directories of same source code. Generally make clean or distclean should
get rid of most binaries, but starting a clean build is always the best
idea.
Toolchains can be bit of a pain to get right.

  w.r.t. Knoppix, Thank you, let me check the informit link for the
 architecture and usage relevance.

 TnR,
 Ganesh

   --
 *From:* Anuz Pratap Singh Tomar chambilketha...@gmail.com
 *To:* Ganesh B ganeshsu...@yahoo.com
 *Cc:* Mulyadi Santosa mulyadi.sant...@gmail.com; 
 kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org
 *Sent:* Tuesday, January 8, 2013 8:44 PM

 *Subject:* Re: Cross Compiling a different architechture



 On Tue, Jan 8, 2013 at 2:39 PM, Ganesh B ganeshsu...@yahoo.com wrote:

 Creating Defconfig and menuconfig (options) for all in one system from
 kernel. I want a clean build rather than an external mount, most I found
 did not have documentation.

 there is extensive documentation under Documentation/ directory in kernel
 source.
 on simple search I got this link about building kernel on knoppix:
  http://www.informit.com/articles/article.aspx?p=422949seqNum=3
 pretty much on most distribution, you  can install ncurses and go for make
 menuconfig and then just make(i.e. if you are native compiling the kernel).
 However the config for distributions are fairly complex these days, so you
 may require to build few other things like initrd and create devices files
 and all.  Please refer to distro documentation for knoppix:
 http://knoppix.net/wiki/Main_Page

 I would recommend that you read these guidelines before asking any
 question on this list
 http://kernelnewbies.org/mailinglistguidelines


 TnR,
 Ganesh

   --
 *From:* Mulyadi Santosa mulyadi.sant...@gmail.com
 *To:* Ganesh B ganeshsu...@yahoo.com
 *Cc:* Anuz Pratap Singh Tomar chambilketha...@gmail.com; 
 kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org
 *Sent:* Tuesday, January 8, 2013 9:18 AM

 *Subject:* Re: Cross Compiling a different architechture

 Hi


 On Tue, Jan 8, 2013 at 10:36 AM, Ganesh B ganeshsu...@yahoo.com wrote:
  Hello,
 
  Any help with some doc's. I see a defconfig for all, but the tree is not
  clear. Any documentation support for this in .Kconfig and .defconfig?

 Which config option you're not clear? Asking like this will only put
 you in the blue, you know


 --
 regards,

 Mulyadi Santosa
 Freelance Linux trainer and consultant

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



 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




 --
 Thank you
 Warm Regards
 Anuz





-- 
Thank you
Warm Regards
Anuz
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Cross Compiling a different architechture

2013-01-09 Thread Ganesh B
Okay makes sense let me try clean before building different arch. I am not 
doing this at the moment. Would I need to have different toolchains for same 
architecture, I was trying to build for all processor types for an arch using a 
different toolchain but it failed?
Ones that passed the different cross-compile arch failed at some modules 
speciially the net, sound, video, or built_in sections. Let me check this and 
revert. 


Have you ever compiled a complete end to end allyesconfig for a same or 
cross-compile build? allyesconfig gave me dependency/ missing/ invalid entry 
errors for cross-compile arch like arm.

 
TnR,
Ganesh



 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 11:19 AM
Subject: Re: Cross Compiling a different architechture
 




On Wed, Jan 9, 2013 at 3:30 AM, Ganesh B ganeshsu...@yahoo.com wrote:

I do not know why but whether ncurses or menuconfig the build fails at some 
modules (specially hardware architecture ones), specially at cross compiling 
architecture build stage. It went smoothly for same system architecture like 
i386 or x86 but not for arm or arm64.


Where is the doc's for Kernel defconfig and kconfig in Kernel.org? I am trying 
to make and edit each manually for each architecture and then run make all. 
The problem is it is not allowing me to assemble all sub-architectures for say 
arm or arm64 as a dynamic module. I have to specify and select each option 
(sub-hardware architecture) specifically during build of defconfig for the 
architecture. My x86 is also blocking the build at times. I did not get 
anything good on my google search.


I would say a wiser choice would be getting a .config from somewhere and 
editing options which you really need to change. 
I am not sure if you understand this or not, but you need to have a series of 
toolchains for each arch you need to cross compile at different locations.
For different binaries of different arch, I would suggest you use different 
directories of same source code. Generally make clean or distclean should get 
rid of most binaries, but starting a clean build is always the best idea. 
Toolchains can be bit of a pain to get right. 

w.r.t. Knoppix, Thank you, let me check the informit link for the architecture 
and usage relevance. 
 
TnR,
Ganesh





 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: Mulyadi Santosa mulyadi.sant...@gmail.com; 
kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Tuesday, January 8, 2013 8:44 PM

Subject: Re: Cross Compiling a different architechture






On Tue, Jan 8, 2013 at 2:39 PM, Ganesh B ganeshsu...@yahoo.com wrote:

Creating Defconfig and menuconfig (options) for all in one system from kernel. 
I want a clean build rather than an external mount, most I found did not have 
documentation.
there is extensive documentation under Documentation/ directory in kernel 
source.
on simple search I got this link about building kernel on knoppix:
 http://www.informit.com/articles/article.aspx?p=422949seqNum=3
pretty much on most distribution, you  can install ncurses and go for make 
menuconfig and then just make(i.e. if you are native compiling the kernel). 
However the config for distributions are fairly complex these days, so you may 
require to build few other things like initrd and create devices files and 
all.  Please refer to distro documentation for knoppix: 
http://knoppix.net/wiki/Main_Page

I would recommend that you read these guidelines before asking any question on 
this list
http://kernelnewbies.org/mailinglistguidelines


 
TnR,
Ganesh





 From: Mulyadi Santosa mulyadi.sant...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: Anuz Pratap Singh Tomar chambilketha...@gmail.com; 
kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Tuesday, January 8, 2013 9:18 AM

Subject: Re: Cross Compiling a different architechture

Hi


On Tue, Jan 8, 2013 at 10:36 AM, Ganesh B ganeshsu...@yahoo.com wrote:
 Hello,

 Any help with some doc's. I see a defconfig for all, but the tree is not
 clear. Any documentation support for this in .Kconfig and .defconfig?

Which config option you're not clear? Asking like this will only put
you in the blue, you know


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

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



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-- 
Thank you 
Warm Regards
Anuz





-- 
Thank you 
Warm Regards
Anuz___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org

Re: Cross Compiling a different architechture

2013-01-09 Thread Anuz Pratap Singh Tomar
On Wed, Jan 9, 2013 at 12:06 PM, Ganesh B ganeshsu...@yahoo.com wrote:

 Okay makes sense let me try clean before building different arch. I am not
 doing this at the moment. Would I need to have different toolchains for
 same architecture, I was trying to build for all processor types for an
 arch using a different toolchain but it failed?

You _may_ require different toolchains for different processor with same
arch types, for example under x86, i386 and i586 toolchains _may_ be used
interchangably but not ia64 or x86_64 or may not even for atom. Similarly
in ARM, there are different families of processor and there may be big
endian or small endian processor. So you may have to find the correct
toolchain for the given config.

 Ones that passed the different cross-compile arch failed at some modules
 speciially the net, sound, video, or built_in sections. Let me check this
 and revert.

 Have you ever compiled a complete end to end allyesconfig for a same or
 cross-compile build? allyesconfig gave me dependency/ missing/ invalid
 entry errors for cross-compile arch like arm.

Why would you do enable all config options? There may be incompatible
dependencies, which will ofcourse lead to compilation errors.
I generally get .config files from elsewhere, sometimes there are files
inside the source somewhere or sometimes you just do make ARCH=XXX
menuconfig and then configure the options selectively.
I may try to build toolchain for raspberry pi in few days and see if I face
such issues or not(but that is highly tentative. )



 TnR,
 Ganesh

   --
 *From:* Anuz Pratap Singh Tomar chambilketha...@gmail.com
 *To:* Ganesh B ganeshsu...@yahoo.com
 *Cc:* kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org
 *Sent:* Wednesday, January 9, 2013 11:19 AM

 *Subject:* Re: Cross Compiling a different architechture



 On Wed, Jan 9, 2013 at 3:30 AM, Ganesh B ganeshsu...@yahoo.com wrote:

 I do not know why but whether ncurses or menuconfig the build fails at
 some modules (specially hardware architecture ones), specially at cross
 compiling architecture build stage. It went smoothly for same system
 architecture like i386 or x86 but not for arm or arm64.

 Where is the doc's for Kernel defconfig and kconfig in 
 Kernel.orghttp://kernel.org/?
 I am trying to make and edit each manually for each architecture and then
 run make all. The problem is it is not allowing me to assemble all
 sub-architectures for say arm or arm64 as a dynamic module. I have to
 specify and select each option (sub-hardware architecture) specifically
 during build of defconfig for the architecture. My x86 is also blocking the
 build at times. I did not get anything good on my google search.

 I would say a wiser choice would be getting a .config from somewhere and
 editing options which you really need to change.
 I am not sure if you understand this or not, but you need to have a series
 of toolchains for each arch you need to cross compile at different
 locations.
 For different binaries of different arch, I would suggest you use
 different directories of same source code. Generally make clean or
 distclean should get rid of most binaries, but starting a clean build is
 always the best idea.
 Toolchains can be bit of a pain to get right.

  w.r.t. Knoppix, Thank you, let me check the informit link for the
 architecture and usage relevance.

 TnR,
 Ganesh

   --
 *From:* Anuz Pratap Singh Tomar chambilketha...@gmail.com
 *To:* Ganesh B ganeshsu...@yahoo.com
 *Cc:* Mulyadi Santosa mulyadi.sant...@gmail.com; 
 kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org
 *Sent:* Tuesday, January 8, 2013 8:44 PM

 *Subject:* Re: Cross Compiling a different architechture



 On Tue, Jan 8, 2013 at 2:39 PM, Ganesh B ganeshsu...@yahoo.com wrote:

 Creating Defconfig and menuconfig (options) for all in one system from
 kernel. I want a clean build rather than an external mount, most I found
 did not have documentation.

 there is extensive documentation under Documentation/ directory in kernel
 source.
 on simple search I got this link about building kernel on knoppix:
  http://www.informit.com/articles/article.aspx?p=422949seqNum=3
 pretty much on most distribution, you  can install ncurses and go for make
 menuconfig and then just make(i.e. if you are native compiling the kernel).
 However the config for distributions are fairly complex these days, so you
 may require to build few other things like initrd and create devices files
 and all.  Please refer to distro documentation for knoppix:
 http://knoppix.net/wiki/Main_Page

 I would recommend that you read these guidelines before asking any
 question on this list
 http://kernelnewbies.org/mailinglistguidelines


 TnR,
 Ganesh

   --
 *From:* Mulyadi Santosa mulyadi.sant...@gmail.com
 *To:* Ganesh B ganeshsu...@yahoo.com
 *Cc:* Anuz Pratap Singh Tomar chambilketha...@gmail.com; 
 

Re: Cross Compiling a different architechture

2013-01-09 Thread Ganesh B
Yes, you touch the pain area I am facing. I could build x86 as well as i386 
toolchain. Though I have not tried the image yet. 


But when cross compiling arm and arm64 say for example, I receive .config 
related errors which either does not create the .config or gives errors like I 
mentioned. Would I be able to do a allyesconfig for this? If yes, what options 
needs to be missed or edited to get the processor selection at runtime.


 using i386 machine

$make ARCH=arm defconfig  - ends up with errors of hardware conpatibility of 
i386, .config not created

$make ARCH=arm allyesconfig  - ends up with errors of hardware conpatibility 
specially sub-architecture of processor, .config not created

$make ARCH=arm menuconfig - all options enabled gives while building, .config 
created but kernel not built while using make


TnR,
Ganesh



 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 12:20 PM
Subject: Re: Cross Compiling a different architechture
 




On Wed, Jan 9, 2013 at 12:06 PM, Ganesh B ganeshsu...@yahoo.com wrote:

Okay makes sense let me try clean before building different arch. I am not 
doing this at the moment. Would I need to have different toolchains for same 
architecture, I was trying to build for all processor types for an arch using a 
different toolchain but it failed?
You _may_ require different toolchains for different processor with same arch 
types, for example under x86, i386 and i586 toolchains _may_ be used 
interchangably but not ia64 or x86_64 or may not even for atom. Similarly in 
ARM, there are different families of processor and there may be big endian or 
small endian processor. So you may have to find the correct toolchain for the 
given config.

Ones that passed the different cross-compile arch failed at some modules 
speciially the net, sound, video, or built_in sections. Let me check this and 
revert. 



Have you ever compiled a complete end to end allyesconfig for a same or 
cross-compile build? allyesconfig gave me dependency/ missing/ invalid entry 
errors for cross-compile arch like arm.

Why would you do enable all config options? There may be incompatible 
dependencies, which will ofcourse lead to compilation errors.
I generally get .config files from elsewhere, sometimes there are files inside 
the source somewhere or sometimes you just do make ARCH=XXX menuconfig and then 
configure the options selectively. 
I may try to build toolchain for raspberry pi in few days and see if I face 
such issues or not(but that is highly tentative. ) 

 

 
TnR,
Ganesh




 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 11:19 AM

Subject: Re: Cross Compiling a different architechture
 





On Wed, Jan 9, 2013 at 3:30 AM, Ganesh B ganeshsu...@yahoo.com wrote:

I do not know why but whether ncurses or menuconfig the build fails at some 
modules (specially hardware architecture ones), specially at cross compiling 
architecture build stage. It went smoothly for same system architecture like 
i386 or x86 but not for arm or arm64.


Where is the doc's for Kernel defconfig and kconfig in Kernel.org? I am 
trying to make and edit each manually for each architecture and then run make 
all. The problem is it is not allowing me to assemble all sub-architectures 
for say arm or arm64 as a dynamic module. I have to specify and select each 
option (sub-hardware architecture) specifically during build of defconfig for 
the architecture. My x86 is also blocking the build at times. I did not get 
anything good on my google search.


I would say a wiser choice would be getting a .config from somewhere and 
editing options which you really need to change. 
I am not sure if you understand this or not, but you need to have a series of 
toolchains for each arch you need to cross compile at different locations.
For different binaries of different arch, I would suggest you use different 
directories of same source code. Generally make clean or distclean should get 
rid of most binaries, but starting a clean build is always the best idea. 
Toolchains can be bit of a pain to get right. 

w.r.t. Knoppix, Thank you, let me check the informit link for the architecture 
and usage relevance. 
 
TnR,
Ganesh





 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: Mulyadi Santosa mulyadi.sant...@gmail.com; 
kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Tuesday, January 8, 2013 8:44 PM

Subject: Re: Cross Compiling a different architechture






On Tue, Jan 8, 2013 at 2:39 PM, Ganesh B ganeshsu...@yahoo.com wrote:

Creating Defconfig and menuconfig (options) 

Re: /usr/ld Not enough room for program headers

2013-01-09 Thread horseriver
On Wed, Jan 09, 2013 at 08:51:36PM +0800, Peter Teoh wrote:
 On Wed, Jan 9, 2013 at 6:36 AM, horseriver horseriv...@gmail.com wrote:
 
  On Wed, Jan 09, 2013 at 01:28:12PM +0800, Peter Teoh wrote:
   On Sun, Jan 6, 2013 at 11:17 AM, horseriver horseriv...@gmail.com
  wrote:
  
  VSYSCALL_BASE = 0xe000;
 
  SECTIONS
  {
. = VSYSCALL_BASE ;
 
.hash   : { *(.hash) }:text
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version: { *(.gnu.version) }
.gnu.version_d  : { *(.gnu.version_d) }
.gnu.version_r  : { *(.gnu.version_r) }
 
 
 
 I suspect something wrong with VSYSCALL_BASE + value here.
 
 look at this:
 
 http://marcbug.scc-dc.com/svn/repository/trunk/linuxkernel/linux-2.6.16-mcemu/arch/x86_64/ia32/vsyscall.lds
 
 and doing a diff with your ld script, there is not much diff, except for
 the VSYSCALL_BASE + SIZEOF_HEADER

thanks!

I do not understand what this error /usr/ld Not enough room for program 
headers really mean ?

if I add SIZEOF_HEADER , this error is still reproted ,

when ld link files , does it only need a ld-script file ? or more than one 
ld-script files ?


 

 
 portion.
 
 Read here to understand how SIZEOF_HEADER is calculated:
 
 http://www.math.utah.edu/docs/info/ld_3.html#SEC13
 
 Not sure why do u want to shift the whole section by SIZEOF_HEADER down in
 bytes?
 
 -- 
 Regards,
 Peter Teoh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernelnewbies Digest, Vol 26, Issue 24

2013-01-09 Thread Ganesh B
Peter,

This was the best. I was struggling to find this. Thank you.

 
TnR,
Ganesh



 From: kernelnewbies-requ...@kernelnewbies.org 
kernelnewbies-requ...@kernelnewbies.org
To: kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 5:00 PM
Subject: Kernelnewbies Digest, Vol 26, Issue 24
 
Send Kernelnewbies mailing list submissions to
    kernelnewbies@kernelnewbies.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
or, via email, send a message with subject or body 'help' to
    kernelnewbies-requ...@kernelnewbies.org

You can reach the person managing the list at
    kernelnewbies-ow...@kernelnewbies.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of Kernelnewbies digest...


Today's Topics:

   1. Linux Kernel Map (Peter Teoh)
   2. Re: /usr/ld Not enough room for program headers (horseriver)


--

Message: 1
Date: Wed, 9 Jan 2013 21:25:11 +0800
From: Peter Teoh htmldevelo...@gmail.com
Subject: Linux Kernel Map
To: kernelnewbies@kernelnewbies.org
    kernelnewbies@kernelnewbies.org
Message-ID:
    CAHnt0GVj=t-e39dlvcyxbl2o48ejzotemquftkk4dkxzrig...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

http://www.makelinux.net/kernel_map/

-- 
Regards,
Peter Teoh
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130109/5703ac6d/attachment-0001.html
 

--

Message: 2
Date: Wed, 9 Jan 2013 12:56:51 +0800
From: horseriver horseriv...@gmail.com
Subject: Re: /usr/ld Not enough room for program headers
To: Peter Teoh htmldevelo...@gmail.com
Cc: kernelnewbies@kernelnewbies.org
Message-ID: 20130109045651.GB3236@debian.localdomain
Content-Type: text/plain; charset=us-ascii

On Wed, Jan 09, 2013 at 08:51:36PM +0800, Peter Teoh wrote:
 On Wed, Jan 9, 2013 at 6:36 AM, horseriver horseriv...@gmail.com wrote:
 
  On Wed, Jan 09, 2013 at 01:28:12PM +0800, Peter Teoh wrote:
   On Sun, Jan 6, 2013 at 11:17 AM, horseriver horseriv...@gmail.com
  wrote:
  
  VSYSCALL_BASE = 0xe000;
 
  SECTIONS
  {
    . = VSYSCALL_BASE ;
 
    .hash           : { *(.hash) }                :text
    .dynsym         : { *(.dynsym) }
    .dynstr         : { *(.dynstr) }
    .gnu.version    : { *(.gnu.version) }
    .gnu.version_d  : { *(.gnu.version_d) }
    .gnu.version_r  : { *(.gnu.version_r) }
 
 
 
 I suspect something wrong with VSYSCALL_BASE + value here.
 
 look at this:
 
 http://marcbug.scc-dc.com/svn/repository/trunk/linuxkernel/linux-2.6.16-mcemu/arch/x86_64/ia32/vsyscall.lds
 
 and doing a diff with your ld script, there is not much diff, except for
 the VSYSCALL_BASE + SIZEOF_HEADER

thanks!

    I do not understand what this error /usr/ld Not enough room for program 
headers really mean ?
    
    if I add SIZEOF_HEADER , this error is still reproted ,

    when ld link files , does it only need a ld-script file ? or more than one 
ld-script files ?




 
 portion.
 
 Read here to understand how SIZEOF_HEADER is calculated:
 
 http://www.math.utah.edu/docs/info/ld_3.html#SEC13
 
 Not sure why do u want to shift the whole section by SIZEOF_HEADER down in
 bytes?
 
 -- 
 Regards,
 Peter Teoh



--

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


End of Kernelnewbies Digest, Vol 26, Issue 24
*___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux Kernel Map

2013-01-09 Thread richard -rw- weinberger
On Wed, Jan 9, 2013 at 2:25 PM, Peter Teoh htmldevelo...@gmail.com wrote:
 http://www.makelinux.net/kernel_map/

This map is horrible outdated.
I see lock_kernel() for example...

-- 
Thanks,
//richard

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: why are scheduling domains used in multiprocessor systems

2013-01-09 Thread Peter Teoh
On Wed, Jan 9, 2013 at 4:03 PM, Bond jamesbond.2...@gmail.com wrote:

 Hi,
 please see this question

 http://stackoverflow.com/questions/14229793/what-does-struct-sched-domain-stands-for-in-include-linux-sched-h-scheduling-do

 I checked following
 http://lwn.net/Articles/169277/ and following
 http://www.kernel.org/doc/Documentation/scheduler/sched-domains.txt
 the first line of kernel.org doc says
 .  Each CPU has a base scheduling domain (struct
 sched_domain)..
 and second para says
  each scheduling domain spans a number of CPUs (stored in the -span
 field).
 third para says
   Each scheduling domain must have one or more CPU
 groups..
 The intersection of cpumasks from any two of these groups
 MUST be the empty set.
 then some where in doc it says
 Balancing within a sched domain occurs between groups. That is, each group
 is treated as one entity. the doc in details talks about the
 implementation of

 scheduling domains and mentions that CPUs should belong to one of the
 scheduling domain in a way that
 cpumasks intersection should  be an  empty set

 The answer of the question that I want to know is
 why is a scheduling domain actually needed?

 _

 CPU scheduling involving many configuration and factors.

https://www.cs.unm.edu/~eschulte/classes/cs587/data/10.1.1.59.6385.pdf

Goto page 18 for definition of scheduler domain, and it says:

Each node in a system has a scheduler domain that points to its parent
scheduler domain. A node might be
a uniprocessor system, an SMP system, or a node within a NUMA system.

this complex hierarchies of CPU is normally associated with hardware
physical proximity CPU (just one factors) or the speed of bus that connect
between CPU.   Not all CPU are connected to all other CPU, but perhaps only
two or 4 other CPU, and therefore, when u transfer data between CPU, it is
necessary to build these proximities information into the kernel, to
minimize costs of data transfer between CPU.

90% (or more) of supercomputers (with thousands of CPU) are run by Linux
kernel, and clearly each CPU can only have a few neighboring CPU.   Other
factors involved power-management:   when your processing usage goes down,
u have to shut down the CPU - leaving only the bare minimum to be running.
  Organizing in some hierarchies facilitate this scheduling algorithm.

http://www.intel.com/technology/itj/2007/v11i4/9-process/6-linux-scheduler.htm
http://www.cs.stonybrook.edu/~porter/courses/cse506/f12/slides/scheduling.pdf
http://www.cs.stonybrook.edu/~porter/courses/cse506/f12/slides/scheduling2.pdf

-- 
Regards,
Peter Teoh
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: why are scheduling domains used in multiprocessor systems

2013-01-09 Thread Preeti U Murthy
On 01/09/2013 01:33 PM, Bond wrote:

 The answer of the question that I want to know is
 why is a scheduling domain actually needed?

Scheduling domains and scheduler groups/cpu groups help to ease the
process of scheduling tasks like:
1.load balancing tasks across cpus.
2.choosing a cpu for a new task to run on.
3.choosing a cpu for a sleeping task to run when it wakes up.

It has a two fold advantage:
1.It organises the cpus in the system very well into groups and hierarchies.
2.It organises the cpus in such a way that it is useful.All cpus which
share an l2 cache belong to one domain.All cpus which share an l3 cache
belong to a higher level domain,which encompasses all the domains which
share the l2 cache.

The advantages that you see with a tree like data structure are similar
here to the advantages of scheduler domains and groups.

Let me explain the use cases with a simple diagram:

 _sd1
/\
--
 l3 cache
--
-   --
l2 cachel2 cache
-   --
cpu0 cpu1   cpu2 cpu3
\___/   \/
  sd0  sd0


 sd1_
/\
--
  l3 cache
--
-   --
l2 cachel2 cache
-   --
cpu4 cpu5   cpu6 cpu7
\___/   \/
  sd0  sd0

What you see above is a scheduler domain hierarchy.sd1 encompasses sd0s
which happen to be scheduler groups of sd1.Every cpu has a scheduler
domain hierarchy associated with it.For eg.
cpu0-sd=sd0; sd0-parent=sd1.This way through a linked list we can
iterate through all the scheduler domains to which a cpu belongs to.

How does this help?

1.load balancing: Say cpu0 is idle and is ready to pull tasks upon
itself to relieve any other burdened cpu.In the above approach,it first
checks if the other cpus that belong to the first level sched domain
,needs to be relieved of load.Here, cpu1.If so it takes on tasks from
cpu1,else it goes to the higher level domain sd1.If it chooses to
migrate task from cpu1 it is the best thing,because the cache contents
can be utilized;shared cache.no need to fetch from memory again.This is
the first advantage:sched domains are formed based upon the advantages
that hardware has to provide.

If it goes to sd1,then it probes sd1's 'groups',both the sd0s.Here is
the next advantage.It needs information about the sched group alone and
will not bother about the individual cpus in it.it checks if
load(sd0[cpu2,cpu3])  load(sd0[cpu0,cpu1])
Only if this is true does it go on to see if cpu2/3 is more loaded.If
there were no scheduler domain or groups,we would have to see the states
of cpu2 and cpu3 in two iterations instead of 1 iteration like we are
doing now.

Now scale this problem and solution to 128 cpus! imagine what a mess it
would have been if there was nothing to tell you which cpu would be the
best to relieve load from,in the worst case you would have to iterate
through all the 128 cpus.

But with scheduler domain or groups,say you divide the 128 cpus into
groups of 16 cpus,you would have 8 groups.see which is the busiest,so
that would be 8 iterations,then you would know the busiest group,then
descend down.another 16 iterations.so worst case

8+16 = 24 iterations.And this decrease is only with one level of sched
domain. Imagine if you had more levels,you would make the number of
iterations even lower.


So in short the scheduler domains and groups are a 'divide and conquer
;but conquer as much as possible what is more useful' solution to
scheduling related stuff :)


Thank you

Regards
Preeti U Murthy





___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Cross Compiling a different architechture

2013-01-09 Thread Ganesh B
 x86 build is done but wont boot up using the build using the vmlinux image. 
 using usb stick. any tips?

 
TnR,
Ganesh



 From: Ganesh B ganeshsu...@yahoo.com
To: Anuz Pratap Singh Tomar chambilketha...@gmail.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 1:09 PM
Subject: Re: Cross Compiling a different architechture
 

Yes, you touch the pain area I am facing. I could build x86 as well as i386 
toolchain. Though I have not tried the image yet. 


But when cross compiling arm and arm64 say for example, I receive .config 
related errors which either does not create the .config or gives errors like I 
mentioned. Would I be able to do a allyesconfig for this? If yes, what options 
needs to be missed or edited to get the processor selection at runtime.


 using i386 machine

$make ARCH=arm defconfig  - ends up with errors of hardware conpatibility of 
i386, .config not created

$make ARCH=arm allyesconfig  - ends up with errors of hardware conpatibility 
specially sub-architecture of processor, .config not created

$make ARCH=arm menuconfig - all options enabled gives while building, .config 
created but kernel not built while using make


TnR,
Ganesh



 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 12:20 PM
Subject: Re: Cross Compiling a different architechture
 




On Wed, Jan 9, 2013 at 12:06 PM, Ganesh B ganeshsu...@yahoo.com wrote:

Okay makes sense let me try clean before building different arch. I am not 
doing this at the moment. Would I need to have different toolchains for same 
architecture, I was trying to build for all processor types for an arch using a 
different toolchain but it failed?
You _may_ require different toolchains for different processor with same arch 
types, for example under x86, i386 and i586 toolchains _may_ be used 
interchangably but not ia64 or x86_64 or may not even for atom. Similarly in 
ARM, there are different families of processor and there may be big endian or 
small endian processor. So you may have to find the correct toolchain for the 
given config.

Ones that passed the different cross-compile arch failed at some modules 
speciially the net, sound, video, or built_in sections. Let me check this and 
revert. 



Have you ever compiled a complete end to end allyesconfig for a same or 
cross-compile build? allyesconfig gave me dependency/ missing/ invalid entry 
errors for cross-compile arch like arm.

Why would you do enable all config options? There may be incompatible 
dependencies, which will ofcourse lead to compilation errors.
I generally get .config files from elsewhere, sometimes there are files inside 
the source somewhere or sometimes you just do make ARCH=XXX menuconfig and then 
configure the options selectively. 
I may try to build toolchain for raspberry pi in few days and see if I face 
such issues or not(but that is highly tentative. ) 

 

 
TnR,
Ganesh




 From: Anuz Pratap Singh Tomar chambilketha...@gmail.com
To: Ganesh B ganeshsu...@yahoo.com 
Cc: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org 
Sent: Wednesday, January 9, 2013 11:19 AM

Subject: Re: Cross Compiling a different architechture
 





On Wed, Jan 9, 2013 at 3:30 AM, Ganesh B ganeshsu...@yahoo.com wrote:

I do not know why but whether ncurses or menuconfig the build fails at some 
modules (specially hardware architecture ones), specially at cross compiling 
architecture build stage. It went smoothly for same system architecture like 
i386 or x86 but not for arm or arm64.


Where is the doc's for Kernel defconfig and kconfig in Kernel.org? I am 
trying to make and edit each manually for each architecture and then run make 
all. The problem is it is not allowing me to assemble all sub-architectures 
for say arm or arm64 as a dynamic module. I have to specify and select each 
option (sub-hardware architecture) specifically during build of defconfig for 
the architecture. My x86 is also blocking the build at times. I did not get 
anything good on my google search.


I would say a wiser choice would be getting a .config from somewhere and 
editing options which you really need to change. 
I am not sure if you understand this or not, but you need to have a series of 
toolchains for each arch you need to cross compile at different locations.
For different binaries of different arch, I would suggest you use different 
directories of same source code. Generally make clean or distclean should get 
rid of most binaries, but starting a clean build is always the best idea. 
Toolchains can be bit of a pain to get right. 

w.r.t. Knoppix, Thank you, let me check the informit link for the architecture 
and usage relevance. 
 
TnR,
Ganesh