Re: Unable to compile 2.6.30-rc7 on RHEL 4 - GCC 3.4.6

2009-05-25 Thread debian developer
On Tue, May 26, 2009 at 3:15 AM, GeunSik Lim  wrote:
> Hi,
>
> If you keep gcc 3.X.X to compile recent kernel source contiunally,
> You will meet another problems again.
>

OK, so 3.x.x is officially not supposed to be used for compilation?

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Recovering deleted file by editing inode..

2009-05-25 Thread Manish Katiyar
On Tue, May 26, 2009 at 8:03 AM, ranjith kannikara <
ranjithkannik...@gmail.com> wrote:

> Hi,
> First we were using the tool logdump in debugfs, and now we use the jls and
> jcat. The recovery works fine now it shows the recover file atonce and is
> available also.



Can you post what was the problem and what was the fix. This would help
others too 

-Manish


>
>
> rgards
> ranju.
>
>
> --
> http://www.ranjithkannikara.blogspot.com/
>



-- 
Thanks -
Manish


Re: Recovering deleted file by editing inode..

2009-05-25 Thread ranjith kannikara
Hi,
First we were using the tool logdump in debugfs, and now we use the jls and
jcat. The recovery works fine now it shows the recover file atonce and is
available also.

rgards
ranju.


-- 
http://www.ranjithkannikara.blogspot.com/


Re: Unable to compile 2.6.30-rc7 on RHEL 4 - GCC 3.4.6

2009-05-25 Thread GeunSik Lim
Hi,

If you want to use recent kernel source 2.6.24/2.6.28,
I recommend that you have to update linux distribution from current
linux distribution to
RHEL 5.X ( or CENTOS 5.X) in my experience.

Refer to http://linuxdistrowatch.com website to select linux
distribution for you.

If you keep gcc 3.X.X to compile recent kernel source contiunally,
You will meet another problems again.

On Tue, May 26, 2009 at 1:56 AM, debian developer  wrote:
> Hi all,
>
> I am getting this error when trying to compile the latest rc:
>
> /in/inndesk171/linux-2.6.28/arch/x86/Makefile:82: stack protector
> enabled but no compiler support
>  CHK     include/linux/version.h
>  CHK     include/linux/utsrelease.h
>  SYMLINK include/asm -> include/asm-x86
>  CALL    scripts/checksyscalls.sh
>  CC      init/main.o
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h: In
> function `start_kernel':
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
> warning: asm operand 1 probably doesn't match constraints
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
> warning: asm operand 2 probably doesn't match constraints
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
> warning: asm operand 1 probably doesn't match constraints
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
> warning: asm operand 2 probably doesn't match constraints
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1599:
> warning: asm operand 1 probably doesn't match constraints
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
> error: impossible constraint in `asm'
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
> error: impossible constraint in `asm'
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
> error: impossible constraint in `asm'
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
> error: impossible constraint in `asm'
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1599:
> error: impossible constraint in `asm'
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
> warning: 'f' might be used uninitialized in this function
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
> warning: 'f' might be used uninitialized in this function
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
> warning: 'f' might be used uninitialized in this function
> /in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
> warning: 'f' might be used uninitialized in this function
> make[1]: *** [init/main.o] Error 1
> make: *** [init] Error 2
>
>
> The gcc version is as follows:
> debian...@inndesk171[80] gcc -v
> Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-java-awt=gtk
> --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
>
>
> Is this gcc version no longer usable to compile the latest kernel?
>
> Thanks,
> DD
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
Regards,
GeunSik Lim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Unable to compile 2.6.30-rc7 on RHEL 4 - GCC 3.4.6

2009-05-25 Thread debian developer
Hi all,

I am getting this error when trying to compile the latest rc:

/in/inndesk171/linux-2.6.28/arch/x86/Makefile:82: stack protector
enabled but no compiler support
  CHK include/linux/version.h
  CHK include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALLscripts/checksyscalls.sh
  CC  init/main.o
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h: In
function `start_kernel':
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
warning: asm operand 1 probably doesn't match constraints
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
warning: asm operand 2 probably doesn't match constraints
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
warning: asm operand 1 probably doesn't match constraints
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
warning: asm operand 2 probably doesn't match constraints
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1599:
warning: asm operand 1 probably doesn't match constraints
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
error: impossible constraint in `asm'
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
error: impossible constraint in `asm'
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1590:
error: impossible constraint in `asm'
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1570:
error: impossible constraint in `asm'
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1599:
error: impossible constraint in `asm'
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
warning: 'f' might be used uninitialized in this function
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
warning: 'f' might be used uninitialized in this function
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
warning: 'f' might be used uninitialized in this function
/in/inndesk171/linux-2.6.28/arch/x86/include/asm/paravirt.h:1568:
warning: 'f' might be used uninitialized in this function
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2


The gcc version is as follows:
debian...@inndesk171[80] gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
--host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)


Is this gcc version no longer usable to compile the latest kernel?

Thanks,
DD

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



USB HSDPA Dongles /dev/ttyUSB* Ports

2009-05-25 Thread Arigead
hello all,
I've a question about the various ZTE HSDPA USB Dongles and the
ports which they create once they've been ejected from storage mode to
vendor specific mode and taken over by the drivers/usb/serial/option.c
driver.

I'm working on an embedded linux system using a 2.6.20 kernel. Back in
that version of the kernel there were no ZTE devices supported by the
option driver but I've augmented the option driver so that they are
recognised and handled by the option driver. I can establish a PPP
connection to them as well so all is good with a manual connection. The
problem is automating the process.

The embedded device could have any Dongle plugged in but we're mainly
working with Huawei and ZTE devices. Huawei devices are very convenient
as usb_modeswitch will switch them out of storage mode and all their
devices once switched communicate with /dev/ttyUSB0

ZTE Devices are less convenient as all the ones I have seen can be
switched with  the eject command but once the dongle is ejected four
serial ports are created and the port you want to talk to is not fixed.
I've seen the same ZTE device communicating on different ports on
different runs. That's fine when you're connecting up manually but not
when you're trying to automate it.

The system we've got here uses mdev which does appear to be getting
passed major and minor number and these are being honoured by mdev  when
it creates the device nodes. I just wonder is the option driver
responsible for creating these device numbers and perhaps creating them
in a random order. Is it an issue in the Dongles, mdev or option?

I could care less about the random nature of things if I could write a
script to test each of the ports created and see which one gives back
the OK to an ATZ command. I can't see a method of doing this unless
somebody who is not a newbie here knows how I could do this. I can do
that manually on another system which has kermit installed on it. But my
 embedded device does not as yet have kermit and I can't see how to
automate querying the various ports even if I installed kermit.

If anybody has any thoughts and could reply I'd be most grateful.

John

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Recovering deleted file by editing inode..

2009-05-25 Thread Mulyadi Santosa
Hi all

Just sharing thoughts maybe we need to do fsync() here?

regards,

Mulyadi.


On Mon, May 25, 2009 at 1:05 PM, SandeepKsinha  wrote:
> On Mon, May 25, 2009 at 11:27 AM, ranjith kannikara
>  wrote:
>> Hi,
>> Meanwhile there is another problem that if we delete a file and then unmount
>> the device. Re-mount it and try debugfs, the journal entries doesn't show
>> the details of the deleted file.
>>
>>
>
> try this:
>
> Delete a file.
> unmount.
> try debugfs.
>
> This should show you the desired results.
> Also, can you tell the mount options that you tried while re mounting.
>
>>
>>
>> --
>> http://www.ranjithkannikara.blogspot.com/
>>
>
>
>
> --
> Regards,
> Sandeep.
>
>
>
>
>
>
> “To learn is to change. Education is a process that changes the learner.”
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: PC to PC debugging in Linux Environment

2009-05-25 Thread Srinivas G.
> From: Greg KH [mailto:g...@kroah.com]

> Use a network console, having all of your kernel log messages get sent
> to a separate machine over the network.  Works very well.  Read how to
> do this in the Documentation/ directory of the kernel.

