Problem with rootfs mounting

2011-03-21 Thread stl
Hello all,
I am porting linux-2.6.37 to a new architecture, and I am facing the
well-known problem:

VFS: Cannot open root device "(null)" or unknown-block(0,0)

When I was working on uClinux, I have seen that the vmlinux image was
concatenated with the romfs image.
The kernel was aware of the address of the magic number -rom1fs-  thanks to
the configuration
CONFIG_MTD_UCLINUX_ADDRESS= 0x . . . .   in the .config file.

But, I have not found how I can do this in Linux..
I have chosen the filesystem ROMFS in the .config file.
Where and how the romfs tree is created and included to the kernel image?

This question concerns also all the necessary user applications like "init"
and "sh".

Should I use a build system tool like Buildroot or OpenEmbedded?

 Any help will be very useful.

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


Problem with rootfs mounting

2011-03-21 Thread stl
Hello all,
I am porting linux-2.6.37 to a new architecture, and I am facing the
well-known problem:

VFS: Cannot open root device "(null)" or unknown-block(0,0)

When I was working on uClinux, the vmlinux image was concatenated with the
romfs image.
The kernel was aware of the address of the magic number -rom1fs- thanks  the
configuration
CONFIG_MTD_UCLINUX_ADDRESS= . . .  in the .config file.

But, I have not found how I can do thit in Linux..
Where and how the romfs tree is created and included to the kernel image?

This question concerns also all the necessary user applications like "init"
and "sh".


 Any help will be very useful.

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


Re: Common signal handler system call

2011-03-21 Thread mohit verma
On Mon, Mar 21, 2011 at 4:08 PM, Bernd Petrovitsch <
be...@petrovitsch.priv.at> wrote:

> On Son, 2011-03-20 at 13:08 +0530, mohit verma wrote: [...]
> > I think it should be there in kernel not because it is my idea but for
> > good reasons (personally think so).
>
> ... and despite IMHO good reason for not including.
> But talk is cheap so prepare and propose a working prototype as patch
> and we will see the reaction from others.
>
>   thanks  a lot Bernd. I am gonna do it.

I'm not strong against it but I do not see any significant advantage but
> at least one open question and the burden to all which do not need/use
> it[0].
>
> ad "POSIX compliance": Well, there are lots of system calls (in the
> Linux kernel) which are not in POSIX (or SuSv3 or ...) - plain simply
> because they are newer than these "standards" or out of the scope of
> them.
> And (on Linux with and/or without GNU-libc) some system-calls (or
> whatever POSIX calls them) are "only" libc functions which are
> transformed into other, real existing system-calls.
>
> Bernd
>
> [0]: And that is partly due to my embedded background where you strive
> to make everything small and avoid bloat;-)
> --
> Bernd Petrovitsch  Email : be...@petrovitsch.priv.at
> LUGA : http://www.luga.at
>
>


-- 

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


Re: Common signal handler system call

2011-03-21 Thread Bernd Petrovitsch
On Son, 2011-03-20 at 13:08 +0530, mohit verma wrote: [...] 
> I think it should be there in kernel not because it is my idea but for
> good reasons (personally think so). 

... and despite IMHO good reason for not including.
But talk is cheap so prepare and propose a working prototype as patch
and we will see the reaction from others.

I'm not strong against it but I do not see any significant advantage but
at least one open question and the burden to all which do not need/use
it[0].

ad "POSIX compliance": Well, there are lots of system calls (in the
Linux kernel) which are not in POSIX (or SuSv3 or ...) - plain simply
because they are newer than these "standards" or out of the scope of
them.
And (on Linux with and/or without GNU-libc) some system-calls (or
whatever POSIX calls them) are "only" libc functions which are
transformed into other, real existing system-calls.

Bernd

[0]: And that is partly due to my embedded background where you strive
 to make everything small and avoid bloat;-)
-- 
Bernd Petrovitsch  Email : be...@petrovitsch.priv.at
 LUGA : http://www.luga.at


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


Re: PCI Configuration Space

2011-03-21 Thread Mulyadi Santosa
Hi...

