Active Topics

 


Reply
Thread Tools
Posts: 3 | Thanked: 2 times | Joined on Oct 2013
#1
Executive Summary:

I have need of a new block device file in the /dev folder. I have used mknod and MAKEDEV to make the new device with the appropriate device major and minors, then when I issue the command to use the device file I get "can't open '/dev/nb1': No such device or address"

the file exists, and has the correct major and minor associated when I type ls.

What gives. I'm afraid I don't even know where to start, to figure out what is going on.

The Details and background:

I have a set top video player hooked to the big screen TV, I put movies (.avi,.mp4,. ect) on a USB stick and watch on the TV. I want to stream the movie files directly off of the computer where they are located, but the video box does not have network connectivity.

Enter the N800. I can plug the N800 into the video box via USB, and it looks like two USB sticks. But there is no access to the root file system, so NFS mounts are not accessible. I figure I need a Block device with the filesystem coming from the network.

Enter Network Block Devices. A block device file in /dev that has a filesystem supplied over the network. (my terminology may be wrong I don't know, but that's how I think of it.) So, I have set up my desktop to act as both client and server, and I can connect to and mount the movie directory so I know that is working and I have the correct syntax for the required incantations.

However, the N800 does not have any nbX devices in /dev like my desktop machine already did, so I had to add them myself. Also, it appears device files have become more complicated in that there now exists udev and device files created and destroyed on the fly. but still, how does a file exist in the directory listing, but not exist when a command goes to use it?

I am at a standstill on this.
 

The Following User Says Thank You to 7&7 For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#2
You do realise, of course that a device file (with whatever major/minor numbers) is just an userland entry point to the kernel driver handling the nice things behind the curtain?

Hence, if your kernel does not support the connected device the /dev/whatever is just a file with nothing behind it...

What does your dmesg show when you plug in the device?
 

The Following 2 Users Say Thank You to juiceme For This Useful Post:
Posts: 3 | Thanked: 2 times | Joined on Oct 2013
#3
First off, thanks for the reply.

Would "Supported by the kernel" require a kernel module? lsmod lists nbd in my desktop kernel where the setup does work. lsmod does not show nbd in the n800 kernel, where I am having trouble.

However, I had to install the nbd-client package on the desktop machine (Kubuntu) to get the nbd-client command. The nbd-client command was already available in the busybox installation on the n800. I was assuming by its presence that the necessary bits were implemented, maybe or maybe not as a kernel module, by busybox... or maybe compiled into the kernel directly.

Plugging in the device amounts to issuing the nbd-client command which returns the "No such device or address" error.

Dmesg only shows many lines like this:
[362627.554687] menelaus 1-0072: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val 0x29)

I don't think that's related. My display is screwed up, I think its a hardware failure in the graphics subsystem. I am using ssh to access the n800.

I think its useful life as a tablet is at an end, but I still have a lot to learn from it as a glorified network adapter, and general purpose device!!!

If I DO need a kernel module, there doesn't appear to be an nbd package for diablo, unless I can use a debian package compiled for the arm chip? If I have to make my own from sources I assume I will need to install the SDK and go from there? it will be a much longer journey than I intended, and take a while since this is a spare time kind of project - and likely require much more googleing and reading than installing!!

Thanks again for the reply, I at least have a direction to bumble and stumble now! Something to look into.
 

The Following User Says Thank You to 7&7 For This Useful Post:
Posts: 78 | Thanked: 109 times | Joined on Jan 2012 @ Washington State
#4
Originally Posted by 7&7 View Post
If I DO need a kernel module, there doesn't appear to be an nbd package for diablo, unless I can use a debian package compiled for the arm chip? If I have to make my own from sources I assume I will need to install the SDK and go from there? it will be a much longer journey than I intended, and take a while since this is a spare time kind of project - and likely require much more googleing and reading than installing!!
I had a kernel compile tree still around from when I was trying to get the n810 to play out to a USB audio device. (Turns out that I was able to get the USB device modules running in the kernel but could never convince the media player to use it.) I config'ed and cooked up a nbd.ko, which you're welcome to grab and see how it works for you:

http://www.vsta.org/andy/pickup/nbd.ko

You'll need to put it somewhere convenient on your n810 and then "insmod nbd.ko". I went as far as making sure it would load into my OS, but you'll have to figure out for yourself if it works.

Good luck!
Andy
 
Posts: 3 | Thanked: 2 times | Joined on Oct 2013
#5
Thank you very much for the .ko file! I have loaded it into the tablet, lo and behold many device files are created in the /dev directory (/dev/nbd[0-12] in fact) so I think this has solved the original question.

However, when I try to use the device files the command never completes. There are no errors issued either. I have to press Ctrl-c to get the command prompt back. My first thought was maybe because the module was made for the N810 and I'm using it on an N800 its different enough to cause a problem. But I figured I should confirm its not a problem with the server first...

Soooo, I turned back to the desktop which is serving up the directory, to make sure things still work over here, and of course now the command is failing (with no changes to anything so far as I can tell... I even used the history command to recall the EXACT same commands I used when it worked, and now I get errors - server terminated connection that kind of thing)

I am now vacillating between putting my foot through the monitor, or taking the entire computer up to the roof and throwing it off. I will probably just take a deep breath, open a beer and think about it until next weekend. I hate when doing (what I THINK is) the exact same thing works one time, and not the next!

Again, thanks for your time and effort, when I solve the overall problem I'll post the results, but I think my original question has been answered... I needed a kernel module to be present to back up the device files... just making the files was not enough.
 
Posts: 78 | Thanked: 109 times | Joined on Jan 2012 @ Washington State
#6
Sorry it didn't work out better. If the module loaded and created device files I'd guess it's compatible enough that it ought to work, but I really don't know offhand what subtle differences exist between n800 and n810 kernel builds. Still, my bet is some detail in how the server is started and/or some little bit of config file verbiage. Hope you have more luck next weekend!

FWIW my uname -a string is:
Linux andy-n810 2.6.21-omap1 #2 Tue Oct 14 11:25:25 EEST 2008 armv6l unknown

So I wonder if you're running a 2.6.21-omap1 flavor of OS.
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#7
Originally Posted by vandys View Post
FWIW my uname -a string is:
Linux andy-n810 2.6.21-omap1 #2 Tue Oct 14 11:25:25 EEST 2008 armv6l unknown

So I wonder if you're running a 2.6.21-omap1 flavor of OS.
Unless the version string in the kernel and in the module match exactly the module cannot be loaded at all.
There are some exceptons, kernel & modules my be compiled with modversions-option, and this enables that some symbols can be marked to be exported across versions but in practice it's not so useful (and it is quite rare to do so)

So, in practice for a module to load at all it needs to be compiled from the same kernel tree as the base kernel.

Modules, after all, are fully part of the kernel code, just packaged a bit differently so that they can be stored away from the base kernel and loaded only on need.
(and quite handy for developers, instead of compiling and flashing whole kernel when I make a small tweak I just compile the module and load it, no flashing required...)
 
Posts: 78 | Thanked: 109 times | Joined on Jan 2012 @ Washington State
#8
Thank you! So hopefully he has the kernel front covered and some mixture of userland incantations should get nbd running for him.
 
Reply

Tags
maemo 4


 
Forum Jump


All times are GMT. The time now is 21:29.