Re: Eudyptula Challenge

2014-05-05 Thread Rahul Bedarkar
On Mon, May 5, 2014 at 5:58 PM, Mandeep Sandhu
mandeepsandhu@gmail.com wrote:
 +1 to this question.

 I too started off early, but now I'm busy with my current work and
 paused on the assignments.

 -mandeep

 On Mon, May 5, 2014 at 5:25 PM, Narendra Joshi narendr...@gmail.com wrote:
 Will the Eudyptula Challenge be always around? I want to do the challenge
 problems but I am busy these days. So I want to start doing them some time
 later. Will I be able to?

This is what it says in first mail.

Fourthly, this challenge is meant to be done over a period of time.
Don't rush things, there's no hurry, I'm not going anywhere, and neither
are you.  So sit back, take your time, and enjoy the process.  Life is
about the journey, not the end result, as that's the same for everyone.

So I think it will there.


Rahul


 --
 narendra

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


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

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


System shutdown sequence

2014-03-26 Thread Rahul Bedarkar
Hi,

When system is going for shutdown, shutdown handler of each device
driver is called. Does kernel in this sequence calls remove handler ?

I believe that remove is not called if driver is built-in. Is my
understanding correct ?

Thanks,
Rahul

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


Side effects of open system call

2014-02-20 Thread Rahul Bedarkar
Hi,

In ioctl man page, mentioned that

Often the open(2) call has unwanted side effects, that can be avoided
   under Linux by giving it the O_NONBLOCK flag.

I have seen open man page but can't find what are side effects of open.

Does anybody know what are side effects of open in general ?

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


Re: Side effects of open system call

2014-02-20 Thread Rahul Bedarkar
On Thu, Feb 20, 2014 at 9:06 PM,  valdis.kletni...@vt.edu wrote:
 On Thu, 20 Feb 2014 20:36:44 +0530, Rahul Bedarkar said:

 Often the open(2) call has unwanted side effects, that can be avoided
under Linux by giving it the O_NONBLOCK flag.

 I have seen open man page but can't find what are side effects of open.

 Well, for starters, the open() call can block while trying to open a hardware
 device that isnt ready, thus hanging the entire process. For added joy,
 remember that signals are delivered when a process inside a syscall finally
 returns to userspace - which means that your hung process may be unkillable
 even by 'kill -9'.


Thanks, Does this mean that if I open a device file with O_NONBLOCK flag
and if device is not ready by that time open system call will return
immediately and fail?

 Most people would call that an unwanted side effect. :)

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


Re: Section Mismatch error

2013-07-30 Thread Rahul Bedarkar
try removing __devinit and __devexit from probe and remove. This is not
needed as it is module.


On Tue, Jul 30, 2013 at 4:36 PM, Vignesh Radhakrishnan 
vignesh1...@gmail.com wrote:

 Hi,

 I am facing the following error when i am building the kernel.


 ERROR: modpost: Found 2 section mismatch(es).
 To see full details build your kernel with:
 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
 To build the kernel despite the mismatches, build with:
 'make CONFIG_NO_ERROR_ON_MISMATCH=y'
 (NOTE: This is not recommended)
 make[3]: *** [__modpost] Error 1
 make[2]: *** [modules] Error 2
 make[1]: *** [sub-make] Error 2

 After i did make the kernel using make CONFIG_DEBUG_SECTION_MISMATCH=y it
 said *section mismatch .*

 I am trying to write a platform driver (not sure if my code is right )

 #includelinux/spinlock.h
 #include linux/module.h   /* Needed by all modules */
 #include linux/kernel.h
 #include asm/io.h /* Needed for KERN_INFO */
 #include linux/platform_device.h
 MODULE_LICENSE (GPL);


 static int __devinit my_module_probe(struct platform_device *pdev){


 printk(KERN_INFO Probe\n);

return 0;

 }
 static int  __devexit my_module_remove (struct platform_device *pdev)
 {

 printk(KERN_INFO Goodbye world 1.\n);
 return 0;

 }
 static struct of_device_id spinlock_match[] = {
 {.compatible = spinlockcrash},
 {}
 };


 static struct platform_driver spinlock_platformdev = {
 .probe  = my_module_probe,
 .remove = __devexit_p(my_module_remove),
 .driver = {
 .name   = spinlock_platformdev,
 .owner  = THIS_MODULE,
 .of_match_table = spinlock_match,
 },
 };



 static int __init mymodule_init(void)
 {
 printk(KERN_INFO INIT);

 platform_driver_register(spinlock_platformdev);
 return 0;
 }
 static void __exit mymodule_exit(void)
 {
 printk(KERN_INFO GOOD BYE);
 platform_driver_unregister(spinlock_platformdev);
 }

 module_init(mymodule_init);
 module_exit(mymodule_exit);



 Can anybody throw some light on what might be happening here ?


 Thanks and regards,
  Vignesh
 --
 http://vigneshradhakrishnan.blogspot.com/

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


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


