diff options
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/MKNOD.hpux | 59 | ||||
-rwxr-xr-x | misc/MKNOD.hpux-800 | 92 | ||||
-rwxr-xr-x | misc/burnstuff | 25 | ||||
-rw-r--r-- | misc/make_diskt@2.sh | 56 | ||||
-rwxr-xr-x | misc/rc.pp | 76 | ||||
-rw-r--r-- | misc/shared_lib_patch_incomplete.diff | 138 |
6 files changed, 446 insertions, 0 deletions
diff --git a/misc/MKNOD.hpux b/misc/MKNOD.hpux new file mode 100755 index 0000000..92f812a --- /dev/null +++ b/misc/MKNOD.hpux @@ -0,0 +1,59 @@ +#!/bin/sh +################################################################ +# make SCSI device files according to: man scsi_ctl +# +# Copyright (c) 1997 J. Schilling +################################################################ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; see the file COPYING. If not, write to the Free Software +# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +################################################################ + +mknod="echo mknod" +mkdir="echo mkdir -p" +chmod="echo chmod" + +mknod="/usr/sbin/mknod" +mkdir="mkdir -p" +chmod="chmod" + +scsi=/dev/scsi +rscsi=/dev/rscsi + +${mkdir} ${scsi} +${mkdir} ${rscsi} + +bus=0 +target=0 +lun=0 + +for bus in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do + for target in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do + for lun in 0 1 2 3 4 5 6 7; do +# +# Newer HP-UX versions seem to have +# /dev/rscsi/citxdy +# but it uses the "non-raw" interface type +# dev=c${bus}t${target}d${lun} +# We follow the HP-UX documentation and create +# /dev/rscsi/citxty with the raw bit set + + dev=c${bus}t${target}l${lun} + + $mknod ${scsi}/${dev} c 203 0x${bus}${target}${lun}00 + $chmod 0600 ${scsi}/${dev} + + $mknod ${rscsi}/${dev} c 203 0x${bus}${target}${lun}02 + $chmod 0600 ${rscsi}/${dev} + done + done +done diff --git a/misc/MKNOD.hpux-800 b/misc/MKNOD.hpux-800 new file mode 100755 index 0000000..f439412 --- /dev/null +++ b/misc/MKNOD.hpux-800 @@ -0,0 +1,92 @@ +#!/bin/sh +################################################################ +# mk node boot script for HP9000 800 series following man scsi_pt +# +# This script is provided WITHOUT ANY WARRANTY. +################################################################ + +PATH=/sbin:/usr/sbin:/usr/bin:. +export PATH + +case $1 in + +start_msg) + echo "Creating SCSI passthru (spt) driver nodes" + ;; + +stop_msg) + echo "Removing SCSI passthru (spt) driver nodes" + ;; + +start) + + hpser=`uname -m | awk -F / '{print substr($2, 1, 1);}'` + if [ $hpser -ne "8" ]; then + echo "spt driver only needed on HP 9000/800 series." + exit 0 + fi + + #mknod="echo mknod" + #mkdir="echo mkdir -p" + #chmod="echo chmod" + + mknod="/usr/sbin/mknod" + mkdir="mkdir -p" + chmod="chmod" + + sptlist="/tmp/spt.$$" + echo "Searching SCSI passthru drivers (spt) ..." + ioscan -kf -d spt | sed '1,2d' | awk '{print $3;}' > $sptlist + nctl=`wc -l < $sptlist` + echo "... found $nctl" + + if [ ! -s $sptlist ]; then + rm -f $sptlist + exit 0 + fi + + scsi=/dev/scsi + ${mkdir} ${scsi} + + rscsi=/dev/rscsi + ${mkdir} ${rscsi} + + cmajor=`lsdev -h -d spt | awk '{print $1;}'` + + for line in `cat $sptlist` ; do + + ctl=`echo $line | awk -F . '{print $1;}'` + bus=`ioscan -f -k -H $ctl -C ext_bus | sed '1,2d' | awk '{print $2;}'` + tgt=`echo $line | awk -F . '{print $2;}'` + hextgt=`printf "%x" $tgt` + + # make first scsi nodes + name="${scsi}/c${bus}t${tgt}l0" + echo "Creating $name" + ${mknod} $name c $cmajor 0x${bus}${hextgt}000 > /dev/null 2>&1 + ${chmod} 0600 $name > /dev/null 2>&1 + + # then rscsi nodes + rname="${rscsi}/c${bus}t${tgt}l0" + echo "Creating $rname" + # Old version, not working! + #${mknod} $rname c $cmajor 0x${bus}${hextgt}020 > /dev/null 2>&1 + ${mknod} $rname c $cmajor 0x${bus}${hextgt}000 > /dev/null 2>&1 + ${chmod} 0600 $rname > /dev/null 2>&1 + done + + rm -f $sptlist + exit 0 + + ;; + +stop) + ;; + +*) + echo usage: $0 "{start|stop}" + ;; +esac + +exit 0 + diff --git a/misc/burnstuff b/misc/burnstuff new file mode 100755 index 0000000..ce3cf82 --- /dev/null +++ b/misc/burnstuff @@ -0,0 +1,25 @@ +#!/bin/sh +# (C) Eduard Bloch, License: BSD, 3-clause +# very simple script to burn files on-the-fly in SAO mode; +# either from a certain directory, or from a list with graft-points +# ISO name is generated from the basename of the list/directory + +set -e + +case "$1" in + *.list) + name=${1%.list} + set -- -D -graft-points -path-list "$1" + ;; + *) + name="$1" + ;; +esac + +MOPTS=${MOPTS:-" -joliet-long -r -q -f -V $name "} +COPTS=${COPTS:-" fs=64m gracetime=5 -v -sao speed=16 -eject -multi -v -force - "} + +SIZE=$(genisoimage $MOPTS -print-size "$@")s + +echo "genisoimage $MOPTS $@ | wodim tsize=$SIZE $COPTS" +genisoimage $MOPTS "$@" | wodim tsize=$SIZE $COPTS diff --git a/misc/make_diskt@2.sh b/misc/make_diskt@2.sh new file mode 100644 index 0000000..a93c8ed --- /dev/null +++ b/misc/make_diskt@2.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# exit on all errors +set -e + +if [ ! -f "$1" ];then + echo "Usage: `basename $0` [imagefile.ext] [-o|-i]" + echo "-o will make the bottom of the image be on the outside of the disk" + echo "-i will make the bottom of the image be on the inside of the disk" + echo + echo "Image must be greyscale" + echo + echo "make sure the imagefile has the right x-y format" + echo "run cdrecord driveropts=tattooinfo -checkdrive" + echo "to find out" + exit 1 +fi + + +case "$2" in + -i) + convopts="-flip" + ;; + -o) + convopts="-flop" + ;; + *) + echo "error: arg2 must be -o or -i" + exit 1 + ;; +esac + +echo "Make sure the imagefile has the right size" +echo "run cdrecord dev=a,b,c driveropts=tattooinfo -checkdrive" +echo "to find out" +echo +echo -n "Converting $1 to disktattoo_image format: " + +## convert it tp ppm format +## note.. -flop = flip horizontally +convert $convopts "$1" "$1-TMP-$$.ppm" + +## We only need the data, which is the last line in a ppm file +## tail works mighty fine for this (insert evil dirty-coder-laughter here) +tail -n+4 "$1-TMP-$$.ppm" > "$1.disktattoo_image" + +## clean up like a good boy +rm "$1-TMP-$$.ppm" + +## notify user that we're done converting +echo "done" +echo + +## stop with stupid code commenting +echo "You may now burn '$1.disktattoo_image' to your cd with the command:" +echo "cdrecord driveropts=tattoofile=\"$1.disktattoo_image\" -checkdrive" diff --git a/misc/rc.pp b/misc/rc.pp new file mode 100755 index 0000000..734cfd5 --- /dev/null +++ b/misc/rc.pp @@ -0,0 +1,76 @@ +#!/bin/sh + +# +# Note: The adapter shell var must updated in order to reflect your actual hardware. +# The current value "friq" is the right value for the FreeCom PP adapter. +# See paride documentation for the list of other drivers. +# +adapter=friq + +case "$1" in + +'start') + echo "Starting Parallel Port IDE/ATAPI" + modprobe paride + modprobe "$adapter" +# modprobe pg +# modprobe pg verbose=2 drive0=0x378,0,0,-1,-1,0 + modprobe pg verbose=0 drive0=0x378,0,0,-1,-1,0 + ;; + +'stop') + echo "Stopping Parallel Port IDE/ATAPI" + rmmod pg + rmmod "$adapter" + rmmod paride + ;; + +*) + echo "Usage: rc.pp start|stop" +esac + +exit + +############################################################################### +When you load pg, you need to specify some parameters like: + + drive0=0x378,0,0,4,0,0 + +The parameters are: + + <prt>,<pro>,<uni>,<mod>,<slv>,<dly> + + Where, + + <prt> is the base of the parallel port address for + the corresponding drive. (required) + + <pro> is the protocol number for the adapter that + supports this drive. These numbers are + logged by 'paride' when the protocol modules + are initialised. (0 if not given) + + <uni> for those adapters that support chained + devices, this is the unit selector for the + chain of devices on the given port. It should + be zero for devices that don't support chaining. + (0 if not given) + + <mod> this can be -1 to choose the best mode, or one + of the mode numbers supported by the adapter. + (-1 if not given) + + <slv> ATAPI devices can be jumpered to master or slave. + Set this to 0 to choose the master drive, 1 to + choose the slave, -1 (the default) to choose the + first drive found. + + <dly> some parallel ports require the driver to + go more slowly. -1 sets a default value that + should work with the chosen protocol. Otherwise, + set this to a small integer, the larger it is + the slower the port i/o. In some cases, setting + this to zero will speed up the device. (default -1) + +EPP mode is best. Your BIOS may not give you that option, unfortunately. +What options does it support ? diff --git a/misc/shared_lib_patch_incomplete.diff b/misc/shared_lib_patch_incomplete.diff new file mode 100644 index 0000000..7921305 --- /dev/null +++ b/misc/shared_lib_patch_incomplete.diff @@ -0,0 +1,138 @@ +Index: wodim/CMakeLists.txt +=================================================================== +--- wodim/CMakeLists.txt (Revision 579) ++++ wodim/CMakeLists.txt (Arbeitskopie) +@@ -21,7 +21,17 @@ + + ADD_DEFINITIONS(-DHAVE_LIB_EDC_ECC -DCLONE_WRITE) + +-ADD_EXECUTABLE (wodim ${CDRECORD_SRCS}) ++SET(CDRECORD_SRCS wodim.c audiosize.c auinfo.c cdr_drv.c cdtext.c clone.c crc16.c cue.c diskid.c drv_7501.c drv_jvc.c drv_mmc.c drv_philips.c drv_simul.c drv_sony.c fifo.c isosize.c scsi_cdr_mmc4.c scsi_mmc4.c sector.c subchan.c wm_packet.c wm_session.c wm_track.c xio.c) ++SET(CDRECORD_COMMON_SRCS cd_misc.c defaults.c getnum.c misc.c modes.c movesect.c scsi_cdr.c scsi_mmc.c scsi_scan.c) ++ ++IF(SHLIB_STYLE) ++ ADD_EXECUTABLE (wodim ${CDRECORD_SRCS}) ++ ADD_LIBRARY (wodimstuff SHARED ${CDRECORD_COMMON_SRCS}) ++ LIST(APPEND EXTRA_LIBS wodimstuff) ++ELSE(SHLIB_STYLE) ++ ADD_EXECUTABLE (wodim ${CDRECORD_SRCS} ${CDRECORD_COMMON_SRCS}) ++ENDIF(SHLIB_STYLE) ++ + TARGET_LINK_LIBRARIES(wodim ${EXTRA_LIBS} deflt edc) + SET_TARGET_PROPERTIES(wodim PROPERTIES SKIP_BUILD_RPATH TRUE) + +Index: genisoimage/CMakeLists.txt +=================================================================== +--- genisoimage/CMakeLists.txt (Revision 579) ++++ genisoimage/CMakeLists.txt (Arbeitskopie) +@@ -27,6 +27,13 @@ + + SET(MKISOFS_MOST_SRCS apple.c boot.c cd_misc.c defaults.c desktop.c dvd_file.c dvd_reader.c eltorito.c exclude.c files.c fnmatch.c getnum.c hash.c ifo_read.c joliet.c mac_label.c match.c modes.c multi.c name.c rock.c scsi.c scsi_cdr.c stream.c tree.c udf.c vms.c volume.c write.c boot-alpha.c boot-hppa.c boot-mips.c md5.c jte.c rsync.c + boot-mipsel.c endian.c ) ++ ++IF(SHLIB_STYLE) ++ SET(MKISOFS_MOST_SRCS apple.c boot.c cd_misc.c defaults.c desktop.c dvd_file.c dvd_reader.c eltorito.c exclude.c files.c fnmatch.c getnum.c hash.c ifo_read.c joliet.c mac_label.c match.c modes.c multi.c name.c rock.c scsi.c scsi_cdr.c stream.c tree.c udf.c vms.c volume.c write.c boot-alpha.c boot-hppa.c boot-mips.c md5.c jte.c rsync.c ++ boot-mipsel.c endian.c ) ++ LIST ( APPEND EXTRA_LIBS wodimstuff ) ++ message(FATAL_ERROR "fixme, half done, see experimental branch, needs to change other tools to libwodimstuff, etc.") ++ENDIF(SHLIB_STYLE) + + INCLUDE(CheckFunctionExists) + SET(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) +@@ -37,7 +44,7 @@ + + + #SET_SOURCE_FILES_PROPERTIES(${MKISOFS_MOST_SRCS} PROPERTIES ) +-LINK_DIRECTORIES(../libhfs_iso ../librols ../libusal ../libunls ../libdeflt) ++LINK_DIRECTORIES(../libhfs_iso ../librols ../libusal ../libunls ../libdeflt ../wodim) + + ADD_EXECUTABLE (genisoimage genisoimage.c ${MKISOFS_MOST_SRCS}) + TARGET_LINK_LIBRARIES(genisoimage hfs_iso deflt ${MAGICLIBS} c unls z ${EXTRA_LIBICONV} ${EXTRA_LIBS}) +Index: libusal/CMakeLists.txt +=================================================================== +--- libusal/CMakeLists.txt (Revision 579) ++++ libusal/CMakeLists.txt (Arbeitskopie) +@@ -6,5 +6,9 @@ + #SET(LIBSCG_SRCS rdummy.c usalsettarget.c usaltimes.c scsi-linux-ata.c scsi-linux-pg.c scsi-linux-sg.c scsierrs.c scsihack.c scsihelp.c scsiopen.c scsitransp.c) + SET(LIBSCG_SRCS usalsettarget.c usaltimes.c scsierrs.c scsihack.c scsihelp.c scsiopen.c scsitransp.c scsi-remote.c) + LINK_DIRECTORIES(../librols) ++IF(SHLIB_STYLE) ++ADD_LIBRARY (usal SHARED ${LIBSCG_SRCS}) ++ELSE(SHLIB_STYLE) + ADD_LIBRARY (usal STATIC ${LIBSCG_SRCS}) ++ENDIF(SHLIB_STYLE) + TARGET_LINK_LIBRARIES(usal ${SCG_SELF_LIBS}) +Index: misc/shared_lib_patch_incomplete.diff +=================================================================== +--- misc/shared_lib_patch_incomplete.diff (Revision 579) ++++ misc/shared_lib_patch_incomplete.diff (Arbeitskopie) +@@ -1,31 +1,29 @@ + Index: wodim/CMakeLists.txt + =================================================================== +---- wodim/CMakeLists.txt (Revision 556) ++--- wodim/CMakeLists.txt (Revision 579) + +++ wodim/CMakeLists.txt (Arbeitskopie) +-@@ -21,8 +21,18 @@ ++@@ -21,7 +21,17 @@ + + ADD_DEFINITIONS(-DHAVE_LIB_EDC_ECC -DCLONE_WRITE) + + -ADD_EXECUTABLE (wodim ${CDRECORD_SRCS}) +--TARGET_LINK_LIBRARIES(wodim ${EXTRA_LIBS} deflt edc) +++SET(CDRECORD_SRCS wodim.c audiosize.c auinfo.c cdr_drv.c cdtext.c clone.c crc16.c cue.c diskid.c drv_7501.c drv_jvc.c drv_mmc.c drv_philips.c drv_simul.c drv_sony.c fifo.c isosize.c scsi_cdr_mmc4.c scsi_mmc4.c sector.c subchan.c wm_packet.c wm_session.c wm_track.c xio.c) +++SET(CDRECORD_COMMON_SRCS cd_misc.c defaults.c getnum.c misc.c modes.c movesect.c scsi_cdr.c scsi_mmc.c scsi_scan.c) + + + +IF(SHLIB_STYLE) +-+ SET(CDRECORD_SRCS wodim.c audiosize.c auinfo.c cdr_drv.c cdtext.c clone.c crc16.c cue.c diskid.c drv_7501.c drv_jvc.c drv_mmc.c drv_philips.c drv_simul.c drv_sony.c fifo.c isosize.c scsi_cdr_mmc4.c scsi_mmc4.c sector.c subchan.c wm_packet.c wm_session.c wm_track.c xio.c) +-+ SET(CDRECORD_COMMON_SRCS cd_misc.c defaults.c getnum.c misc.c modes.c movesect.c scsi_cdr.c scsi_mmc.c scsi_scan.c) + + ADD_EXECUTABLE (wodim ${CDRECORD_SRCS}) + + ADD_LIBRARY (wodimstuff SHARED ${CDRECORD_COMMON_SRCS}) +-+ TARGET_LINK_LIBRARIES(wodim ${EXTRA_LIBS} deflt edc wodimstuff) +++ LIST(APPEND EXTRA_LIBS wodimstuff) + +ELSE(SHLIB_STYLE) +-+ ADD_EXECUTABLE (wodim ${CDRECORD_SRCS}) +-+ TARGET_LINK_LIBRARIES(wodim ${EXTRA_LIBS} deflt edc) +++ ADD_EXECUTABLE (wodim ${CDRECORD_SRCS} ${CDRECORD_COMMON_SRCS}) + +ENDIF(SHLIB_STYLE) + + ++ TARGET_LINK_LIBRARIES(wodim ${EXTRA_LIBS} deflt edc) + SET_TARGET_PROPERTIES(wodim PROPERTIES SKIP_BUILD_RPATH TRUE) + +- INSTALL(TARGETS wodim DESTINATION bin) + Index: genisoimage/CMakeLists.txt + =================================================================== +---- genisoimage/CMakeLists.txt (Revision 556) ++--- genisoimage/CMakeLists.txt (Revision 579) + +++ genisoimage/CMakeLists.txt (Arbeitskopie) + @@ -27,6 +27,13 @@ + +@@ -52,7 +50,7 @@ + TARGET_LINK_LIBRARIES(genisoimage hfs_iso deflt ${MAGICLIBS} c unls z ${EXTRA_LIBICONV} ${EXTRA_LIBS}) + Index: libusal/CMakeLists.txt + =================================================================== +---- libusal/CMakeLists.txt (Revision 556) ++--- libusal/CMakeLists.txt (Revision 579) + +++ libusal/CMakeLists.txt (Arbeitskopie) + @@ -6,5 +6,9 @@ + #SET(LIBSCG_SRCS rdummy.c usalsettarget.c usaltimes.c scsi-linux-ata.c scsi-linux-pg.c scsi-linux-sg.c scsierrs.c scsihack.c scsihelp.c scsiopen.c scsitransp.c) +@@ -64,20 +62,3 @@ + ADD_LIBRARY (usal STATIC ${LIBSCG_SRCS}) + +ENDIF(SHLIB_STYLE) + TARGET_LINK_LIBRARIES(usal ${SCG_SELF_LIBS}) +-Index: librols/CMakeLists.txt +-=================================================================== +---- librols/CMakeLists.txt (Revision 556) +-+++ librols/CMakeLists.txt (Arbeitskopie) +-@@ -1,7 +1,11 @@ +- PROJECT (LIBROLS) +- INCLUDE_DIRECTORIES(../include ../libhfs_iso ${CMAKE_BINARY_DIR} ../wodim) +- +--SET(LIBROLS_SRCS astoi.c astoll.c astoull.c breakline.c cmpbytes.c comerr.c error.c fexec.c fillbytes.c getargs.c getav0.c getdomainname.c geterrno.c gethostid.c gethostname.c getpagesize.c handlecond.c movebytes.c raisecond.c rename.c saveargs.c seterrno.c spawn.c strcatl.c strdup.c streql.c swabbytes.c usleep.c stdio/cvmod.c stdio/dat.c stdio/fcons.c stdio/fcons64.c stdio/fdown.c stdio/fdup.c stdio/fdup64.c stdio/ffileread.c stdio/ffilewrite.c stdio/fgetline.c stdio/file_raise.c stdio/fileclose.c stdio/fileluopen.c stdio/fileluopen64.c stdio/filemopen.c stdio/filemopen64.c stdio/fileopen.c stdio/fileopen64.c stdio/filepos.c stdio/filepos64.c stdio/fileread.c stdio/filereopen.c stdio/filereopen64.c stdio/fileseek.c stdio/fileseek64.c stdio/filesize.c stdio/filesize64.c stdio/filestat.c stdio/filestat64.c stdio/filewrite.c stdio/flag.c stdio/flush.c stdio/fpipe.c stdio/niread.c stdio/niwrite.c stdio/nixread.c stdio/nixwrite.c stdio/openfd.c stdio/openfd64.c stdio/peekc.c ) +-+SET(LIBROLS_SRCS astoi.c astoll.c astoull.c breakline.c cmpbytes.c comerr.c error.c fexec.c fillbytes.c getargs.c getav0.c getdomainname.c geterrno.c gethostid.c gethostname.c getpagesize.c handlecond.c movebytes.c raisecond.c rename.c saveargs.c seterrno.c spawn.c strcatl.c strdup.c streql.c swabbytes.c usleep.c stdio/cvmod.c stdio/dat.c stdio/fcons.c stdio/fdown.c stdio/fdup.c stdio/ffileread.c stdio/ffilewrite.c stdio/fgetline.c stdio/file_raise.c stdio/fileclose.c stdio/fileluopen.c stdio/filemopen.c stdio/fileopen.c stdio/filepos.c stdio/fileread.c stdio/filereopen.c stdio/fileseek.c stdio/filesize.c stdio/filestat.c stdio/filewrite.c stdio/flag.c stdio/flush.c stdio/fpipe.c stdio/niread.c stdio/niwrite.c stdio/nixread.c stdio/nixwrite.c stdio/openfd.c stdio/peekc.c ) +- +-+IF(SHLIB_STYLE) +-+ADD_LIBRARY (rols SHARED ${CMAKE_CURRENT_SOURCE_DIR}/../include/xconfig.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/align.h ${LIBROLS_SRCS}) +-+ELSE(SHLIB_STYLE) +- ADD_LIBRARY (rols STATIC ${CMAKE_CURRENT_SOURCE_DIR}/../include/xconfig.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/align.h ${LIBROLS_SRCS}) +-+ENDIF(SHLIB_STYLE) +- |