Browse Source

- add wwio bre2ze4k; part 2

master
vanhofen 6 years ago
parent
commit
8b19269ec9
  1. 1
      archive-configs/busybox-armbox-bre2ze4k.config
  2. 5
      skel-root/armbox/bre2ze4k/etc/exports
  3. 13
      skel-root/armbox/bre2ze4k/etc/filesystems
  4. 3
      skel-root/armbox/bre2ze4k/etc/fstab
  5. 17
      skel-root/armbox/bre2ze4k/etc/group
  6. 1
      skel-root/armbox/bre2ze4k/etc/hosts
  7. 5
      skel-root/armbox/bre2ze4k/etc/inetd.conf
  8. 195
      skel-root/armbox/bre2ze4k/etc/init.d/fstab
  9. 21
      skel-root/armbox/bre2ze4k/etc/init.d/networking
  10. 16
      skel-root/armbox/bre2ze4k/etc/init.d/partitions-by-name
  11. 25
      skel-root/armbox/bre2ze4k/etc/init.d/rcK
  12. 104
      skel-root/armbox/bre2ze4k/etc/init.d/rcS
  13. 44
      skel-root/armbox/bre2ze4k/etc/init.d/resizerootfs
  14. 64
      skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino
  15. 8
      skel-root/armbox/bre2ze4k/etc/init.d/sys_update.sh
  16. 10
      skel-root/armbox/bre2ze4k/etc/inittab
  17. 12
      skel-root/armbox/bre2ze4k/etc/issue.net
  18. 95
      skel-root/armbox/bre2ze4k/etc/mdev.conf
  19. 4
      skel-root/armbox/bre2ze4k/etc/network/interfaces
  20. 47
      skel-root/armbox/bre2ze4k/etc/nsswitch.conf
  21. 5
      skel-root/armbox/bre2ze4k/etc/passwd
  22. 17
      skel-root/armbox/bre2ze4k/etc/profile
  23. 1
      skel-root/armbox/bre2ze4k/etc/profile.local
  24. 34
      skel-root/armbox/bre2ze4k/etc/protocols
  25. 544
      skel-root/armbox/bre2ze4k/etc/services
  26. 2
      skel-root/armbox/bre2ze4k/etc/shells
  27. 8
      skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-log-only
  28. 10
      skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-modprobe
  29. 6
      skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-module
  30. 153
      skel-root/armbox/bre2ze4k/lib/mdev/fs/mdev-mmcblk
  31. 117
      skel-root/armbox/bre2ze4k/lib/mdev/fs/mdev-mount
  32. 19
      skel-root/armbox/bre2ze4k/lib/mdev/net/mdev-wlan
  33. 31
      skel-root/armbox/bre2ze4k/lib/mdev/usb/coldplug-setenv
  34. 135
      skel-root/armbox/bre2ze4k/lib/mdev/usb/mdev-usb

1
archive-configs/busybox-armbox-bre2ze4k.config

@ -0,0 +1 @@
busybox-armbox-hd51.config

5
skel-root/armbox/bre2ze4k/etc/exports

@ -0,0 +1,5 @@
# /var/etc/exports: the access control list for filesystems which may be exported to NFS clients.
#
# Example for client mount: "mount -t nfs -o nolock,soft 192.168.0.6:/media/sda1/movies /tmp/movies"
#
/media/sda1/movies 192.168.0.0/16(rw,no_root_squash,no_subtree_check)

13
skel-root/armbox/bre2ze4k/etc/filesystems

@ -0,0 +1,13 @@
ext4
ext3
ext2
nodev proc
nodev devpts
ntfs
fuseblk
vfat
exfat
exfat_fuse
udf
iso9660
*

3
skel-root/armbox/bre2ze4k/etc/fstab

@ -0,0 +1,3 @@
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

17
skel-root/armbox/bre2ze4k/etc/group

@ -0,0 +1,17 @@
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
wheel:x:10:root
utmp:x:43:
staff:x:50:
haldaemon:x:68:
dbus:x:81:
netdev:x:82:
users:x:100:
default:x:1000:
nobody:x:65533:nobody
nogroup:x:65534:nogroup

1
skel-root/armbox/bre2ze4k/etc/hosts

@ -0,0 +1 @@
127.0.0.1 localhost

5
skel-root/armbox/bre2ze4k/etc/inetd.conf

@ -0,0 +1,5 @@
# /etc/inetd.conf: Internet superserver configuration database
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
telnet stream tcp nowait root /sbin/telnetd /sbin/telnetd

195
skel-root/armbox/bre2ze4k/etc/init.d/fstab

@ -0,0 +1,195 @@
#!/bin/sh
. /etc/init.d/globals
SRVFLAG=/var/etc/.srv
MTAB=/etc/mtab
FSTAB=/etc/fstab
if [ -e /var/etc/fstab ]; then
FSTAB=/var/etc/fstab
fi
is_mount()
{
RET=1
test -f $MTAB || return $RET
while read _DEV _MTPT _FSTYPE _OPTS _REST
do
case "$_FSTYPE" in
"tmpfs") continue ;;
esac
case "$1" in
"$_DEV"|"$_MTPT") RET=0; break ;;
esac
done < $MTAB
return $RET
}
mount_local()
{
SHOWINFO "mount all local stuff from $FSTAB"
test -f $FSTAB || return
while read DEV MTPT FSTYPE OPTS REST
do
case "$DEV" in
""|\#*)
continue
;;
esac
case "$OPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
continue
;;
esac
case "$FSTYPE" in
swap)
#SHOWINFO "enable all swaps from $FSTAB"
#swapon -a
SHOWINFO "ignoring all swaps from $FSTAB"
continue
;;
nfs|cifs)
continue
;;
*)
test -d $MTPT || mkdir -p $MTPT;
SHOWINFO "trying to mount $DEV to $MTPT"
if OUT=$(mount $MTPT 2>&1 >/dev/null)
then
RET=$?
LOGINFO "mount: $MTPT - success ($RET)"
else
RET=$?
LOGWARN "mount: $MTPT - failed ($RET)"
echo "$OUT" | LOGWARN
fi
;;
esac
done < $FSTAB
}
mount_netfs()
{
SHOWINFO "mount all netfs stuff from $FSTAB"
test -f $FSTAB || return
rm -f $SRVFLAG
while read DEV MTPT FSTYPE OPTS REST
do
case "$DEV" in
""|\#*)
continue
;;
esac
case "$OPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
continue
;;
esac
case "$FSTYPE" in
nfs|cifs)
if ! is_mount $MTPT; then
test -d $MTPT || mkdir -p $MTPT;
SHOWINFO "trying to mount $DEV to $MTPT"
(
try=51
while(true); do
if OUT=$(mount $MTPT 2>&1 >/dev/null); then
RET=$?
LOGINFO "mount: $MTPT - success ($RET)"
test -e $SRVFLAG || touch $SRVFLAG
break
else
RET=$?
LOGWARN "mount: $MTPT - failed ($RET)"
echo "$OUT" | LOGWARN
if [ ${try:1:1} -eq ${try:0:1} ]; then
LOGWARN "mount: $MTPT - cancel!"
break
fi
try=$((try+1))
LOGWARN "mount: $MTPT - try ${try:1:1} in 30 seconds ..."
sleep 30
fi
done
) &
else
SHOWINFO "already mounted $MTPT"
test -e $SRVFLAG || touch $SRVFLAG
fi
;;
*)
continue
;;
esac
done < $FSTAB
}
umount_netfs()
{
SHOWINFO "unmount all netfs stuff from $MTAB"
test -f $MTAB || return
rm -f $SRVFLAG
while read DEV MTPT FSTYPE OPTS REST
do
case "$OPTS" in
noauto|*,noauto|noauto,*|*,noauto,*)
continue
;;
esac
case "$FSTYPE" in
nfs|cifs)
SHOWINFO "trying to unmount $DEV from $MTPT"
(
if OUT=$(umount -f $MTPT 2>&1 >/dev/null); then
RET=$?
LOGINFO "umount: $MTPT - success ($RET)"
else
RET=$?
LOGWARN "umount: $MTPT - failed ($RET)"
echo "$OUT" | LOGWARN
test -e $SRVFLAG || touch $SRVFLAG
fi
) &
;;
*)
continue
;;
esac
done < $MTAB
}
if [ -e /tmp/.flash.start ]; then
SHOWINFO "flash.start flag found"
umount_netfs
SHOWINFO "exiting"
exit 0
fi
case "$1" in
"start")
mount_local
mount_netfs
;;
"start_netfs")
mount_netfs
;;
"stop_netfs")
umount_netfs
;;
"stop")
umount_netfs
#SHOWINFO "unmount all sysfs, tmpfs, devpts and usbfs mounts"
#umount -a -t sysfs, tmpfs, devpts, usbfs
#SHOWINFO "disable all swaps"
#swapoff -a
#SHOWINFO "detach jffs2 filesystems"
#umount -l -t jffs2
;;
*)
echo "[$BASENAME] Usage: $0 {start|start_netfs|stop_netfs|stop}"
;;
esac