CPU usage of particular process

2013-05-20 Thread Rahul Bedarkar
Hi,

I am trying to write small program to get CPU usage for a particular
process. My logic is to read user, nice, system, idle values from
/proc/stat. Then read user and system time from /proc/pid/stat. Then wait
for some time and again read same values. After that I am doing following
calculations
CPU% = (no_of_processor * (process_cpu_usage2-process_cpu_usage1) * 100 ) /
(total_cpu_usage2-total_cpu_usage1)

When I compare my output with top, it looks like correct, but sometimes it
is more than 100. Is my logic correct here ? Please correct me if I am
worng.

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


Linux kernel book

2013-01-30 Thread Rahul Bedarkar
Hi,

Can you suggest book on Linux kernel and device drivers which covers kernel
version 3.0 on words?

Thanks,
Rahul B.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


port 1 disabled by hub (EMI?), re-enabling...

2013-01-11 Thread Rahul Bedarkar
Hi,

When I remove pen-drive, I am seeing following logs

[  132.968942]   Disconnect Detected Interrupt++ (Host) a_host
[  133.196692] hub 1-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
[  133.207595] usb 1-1: USB disconnect, device number 2
[  164.420649] sd 0:0:0:0: Device offlined - not ready after error recovery
[  164.447670] sd 0:0:0:0: [sda] Unhandled error code
[  164.459347] sd 0:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
[  164.482169] sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 15 65 f8 00 00
08 00
[  164.643217] end_request: I/O error, dev sda, sector 1402360

Why EMI is coming into picture here ?


Thanks,
Rahul B.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Regarding module init function

2013-01-08 Thread Rahul Bedarkar
I have gone through LDD3 page 31. But it didn't answer my question. It
is describing module init and exit when manually loading driver and
removing it.
I want to know when one of auxdriver (selected in from menuconfig) is built
as built-in module. When and Who calls it's init function ?

Thanks,
Rahul

On Fri, Jan 4, 2013 at 6:52 PM, Tobias Boege tob...@gambas-buch.de wrote:

 On Fri, 04 Jan 2013, Rahul Bedarkar wrote:
  Hi,
 
  This may be stupid question.
 
  When we compile external module and insert it, it's init function is
 called
  and when we remove it, it's exit function gets called.
 
  What happens in case of built-in modules? When it's init and exit is
  called? May be take example of one of auxdriver.
 

 You can find relevant information in LDD3, pp. 31 ff.. Basically, there is
 no difference in the use of the init function (it's called at kernel
 startup, I suppose) but exit is simply discarded in this case, because if
 your module is built-in, it could never be removed.

 Regards,
 Tobi


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

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


doesn't support DPO or FUA

2013-01-08 Thread Rahul Bedarkar
Hi,

When I attach pen-drive, I am seeing following logs. And when I
remove pen-drive, file system does not unmount for 10-15 secs.

