NGW100: modprobe only works with serial console

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everybody.. here I go with my first post on the AVR32:

I've been using some modules, specially the at32_abdac to make use of the integrated DAC. I already modified setup.c in the kernel source tree to make the module work.
I tried modprobe at32_abdac throught the RS232 console (/dev/ttyS0) and everything is fine. I can measure some frequency at the DAC's output when I do cat something > /dev/dsp (I still have to make the low pass filter and amplifier).

Now, modprobe won't load the module(s) if I execute it by logging in through telnet or ssh (dropbear). Any clues?
This is strange since "whoami" shows "root" in every console. Maybe the bootargs being "console=ttyS0"??

Also, what do I do if I want kernel messages (like printk's ) to be displayed in all open consoles? I think that's when console=xxxx comes up in the boot args, but i'm still not sure.

thanks,

Carlos

EDIT: when I run modprobe from ssh or telnet I get "failed to load module"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

cbecker wrote:
Now, modprobe won't load the module(s) if I execute it by logging in through telnet or ssh (dropbear). Any clues?
This is strange since "whoami" shows "root" in every console. Maybe the bootargs being "console=ttyS0"??
root should be able to do it from any console, after all, you can modprobe from an xterm on your Linux PC. This is very odd indeed. Do you have 'sudo' installed on your ngw100? (if you make your root fs with buildroot you can just tick the sudo box.) If so, try ssh'ing as a regular user and 'sudo modprobe xxx'.
cbecker wrote:
Also, what do I do if I want kernel messages (like printk's ) to be displayed in all open consoles? I think that's when console=xxxx comes up in the boot args, but i'm still not sure.
Yeah the console= argument just specifies where messages go during startup. Once init is loaded (afaik) this argument doesn't mean much. To get things displayed to the console you change the console_loglevel value. '8' will mean _everything_ is written to your console down to '1' being only critical things. You can set this at boot time by putting a console_loglevel=8 in your bootargs or at runtime by 'echo 8 > /proc/sys/kernel/printk'. Use with care, there can be a fair few messages. You might be better off just letting the klogd log everything for you and just check the output of 'dmesg | tail' every now and then.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First thanks for the reply, it was useful. Specially the last part about logging kernel messages.

I found the problem... A friend of mine helped.. some important variables weren´t set... specially PATH.

So doing ´export PATH=/sbin:/usr/sbin:/bin:/usr/bin´ helped and everything worked fine. The thing was that insmod was acting right, so it had to be some mis- or un-exported environment variable.

This problem seems to be on the new .img files I downloaded to the NGW, but maybe the bug exists on older versions too.

This also happens on telnet, so beware.

The solution is to just do this:
create a file, /etc/profile which contains the following:

export PATH=/sbin:/usr/sbin:/bin:/usr/bin

and done :P

thanks again to everybody.

Carlos