21
skel-root/armbox/bre2ze4k/etc/init.d/networking

@ -0,0 +1,21 @@
#!/bin/sh
. /etc/init.d/globals
case "$1" in
start)
SHOWINFO "Configuring network ... "
ifup -a -f
;;
stop)
SHOWINFO "Deconfiguring network ... "
ifdown -a
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "[$BASENAME] Usage: $0 {start|restart|force-reload|stop}"
;;
esac

16
skel-root/armbox/bre2ze4k/etc/init.d/partitions-by-name

@ -0,0 +1,16 @@
#!/bin/sh
if grep -q mmcblk1 /proc/cmdline
then
search=/sys/block/mmcblk1/mmcblk1p*
else
search=/sys/block/mmcblk0/mmcblk0p*
fi
for i in $search;
do
if [ "$i" != "$search" ]; then
partname=`cat /$i/uevent | grep PARTNAME | cut -d '=' -f 2`
devname=`cat /$i/uevent | grep DEVNAME | cut -d '=' -f 2`
mkdir -p /dev/block/by-name/
ln -sf /dev/$devname /dev/block/by-name/$partname
fi
done

25
skel-root/armbox/bre2ze4k/etc/init.d/rcK

@ -0,0 +1,25 @@
#!/bin/sh
. /etc/profile
. /etc/init.d/functions
. /etc/init.d/globals
SHOWINFO "start"
if [ -e /tmp/.flash.start ]; then
lcd4l_cmd=stop
lcd4l_msg="Updating STB ..."
else
lcd4l_cmd=off
lcd4l_msg="Shutdown STB ..."
fi
# first stopping lcd4linux
test -d /tmp/lcd/ && echo ${lcd4l_msg} > /tmp/lcd/goodbye
service lcd4linux ${lcd4l_cmd}
# stopping services and daemons in order of the symlink names
LOGINFO "run initscripts stop ..."
run_initscripts stop
SHOWINFO "done"

104
skel-root/armbox/bre2ze4k/etc/init.d/rcS

@ -0,0 +1,104 @@
#!/bin/sh
. /etc/profile
. /etc/init.d/functions
. /etc/init.d/globals
SHOWINFO "start"
mount -t proc proc /proc
# init system
SHOWINFO "creating and mounting system directories..."
mount -t devtmpfs devtmpfs /dev
mount -t sysfs sys /sys
mount -t tmpfs tmp /tmp
mount -t tmpfs media /media
mount -t tmpfs mnt /mnt
for dir in epg movies music pictures streaming autofs plugins; do
mkdir -p /mnt/${dir}
done
mount -t tmpfs srv /srv
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
mkdir -p /dev/shm/usb
# mount var-partition
# FIXME
service partitions-by-name start
service resizerootfs start
# for nfsd
mkdir -p /var/lib/nfs
mount -t tmpfs nfs /var/lib/nfs
# for samba
mkdir -p /var/samba
mount -t tmpfs samba /var/samba
# for wget
mkdir -p /tmp/wget
dmesg -n 1
# set dummy time
date -s "2017-01-01 00:00"
# directory for wireless drivers
mkdir -p /var/run/wpa_supplicant
# automatic restore
if [ -e /var/backup_flash.tar.gz ]; then
/bin/restore_flash.sh
fi
# update system
if [ -x /etc/init.d/sys_update.sh ]; then
/etc/init.d/sys_update.sh
fi
service hostname start
# logging as much as possible
service syslogd start
# load modules / create nodes
load_module extra/bre2ze4k_1.ko
load_module extra/bre2ze4k_2.ko
load_module extra/bre2ze4k_3.ko
load_module extra/bre2ze4k_4.ko
# show bootlogo
showiframe.sh bootlogo.m2v
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
service networking start
service ntpdate start
# say hi to everyone
echo "Booting... NI" > /dev/dbox/oled0
# starting services and daemons in order of the symlink names
LOGINFO "run initscripts start ..."
run_initscripts start
service coredump start
SHOWINFO "done"

44
skel-root/armbox/bre2ze4k/etc/init.d/resizerootfs

@ -0,0 +1,44 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: resize2fs mmcblk0p3
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop:
# Short-Description: Resizes once linuxrootfs and userdata to full partition size
### END INIT INFO
if [ ! -f "/.resize-linuxrootfs" ] && [ -e "/dev/block/by-name/linuxrootfs" ]
then
echo "Resizing linuxrootfs partition, Do not unplug power!..."
resize2fs /dev/block/by-name/linuxrootfs
touch "/.resize-linuxrootfs"
fi
if [ ! -f "/.resize-userdata" ] && [ -e "/dev/block/by-name/userdata" ] && [ -x "/sbin/blkid" ]; then
if blkid /dev/block/by-name/userdata | grep "ext4"; then
echo "Resizing userdata partition, Do not unplug power!..."
resize2fs /dev/block/by-name/userdata
touch "/.resize-userdata"
else
echo "userdata partition is not format!..."
echo "Setup userdata partitions, Do not unplug power!..."
mkfs.ext4 -F /dev/block/by-name/userdata
touch "/.resize-userdata"
fi
fi
if [ ! -f "/.resize-storage" ] && [ -e "/dev/block/by-name/storage" ] && [ -x "/sbin/blkid" ]; then
if blkid /dev/block/by-name/storage | grep "ext4"; then
echo "Resizing storage partition, Do not unplug power!..."
resize2fs /dev/block/by-name/storage
touch "/.resize-storage"
else
echo "storage partition is not format!..."
echo "Setup storage partitions, Do not unplug power!..."
mkfs.ext4 -F /dev/block/by-name/storage
touch "/.resize-storage"
fi
fi
: exit 0

64
skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino

@ -0,0 +1,64 @@
#!/bin/sh
. /etc/init.d/globals
if [ -e /var/etc/.coredump ]; then
ulimit -c unlimited
fi
# uncomment for gstreamer debugging
#export GST_DEBUG=4
# if neutrino crashes, just restart it or reboot the box?
REBOOT_ON_ERROR=false
do_cleanup() {
# remove files created by neutrino
rm -f /tmp/.timer
}
do_shutdown() {
echo "Shutdown ..." > /dev/dbox/oled0
poweroff
}
do_reboot() {
echo "Reboot ..." > /dev/dbox/oled0
reboot
}
while true; do
do_cleanup
neutrino; RET=$?
LOGINFO "Neutrino exited with exit code $RET"
if [ $RET -eq 0 ]; then
# do nothing
break
elif [ $RET -eq 1 ]; then
do_shutdown
break
elif [ $RET -eq 2 ]; then
do_cleanup
do_reboot
break
fi
echo "Neutrino: $RET" > /dev/dbox/oled0
# report errors on external display
if [ -e /tmp/.lcd-* ]; then
echo "0" > /tmp/lcd/mode_logo
echo "Neutrino" > /tmp/lcd/service
echo "Error: $RET" > /tmp/lcd/event
fi
if $REBOOT_ON_ERROR; then
LOGINFO "Rebooting due to REBOOT_ON_ERROR=true and exit code $RET"
do_reboot
break
fi
LOGINFO "Restarting neutrino after exit code $RET"
done