[   35.183406] usb 1-1: new full-speed USB device number 2 using dwc_otg
[   35.440812] usb 1-1: not running at top speed; connect to a high speed
hub
[   35.456740] usb 1-1: New USB device found, idVendor=0781, idProduct=5572
[   35.479144] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[   35.501552] usb 1-1: Product: Cruzer Switch
[   35.513147] usb 1-1: Manufacturer: SanDisk
[   35.535614] usb 1-1: SerialNumber: 4C53250910112450
[   35.571416] scsi0 : usb-storage 1-1:1.0
[   36.619687] scsi 0:0:0:0: Direct-Access SanDisk  Cruzer Switch
 1.20 PQ: 0 ANSI: 5
[   36.651795] sd 0:0:0:0: [sda] 3908352 512-byte logical blocks: (2.00
GB/1.86 GiB)
[   36.682780] sd 0:0:0:0: [sda] Write Protect is off
[   36.709971] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[   36.756973]  sda: sda1


what is doesn't support DPO or FUA ? I am using Linux kernel 3.3.0.

Thanks,
Rahul B.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Regarding module init function

2013-01-08 Thread Rahul Bedarkar
Ok. in init/main.c we call do_basic_setup(). Where do_initcalls call each
of init functions from __early_initcall_end to __initcall_end. But I don't
know from where these values gets initialized.

On Tue, Jan 8, 2013 at 2:10 PM, Rahul Bedarkar rpal...@gmail.com wrote:

 I have gone through LDD3 page 31. But it didn't answer my question. It
 is describing module init and exit when manually loading driver and
 removing it.
 I want to know when one of auxdriver (selected in from menuconfig) is
 built as built-in module. When and Who calls it's init function ?

 Thanks,
 Rahul

 On Fri, Jan 4, 2013 at 6:52 PM, Tobias Boege tob...@gambas-buch.dewrote:

 On Fri, 04 Jan 2013, Rahul Bedarkar wrote:
  Hi,
 
  This may be stupid question.
 
  When we compile external module and insert it, it's init function is
 called
  and when we remove it, it's exit function gets called.
 
  What happens in case of built-in modules? When it's init and exit is
  called? May be take example of one of auxdriver.
 

 You can find relevant information in LDD3, pp. 31 ff.. Basically, there is
 no difference in the use of the init function (it's called at kernel
 startup, I suppose) but exit is simply discarded in this case, because if
 your module is built-in, it could never be removed.

 Regards,
 Tobi


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



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


Re: Regarding module init function

2013-01-08 Thread Rahul Bedarkar
Thanks Dave!

I just verified that from System.map. Between __early_initcall_end
and __initcall_end, there is list of init calls with levels from 0-7. What
is significance of these levels.

Thanks,
Rahul

On Tue, Jan 8, 2013 at 7:01 PM, Dave Hylands dhyla...@gmail.com wrote:

 Hi,



 On Tue, Jan 8, 2013 at 11:08 AM, Rahul Bedarkar rpal...@gmail.com wrote:
 
  Ok. in init/main.c we call do_basic_setup(). Where do_initcalls call
 each of init functions from __early_initcall_end to __initcall_end. But I
 don't know from where these values gets initialized.

 If you look here:
 http://lxr.linux.no/#linux+v3.7.1/include/linux/init.h#L279http://lxr.linux.no/#linux+v3.7.1/include/linux/init.h%23L279

 module_init is mapped to __initcall, which is in turn mapped to
 device_initcall, which sets up a pointer in a section called .initcall6.init

 If you then look in the kernel linker script:
 http://lxr.linux.no/#linux+v3.7.1/arch/arm/kernel/vmlinux.lds.S#L175http://lxr.linux.no/#linux+v3.7.1/arch/arm/kernel/vmlinux.lds.S%23L175

 INIT_CALLS is defined here:
 http://lxr.linux.no/#linux+v3.7.1/include/asm-generic/vmlinux.lds.h#L633http://lxr.linux.no/#linux+v3.7.1/include/asm-generic/vmlinux.lds.h%23L633

 and it defines the __initcall_start and __initcall_end symbols.

 Dave Hylands

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