Greg, thanks for your reply.

However, I am working on CENTOS 5.2 Linux box. There is a service for
the netconsole under CENTOS, and I have used the same. For this, I did
the following.

Target system means where we load (insert) the driver with debug
messages.
Host System means where we see the debug messages i.e. received debug
messages from target system.

Target System Configuration

Open the /etc/sysconfig/netconsole file and modify the following
variables.

a)  LOCALPORT - keep the default port number only
b)  SYSLOGADDR - This is the host (remote) system IP address
c)  SYSLOGPORT - keep the default port number only
d)  SYSLOGMACADDR - This is the host system MAC address

Then, save the file and exit.

Just run the netconsole service with the following command.
# service netconsole restart

Host System Configuration

Just run the syslogd service with the following command to log the
target system debug messages. However, this service starts by default.
# service syslog restart

This is working fine for SINGLE thread. If the driver has two threads,
then I am missing the debug messages from one of the threads. For
example, in the USB mass storage driver, I am getting the messages only
when I insert the module (modprobe -a usb_storage). But, when I insert
the actual mass storage device then the debug messages in STORAGE_PROBE
function was not logged into the host machine /var/log/messages file
where as I am able to see the same (STORAGE_PROBE function) debug
messages in the target system /var/log/messages.

Please let me know if I missed any configuration settings.

Thanks and Regards,
Srinivas G



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Weired error for struct timespec...please help

2009-05-25 Thread Manish Katiyar
On Mon, May 25, 2009 at 12:42 PM, Vipul Jain  wrote:

> Hi All,
>
>   I am trying to learn adding entry in proc file system and currently
> using the the example given in
>   Documentation/DocBook/procfs_example.c. I would like to make a
> entry in the proc file system that
>   will print the struct timespec values on read i.e. cat . I am
> getting the following error on compilation
>   and am confused as everything looks ok to me. I was wondering if
> you guys could please help me.



In the code, you are just printing a local variable without initializing it.
It can contain garbage of the stack and that is why gcc is cribbing.

