* Specify devices manually in exotic environment
@ 2006-08-22 19:26 Milan Hauth
2006-08-23 8:31 ` Denis Vlasenko
[not found] ` <200608231313.37976.vda.linux@googlemail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Milan Hauth @ 2006-08-22 19:26 UTC (permalink / raw)
To: linux-kernel
Hello there.
Got a quite exotic environment here -- a Compaq Evo T20 thin client, which
I want to run Linux on.
But I'm not satisfied with a completely thin client, meaning that all the
files are located on the server. What I want is the basic system to be
located on the client, while the Unix System Resources, for example, are
mounted from the server, since they're too big for 32MB of Flash memory.
The problem I'm facing at the moment is the T20's BIOS, which doesn't seem
to pass the device information correctly to the Kernel. GRUB (v0.97) does
work with a workaround, which can be found in the document [1] I followed
to 'teach' Linux to the T20.
I already tried to use /proc/sys/kernel/real-root-dev, but setting the
root device to 0x80 (as already specified for GRUB) or 0x81 (1st partition
of 0x80) did not seem to help.
So, did I forget anything when building my Kernel? Or is it just another
trick, I don't know yet?
Hopefully someone here can help me on this one.. have been 'working' on my
cute T20 for several months now.. :-\
Cheers, milahu
[1] http://www.kazak.ws/evo/
PS: Here's my linuxrc:
#!/bin/sh
mount -v -t proc proc /proc
echo 0x80 >/proc/sys/kernel/real-root-dev
mount -o remount,rw /
exec chroot . sh <<- EOF
<dev/console >dev/console 2>&1
exec /sbin/init
EOF
--
proc on /proc type proc (rw)
mount: can't find / in /etc/fstab or /etc/mtab
INIT: version 2.86 booting
INIT: No inittab file found
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
2006-08-22 19:26 Specify devices manually in exotic environment Milan Hauth
@ 2006-08-23 8:31 ` Denis Vlasenko
2006-08-23 9:59 ` Milan Hauth
[not found] ` <200608231313.37976.vda.linux@googlemail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Denis Vlasenko @ 2006-08-23 8:31 UTC (permalink / raw)
To: Milan Hauth; +Cc: linux-kernel
On Tuesday 22 August 2006 21:26, Milan Hauth wrote:
> Hello there.
>
> Got a quite exotic environment here -- a Compaq Evo T20 thin client, which
> I want to run Linux on.
>
> But I'm not satisfied with a completely thin client, meaning that all the
> files are located on the server. What I want is the basic system to be
> located on the client, while the Unix System Resources, for example, are
> mounted from the server, since they're too big for 32MB of Flash memory.
>
> The problem I'm facing at the moment is the T20's BIOS, which doesn't seem
> to pass the device information correctly to the Kernel.
More info? What information is not passed?
> GRUB (v0.97) does
> work with a workaround, which can be found in the document [1] I followed
> to 'teach' Linux to the T20.
>
> I already tried to use /proc/sys/kernel/real-root-dev, but setting the
> root device to 0x80 (as already specified for GRUB) or 0x81 (1st partition
> of 0x80) did not seem to help.
>
> So, did I forget anything when building my Kernel? Or is it just another
> trick, I don't know yet?
>
> Hopefully someone here can help me on this one.. have been 'working' on my
> cute T20 for several months now.. :-\
I just pass two parameters to kernel on the commandline,
then I create needed node (in initrd):
mknod /dev/root b "$ROOTMAJ" "$ROOTMIN"
And then (still in initrd):
mount -n -o ro /dev/root /new_root
mount -n -t ramfs none /new_root/dev
cp -dp /dev/console /dev/null /new_root/dev
cd /new_root
# making sure we dont keep /dev busy
exec <dev/console >dev/console 2>&1
# proc/ in new root is used here as a temp mountpoint for old root
pivot_root . proc
exec chroot . sh -c 'umount -n /proc; exec /bin/env - /sbin/init'
and then proceed as usual (/dev will be populated by udev later)
For this to work you only need to know major/minor#.
--
vda
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
2006-08-23 8:31 ` Denis Vlasenko
@ 2006-08-23 9:59 ` Milan Hauth
[not found] ` <200608231210.27700.vda.linux@googlemail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Milan Hauth @ 2006-08-23 9:59 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: linux-kernel
On Wed, 23 Aug 2006 10:31:06 +0200, Denis Vlasenko
<vda.linux@googlemail.com> wrote:
> More info? What information is not passed?
Well, usually the BIOS enables access to the IDE bus, but not with me. But
how does WinNT work on the T20 then..? Also lspci does not show any device
identifiers -- just loads of cryptic numbers..
> mknod /dev/root b "$ROOTMAJ" "$ROOTMIN"
This also did not help -- 'cat: /dev/root: No such device or address'.
Major/minor is 4/0, as recommended in the kernel docs for /dev/root.
So where can I find my flash memory..? Again, with GRUB I just had to
specify the device address (0x80) and the kernel/initrd positions in
sector syntax, which works fine. Maybe I can do the same in Linux with my
ext2 partition, to specify the start and end sectors ('Specify drives
manually..'). But where to start?
Here's some other info (typos may be included):
/proc/devices:
**************
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
14 sound
29 fb
89 i2c
90 mtd
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
226 drm
Block devices:
1 ramdisk
7 loop
8 sd
44 ftl
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
93 nftl
128 sd <-- Is this my 0x80 device..?
129 sd <-- ..then this would be my 1st part.. [1]
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
[1] ..but how to access that block device then? What major/minor combi is
needed here..?
lspci:
******
00:00.0 0600: 1078:0001
00:0f.0 0200: 100b:0020
00:12.0 0601: 1078:0100 (rev 30)
00:12.1 0680: 1078:0101
00:12.2 0101: 1078:0102
00:12.3 0401: 1078:0103
00:12.4 0300: 1078:0104
00:13.0 0c03: 0e11:a0f8 (rev 06)
/proc/iomem:
************
00000000-0008efff : System RAM
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000cc000-000ccfff : 0000:00:13.0
000cc000-000ccfff : ohci_hcd
000f0000-000fffff : System ROM
00100000-07d0ffff : System RAM
00100000-00303920 : Kernel code
00303921-003cdeb3 : Kernel data
10000000-1000ffff : 0000:00:0f.0
10010000-10010fff : 0000:00:0f.0
10010000-10010fff : natsemi
40010000-40010fff : 0000:00:12.4
40011000-4001107f : 0000:00:12.3
40012000-400120ff : 0000:00:12.1
Hope this helps.. somehow.
Cheers, milahu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
[not found] ` <200608231210.27700.vda.linux@googlemail.com>
@ 2006-08-23 11:15 ` Milan Hauth
2006-08-23 12:00 ` linux-os (Dick Johnson)
0 siblings, 1 reply; 7+ messages in thread
From: Milan Hauth @ 2006-08-23 11:15 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: linux-kernel
On Wed, 23 Aug 2006 12:10:27 +0200, Denis Vlasenko
<vda.linux@googlemail.com> wrote:
>> > mknod /dev/root b "$ROOTMAJ" "$ROOTMIN"
>>
>> This also did not help -- 'cat: /dev/root: No such device or address'.
>> Major/minor is 4/0, as recommended in the kernel docs for /dev/root.
>
> What cat? Where did I say to cat anything? I said "create new node,
> namely, 'root', in the /dev, with the following major/minor#".
I did create the root node (b4/0). Just used cat for testing, since I
didn't have dd available yet on the initrd. But obviously it did not
work.. :-\
> If it doesn't work, maybe your initrd is mounted ro.
> Remount it rw first. Or mount a ramfs somewhere,
> it will give you writable place to play.
>
>> So where can I find my flash memory..? Again, with GRUB I just had to
>> specify the device address (0x80) and the kernel/initrd positions in
>> sector syntax, which works fine. Maybe I can do the same in Linux with
>> my
>> ext2 partition, to specify the start and end sectors ('Specify drives
>> manually..'). But where to start?
>
> Start by reading boot messages. They ought to say
> what devices are found.
Ah, excellent: A IDE controller is found:
CS5530: IDE controller at PCI slot 0000:00:12.2
The according line in lspci:
00:12.2 0101: 1078:0102
And there are also two IDE interfaces:
PCI: Setting latency timer iof devvice 0000:00:12.0 to 64
ide0: BM-DMA at 0xfb00-0xfb07, BIOS settings: hda: pio, hdb: pio
ide1: BM-DMA at 0xfb08-0xfb0f, BIOS settings: hdc: pio, hdd: pio
Probing IDE interface ide0...
Probing IDE interface ide1...
..but no devices, which is logical: If there would be devices, I could use
them via /dev/hd*.
But why is the IDE controller being recognized, while no devices are
found..?
> Try hexdump'ing your sd devices:
>
> # dd if=/dev/sda bs=1024 count=1 | hexdump
>
> and see whether they give something like boot sector.
'No such device or address'.. I already tried special devices before,
forgot to mention.
Maybe I just gonna try to get some more information about my hardware and
recheck my Kernel configuration..
Cheers, milahu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
2006-08-23 11:15 ` Milan Hauth
@ 2006-08-23 12:00 ` linux-os (Dick Johnson)
2006-08-23 12:07 ` linux-os (Dick Johnson)
0 siblings, 1 reply; 7+ messages in thread
From: linux-os (Dick Johnson) @ 2006-08-23 12:00 UTC (permalink / raw)
To: Milan Hauth; +Cc: Denis Vlasenko, Linux kernel
[-- Attachment #1: Type: text/plain, Size: 3374 bytes --]
On Wed, 23 Aug 2006, Milan Hauth wrote:
> On Wed, 23 Aug 2006 12:10:27 +0200, Denis Vlasenko
> <vda.linux@googlemail.com> wrote:
>
>>>> mknod /dev/root b "$ROOTMAJ" "$ROOTMIN"
>>>
>>> This also did not help -- 'cat: /dev/root: No such device or address'.
>>> Major/minor is 4/0, as recommended in the kernel docs for /dev/root.
>>
>> What cat? Where did I say to cat anything? I said "create new node,
>> namely, 'root', in the /dev, with the following major/minor#".
>
> I did create the root node (b4/0). Just used cat for testing, since I
> didn't have dd available yet on the initrd. But obviously it did not
> work.. :-\
>
>
>> If it doesn't work, maybe your initrd is mounted ro.
>> Remount it rw first. Or mount a ramfs somewhere,
>> it will give you writable place to play.
>>
>>> So where can I find my flash memory..? Again, with GRUB I just had to
>>> specify the device address (0x80) and the kernel/initrd positions in
>>> sector syntax, which works fine. Maybe I can do the same in Linux with
>>> my
>>> ext2 partition, to specify the start and end sectors ('Specify drives
>>> manually..'). But where to start?
>>
>> Start by reading boot messages. They ought to say
>> what devices are found.
>
> Ah, excellent: A IDE controller is found:
>
> CS5530: IDE controller at PCI slot 0000:00:12.2
>
> The according line in lspci:
>
> 00:12.2 0101: 1078:0102
>
> And there are also two IDE interfaces:
>
> PCI: Setting latency timer iof devvice 0000:00:12.0 to 64
> ide0: BM-DMA at 0xfb00-0xfb07, BIOS settings: hda: pio, hdb: pio
> ide1: BM-DMA at 0xfb08-0xfb0f, BIOS settings: hdc: pio, hdd: pio
> Probing IDE interface ide0...
> Probing IDE interface ide1...
>
> ..but no devices, which is logical: If there would be devices, I could use
> them via /dev/hd*.
>
> But why is the IDE controller being recognized, while no devices are
> found..?
>
>
>> Try hexdump'ing your sd devices:
>>
>> # dd if=/dev/sda bs=1024 count=1 | hexdump
>>
>> and see whether they give something like boot sector.
>
> 'No such device or address'.. I already tried special devices before,
> forgot to mention.
>
>
> Maybe I just gonna try to get some more information about my hardware and
> recheck my Kernel configuration..
>
> Cheers, milahu
> -
A lot of flash devices emulate a IDE hard disk. With an IDE driver
__installed__, the first one should be /dev/hda, the first partition
should be /dev/hda1, etc. You can use the attached MAKEDEV to
see what the major/minor numbers should be, and make a few in
your initial RAM disk to exeriment.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.62 BogoMips).
New book: http://www.AbominableFirebug.com/
_
\x1a\x04
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
[-- Attachment #2: MAKEDEV --]
[-- Type: APPLICATION/octet-stream, Size: 16276 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
2006-08-23 12:00 ` linux-os (Dick Johnson)
@ 2006-08-23 12:07 ` linux-os (Dick Johnson)
0 siblings, 0 replies; 7+ messages in thread
From: linux-os (Dick Johnson) @ 2006-08-23 12:07 UTC (permalink / raw)
To: Milan Hauth; +Cc: Denis Vlasenko, Linux kernel
[-- Attachment #1: Type: text/plain, Size: 3706 bytes --]
On Wed, 23 Aug 2006, Richard B. Johnson wrote:
> On Wed, 23 Aug 2006, Milan Hauth wrote:
>
>> On Wed, 23 Aug 2006 12:10:27 +0200, Denis Vlasenko
>> <vda.linux@googlemail.com> wrote:
>>
>>>>> mknod /dev/root b "$ROOTMAJ" "$ROOTMIN"
>>>>
>>>> This also did not help -- 'cat: /dev/root: No such device or address'.
>>>> Major/minor is 4/0, as recommended in the kernel docs for /dev/root.
>>>
>>> What cat? Where did I say to cat anything? I said "create new node,
>>> namely, 'root', in the /dev, with the following major/minor#".
>>
>> I did create the root node (b4/0). Just used cat for testing, since I
>> didn't have dd available yet on the initrd. But obviously it did not
>> work.. :-\
>>
>>
>>> If it doesn't work, maybe your initrd is mounted ro.
>>> Remount it rw first. Or mount a ramfs somewhere,
>>> it will give you writable place to play.
>>>
>>>> So where can I find my flash memory..? Again, with GRUB I just had to
>>>> specify the device address (0x80) and the kernel/initrd positions in
>>>> sector syntax, which works fine. Maybe I can do the same in Linux with
>>>> my
>>>> ext2 partition, to specify the start and end sectors ('Specify drives
>>>> manually..'). But where to start?
>>>
>>> Start by reading boot messages. They ought to say
>>> what devices are found.
>>
>> Ah, excellent: A IDE controller is found:
>>
>> CS5530: IDE controller at PCI slot 0000:00:12.2
>>
>> The according line in lspci:
>>
>> 00:12.2 0101: 1078:0102
>>
>> And there are also two IDE interfaces:
>>
>> PCI: Setting latency timer iof devvice 0000:00:12.0 to 64
>> ide0: BM-DMA at 0xfb00-0xfb07, BIOS settings: hda: pio, hdb: pio
>> ide1: BM-DMA at 0xfb08-0xfb0f, BIOS settings: hdc: pio, hdd: pio
>> Probing IDE interface ide0...
>> Probing IDE interface ide1...
>>
>> ..but no devices, which is logical: If there would be devices, I could use
>> them via /dev/hd*.
>>
>> But why is the IDE controller being recognized, while no devices are
>> found..?
>>
>>
>>> Try hexdump'ing your sd devices:
>>>
>>> # dd if=/dev/sda bs=1024 count=1 | hexdump
>>>
>>> and see whether they give something like boot sector.
>>
>> 'No such device or address'.. I already tried special devices before,
>> forgot to mention.
>>
>>
>> Maybe I just gonna try to get some more information about my hardware and
>> recheck my Kernel configuration..
>>
>> Cheers, milahu
>> -
>
> A lot of flash devices emulate a IDE hard disk. With an IDE driver
> __installed__, the first one should be /dev/hda, the first partition
> should be /dev/hda1, etc. You can use the attached MAKEDEV to
> see what the major/minor numbers should be, and make a few in
> your initial RAM disk to exeriment.
>
On this "*(!@!+%*^+" distribution, some banana-head substituted
a binary file for what used to be a shell script. Here is the
correct MAKEDEV from an older distribution.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.62 BogoMips).
New book: http://www.AbominableFirebug.com/
_
\x1a\x04
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
[-- Attachment #2: MAKEDEV --]
[-- Type: TEXT/PLAIN, Size: 14984 bytes --]
#! /bin/sh -
RCSID='$Id: MAKEDEV 2.2 1995/05/21 17:55:14 alfie Exp $'
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
# Customisation:
# The devices fall into various classes. This section contains the mapping
# from a class name into a group name and permission.
# You will almost certainly need to edit the group name to match your
# system, and you may change the permissions to suit your preference. These
# lines _must_ be of the format "user group perm".
public=" root sys 666"
system=" root sys 660"
kmem=" root kmem 660"
tty=" root tty 666"
cons=" root tty 622" # 622 for console?
vcs=" root sys 600"
dialout=" root uucp 660"
mouse=" root sys 666"
printer=" root daemon 660"
floppy=" root disk 660"
disk=" root disk 660"
scsi=" root sys 600"
cdrom=" root disk 660"
tape=" root disk 660"
audio=" root sys 666"
ibcs2=" root sys 666"
scanner=" root sys 666"
MAXVT=8
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
procfs=/proc
opt_v=
opt_d=
opt_n=
while [ $# -ge 1 ]
do
case $1 in
--) shift; break ;;
-v) shift; opt_v=1 ;;
-d) shift; opt_d=1 ;;
-n) shift; opt_n=1; opt_v=1 ;;
-V) shift; opt_V=1 ;;
-*) echo "$0: unknown flag \"$1\"" >&2; exit 1 ;;
*) break ;;
esac
done
if [ "$opt_V" ]
then
echo "$RCSID"
exit 0
fi
opts="${opt_n:+-n} ${opt_v:+-v} ${opt_d:+-d}"
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
makedev () { # usage: makedev name [bcu] major minor owner group mode
if [ "$opt_v" ]
then if [ "$opt_d" ]
then echo "delete $1"
else echo "create $1 $2 $3 $4 $5:$6 $7"
fi
fi
if [ ! "$opt_n" ]
then if [ "$opt_d" ]
then
rm -f $1
else
mknod $1- $2 $3 $4 &&
chown $5:$6 $1- &&
chmod $7 $1- &&
mv $1- $1
fi
fi
}
symlink () { # usage: symlink name target
if [ "$opt_v" ]
then if [ "$opt_d" ]
then echo "delete $1"
else echo "create $1 -> $2"
fi
fi
[ ! "$opt_n" ] && rm -f $1 &&
[ ! "$opt_d" ] && ln -s $2 $1
}
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
# For bash and ksh, we can use faster builtin routines to do manipulation,
# otherwise (ash) fall back to slower method using `expr'.
# The extra level of indirection using `eval' is necessary a) for ksh, and
# b) to get past ash.
if [ "$RANDOM" != "$RANDOM" ]
then
math () {
eval echo "\$(($*))"
}
index () { # index string c
eval "I=\${1%$2*}"
eval echo "\${#I}"
}
suffix () {
eval echo "\${1#$2}"
}
strip () {
eval echo "\${1% $2 *} \${1#* $2 }"
}
else
math () {
expr "$@"
}
index () { # index string c
expr $1 : ".*$2" - 1
}
suffix () {
expr "$1" : "$2\(.*\)"
}
strip () {
echo "[$1][$2]" >&2
echo "`expr \"$1\" : \"\(.*\) $2 \"` `expr \"$1\" : \".* $2 \(.*\)\"`"
}
fi
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
devices=
if [ ! -f $procfs/devices ]
then
echo "$0: warning: can't read $procfs/devices" >&2
else
exec 3<$procfs/devices
while read major device <&3
do
case "$major" in
Character|Block|'')
;;
*)
eval "major_$device=$major"
devices="$devices $device"
;;
esac
done
exec 3<&-
fi
Major () {
device=$2
if [ "$opt_d" ]
then
echo -1 # don't care
else
eval echo \${major_$1:-\${device:?\"unknown major number for $1\"}}
fi
}
cvt () {
while [ $# -ne 0 ]
do
case "$1" in
mem|tty|ttyp|cua|cub) ;;
hd|ide0) echo hda hdb ;;
ide1) echo hdc hdd ;;
sd) echo sda sdb ;;
sr) echo scd0 ;;
st) echo st0 ;;
xd) echo xda xdb ;;
fd) echo fd0 fd1 ;;
lp) echo lp ;;
mt) echo ftape ;;
loop) echo loop ;;
md) echo md ;;
ibcs2) echo ibcs2 ;;
tpqic02) echo qic ;;
sound) echo audio ;;
logiscan) echo logiscan ;;
ac4096) echo ac4096 ;;
hw) echo helloworld ;;
sbpcd | sbpcd[123]) echo $1 ;;
Joystick) echo js ;;
apm_bios) echo apm ;;
dcf) echo dcf ;;
aztcd) echo aztcd ;;
pcmcia) ;; # taken care of by its own driver
ttyC) echo cyclades ;;
vcs) ;;
*) echo "$0: don't know what \"$1\" is" >&2 ;;
esac
shift
done
}
for arg
do
case $arg in
generic)
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
$0 $opts hda hdb
$0 $opts xda xdb
$0 $opts sda sdb
$0 $opts ptyp ptyq ptyr ptys
$0 $opts console
$0 $opts ttyS0 ttyS1 ttyS2 ttyS3
$0 $opts busmice
$0 $opts lp
$0 $opts par
;;
local)
$0.local $opts
;;
std)
makedev mem c 1 1 $kmem
makedev kmem c 1 2 $kmem
makedev null c 1 3 $public
makedev port c 1 4 $kmem
makedev zero c 1 5 $public
symlink core $procfs/kcore
makedev full c 1 7 $public
makedev ram b 1 1 $disk
makedev tty c 5 0 $tty
;;
console)
major=`Major vcs` # not fatal
# console
makedev tty0 c 4 0 $cons
symlink console tty0
[ "$major" ] && makedev vcs0 c $major 0 $vcs
[ "$major" ] && makedev vcsa c $major 128 $vcs
# individual vts
line=1
while [ $line -le $MAXVT -a $line -le 63 ]
do
makedev tty$line c 4 $line $tty
[ "$major" ] && makedev vcs$line c $major $line $vcs
[ "$major" ] && makedev vcsa$line c $major `math $line + 128` $vcs
line=`math $line + 1`
done
;;
tty[1-9]|tty[1-5][0-9]|tty[6][0-3])
line=`suffix $arg tty`
makedev tty$line c 4 $line $tty
;;
ttyS[0-9]|ttyS[1-5][0-9]|ttyS[6][0-3])
line=`suffix $arg ttyS`
minor=`math 64 + $line`
makedev ttyS$line c 4 $minor $tty
makedev cua$line c 5 $minor $dialout
;;
pty[p-s])
# Currently limited to 64 master/slave pairs.
bank=`suffix $arg pty`
base=`index pqrs $bank`
base=`math $base \* 16`
for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
j=`index 0123456789abcdef $i`
makedev pty$bank$i c 4 `math 128 + $base + $j` $tty
makedev tty$bank$i c 4 `math 192 + $base + $j` $tty
done
;;
cyclades)
major1=`Major ttyC` || continue
major2=`Major cub` || continue
for i in 0 1 2 3 4 5 6 7 # 8 9 10 11 12 13 14 15
do
makedev ttyC$i c $major1 `math 32 + $i` $tty
makedev cub$i c $major2 `math 32 + $i` $dialout
done
;;
lp)
major=`Major lp` || continue
makedev ${arg}0 c $major 0 $printer
makedev ${arg}1 c $major 1 $printer
makedev ${arg}2 c $major 2 $printer
;;
par)
major=`Major lp` || continue
makedev ${arg}0 c $major 0 $printer
makedev ${arg}1 c $major 1 $printer
makedev ${arg}2 c $major 2 $printer
;;
busmice)
major=`Major mouse 10` || continue
makedev logimouse c $major 0 $mouse
makedev psmouse c $major 1 $mouse
makedev msmouse c $major 2 $mouse
makedev atimouse c $major 3 $mouse
makedev jmouse c $major 4 $mouse
;;
js)
major=`Major Joystick` || continue
makedev js0 c $major 0 $mouse
makedev js1 c $major 1 $mouse
;;
fd[0-7])
major=`Major fd 2` || continue
base=`suffix $arg fd`
if [ $base -ge 4 ]
then
base=`math $base + 124`
fi
makedev ${arg} b $major $base $floppy
makedev ${arg}d360 b $major `math $base + 4` $floppy
makedev ${arg}h1200 b $major `math $base + 8` $floppy
makedev ${arg}D360 b $major `math $base + 12` $floppy
makedev ${arg}D720 b $major `math $base + 16` $floppy
makedev ${arg}h360 b $major `math $base + 20` $floppy
makedev ${arg}h720 b $major `math $base + 24` $floppy
makedev ${arg}H1440 b $major `math $base + 28` $floppy
makedev ${arg}E2880 b $major `math $base + 32` $floppy
makedev ${arg}CompaQ b $major `math $base + 36` $floppy
symlink ${arg}H360 ${arg}D360
symlink ${arg}H720 ${arg}D720
makedev ${arg}h1440 b $major `math $base + 40` $floppy
makedev ${arg}H1680 b $major `math $base + 44` $floppy
makedev ${arg}h410 b $major `math $base + 48` $floppy
makedev ${arg}H820 b $major `math $base + 52` $floppy
makedev ${arg}h1476 b $major `math $base + 56` $floppy
makedev ${arg}H1722 b $major `math $base + 60` $floppy
makedev ${arg}h420 b $major `math $base + 64` $floppy
makedev ${arg}H830 b $major `math $base + 68` $floppy
makedev ${arg}h1494 b $major `math $base + 72` $floppy
makedev ${arg}H1743 b $major `math $base + 76` $floppy
makedev ${arg}h880 b $major `math $base + 80` $floppy
makedev ${arg}D1040 b $major `math $base + 84` $floppy
makedev ${arg}D1120 b $major `math $base + 88` $floppy
makedev ${arg}h1600 b $major `math $base + 92` $floppy
makedev ${arg}H1760 b $major `math $base + 96` $floppy
makedev ${arg}H1920 b $major `math $base + 100` $floppy
makedev ${arg}E3200 b $major `math $base + 104` $floppy
makedev ${arg}E3520 b $major `math $base + 108` $floppy
makedev ${arg}E3840 b $major `math $base + 112` $floppy
makedev ${arg}H1840 b $major `math $base + 116` $floppy
makedev ${arg}D800 b $major `math $base + 120` $floppy
makedev ${arg}H1600 b $major `math $base + 124` $floppy
;;
hd[a-b])
major=`Major ide0` || major=`Major hd 3` || continue
unit=`suffix $arg hd`
base=`index ab $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16 17 18 19 20
do
makedev hd$unit$part b $major `math $base + $part` $disk
done
;;
hd[c-d])
major=`Major ide1 22` || continue
unit=`suffix $arg hd`
base=`index cd $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16 17 18 19 20
do
makedev hd$unit$part b $major `expr $base + $part` $disk
done
;;
xd[a-d])
major=`Major xd 13` || continue
unit=`suffix $arg xd`
base=`index abcd $unit`
base=`math $base \* 64`
makedev xd$unit b $major $base $disk
for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16 17 18 19 20
do
makedev xd$unit$part b $major `expr $base + $part` $disk
done
;;
sd[a-h])
major=`Major sd 8` || continue
unit=`suffix $arg sd`
base=`index abcdefgh $unit`
base=`math $base \* 16`
makedev sd$unit b $major $base $disk
for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15
do
minor=`expr $base + $part`
makedev sd$unit$part b $major $minor $disk
done
;;
loop)
major=`Major loop` || continue
for part in 0 1 2 3 4 5 6 7
do
makedev loop$part b $major $part $disk
done
;;
md)
major=`Major md` || continue
for part in 0 1 2 3
do
makedev md$part b $major $part $disk
done
;;
st[0-7])
major=`Major st 9`
unit=`suffix $arg st`
makedev st$unit c $major $unit $tape
makedev nst$unit c $major `math 128 + $unit` $tape
;;
qic)
major=`Major tpqic02 12`
makedev rmt8 c $major 6 $tape
makedev rmt16 c $major 8 $tape
makedev tape-d c $major 136 $tape
makedev tape-reset c $major 255 $tape
;;
ftape)
major=`Major mt 27` || continue
for unit in 0 1 2 3
do
makedev rft$unit c $major $unit $tape
makedev nrft$unit c $major `math $unit + 4` $tape
done
symlink ftape rft0
symlink nftape nrft0
;;
scd[0-7])
major=`Major sr 11` || continue
unit=`suffix $arg scd`
makedev scd$unit b $major $unit $cdrom
;;
sonycd)
major=`Major cdu31a` || continue
makedev $arg b $major 0 $cdrom
;;
mcd)
major=`Major mcd 23` || continue
makedev $arg b $major 0 $cdrom
;;
cdu535)
makedev $arg b 24 0 $cdrom
;;
lmscd)
makedev $arg b 24 0 $cdrom
;;
sbpcd|sbpcd[123])
major=`Major $arg` || continue
base=`suffix ${arg}0 sbpcd`
# base=`expr ${arg}0 : "sbpcd\(.\)"`
for minor in 0 1 2 3
do
# XXX
unit=`expr substr 0123456789abcdef \( $base \* 4 + $minor + 1 \) 1`
makedev sbpcd$unit b $major $minor $cdrom
done
[ $arg = sbpcd ] && symlink $arg ${arg}0
;;
aztcd)
major=`Major $arg` || continue
makedev ${arg}0 b $major 0 $cdrom
;;
logiscan)
major=`Major logiscan` || continue
makedev $arg c $major 0 $scanner
;;
m105scan)
major=`Major m105` || continue
makedev $arg c $major 0 $scanner
;;
ac4096)
major=`Major ac4096` || continue
makedev $arg c $major 0 $scanner
;;
audio)
major=`Major sound 14`
makedev mixer c $major 0 $audio
makedev sequencer c $major 1 $audio
makedev midi00 c $major 2 $audio
makedev dsp c $major 3 $audio
makedev audio c $major 4 $audio
makedev sndstat c $major 6 $audio
# makedev sequencer2 c $major 8 $audio
makedev mixer1 c $major 16 $audio
# makedev patmgr0 c $major 17 $audio
makedev midi01 c $major 18 $audio
makedev dsp1 c $major 19 $audio
makedev audio1 c $major 20 $audio
# makedev patmgr1 c $major 33 $audio
makedev midi02 c $major 34 $audio
makedev midi03 c $major 50 $audio
;;
pcaudio)
major=`Major pcsp` || continue
makedev pcmixer c $major 0 $audio
makedev pcsp c $major 3 $audio
makedev pcaudio c $major 4 $audio
;;
sg)
major=`Major sg 21`
for unit in a b c d e f g h
do
minor=`index abcdefgh $unit`
# minor=`expr abcdefgh : ".*$unit" - 1`
makedev $arg$unit c $major $minor $scsi
done
;;
fd)
# not really devices, we use the /proc filesystem
symlink fd $procfs/self/fd
symlink stdin fd/0
symlink stdout fd/1
symlink stderr fd/2
;;
ibcs2)
major=`Major ibcs2` || continue
makedev socksys c $major 0 $ibcs2
symlink nfsd socksys
makedev spx c $major 1 $ibcs2
symlink X0R null
;;
apm)
major=`Major apm_bios` || continue
makedev $arg c $major 0 $system
;;
dcf)
major=`Major dcf` || continue
makedev $arg c $major 0 $system
;;
helloworld)
major=`Major hw` || continue
makedev helloworld c $major 0 $public
;;
update)
if [ ! "$devices" ]
then
echo "$0: don't appear to have any devices" >&2
continue
fi
if [ "$opt_d" ]
then
echo "$0: can't delete an update" >&2
continue
fi
create=
delete=
devs="$devices"
if [ -f DEVICES ]
then
exec 3<DEVICES
while read device major <&3
do
eval now=\$major_$device
if [ "$now" = "" ]
then
delete="$delete `cvt $device`"
continue
elif [ "$now" != $major ]
then
create="$create "`cvt $device`
fi
devs=`strip " $devs " $device`
# devs=`expr "$devs" : "\(.*\) $device"``expr "$devs" : ".* $device\(.*\)"`
done
exec 3<&-
fi
create="$create "`cvt $devs`
[ "$delete" != "" ] && $0 $opts -d $delete
[ "$create" != " " ] && $0 $opts $create
[ "$opt_n" ] && continue
for device in $devices
do
if [ "`cvt $device`" ]
then
eval echo $device \$major_$device
fi
done > DEVICES
;;
*)
echo "$0: don't know how to make device \"$arg\"" >&2
;;
esac
done
exit 0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Specify devices manually in exotic environment
[not found] ` <200608241108.52379.vda.linux@googlemail.com>
@ 2006-08-24 11:08 ` Milan Hauth
0 siblings, 0 replies; 7+ messages in thread
From: Milan Hauth @ 2006-08-24 11:08 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: linux-kernel
On Thu, 24 Aug 2006 11:08:52 +0200, Denis Vlasenko
<vda.linux@googlemail.com> wrote:
> On Wednesday 23 August 2006 21:40, Milan Hauth wrote:
>> I have tried MTD's NAND module according this [1] document, but it also
>> did not work.
>>
>> As Richard B. Johnson <linux-os@analogic.com> already mentioned, a
>> regular
>> IDE interface has to be emulated. Somehow. Anyhow.
>
> Yes, I never saw flash-based IDE devices, but they exist, that's true.
> However, it's not necessarily what you have.
> I think that IDE devices should be detected by kernel at boot-up.
> You say that they are not. That's why I'm inclined to think
> your flash memory is not IDEish.
What I also forgot to mention is, that it's a SmartMedia Flash Card I have
here, which is told to always identify as a IDE device.
> lsusb? Or if you have no lsusb, then:
>
> # mount | grep usb
> none on /proc/bus/usb type usbfs (rw)
Ohh, that's why lsusb never worked.. but you won't like the current result:
Bus 001 Device 003: ID 046a:002b Cherry GmbH --> Keyboard
Bus 001 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 001 Device 001: ID 0000:0000 --> What the..?
But I'm afraid I broke my SMC, while playing around with my disassembled
T20, since GRUB hangs with 'GRUB _' without having changed anything in the
software. D'oh!
That's why I can't test with 'USB Mass Storage' support in the kernel at
the moment, which would probably uncover the mysterious '0000:0000' USB
device. Gonna try again next week with a new SMC.
Cheers, milahu
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-08-24 11:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-22 19:26 Specify devices manually in exotic environment Milan Hauth
2006-08-23 8:31 ` Denis Vlasenko
2006-08-23 9:59 ` Milan Hauth
[not found] ` <200608231210.27700.vda.linux@googlemail.com>
2006-08-23 11:15 ` Milan Hauth
2006-08-23 12:00 ` linux-os (Dick Johnson)
2006-08-23 12:07 ` linux-os (Dick Johnson)
[not found] ` <200608231313.37976.vda.linux@googlemail.com>
[not found] ` <op.teq4xxc2epq0rv@localhost>
[not found] ` <200608241108.52379.vda.linux@googlemail.com>
2006-08-24 11:08 ` Milan Hauth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).