Regarding module init function

2013-01-04 Thread Rahul Bedarkar
Hi,

This may be stupid question.

When we compile external module and insert it, it's init function is called
and when we remove it, it's exit function gets called.

What happens in case of built-in modules? When it's init and exit is
called? May be take example of one of auxdriver.


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


Re: What is asmlinkage ?

2013-01-03 Thread Rahul Bedarkar
Thanks. So with asmlinkage we request compiler to put args on stack. What
is advantage of this to start_kernel or in general to other functions ?

Regards,
Rahul

On Thu, Jan 3, 2013 at 9:34 PM, Mulyadi Santosa
mulyadi.sant...@gmail.comwrote:

 On Thu, Jan 3, 2013 at 7:40 PM, Rahul Bedarkar rpal...@gmail.com wrote:
  Hi,
 
  I was searching for asmlinkage and found that it is already explained at
  http://kernelnewbies.org/FAQ/asmlinkage
 
  But I didn't get this. Can someone tell me about it in brief ?

 the point is, parameters which is usually passed via stack, is passed
 using different way.

 A good example is system call they are passed using registers IIRC


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


sys fs interface

2012-12-28 Thread Rahul Bedarkar
Hi,

When driver provides sys fs interface for user space programs, how we
specify name of file to be created ?


Thanks,
Rahul B.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Regarding ioctl()

2012-12-27 Thread Rahul Bedarkar
Hi,

When ioctl() is called from user space, how device driver related to it
comes into picture ? What is flow from user space to kernel space ?


Thanks,
Rahul Bedarkar
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Regarding udevadm

2012-10-18 Thread Rahul Bedarkar
Hi,

I am using udevadm info to get information about connected block devices.

I have attached usb device and disabled auto mounting of it. I can see
kernel logs that device is added and node is created.

But when I use udevadm info --export-db, I can't see device info of
/dev/sdb1

If I use udevadm monitor --kernel to monitor kernel udev events, I can see

KERNEL[1419.590316] remove   /block/sdb/sdb1 (block)
KERNEL[1419.622381] remove   /block/sdb (block)
KERNEL[1430.528523] add  /block/sdb (block)
KERNEL[1430.564808] add  /block/sdb/sdb1 (block)

Why /dev/sdb1 is not getting displayed in case udevadm info ?


Thanks,
Rahul B.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Compiling the source RPM file.

2012-09-28 Thread Rahul Bedarkar
Can you write command here, how you have applied patches ?

Packages (.deb, .rpm and others) meant to build and installed automatically.

You can build and install it by following command

$sudo rpm -i package-name

On Fri, Sep 28, 2012 at 11:51 AM, K Arun Kumar ziconiu...@gmail.com wrote:
 I have a rpm for a module  which I extracted like -
 rpm2cpio numactl-2.0.7-3.el6.src.rpm | cpio -idmv

 then I extracted the source like -
 tar -xzvf numactl-2.0.7-3.tar.gz

 then I tried to apply all the patches to available with
 this rpm to the extracted source which results in Hunks and
 rejections.

 I want to apply all patches and compile the source and get
 an exe. I am not much aware of the rpm build procedure

 I want to do similar thing to kernel source also

 Please help me...

 Regards,
 Arun


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

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



I/O event notification mechanism - select() or epoll() ?

2012-09-26 Thread Rahul Bedarkar
Hi,

I have to capture kernel udev events through libudev. One of API
provides asynchronous events by reading on file descriptor. I found
that there two ways to do that.

1) select call
2) epoll

I also found that epoll is smarter and meant to replace old select call.

What are your thoughts on these ? Which one is better ?

Thanks
Rahul B.

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


Re: Is my rootfs correctly mounted?

2012-08-30 Thread Rahul Bedarkar
yes root file system is mounted correctly. It is just it didn't find init.