static int proc_read_xtime(char *page, char **start,
 off_t off, int count,
 int *eof, void *data)
{
int len;
struct timespec tv;

len = sprintf(page, "xtime : tv_secs = %ld tv_nvsecs = %ld \n",
  (long)tv.tv_sec, tv.tv_nsec);
 ^^^
return len;


Thanks -
Manish


>
>   /home/vipul/linux/ldd/test/procfs_example.c: In function
> ‘proc_read_xtime’:
> /home/vipul/linux/ldd/test/procfs_example.c:68: warning: ‘tv.tv_sec’
> is used uninitialized in this function
> /home/vipul/linux/ldd/test/procfs_example.c:68: warning: ‘tv.tv_nsec’
> is used uninitialized in this function
>  Building modules, stage 2.
>
>
> Regards,
> Vipul.
>



-- 
Thanks -
Manish


Weired error for struct timespec...please help

2009-05-25 Thread Vipul Jain
Hi All,

   I am trying to learn adding entry in proc file system and currently
using the the example given in
   Documentation/DocBook/procfs_example.c. I would like to make a
entry in the proc file system that
   will print the struct timespec values on read i.e. cat . I am
getting the following error on compilation
   and am confused as everything looks ok to me. I was wondering if
you guys could please help me.

   /home/vipul/linux/ldd/test/procfs_example.c: In function ‘proc_read_xtime’:
/home/vipul/linux/ldd/test/procfs_example.c:68: warning: ‘tv.tv_sec’
is used uninitialized in this function
/home/vipul/linux/ldd/test/procfs_example.c:68: warning: ‘tv.tv_nsec’
is used uninitialized in this function
  Building modules, stage 2.


Regards,
Vipul.
/*
 * procfs_example.c: an example proc interface
 *
 * Copyright (C) 2001, Erik Mouw (m...@nl.linux.org)
 *
 * This file accompanies the procfs-guide in the Linux kernel
 * source. Its main use is to demonstrate the concepts and
 * functions described in the guide.
 *
 * This software has been developed while working on the LART
 * computing board (http://www.lartmaker.nl), which was sponsored
 * by the Delt University of Technology projects Mobile Multi-media
 * Communications and Ubiquitous Communications.
 *
 * This program is free software; you can redistribute
 * it and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA  02111-1307  USA
 *
 */

#include 
#include 
#include 
#include 
#include 
#include 
#include 
//#include 


#define MODULE_VERS "1.0"
#define MODULE_NAME "procfs_example"

#define FOOBAR_LEN 8

struct fb_data_t {
	char name[FOOBAR_LEN + 1];
	char value[FOOBAR_LEN + 1];
};


static struct proc_dir_entry *xtime_file, *example_dir, *foo_file,
	*bar_file, *jiffies_file, *symlink;


struct fb_data_t foo_data, bar_data;

static int proc_read_xtime(char *page, char **start,
			 off_t off, int count,
			 int *eof, void *data)
{
	int len;
	struct timespec tv;

	len = sprintf(page, "xtime : tv_secs = %ld tv_nvsecs = %ld \n",
  (long)tv.tv_sec, tv.tv_nsec);

	return len;
}

static int proc_read_jiffies(char *page, char **start,
			 off_t off, int count,
			 int *eof, void *data)
{
	int len;

	len = sprintf(page, "jiffies = %ld\n",
  jiffies);

	return len;
}


static int proc_read_foobar(char *page, char **start,
			off_t off, int count, 
			int *eof, void *data)
{
	int len;
	struct fb_data_t *fb_data = (struct fb_data_t *)data;

	/* DON'T DO THAT - buffer overruns are bad */
	len = sprintf(page, "%s = '%s'\n", 
		  fb_data->name, fb_data->value);

	return len;
}


static int proc_write_foobar(struct file *file,
			 const char *buffer,
			 unsigned long count, 
			 void *data)
{
	int len;
	struct fb_data_t *fb_data = (struct fb_data_t *)data;

	if(count > FOOBAR_LEN)
		len = FOOBAR_LEN;
	else
		len = count;

	if(copy_from_user(fb_data->value, buffer, len))
		return -EFAULT;

	fb_data->value[len] = '\0';

	return len;
}


static int __init init_procfs_example(void)
{
	int rv = 0;

	/* create directory */
	example_dir = proc_mkdir(MODULE_NAME, NULL);
	if(example_dir == NULL) {
		rv = -ENOMEM;
		goto out;
	}
	
	example_dir->owner = THIS_MODULE;
	
	/* create jiffies using convenience function */
	jiffies_file = create_proc_read_entry("jiffies", 
	  0444, example_dir, 
	  proc_read_jiffies,
	  NULL);
	if(jiffies_file == NULL) {
		rv  = -ENOMEM;
		goto no_jiffies;
	}

	jiffies_file->owner = THIS_MODULE;

	xtime_file = create_proc_entry("xtime", 0644, example_dir);
	if(foo_file == NULL) {
		rv = -ENOMEM;
		goto no_xtime;
	}

	//strcpy(foo_data.name, "foo");
	//strcpy(foo_data.value, "foo");
	//foo_file->data = &foo_data;
	xtime_file->read_proc = proc_read_xtime;
	xtime_file->owner = THIS_MODULE;
	//foo_file->write_proc = proc_write_foobar;

	/* create foo and bar files using same callback
	 * functions 
	 */
	foo_file = create_proc_entry("foo", 0644, example_dir);
	if(foo_file == NULL) {
		rv = -ENOMEM;
		goto no_foo;
	}

	strcpy(foo_data.name, "foo");
	strcpy(foo_data.value, "foo");
	foo_file->data = &foo_data;
	foo_file->read_proc = proc_read_foobar;
	foo_file->write_proc = proc_write_foobar;
	foo_file->owner = THIS_MODULE;
		
	bar_file = create_proc_entry("bar", 0644, example_dir);
	if(bar_file == NULL) {
		rv = -ENOMEM;
		goto no_bar;
	}

	strcpy(bar_data.name, "bar");