Home hello-4 auf COBRA unter Kernel 2.4 Das "hello-4.o" läßt sich auch auf dem COBRA-Board erfolgreich starten Entwicklung des Treibers QADC
 

2.3.4 Versuch "mknod" von Hand

Da im Allgemeinen wohl nicht das Modul den mknod-Befehl durchführt, wie die Recherchen über die sonstigen Quellcodes ergab, versuche ich zuerst doch den "mknod"-Befehl von Hand aus. Hier ist das auch nicht befriedigende Ergebnis:

/> mount -t nfs -o rsize=4096,wsize=4096 192.168.100.1:/home/andreas/uClinux /usr
/> cd usr
/usr> ls -l
-rw-r--r--    1 1000     100          4337 Mar  4  2005 boot_linux.cap
-rw-r--r--    1 1000     100        135796 Jun 29  2005 hello-4.o
drwxr-xr-x    2 1000     100           432 Mar  4  2005 led_test_cobra5282-20040324
-r-xr-xr-x    1 1000     100          3028 Mar  4  2005 led_test_cobra5282-20040324.tar.gz
-rw-r--r--    1 1000     100        136256 Jul  2  2005 qadc-1_0.o
-rwxr--r--    1 1000     100         20160 Jul  2  2005 readqadc-1_0
/usr> insmod qadc-1_0.o
Using qadc-1_0.o
QADC Driver 1.0
Device registered using major 254.
To talk to the driver, create a dev file with
'mknod /dev/qadc c 254 0'.
Try various minor numbers.  Try to cat and echo to
the device file.
Remove the device file and module when done.
/usr> mknod /dev/qadc c 254 0
mknod: /dev/qadc: Read-only file system
pid 24: failed 256
/usr> ls -l /
drwxr-xr-x    1 0        0              32 Jan  1  1970 bin
drwxr-xr-x    1 0        0              32 Jan  1  1970 dev
drwxr-xr-x    1 0        0              32 Jan  1  1970 etc
drwxr-xr-x    1 0        0              32 Jan  1  1970 home
drwxr-xr-x    1 0        0              32 Jan  1  1970 lib
drwxr-xr-x    1 0        0              32 Jan  1  1970 mnt
dr-xr-xr-x   20 0        0               0 Nov 30 00:00 proc
lrwxrwxrwx    1 0        0               8 Jan  1  1970 tmp -> /var/tmp
drwxr-xr-x    3 1000     100           280 Jul  2  2005 usr
drwxr-xr-x    7 0        0            1024 Nov 30 00:00 var
/usr> su
su: Bad command or file name
/usr> whoami
whoami: Bad command or file name
/usr> busybox
BusyBox v0.60.5 (2005.06.12-13:35+0000) multi-call binary

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use, and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        busybox, dd, df, echo, ifconfig, insmod, kill, ln, ls, lsmod,
        mknod, more, mount, ping, ps, rmmod, route, touch, umount, vi

/usr> mknod
BusyBox v0.60.5 (2005.06.12-13:35+0000) multi-call binary

Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR

pid 30: failed 256
/usr> mknod -m 777 /dev/qadc c 254 0
mknod: /dev/qadc: Read-only file system
pid 32: failed 256
/usr> cd ..
/> ls -l
drwxr-xr-x    1 0        0              32 Jan  1  1970 bin
drwxr-xr-x    1 0        0              32 Jan  1  1970 dev
drwxr-xr-x    1 0        0              32 Jan  1  1970 etc
drwxr-xr-x    1 0        0              32 Jan  1  1970 home
drwxr-xr-x    1 0        0              32 Jan  1  1970 lib
drwxr-xr-x    1 0        0              32 Jan  1  1970 mnt
dr-xr-xr-x   20 0        0               0 Nov 30 00:00 proc
lrwxrwxrwx    1 0        0               8 Jan  1  1970 tmp -> /var/tmp
drwxr-xr-x    3 1000     100           280 Jul  2  2005 usr
drwxr-xr-x    7 0        0            1024 Nov 30 00:00 var
/> cd home
/home> ls -l
drwxr-xr-x    1 0        0              32 Jan  1  1970 httpd
/home> touch test
touch: test: Read-only file system
pid 36: failed 256
/home> cd /usr
/usr> ls -l
-rw-r--r--    1 1000     100          4337 Mar  4  2005 boot_linux.cap
-rw-r--r--    1 1000     100        135796 Jun 29  2005 hello-4.o
drwxr-xr-x    2 1000     100           432 Mar  4  2005 led_test_cobra5282-20040324
-r-xr-xr-x    1 1000     100          3028 Mar  4  2005 led_test_cobra5282-20040324.tar.gz
-rw-r--r--    1 1000     100        136652 Jul  3  2005 qadc-1_0.o
-rwxr--r--    1 1000     100         20160 Jul  3  2005 readqadc-1_0
/usr> cp hello-4.o /home
/home/hello-4.o: Read-only file system
/usr>


Es hat den Anschein, daß überhaupt kein File neu angelegt werden kann.


Copyright © Andreas Birkert
Letzte Aktualisierung am 20. Dezember 2013
Home hello-4 auf COBRA unter Kernel 2.4 Das "hello-4.o" läßt sich auch auf dem COBRA-Board erfolgreich starten Entwicklung des Treibers QADC