On Thu, Aug 30, 2012 at 8:10 PM, stl st.lamber...@gmail.com wrote:
 Hello all,
 if I try to boot Linux 2.6.37 by supplying a configuration file to the
 kernel to create initramfs_data.cpio,
 (without any compression), is it normal that the kernel doesn't print the
 well known message:

 VFS: Mounted root (type filesystem)

 even if the boot reaches the point where it tries to run init executable?
 Does it mean that my rootfs is not correctly mounted?

 Here is the kernel output printed during the boot:

 5[0.00] Linux version 2.6.37+ (gcc version 4.6.3 20120816 (GCC) )
 #57 Thu Aug 30 12:00:00 CEST 2012
 [0.00] Built 1 zonelists in Zone order, mobility grouping off.
 Total pages: 2032
 [0.00] Kernel command line:
 [0.00] PID hash table entries: 32 (order: -5, 128 bytes)
 [0.00] Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
 [0.00] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
 [0.00] Memory: 7656k/8196k available (1098k kernel code, 536k
 reserved, 2096117k data, 12k init)
 [0.00] SLUB: Genslabs=15, HWalign=16, Order=0-3, MinObjects=0,
 CPUs=1, Nodes=1
 [0.00] NR_IRQS:64
 [0.00] Timer start: timer interrupt every 10 ms
 [0.00] console [ttyS0] enabled
 [42949372.98] Calibrating delay loop... 0.00 BogoMIPS (lpj=0)
 [42949373.18] pid_max: default: 32768 minimum: 301
 [42949373.20] Security Framework initialized
 [42949373.21] Mount-cache hash table entries: 512
 [42949373.26] khelper used greatest stack depth: 7548 bytes left
 [42949373.34] kworker/u:0 used greatest stack depth: 7324 bytes left
 [42949373.50] bio: create slab bio-0 at 0
 [42949373.63] kworker/u:0 used greatest stack depth: 7260 bytes left
 [42949374.63] kworker/u:0 used greatest stack depth: 7180 bytes left
 [42949375.25] VFS: Disk quotas dquot_6.5.2
 [42949375.27] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
 [42949375.39] msgmni has been set to 16
 [42949375.42] Block layer SCSI generic (bsg) driver version 0.4 loaded
 (major 253)
 [42949375.43] io scheduler noop registered
 [42949375.44] io scheduler deadline registered
 [42949375.46] io scheduler cfq registered (default)
 [42949375.49] Architecture Specific Serial Driver
 [42949375.50] ttyS0 at MMIO 0x40001000 (irq = 5) is a arch_uart
 [42949375.70] loop: module loaded
 [42949375.72] mice: PS/2 mouse device common for all mice
 [42949375.78] [ cut here ]
 [42949375.80] WARNING: at fs/proc/generic.c:589 .LBE364+0x0/0x2()
 [42949375.81] proc_dir_entry '/proc/schedstat' already registered
 [42949375.82] Modules linked in:
 [42949375.83] ---[ end trace 31baa4bbf69a8bbc ]---
 [42949375.85] Failed to execute /init
 [42949375.87] Kernel panic - not syncing: No init found.  Try passing
 init= option to kernel. See Linux Documentation/init.txt for guidance.

 In my opinion, it seems to be correct because the following message doesn't
 appear:

 Warning: unable to open an initial console

 This means that the file /dev/console has been found, so that the rootfs has
 been correctly mounted, isn't it?


 Thanks in advance for your help!


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


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


Re: Is my rootfs correctly mounted?

2012-08-30 Thread Rahul Bedarkar
On Thu, Aug 30, 2012 at 8:38 PM, stl st.lamber...@gmail.com wrote:
 And another question,
 since the kernel is booting with initramfs support,
 is it normal that it tries to run /init instead of bin/init or sbin/init

 To be more precise, it runs this:

 if (ramdisk_execute_command) {
 run_init_process(ramdisk_execute_command);   ---this
 printk(KERN_WARNING Failed to execute %s\n,
 ramdisk_execute_command);
 }

 instead of this:

 run_init_process(/sbin/init);
 run_init_process(/etc/init);
 run_init_process(/bin/init);
 run_init_process(/bin/sh);

 is it normal?