8
skel-root/armbox/bre2ze4k/etc/init.d/sys_update.sh

@ -0,0 +1,8 @@
#!/bin/sh
. /etc/init.d/globals
# install correct yWeb style
cd /share/tuxbox/neutrino/httpd/scripts/ && ./Y_Tools.sh style_set
#rm -f /etc/init.d/sys_update.sh

10
skel-root/armbox/bre2ze4k/etc/inittab

@ -0,0 +1,10 @@
# /etc/inittab: init configuration.
::sysinit:/etc/init.d/rcS
::once:/etc/init.d/start_neutrino
::askfirst:-/bin/sh
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/rcK

12
skel-root/armbox/bre2ze4k/etc/issue.net

@ -0,0 +1,12 @@
### ### ###
### ## ##
#### ## ##
## ## ## ##
## #### ##
## ### ##
## ## ## http://www.neutrino-images.de
#
Kernel: %r %v @%m
Date: %d, %t

95
skel-root/armbox/bre2ze4k/etc/mdev.conf

@ -0,0 +1,95 @@
# /etc/mdev.conf
# Syntax:
# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
#
# [-]: do not stop on this match, continue reading mdev.conf
# =: move, >: move and create a symlink
# !: do not create device node
# @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
# Support module loading on hotplug
#$MODALIAS=.* root:root 0660 @/bin/busybox modprobe "$MODALIAS"
null root:root 0666
zero root:root 0666
full root:root 0666
random root:root 0666
urandom root:root 0444
cpu_dma_latency root:root 0660
initctl root:root 0600
ircomm[0-9].* root:root 0660
kmem root:root 0640
kmsg root:root 0660
log root:root 0666
loop[0-9].* root:root 0640
mem root:root 0640
network_latency root:root 0660
network_throughput root:root 0660
port root:root 0640
ptmx root:root 0666
ram[0-9].* root:root 0640
vcs.* root:root 0660
rtc0 root:root 0666 =misc/rtc
tun[0-9]* root:root 0640 =net/
pcm.* root:root 0660 =snd/
control.* root:root 0660 =snd/
timer root:root 0660 =snd/
i2c-([0-9]) root:root 0660 >i2c/%1
# Console device
console root:tty 0600
# TTY devices
tty root:root 0666
tty.* root:root 0620
# DVB devices
dvb([0-9])\.(.*)([0-9]) root:root 0660 >dvb/adapter%1/%2%3
# Input layer
event.* root:root 0640 =input/
mice root:root 0640 =input/
mouse.* root:root 0640 =input/
fb([0-2]) root:root 0660 >fb/%1
lcd0 root:root 0660 =dbox/lcd0
oled0 root:root 0660 =dbox/oled0
dboxlcd root:root 0660 =dbox/lcd0
pvr root:root 0660 =misc/pvr
vtuner([0-9]) root:root 0660 =misc/
fp0 root:root 0660 =dbox/fp0
# USB devices
#usbdev.* root:root 0660 */lib/mdev/usb/mdev-usb
[0-3]-.*:1.0 root:root 0660 */lib/mdev/usb/mdev-usb
# Mass-storage devices
[hs]d[a-z][0-9]? root:root 0664 */lib/mdev/fs/mdev-mount
# Disc devices
sr[0-9] root:root 0664 */lib/mdev/fs/mdev-mount
# Memory cards / eMMC-Partitions
mmcblk0p1 root:root 0664 @mount -t auto /dev/$MDEV /boot 2>&1 >/dev/null
mmcblk[0-9]p[0-9] root:root 0664 */lib/mdev/fs/mdev-mmcblk
# WLAN devices
ra[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan
rausb[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan
wlan[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan
# Block devices: group -> disk
mtdblock([0-9]) root:root 0660 >mtdblock/%1
# Double up flash characters devices
mtd([0-9]) root:root 0660 >mtd/%1
mtd([0-9])+ro root:root 0600
# Log all other devices. Right now useful only for debuging.
.* root:root 0600 */lib/mdev/common/mdev-log-only

4
skel-root/armbox/bre2ze4k/etc/network/interfaces

@ -0,0 +1,4 @@
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

47
skel-root/armbox/bre2ze4k/etc/nsswitch.conf

@ -0,0 +1,47 @@
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
passwd: files
shadow: files
group: files
hosts: files dns
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#bootparams: nisplus [NOTFOUND=return] files
#netgroup: nisplus
#publickey: nisplus
#automount: files nisplus
#aliases: files nisplus

5
skel-root/armbox/bre2ze4k/etc/passwd

@ -0,0 +1,5 @@
root:gbAdujXVMYE.6:0:0::/root:/bin/sh
sshd:*:65531:65534::/:/bin/false
ftp:*:65532:65534::/:/bin/false
ftpguest:acFuqMq23IVqc:65533:65534::/media:/bin/false
nobody:*:65534:65534::/:/bin/false

17
skel-root/armbox/bre2ze4k/etc/profile

@ -0,0 +1,17 @@
# /etc/profile: system-wide profile file for the shell
PATH=/sbin:/bin:/usr/bin:/var/bin
TERM=linux
PS1='[\h] \w \$ '
alias l='ls -al'
alias ll='ls -l'
alias dir='ls -lA'
alias ..='cd ..'
alias mc='mc -a'
alias sc='setconsole'
alias sr='setconsole -r'
# Add your own modifications to /etc/profile.local!
test -e /etc/profile.local && . /etc/profile.local

1
skel-root/armbox/bre2ze4k/etc/profile.local

@ -0,0 +1 @@
# /etc/profile.local: your profile modifications for the shell

34
skel-root/armbox/bre2ze4k/etc/protocols

@ -0,0 +1,34 @@
# /etc/protocols: This file describes the various protocols that are
# available from the TCP/IP subsystem. It should be
# consulted instead of using the numbers in the ARPA
# include files, or, worse, just guessing them.
# Internet (IP) protocols
#
ip 0 IP # internet protocol v4
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # internet group multicast protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
idp 22 IDP # WhatsThis?
rdp 27 RDP # "reliable datagram" protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4
# Internet (IPv6) extension headers
#
hopopt 0 HOPOPT # Hop-by-hop optons for IPv6
ipv6 41 IPv6 # IPv6
ipv6-route 43 IPv6-Route # Routing Header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
ipv6-crypt 50 IPv6-Crypt # Encryption Header for IPv6
ipv6-auth 51 IPv6-Auth # Authentication Header for IPv6
icmpv6 58 IPv6-ICMP ICMPV6 ipv6-icmp icmp6 # ICMP for IPv6
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
iso-ip 80 ISO-IP # ISO Internet Protocol
encap 98 ENCAP # RFC1241 encapsulation
raw 255 RAW # RAW IP interface

544
skel-root/armbox/bre2ze4k/etc/services

@ -0,0 +1,544 @@
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, officially ports have two entries
# even if the protocol doesn't support UDP operations.
#
# Updated from http://www.iana.org/assignments/port-numbers and other
# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services .
# New ports will be added on request if they have been officially assigned
# by IANA and used in the real-world or are needed by a debian package.
# If you need a huge list of used numbers please install the nmap package.
tcpmux 1/tcp # TCP port service multiplexer
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
msp 18/tcp # message send protocol
msp 18/udp
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp 21/tcp
fsp 21/udp fspd
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp
telnet 23/tcp
smtp 25/tcp mail
time 37/tcp timserver
time 37/udp timserver
rlp 39/udp resource # resource location
nameserver 42/tcp name # IEN 116
whois 43/tcp nicname
tacacs 49/tcp # Login Host Protocol (TACACS)
tacacs 49/udp
re-mail-ck 50/tcp # Remote Mail Checking Protocol
re-mail-ck 50/udp
domain 53/tcp nameserver # name-domain server
domain 53/udp nameserver
mtp 57/tcp # deprecated
tacacs-ds 65/tcp # TACACS-Database Service
tacacs-ds 65/udp
bootps 67/tcp # BOOTP server
bootps 67/udp
bootpc 68/tcp # BOOTP client
bootpc 68/udp
tftp 69/udp
gopher 70/tcp # Internet Gopher
gopher 70/udp
rje 77/tcp netrjs
finger 79/tcp
www 80/tcp http # WorldWideWeb HTTP
www 80/udp # HyperText Transfer Protocol
link 87/tcp ttylink
kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5
kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5
supdup 95/tcp
hostnames 101/tcp hostname # usually from sri-nic
iso-tsap 102/tcp tsap # part of ISODE
acr-nema 104/tcp dicom # Digital Imag. & Comm. 300
acr-nema 104/udp dicom # Digital Imag. & Comm. 300
csnet-ns 105/tcp cso-ns # also used by CSO name server
csnet-ns 105/udp cso-ns
rtelnet 107/tcp # Remote Telnet
rtelnet 107/udp
pop2 109/tcp postoffice pop-2 # POP version 2
pop2 109/udp pop-2
pop3 110/tcp pop-3 # POP version 3
pop3 110/udp pop-3
sunrpc 111/tcp portmapper # RPC 4.0 portmapper
sunrpc 111/udp portmapper
auth 113/tcp authentication tap ident
sftp 115/tcp
uucp-path 117/tcp
nntp 119/tcp readnews untp # USENET News Transfer Protocol
ntp 123/tcp
ntp 123/udp # Network Time Protocol
pwdgen 129/tcp # PWDGEN service
pwdgen 129/udp # PWDGEN service
loc-srv 135/tcp epmap # Location Service
loc-srv 135/udp epmap
netbios-ns 137/tcp # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp # NETBIOS session service
netbios-ssn 139/udp
imap2 143/tcp imap # Interim Mail Access P 2 and 4
imap2 143/udp imap
snmp 161/tcp # Simple Net Mgmt Protocol
snmp 161/udp # Simple Net Mgmt Protocol
snmp-trap 162/tcp snmptrap # Traps for SNMP
snmp-trap 162/udp snmptrap # Traps for SNMP
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
cmip-man 163/udp
cmip-agent 164/tcp
cmip-agent 164/udp
mailq 174/tcp # Mailer transport queue for Zmailer
mailq 174/udp # Mailer transport queue for Zmailer
xdmcp 177/tcp # X Display Mgr. Control Proto
xdmcp 177/udp
nextstep 178/tcp NeXTStep NextStep # NeXTStep window
nextstep 178/udp NeXTStep NextStep # server
bgp 179/tcp # Border Gateway Protocol
bgp 179/udp
prospero 191/tcp # Cliff Neuman's Prospero
prospero 191/udp
irc 194/tcp # Internet Relay Chat
irc 194/udp
smux 199/tcp # SNMP Unix Multiplexer
smux 199/udp
at-rtmp 201/tcp # AppleTalk routing
at-rtmp 201/udp
at-nbp 202/tcp # AppleTalk name binding
at-nbp 202/udp
at-echo 204/tcp # AppleTalk echo
at-echo 204/udp
at-zis 206/tcp # AppleTalk zone information
at-zis 206/udp
qmtp 209/tcp # Quick Mail Transfer Protocol
qmtp 209/udp # Quick Mail Transfer Protocol
z3950 210/tcp wais # NISO Z39.50 database
z3950 210/udp wais
ipx 213/tcp # IPX
ipx 213/udp
imap3 220/tcp # Interactive Mail Access
imap3 220/udp # Protocol v3
pawserv 345/tcp # Perf Analysis Workbench
pawserv 345/udp
zserv 346/tcp # Zebra server
zserv 346/udp
fatserv 347/tcp # Fatmen Server
fatserv 347/udp
rpc2portmap 369/tcp
rpc2portmap 369/udp # Coda portmapper
codaauth2 370/tcp
codaauth2 370/udp # Coda authentication server
clearcase 371/tcp Clearcase
clearcase 371/udp Clearcase
ulistserv 372/tcp # UNIX Listserv
ulistserv 372/udp
ldap 389/tcp # Lightweight Directory Access Protocol
ldap 389/udp
imsp 406/tcp # Interactive Mail Support Protocol
imsp 406/udp
https 443/tcp # http protocol over TLS/SSL
https 443/udp
snpp 444/tcp # Simple Network Paging Protocol
snpp 444/udp
microsoft-ds 445/tcp # Microsoft Naked CIFS
microsoft-ds 445/udp
saft 487/tcp # Simple Asynchronous File Transfer
saft 487/udp
isakmp 500/tcp # IPsec - Internet Security Association
isakmp 500/udp # and Key Management Protocol
rtsp 554/tcp # Real Time Stream Control Protocol
rtsp 554/udp # Real Time Stream Control Protocol
nqs 607/tcp # Network Queuing system
nqs 607/udp
npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS
npmp-local 610/udp dqs313_qmaster
npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS
npmp-gui 611/udp dqs313_execd
hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS
hmmp-ind 612/udp dqs313_intercell
ipp 631/tcp # Internet Printing Protocol
ipp 631/udp
#
# UNIX specific services
#
exec 512/tcp
biff 512/udp comsat
login 513/tcp
who 513/udp whod
shell 514/tcp cmd # no passwords used
syslog 514/udp
printer 515/tcp spooler # line printer spooler
talk 517/udp
ntalk 518/udp
route 520/udp router routed # RIP
timed 525/udp timeserver
tempo 526/tcp newdate
courier 530/tcp rpc
conference 531/tcp chat
netnews 532/tcp readnews
netwall 533/udp # for emergency broadcasts
gdomap 538/tcp # GNUstep distributed objects
gdomap 538/udp
uucp 540/tcp uucpd # uucp daemon
klogin 543/tcp # Kerberized `rlogin' (v5)
kshell 544/tcp krcmd # Kerberized `rsh' (v5)
afpovertcp 548/tcp # AFP over TCP
afpovertcp 548/udp
remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem
nntps 563/tcp snntp # NNTP over SSL
nntps 563/udp snntp
submission 587/tcp # Submission [RFC2476]
submission 587/udp
ldaps 636/tcp # LDAP over SSL
ldaps 636/udp
tinc 655/tcp # tinc control port
tinc 655/udp
silc 706/tcp
silc 706/udp
kerberos-adm 749/tcp # Kerberos `kadmin' (v5)
#
webster 765/tcp # Network dictionary
webster 765/udp
rsync 873/tcp
rsync 873/udp
ftps-data 989/tcp # FTP over SSL (data)
ftps 990/tcp
telnets 992/tcp # Telnet over SSL
telnets 992/udp
imaps 993/tcp # IMAP over SSL
imaps 993/udp
ircs 994/tcp # IRC over SSL
ircs 994/udp
pop3s 995/tcp # POP-3 over SSL
pop3s 995/udp
#
# From ``Assigned Numbers'':
#
#> The Registered Ports are not controlled by the IANA and on most systems
#> can be used by ordinary user processes or programs executed by ordinary
#> users.
#
#> Ports are used in the TCP [45,106] to name the ends of logical
#> connections which carry long term conversations. For the purpose of
#> providing services to unknown callers, a service contact port is
#> defined. This list specifies the port used by the server process as its
#> contact port. While the IANA can not control uses of these ports it
#> does register or list uses of these ports as a convienence to the
#> community.
#
socks 1080/tcp # socks proxy server
socks 1080/udp
proofd 1093/tcp
proofd 1093/udp
rootd 1094/tcp
rootd 1094/udp
openvpn 1194/tcp
openvpn 1194/udp
rmiregistry 1099/tcp # Java RMI Registry
rmiregistry 1099/udp
kazaa 1214/tcp
kazaa 1214/udp
nessus 1241/tcp # Nessus vulnerability
nessus 1241/udp # assessment scanner
lotusnote 1352/tcp lotusnotes # Lotus Note
lotusnote 1352/udp lotusnotes
ms-sql-s 1433/tcp # Microsoft SQL Server
ms-sql-s 1433/udp
ms-sql-m 1434/tcp # Microsoft SQL Monitor
ms-sql-m 1434/udp
ingreslock 1524/tcp
ingreslock 1524/udp
prospero-np 1525/tcp # Prospero non-privileged
prospero-np 1525/udp
datametrics 1645/tcp old-radius
datametrics 1645/udp old-radius
sa-msg-port 1646/tcp old-radacct
sa-msg-port 1646/udp old-radacct
kermit 1649/tcp
kermit 1649/udp
l2f 1701/tcp l2tp
l2f 1701/udp l2tp
radius 1812/tcp
radius 1812/udp
radius-acct 1813/tcp radacct # Radius Accounting
radius-acct 1813/udp radacct
unix-status 1957/tcp # remstats unix-status server
log-server 1958/tcp # remstats log server
remoteping 1959/tcp # remstats remoteping server
nfsd 2049/tcp nfs # NFS server daemon
nfsd 2049/udp nfs # NFS server daemon
rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99
rtcm-sc104 2101/udp
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp
venus 2430/tcp # codacon port
venus 2430/udp # Venus callback/wbc interface
venus-se 2431/tcp # tcp side effects
venus-se 2431/udp # udp sftp side effect
codasrv 2432/tcp # not used
codasrv 2432/udp # server port
codasrv-se 2433/tcp # tcp side effects
codasrv-se 2433/udp # udp sftp side effect
mon 2583/tcp # MON
mon 2583/udp
dict 2628/tcp # Dictionary server
dict 2628/udp
gpsd 2947/tcp
gpsd 2947/udp
gds_db 3050/tcp # InterBase server
gds_db 3050/udp
icpv2 3130/tcp icp # Internet Cache Protocol
icpv2 3130/udp icp
mysql 3306/tcp
mysql 3306/udp
nut 3493/tcp # Network UPS Tools
nut 3493/udp
distcc 3632/tcp # distributed compiler
distcc 3632/udp
daap 3689/tcp # Digital Audio Access Protocol
daap 3689/udp
svn 3690/tcp subversion # Subversion protocol
svn 3690/udp subversion
iax 4569/tcp # Inter-Asterisk eXchange
iax 4569/udp
radmin-port 4899/tcp # RAdmin Port
radmin-port 4899/udp
rfe 5002/udp # Radio Free Ethernet
rfe 5002/tcp
sip 5060/tcp # Session Initiation Protocol
sip 5060/udp
sip-tls 5061/tcp
sip-tls 5061/udp
xmpp-client 5222/tcp jabber-client # Jabber Client Connection
xmpp-client 5222/udp jabber-client
xmpp-server 5269/tcp jabber-server # Jabber Server Connection
xmpp-server 5269/udp jabber-server
cfengine 5308/tcp
cfengine 5308/udp
postgresql 5432/tcp postgres # PostgreSQL Database
postgresql 5432/udp postgres
x11 6000/tcp x11-0 # X Window System
x11 6000/udp x11-0
x11-1 6001/tcp
x11-1 6001/udp
x11-2 6002/tcp
x11-2 6002/udp
x11-3 6003/tcp
x11-3 6003/udp
x11-4 6004/tcp
x11-4 6004/udp
x11-5 6005/tcp
x11-5 6005/udp
x11-6 6006/tcp
x11-6 6006/udp
x11-7 6007/tcp
x11-7 6007/udp
gnutella-svc 6346/tcp # gnutella
gnutella-svc 6346/udp
gnutella-rtr 6347/tcp # gnutella
gnutella-rtr 6347/udp
afs3-fileserver 7000/tcp bbs # file server itself
afs3-fileserver 7000/udp bbs
afs3-callback 7001/tcp # callbacks to cache managers
afs3-callback 7001/udp
afs3-prserver 7002/tcp # users & groups database
afs3-prserver 7002/udp
afs3-vlserver 7003/tcp # volume location database
afs3-vlserver 7003/udp
afs3-kaserver 7004/tcp # AFS/Kerberos authentication
afs3-kaserver 7004/udp
afs3-volser 7005/tcp # volume managment server
afs3-volser 7005/udp
afs3-errors 7006/tcp # error interpretation service
afs3-errors 7006/udp
afs3-bos 7007/tcp # basic overseer process
afs3-bos 7007/udp
afs3-update 7008/tcp # server-to-server updater
afs3-update 7008/udp
afs3-rmtsys 7009/tcp # remote cache manager service
afs3-rmtsys 7009/udp
font-service 7100/tcp xfs # X Font Service
font-service 7100/udp xfs
bacula-dir 9101/tcp # Bacula Director
bacula-dir 9101/udp
bacula-fd 9102/tcp # Bacula File Daemon
bacula-fd 9102/udp
bacula-sd 9103/tcp # Bacula Storage Daemon
bacula-sd 9103/udp
amanda 10080/tcp # amanda backup services
amanda 10080/udp
hkp 11371/tcp # OpenPGP HTTP Keyserver
hkp 11371/udp # OpenPGP HTTP Keyserver
bprd 13720/tcp # VERITAS NetBackup
bprd 13720/udp
bpdbm 13721/tcp # VERITAS NetBackup
bpdbm 13721/udp
bpjava-msvc 13722/tcp # BP Java MSVC Protocol
bpjava-msvc 13722/udp
vnetd 13724/tcp # Veritas Network Utility
vnetd 13724/udp
bpcd 13782/tcp # VERITAS NetBackup
bpcd 13782/udp
vopied 13783/tcp # VERITAS NetBackup
vopied 13783/udp
wnn6 22273/tcp # wnn6
wnn6 22273/udp
#
# Datagram Delivery Protocol services
#
rtmp 1/ddp # Routing Table Maintenance Protocol
nbp 2/ddp # Name Binding Protocol
echo 4/ddp # AppleTalk Echo Protocol
zip 6/ddp # Zone Information Protocol
#=========================================================================
# The remaining port numbers are not as allocated by IANA.
#=========================================================================
# Kerberos (Project Athena/MIT) services
# Note that these are for Kerberos v4, and are unofficial. Sites running
# v4 should uncomment these and comment out the v5 entries above.
#
kerberos4 750/udp kerberos-iv kdc # Kerberos (server)
kerberos4 750/tcp kerberos-iv kdc
kerberos_master 751/udp # Kerberos authentication
kerberos_master 751/tcp
passwd_server 752/udp # Kerberos passwd server
krb_prop 754/tcp krb5_prop hprop # Kerberos slave propagation
krbupdate 760/tcp kreg # Kerberos registration
kpasswd 761/tcp kpwd # Kerberos "passwd"
swat 901/tcp # swat
kpop 1109/tcp # Pop with Kerberos
knetd 2053/tcp # Kerberos de-multiplexor
zephyr-srv 2102/udp # Zephyr server
zephyr-clt 2103/udp # Zephyr serv-hm connection
zephyr-hm 2104/udp # Zephyr hostmanager
eklogin 2105/tcp # Kerberos encrypted rlogin
# Hmmm. Are we using Kv4 or Kv5 now? Worrying.
# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000)
kx 2111/tcp # X over Kerberos
iprop 2121/tcp # incremental propagation
#
# Unofficial but necessary (for NetBSD) services
#
supfilesrv 871/tcp # SUP server
supfiledbg 1127/tcp # SUP debugging
#
# Services added for the Debian GNU/Linux distribution
#
linuxconf 98/tcp # LinuxConf
poppassd 106/tcp # Eudora
poppassd 106/udp
ssmtp 465/tcp smtps # SMTP over SSL
moira_db 775/tcp # Moira database
moira_update 777/tcp # Moira update protocol
moira_ureg 779/udp # Moira user registration
spamd 783/tcp # spamassassin daemon
omirr 808/tcp omirrd # online mirror
omirr 808/udp omirrd
customs 1001/tcp # pmake customs server
customs 1001/udp
skkserv 1178/tcp # skk jisho server port
predict 1210/udp # predict -- satellite tracking
rmtcfg 1236/tcp # Gracilis Packeten remote config server
wipld 1300/tcp # Wipl network monitor
xtel 1313/tcp # french minitel
xtelw 1314/tcp # french minitel
support 1529/tcp # GNATS
sieve 2000/tcp # Sieve mail filter daemon
cfinger 2003/tcp # GNU Finger
ndtp 2010/tcp # Network dictionary transfer protocol
frox 2121/tcp # frox: caching ftp proxy
ninstall 2150/tcp # ninstall service
ninstall 2150/udp
zebrasrv 2600/tcp # zebra service
zebra 2601/tcp # zebra vty
ripd 2602/tcp # ripd vty (zebra)
ripngd 2603/tcp # ripngd vty (zebra)
ospfd 2604/tcp # ospfd vty (zebra)
bgpd 2605/tcp # bgpd vty (zebra)
ospf6d 2606/tcp # ospf6d vty (zebra)
ospfapi 2607/tcp # OSPF-API
isisd 2608/tcp # ISISd vty (zebra)
afbackup 2988/tcp # Afbackup system
afbackup 2988/udp
afmbackup 2989/tcp # Afmbackup system
afmbackup 2989/udp
xtell 4224/tcp # xtell server
fax 4557/tcp # FAX transmission service (old)
hylafax 4559/tcp # HylaFAX client-server protocol (new)
distmp3 4600/tcp # distmp3host daemon
munin 4949/tcp lrrd # Munin
enbd-cstatd 5051/tcp # ENBD client statd
enbd-sstatd 5052/tcp # ENBD server statd
pcrd 5151/tcp # PCR-1000 Daemon
noclog 5354/tcp # noclogd with TCP (nocol)
noclog 5354/udp # noclogd with UDP (nocol)
hostmon 5355/tcp # hostmon uses TCP (nocol)
hostmon 5355/udp # hostmon uses UDP (nocol)
rplay 5555/udp # RPlay audio service
rplay 5555/tcp
rptp 5556/udp # Remote Play Transfer Protocol
rptp 5556/tcp
nsca 5667/tcp # Nagios Agent - NSCA
mrtd 5674/tcp # MRT Routing Daemon
bgpsim 5675/tcp # MRT Routing Simulator
canna 5680/tcp # cannaserver
sane-port 6566/tcp sane saned # SANE network scanner daemon
ircd 6667/tcp # Internet Relay Chat
zope-ftp 8021/tcp # zope management by ftp
webcache 8080/tcp # WWW caching service
tproxy 8081/tcp # Transparent Proxy
omniorb 8088/tcp # OmniORB
omniorb 8088/udp
clc-build-daemon 8990/tcp # Common lisp build daemon
xinetd 9098/tcp
mandelspawn 9359/udp mandelbrot # network mandelbrot
zope 9673/tcp # zope server
kamanda 10081/tcp # amanda backup services (Kerberos)
kamanda 10081/udp
amandaidx 10082/tcp # amanda backup services
amidxtape 10083/tcp # amanda backup services
smsqp 11201/tcp # Alamin SMS gateway
smsqp 11201/udp
xpilot 15345/tcp # XPilot Contact Port
xpilot 15345/udp
sgi-cmsd 17001/udp # Cluster membership services daemon
sgi-crsd 17002/udp
sgi-gcd 17003/udp # SGI Group membership daemon
sgi-cad 17004/tcp # Cluster Admin daemon
isdnlog 20011/tcp # isdn logging system
isdnlog 20011/udp
vboxd 20012/tcp # voice box system
vboxd 20012/udp
binkp 24554/tcp # binkp fidonet protocol
asp 27374/tcp # Address Search Protocol
asp 27374/udp
dircproxy 57000/tcp # Detachable IRC Proxy
tfido 60177/tcp # fidonet EMSI over telnet
fido 60179/tcp # fidonet EMSI over TCP
# Local services
streamsec 31335/tcp
streamavpes 31336/tcp
streamps 31337/tcp
streampes 31338/tcp
streamts 31339/tcp
udpstreampes 31340/tcp
udpstreampes 31341/udp
streamtsfile 31342/tcp
streames 31343/tcp

2
skel-root/armbox/bre2ze4k/etc/shells

@ -0,0 +1,2 @@
/bin/sh
/bin/bash

8
skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-log-only

@ -0,0 +1,8 @@
#!/bin/sh
# log only when requested
[ $# -eq 0 ] && exit 0
. /etc/init.d/globals
env | egrep -v '^(HOME|PATH|PWD|CONFIG_.*)=') | LOGDEBUG

10
skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-modprobe

@ -0,0 +1,10 @@
#!/bin/sh
[ "$ACTION" = remove ] && action='-r -a'
. /etc/init.d/globals
for module in "$@"; do
modprobe $action $module &&
LOGINFO "${ACTION:-scan} module $module succeed"
done

6
skel-root/armbox/bre2ze4k/lib/mdev/common/mdev-module

@ -0,0 +1,6 @@
#!/bin/sh
. /etc/init.d/globals
LOGINFO "${ACTION:-scan} module chain $@"
/lib/mdev/common/mdev-modprobe "$@"

153
skel-root/armbox/bre2ze4k/lib/mdev/fs/mdev-mmcblk

@ -0,0 +1,153 @@
#!/bin/sh
. /etc/init.d/globals
MOUNTBASE=/mnt
MOUNTPOINT="$MOUNTBASE/$MDEV"
ROOTDEV=$(readlink /dev/root)
BLOCKS="/sys/block/mmcblk0/mmcblk0p*/uevent"
KERNELDEV=""
K_PARTNAME=""
ROOTFSDEV=""
R_PARTNAME=""
ROOTSUBDIR=""
SUBDIRBOOT=0
# to use partition names in non-subdirboot layout, set it to 1
USE_PARTNAMES=0
# check partition names
DEVNAME=""
PARTNAME=""
for i in $BLOCKS; do
if [ "$i" != "$BLOCKS" ]; then
DEVNAME=$(cat $i | grep DEVNAME | cut -d '=' -f 2)
if [ "$DEVNAME" == "$MDEV" ]; then
PARTNAME=$(cat $i | grep PARTNAME | cut -d '=' -f 2)
if [ -n "$(echo $PARTNAME | grep 'kernel')" ]; then
KERNELDEV=$DEVNAME
K_PARTNAME=$PARTNAME
break
elif [ -n "$(echo $PARTNAME | grep 'rootfs')" ]; then
ROOTFSDEV=$DEVNAME
R_PARTNAME=$PARTNAME
if [ -n "$(echo $PARTNAME | grep 'linuxrootfs')" ]; then
R_PARTNAME="linuxrootfs1"
SUBDIRBOOT=1
fi
break
elif [ -n "$(echo $PARTNAME | grep 'userdata')" ]; then
ROOTFSDEV=$DEVNAME
R_PARTNAME=$PARTNAME
SUBDIRBOOT=1
break
fi
fi
fi
done
if [ "$SUBDIRBOOT" == "1" -o "$USE_PARTNAMES" == "1" ]; then
MOUNTPOINT="$MOUNTBASE/$R_PARTNAME"
elif [ "$PARTNAME" == "storage" ]; then
MOUNTPOINT="$MOUNTBASE/$PARTNAME"
fi
# do not add or remove root device again...
[ "$ROOTDEV" = "$MDEV" -a "$R_PARTNAME" != "userdata" ] && exit 0
if [ -e /tmp/.nomdevmount ]; then
LOGINFO "no action on $MDEV -- /tmp/.nomdevmount exists"
exit 0
fi
case "$ACTION" in
add)
# do not mount kernel partitions
if [ "$KERNELDEV" == "$MDEV" ]; then
LOGINFO "[$ACTION] /dev/$MDEV is a kernel partition [$K_PARTNAME] - not mounting."
exit 0
fi
if [ "$PARTNAME" == "swap" ]; then
mkswap /dev/$MDEV
swapon /dev/$MDEV
exit 0
fi
if [ "$SUBDIRBOOT" == "1" ]; then
if grep -q $MOUNTPOINT /proc/mounts; then
LOGINFO "/dev/$MDEV already mounted [$R_PARTNAME] - not mounting again"
exit 0
fi
mkdir -p /tmp/$MDEV
mount -t auto /dev/$MDEV /tmp/$MDEV 2>&1 >/dev/null
RET=$?
[ $RET != 0 ] && LOGWARN "mount /dev/$MDEV to /tmp/$MDEV failed with $RET" && rmdir /tmp/$MDEV
if [ "$R_PARTNAME" == "linuxrootfs1" ]; then
LOGINFO "mounting /dev/$MDEV [$R_PARTNAME] to $MOUNTPOINT"
mkdir -p $MOUNTPOINT
mount --bind /tmp/$MDEV/linuxrootfs1 $MOUNTPOINT
elif [ "$R_PARTNAME" == "userdata" ]; then
# parse cmdline for rootsubdir
for param in $(cat /proc/cmdline); do
if [ -n "$(echo $param | grep rootsubdir)" ]; then
ROOTSUBDIR=$(echo $param | cut -d '=' -f 2)
break
fi
done
for i in /tmp/$MDEV/*; do
if [ -n "$(echo $i | grep linuxrootfs)" ]; then
if [ "$ROOTSUBDIR" == "$(basename $i)" ]; then
LOGINFO "/dev/$MDEV rootsubdir [$ROOTSUBDIR] is already mounted as root"
continue
fi
MOUNTPOINT="$MOUNTBASE/$(basename $i)"
if grep -q $MOUNTPOINT /proc/mounts; then
LOGINFO "/dev/$MDEV already mounted [$(basename $i)] - not mounting again"
else
LOGINFO "mounting /dev/$MDEV [$(basename $i)] to $MOUNTPOINT"
mkdir -p $MOUNTPOINT
mount --bind /tmp/$MDEV/$(basename $i) $MOUNTPOINT
fi
fi
done
fi
umount -lf /tmp/$MDEV
RET=$?
if [ $RET = 0 ]; then
rmdir /tmp/$MDEV
else
LOGWARN "umount /tmp/$MDEV failed with $RET"
fi
else
if grep -q "/dev/$MDEV" /proc/mounts; then
LOGINFO "/dev/$MDEV already mounted - not mounting again"
exit 0
fi
LOGINFO "[$ACTION] mounting /dev/$MDEV to $MOUNTPOINT"
# remove old mountpoint symlinks we might have for this device
rm -f $MOUNTPOINT
mkdir -p $MOUNTPOINT
mount -t auto /dev/$MDEV $MOUNTPOINT 2>&1 >/dev/null
RET=$?
if [ $RET != 0 ]; then
LOGWARN "mount /dev/$MDEV $MOUNTPOINT failed with $RET"
LOGWARN " $OUT1"
rmdir $MOUNTPOINT
fi
fi
;;
# I think never comes a 'remove' from mdev, because never the mmcblock will be removed
# It can be used for manually ( or per script ) umounting
remove)
LOGINFO "[$ACTION] unmounting $MOUNTBASE/$MDEV"
grep -q "$MOUNTBASE/$MDEV " /proc/mounts || exit 0 # not mounted...
umount -lf $MOUNTBASE/$MDEV
RET=$?
if [ $RET = 0 ]; then
rmdir $MOUNTBASE/$MDEV
else
LOGWARN "umount $MOUNTBASE/$MDEV failed with $RET"
fi
;;
esac

117
skel-root/armbox/bre2ze4k/lib/mdev/fs/mdev-mount

@ -0,0 +1,117 @@
#!/bin/sh
# based on script from http://gitorious.org/neutrino-hd/buildsystem-cs
. /etc/init.d/globals
MOUNTBASE=/media
MOUNTPOINT="$MOUNTBASE/$MDEV"
ROOTDEV=$(readlink /dev/root)
# do not add or remove root device again...
[ "$ROOTDEV" = "$MDEV" ] && exit 0
if [ -e /tmp/.nomdevmount ]; then
LOGINFO "no action on $MDEV -- /tmp/.nomdevmount exists"
exit 0
fi
create_symlinks() {
DEVBASE=${MDEV:0:3} # first 3 characters
PARTNUM=${MDEV:3} # characters 4-
if [ -e /sys/block/$DEVBASE/device/model ]; then # don't read if blockdevice not present
read MODEL < /sys/block/$DEVBASE/device/model
fi
MODEL=${MODEL// /_} # replace ' ' with '_'
OLDPWD=$PWD
cd $MOUNTBASE
if which blkid > /dev/null; then
BLKID=$(blkid /dev/$MDEV)
eval ${BLKID#*:}
fi
if [ -n "$LABEL" ]; then
LABEL=${LABEL// /_} # replace ' ' with '_'
rm -f "$LABEL"
ln -s $MDEV "$LABEL"
fi
if [ -n "$UUID" ]; then
LINK="${TYPE}${TYPE:+-}${UUID}"
rm -f "${LINK}"
ln -s $MDEV "${LINK}"
fi
if [ -n "$MODEL" ]; then
LINK="${MODEL}${PARTNUM:+-}${PARTNUM}"
rm -f "${LINK}"
ln -s $MDEV "${LINK}"
fi
cd $OLDPWD
}
remove_symlinks() {
OLDPWD=$PWD
cd $MOUNTBASE
for i in *; do
[ -L "$i" ] || continue
TARGET=$(readlink "$i")
if [ "$TARGET" = "$MDEV" ]; then
rm "$i"
fi
done
cd $OLDPWD
}
case "$ACTION" in
add)
if [ ${#MDEV} = 3 ]; then # sda, sdb, sdc => whole drive
PARTS=$(sed -n "/ ${MDEV}[0-9]$/{s/ *[0-9]* *[0-9]* * [0-9]* //;p}" /proc/partitions)
if [ -n "$PARTS" ]; then
LOGINFO "drive has partitions $PARTS, not trying to mount $MDEV"
exit 0
fi
fi
if grep -q "/dev/$MDEV" /proc/mounts; then
LOGINFO "/dev/$MDEV already mounted - not mounting again"
exit 0
fi
LOGINFO "[$ACTION] mounting /dev/$MDEV to $MOUNTPOINT"
# remove old mountpoint symlinks we might have for this device
rm -f $MOUNTPOINT
mkdir -p $MOUNTPOINT
for i in 1 2 3 4 5 6 7 8 9; do # retry 9 times for slow devices
# LOGINFO "mounting /dev/$MDEV to $MOUNTPOINT try $i"
OUT1=$(mount -t auto /dev/$MDEV $MOUNTPOINT 2>&1 >/dev/null)
RET1=$?
[ $RET1 = 0 ] && break
sleep 1
done
if [ $RET1 = 0 ]; then
create_symlinks
echo 1 > /proc/stb/lcd/symbol_hdd
else
LOGWARN "mount /dev/$MDEV $MOUNTPOINT failed with $RET1"
LOGWARN " $OUT1"
rmdir $MOUNTPOINT
fi
if [ -x /bin/mdev_helper ]; then
/bin/mdev_helper
fi
;;
remove)
LOGINFO "[$ACTION] unmounting $MOUNTBASE/$MDEV"
grep -q "^/dev/$MDEV " /proc/mounts || exit 0 # not mounted...
umount -lf $MOUNTBASE/$MDEV
RET=$?
if [ $RET = 0 ]; then
rmdir $MOUNTPOINT
remove_symlinks
if ! grep -q "[hs]d[a-z][0-9]" /proc/mounts; then
echo 0 > /proc/stb/lcd/symbol_hdd
fi
else
LOGWARN "umount $MOUNTBASE/$MDEV failed with $RET"
fi
if [ -x /bin/mdev_helper ]; then
/bin/mdev_helper
fi
;;
esac

19
skel-root/armbox/bre2ze4k/lib/mdev/net/mdev-wlan

@ -0,0 +1,19 @@
#!/bin/sh
. /etc/init.d/globals
case "$ACTION" in
add|"")
if [ -s /etc/wpa_supplicant.conf ]; then
LOGINFO "trying to bring $MDEV up"
ifup $MDEV
else
LOGWARN "/etc/wpa_supplicant.conf missing or empty, not trying to bring $MDEV up"
fi
;;
remove)
LOGINFO "trying to bring $MDEV down"
ifdown $MDEV
;;
esac

31
skel-root/armbox/bre2ze4k/lib/mdev/usb/coldplug-setenv

@ -0,0 +1,31 @@
#!/bin/false
for path in $(find /sys/devices -name "$MDEV" 2>/dev/null); do
DEVPATH=${path#/sys}
done
MODALIAS=$(cat /sys${DEVPATH}/modalias 2>/dev/null)
parse_interface () {
printf '%d/%d/%d' $(sed 's/.*dp[0-F]\{2\}//;s/[iscp]\+/ 0x/g')
}
parse_type () {
printf '%d/%d/%d' $(sed 's/.*d[0-9]\{4\}//;s/ic.*//;s/[dscp]\+/ 0x/g')
}
parse_product () {
sed 's!^usb:\(.*\)dc.*!\1!;s![vpd]!/!g;s!/0\{1,3\}!/!g;s!^/!!;y!ABCDEF!abcdef!'
}
TYPE=$(echo $MODALIAS | parse_type)
PRODUCT=$(echo $MODALIAS | parse_product)
INTERFACE=$(echo $MODALIAS | parse_interface)
for var in DEVPATH MODALIAS TYPE PRODUCT INTERFACE; do
if [ -z "$(eval "echo \$${var}")" ]; then
LOGERROR "Could not set uevent environment variable $var"
exit 1
fi
done
unset path var
unset -f parse_type parse_interface parse_product

135
skel-root/armbox/bre2ze4k/lib/mdev/usb/mdev-usb

@ -0,0 +1,135 @@
#!/bin/sh
. /etc/init.d/globals
# setup environment for coldplug events
[ -z "$ACTION" ] && . /lib/mdev/usb/coldplug-setenv
# get proper product and manufacturer description (only works for ACTION=add)
[ -z "$DEVPATH" ] && LOGERROR 'uevent environment variable DEVPATH is unset' && exit 1
if [ -d /sys${DEVPATH} ]; then
cd /sys${DEVPATH}/..
for f in product manufacturer id[PV]*; do
[ -r $f ] && eval "$f='$(cat $f)'"
done
cd $MDEV
fi
# get $idVendor and $idProduct from $MODALIAS if necessary
idVendor=${idVendor:-${MODALIAS:5:4}}
idProduct=${idProduct:-${MODALIAS:10:4}}
# set $idVendor and $idProduct lower case and w/o leading zeros
idVendor=$(echo ${idVendor} | sed 's/^[0]*//' | tr [:upper:] [:lower:])
idProduct=$(echo ${idProduct} | sed 's/^[0]*//' | tr [:upper:] [:lower:])
channel=${MDEV%:1.0}
LOGINFO "${ACTION} $channel ${manufacturer:-$idVendor} ${product:-$idProduct}"
# for debug
#LOGINFO "ACTION=${ACTION}"
#LOGINFO "MDEV=${MDEV}"
#LOGINFO "DEVPATH=${DEVPATH}"
#LOGINFO "INTERFACE=${INTERFACE}"
#LOGINFO "MODALIAS=${MODALIAS}"
#LOGINFO "PRODUCT=${product} idProduct=${idProduct}"
#LOGINFO "MANUFACTURER=${manufacturer} idVendor=${idVendor}"
# ignore controllers and hubs
cat /sys/bus/usb/devices/*/bDeviceClass | grep -q -v '02\|09'
RET=$?
case "$ACTION" in
add)
if [ $RET = 0 ]; then
echo 1 > /proc/stb/lcd/symbol_usb
fi
;;
remove)
if [ $RET = 1 ]; then
echo 0 > /proc/stb/lcd/symbol_usb
fi
;;
esac
# http://en.wikipedia.org/wiki/Universal_Serial_Bus#Device_classes
# http://www.usb.org/developers/defined_class
[ 0 -eq "${TYPE%%/*}" ] && TYPE=$INTERFACE
LOGINFO "type ${TYPE}"
case $TYPE in
1/*/*)
LOGINFO "$channel USB Audio Interface"
;;
2/*/*)
LOGINFO "$channel Communications and CDC Control"
;;
3/*/*)
LOGINFO "$channel HID (Human Interface Device)"
# precheck vendor id for unsupported DPF in bootloader mode
if [ "$idVendor" == "1908" ]; then
service extdisplay ${ACTION} ${MDEV} ${idVendor} ${idProduct}
fi
;;
5/*/*)
LOGINFO "$channel Physical Interface"
;;
6/*/*)
LOGINFO "$channel Image Interface"
;;
7/*/*)
LOGINFO "$channel Printer Interface"
;;
8/*/*)
LOGINFO "$channel Mass Storage Interface"
# precheck vendor id for supported SPFs
if [ "$idVendor" == "4e8" ]; then
service extdisplay ${ACTION} ${MDEV} ${idVendor} ${idProduct}
fi
;;
9/*/*)
LOGINFO "$channel HUB Device"
;;
10/*/*)
LOGINFO "$channel CDC Data Interface"
;;
11/*/*)
LOGINFO "$channel Smart Card Interface"
;;
13/*/*)
LOGINFO "$channel Content Security Interface"
;;
14/*/*)
LOGINFO "$channel Video Interface"
;;
15/*/*)
LOGINFO "$channel Personal Healthcare Interface"
;;
16/*/*)
LOGINFO "$channel usb Audio/Video Devices Interface"
;;
17/*/*)
LOGINFO "$channel Billboard Device Class"
;;
220/*/*)
LOGINFO "$channel Diagnostic Device"
;;
224/*/*)
LOGINFO "$channel Wireless Controller Interface"
;;
239/*/*)
LOGINFO "$channel Miscellaneous"
;;
254/*/*)
LOGINFO "$channel Application Specific"
;;
255/*/*)
LOGINFO "$channel Vendor Specific"
# pre-check vendor id for supported DPFs and SPFs
if [ "$idVendor" = "1908" -o "$idVendor" == "4e8" ]; then
service extdisplay ${ACTION} ${MDEV} ${idVendor} ${idProduct}
fi
;;
*)
LOGINFO "FALLBACK: $channel device $MODALIAS"
;;
esac
/lib/mdev/common/mdev-modprobe $MODALIAS
Loading…
Cancel
Save