On Mon, Mar 21, 2011 at 10:46, Joy  wrote:
> The question is simple.
>
> If I am able to read PCI device's configuration space, where is it?
>
> Is it in Main Memory (in general, DDR3) mapped? Or Is it in the device's
> own memory?

Does "lspci -vv" help?

-- 
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


Re: how can I get page fault addressed with perf

2011-03-21 Thread Mulyadi Santosa
Hi...

On Sun, Mar 20, 2011 at 16:15, zhao bao  wrote:
>  Hi,  I want to trace page faults in my program. The result I wanted like 
> this:
>  1st page fault at addrA.
>  2nd page fault at addrB.
>  3rd page fault at addrC

Not sure about perf, but once I got the same idea when I wanna
simulate in the simplest way on how stuffs like Xen manage shadow page
table. The idea is by piggy backing SIGSEGV handler. I was heavily
inspired by Phrack : http://www.phrack.org/issues.php?issue=58&id=3

Check the =[ 0x01 ]= part "Subject: Getting rid of SIGSEGV - for fun
but not for profit"

Good luck...


-- 
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


Re: Problem compiling BCM Wireless driver on 2.6.37 (lib80211 symbol issue)

2011-03-21 Thread Shreyansh Jain
Hi Greg,

On Mon, Mar 21, 2011 at 12:20 AM, Greg KH  wrote:
> On Sun, Mar 20, 2011 at 11:42:36PM +0530, Shreyansh Jain wrote:
>> Hi Greg
>>



>> >
>> > Why not ask the authors of that code?  As it is closed source, they are
>> > the only ones that can legally help you out.
>>
>> Well, I have not considered asking the authors because I have the
>> code, I can successfully compile it and then, unable to link to the
>> kernel because of a missing function which is present in another
>> module and exported in the kernel.
>
> Wait, why ask some random people instead of the people who can actually
> fix the problem for you (i.e. the authors of the code?)
>
>> Yes, this driver might not be GPL'd, but I certainly have its code.
>
> Yes, but note that just because you have the code, that doesn't mean
> that anyone else has the rights to change it (including you), or help
> you out.  Please read the license for what you have before making
> assumptions.

Right, I understand your point and apologize for being callous enough
pertaining to the licensing issues.

Actually, I just went ahead and read the license terms and (as far as
what I can make sense of the legal language) it doesn't restrict
changes in the code until and unless I am not distributing it and not
breaking any IEEE standard compatibility (once again, in case
distributing it with a broadcom device).

Nevertheless, I will try and search for correct people to answer this
or reframe the question in more generic terms if problem still
persists. Thanks for correcting me!

>
> best of luck,
>
> greg k-h
>

-
Shreyansh

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


Re: User space context switch

2011-03-21 Thread mohit verma
thanks  vimal and mulyadi.

On Mon, Mar 21, 2011 at 12:32 PM, Vimal  wrote:

> Hi Mohit,
>
> On 18 March 2011 13:07, mohit verma  wrote:
> > hi all,
> >   is it possible to write a user space code to calculate the context
> switch
> > time of a process ? I mean , how can the user space code know about the
> > working of the scheduler?
> > Is there any system call API to interact with scheduler or something
> other
> > to interact with , regarding  this problem?
>
> Do check the function tracing framework in the Linux Kernel.
>
> Links:
> * http://lwn.net/Articles/322666/
> * http://lwn.net/Articles/290277/
>
> sched_switch is the tracer you're looking for.
>
> --
> Vimal
>



-- 

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


Re: User space context switch

2011-03-21 Thread Vimal
Hi Mohit,

On 18 March 2011 13:07, mohit verma  wrote:
> hi all,
>   is it possible to write a user space code to calculate the context switch
> time of a process ? I mean , how can the user space code know about the
> working of the scheduler?
> Is there any system call API to interact with scheduler or something other
> to interact with , regarding  this problem?

Do check the function tracing framework in the Linux Kernel.

Links:
* http://lwn.net/Articles/322666/
* http://lwn.net/Articles/290277/

sched_switch is the tracer you're looking for.

-- 
Vimal

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