yes it is obvious from code (init/main.c) that it tries /init
/sbin/init  unless it fails to execute anything.
 Thanks!


 2012/8/30 stl st.lamber...@gmail.com

 Thanks Rahul for your very quick answer.
 Glad to hear this.
 So, when does the message VFS: Mounted root appear?
 Maybe when using init ramdisk (initrd) support?
I don't know but if it fails to mount root file system or file system
is just a garbage with initramfs the well known log is kernel panic:
junk in compressed archive




 2012/8/30 Rahul Bedarkar rpal...@gmail.com

 yes root file system is mounted correctly. It is just it didn't find
 init.

 On Thu, Aug 30, 2012 at 8:10 PM, stl st.lamber...@gmail.com wrote:
  Hello all,
  if I try to boot Linux 2.6.37 by supplying a configuration file to the
  kernel to create initramfs_data.cpio,
  (without any compression), is it normal that the kernel doesn't print
  the
  well known message:
 
  VFS: Mounted root (type filesystem)
 
  even if the boot reaches the point where it tries to run init
  executable?
  Does it mean that my rootfs is not correctly mounted?
 
  Here is the kernel output printed during the boot:
 
  5[0.00] Linux version 2.6.37+ (gcc version 4.6.3 20120816
  (GCC) )
  #57 Thu Aug 30 12:00:00 CEST 2012
  [0.00] Built 1 zonelists in Zone order, mobility grouping off.
  Total pages: 2032
  [0.00] Kernel command line:
  [0.00] PID hash table entries: 32 (order: -5, 128 bytes)
  [0.00] Dentry cache hash table entries: 1024 (order: 0, 4096
  bytes)
  [0.00] Inode-cache hash table entries: 1024 (order: 0, 4096
  bytes)
  [0.00] Memory: 7656k/8196k available (1098k kernel code, 536k
  reserved, 2096117k data, 12k init)
  [0.00] SLUB: Genslabs=15, HWalign=16, Order=0-3, MinObjects=0,
  CPUs=1, Nodes=1
  [0.00] NR_IRQS:64
  [0.00] Timer start: timer interrupt every 10 ms
  [0.00] console [ttyS0] enabled
  [42949372.98] Calibrating delay loop... 0.00 BogoMIPS (lpj=0)
  [42949373.18] pid_max: default: 32768 minimum: 301
  [42949373.20] Security Framework initialized
  [42949373.21] Mount-cache hash table entries: 512
  [42949373.26] khelper used greatest stack depth: 7548 bytes left
  [42949373.34] kworker/u:0 used greatest stack depth: 7324 bytes
  left
  [42949373.50] bio: create slab bio-0 at 0
  [42949373.63] kworker/u:0 used greatest stack depth: 7260 bytes
  left
  [42949374.63] kworker/u:0 used greatest stack depth: 7180 bytes
  left
  [42949375.25] VFS: Disk quotas dquot_6.5.2
  [42949375.27] Dquot-cache hash table entries: 1024 (order 0, 4096
  bytes)
  [42949375.39] msgmni has been set to 16
  [42949375.42] Block layer SCSI generic (bsg) driver version 0.4
  loaded
  (major 253)
  [42949375.43] io scheduler noop registered
  [42949375.44] io scheduler deadline registered
  [42949375.46] io scheduler cfq registered (default)
  [42949375.49] Architecture Specific Serial Driver
  [42949375.50] ttyS0 at MMIO 0x40001000 (irq = 5) is a arch_uart
  [42949375.70] loop: module loaded
  [42949375.72] mice: PS/2 mouse device common for all mice
  [42949375.78] [ cut here ]
  [42949375.80] WARNING: at fs/proc/generic.c:589 .LBE364+0x0/0x2()
  [42949375.81] proc_dir_entry '/proc/schedstat' already registered
  [42949375.82] Modules linked in:
  [42949375.83] ---[ end trace 31baa4bbf69a8bbc ]---
  [42949375.85] Failed to execute /init
  [42949375.87] Kernel panic - not syncing: No init found.  Try
  passing
  init= option to kernel. See Linux Documentation/init.txt for guidance.
 
  In my opinion, it seems to be correct because the following message
  doesn't
  appear:
 
  Warning: unable to open an initial console
 
  This means that the file /dev/console has been found, so that the
  rootfs has
  been correctly mounted, isn't it?
 
 
  Thanks in advance for your help!
 
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 




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


Re: need some clarifications concerning rootf mounting

2012-08-20 Thread Rahul Bedarkar
You haven't build your root file system. I believe we give path to
root file system in CONFIG_INITRAMFS_SOURCE.
There are different ways to build root file system, like buildroot.
http://buildroot.uclibc.org/

-Rahul B.

On Thu, Aug 16, 2012 at 3:01 PM, stl st.lamber...@gmail.com wrote:
 Thanks for your answer.

 Ok, here is what I have exactly done:

 - compiled with my uClibc cross-compiler a simple hello world program.
 - written a basic config file in linux-2.6.37/usr, creating a dev/console, a
 /init from /usr/hello and some other dirs.
 - edited the .config file with CONFIG_INITRAMFS_SOURCE =
 .../usr/config_file and selected CONFIG_INITRAMFS_COMPRESSION_GZIP=y
 - built the kernel
 - launched vmlinux and received the kernel panic: junk in compressed
 archive error message

 In the source code, initrd_start ans initrd_end appears.
 if i want to use initramfs support (and not initrd support), should I do
 something special in setup_arch() in order to initialize these symbols?

 thakns in advance

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


Re: need some clarifications concerning rootf mounting

2012-08-14 Thread Rahul Bedarkar
On Tue, Aug 14, 2012 at 3:45 PM, stl st.lamber...@gmail.com wrote:
 I have dug a little more, and if I well understand, the
 initramfs_data.cpio.gz should be
 expanded from __initramfs_start (defined in vmlinux.lds.S)

 But when and how is it done?
 And by who?
 Architecture specific code? bootloader, or setup_arch() memory
 initialisation function?
 Or the kernel itself and automatically during kernel build? Or during boot?

 In my case, the initramfs_data.cpio.gz is not present at __initramfs_start.
 When the kernel tries to find the compression magic number
 (decompress_method() function),
 it complains and panic with the following message:

 kernel panic: junk in compressed archive

It is essential to have rootfs otherwise you will not able to compete
kernel boot process.
If you try to compile kernel without rootfs, it will give you error.
In your case, kernel found that initramfs_data.cpio.gz does not
contain anything. you might have did touch to initramfs_data.cpio.gz
to ignore error ?

Thanks,
Rahul B.

 (I precise that I am porting Linux-2.6.37 to a new architecture)

 Thanks in advance for your help and advices.

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


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


Re: Android jelly bean mounting problem

2012-08-14 Thread Rahul Bedarkar
It seems that modules related to ext4 are not loaded.

BTW what are these logs ?

On Tue, Aug 14, 2012 at 4:23 PM, sandeep kumar
coolsandyfor...@gmail.com wrote:
 Hi all,
 We are facing one issue,

 3EXT4-fs (mmcblk0p12): VFS: Can't find ext4 filesystem
 [5.943134] EXT4-fs (mmcblk0p12): VFS: Can't find ext4 filesystem
 3fs_mgr: Cannot mount filesystem on
 /dev/block/platform/msm_sdcc.1/by-num/p12 at /system
 [5.992430] fs_mgr: Cannot mount filesystem on
 /dev/block/platform/msm_sdcc.1/by-num/p12 at /system
 3init: fs_mgr_mount_all returned an error
 [6.005364] init: fs_mgr_mount_all returned an error
 3EXT4-fs (mmcblk0p15): VFS: Can't find ext4 filesystem
 [6.015346] EXT4-fs (mmcblk0p15): VFS: Can't find ext4 filesystem
 3EXT4-fs (mmcblk0p14): VFS: Can't find ext4 filesystem
 [6.110148] EXT4-fs (mmcblk0p14): VFS: Can't find ext4 filesystem
 3init: cannot find '/system/bin/sh', disabling 'qcom-post-fs'
 [6.230449] init: cannot find '/system/bin/sh', disabling 'qcom-post-fs'

 Can you help me..

 With regards,
 Sandeep Kumar Anantapalli,


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


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


Re: Regarding Ethernet support for kernel 3.4.7 debugging via KGDB‏‏

2012-08-09 Thread Rahul Bedarkar
On Thu, Aug 9, 2012 at 4:12 PM, Vivek Panwar vivekpanwar2...@gmail.com wrote:
 Hi,

 I am making a set up for kernel debugging at remote location with the help
 of ethernet, but as i heard that we dont have ethernet support in kernel 3.x
 series , Is it true?
I can not believe ethernet support is not in 3.x series!

Thanks,
Rahul B.
 If yes so do we have any other option to enable the ethernet functionality.
 I have downloaded the latest 3.6.7 kernel to my ubuntu 11.04 64 bit machine
 and booted my machine with this new kernel successfully but the problem is
 that i dont have ethernet support in this for debugging via KGDB. I am a
 beginner in this field, so can you please help me out in this if possible.

 Thanks for your support

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


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


Re: What is purpose of /init

2012-08-02 Thread Rahul Bedarkar
Thanks Richard !

And what is
exec 0/dev/console
exec 1/dev/console

On Thu, Aug 2, 2012 at 5:24 AM, richard -rw- weinberger
richard.weinber...@gmail.com wrote:
 On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar rpal...@gmail.com wrote:
 Hi,

 I just saw contents of /init on my system.

 #!/bin/sh
 # devtmpfs does not get automounted for initramfs
 /bin/mount -t devtmpfs devtmpfs /dev
 exec 0/dev/console
 exec 1/dev/console
 exec 2/dev/console
 exec /sbin/init $*

 Can someone explain what is meant for ?

 It's a hack to get devtmpfs mounted before init starts...
 Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-)

 --
 Thanks,
 //richard

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


Re: What is purpose of /init

2012-08-02 Thread Rahul Bedarkar
Sorry!

and what is meant by
exec 0/dev/console
exec 1/dev/console


On Thu, Aug 2, 2012 at 12:04 PM, Rahul Bedarkar rpal...@gmail.com wrote:
 Thanks Richard !

 And what is
 exec 0/dev/console
 exec 1/dev/console

 On Thu, Aug 2, 2012 at 5:24 AM, richard -rw- weinberger
 richard.weinber...@gmail.com wrote:
 On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar rpal...@gmail.com wrote:
 Hi,

 I just saw contents of /init on my system.

 #!/bin/sh
 # devtmpfs does not get automounted for initramfs
 /bin/mount -t devtmpfs devtmpfs /dev
 exec 0/dev/console
 exec 1/dev/console
 exec 2/dev/console
 exec /sbin/init $*

 Can someone explain what is meant for ?

 It's a hack to get devtmpfs mounted before init starts...
 Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-)

 --
 Thanks,
 //richard

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


What is purpose of /init

2012-08-01 Thread Rahul Bedarkar
Hi,

I just saw contents of /init on my system.

#!/bin/sh
# devtmpfs does not get automounted for initramfs
/bin/mount -t devtmpfs devtmpfs /dev
exec 0/dev/console
exec 1/dev/console
exec 2/dev/console
exec /sbin/init $*

Can someone explain what is meant for ?

Regards,
Rahul B.

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