> As you may have seen from recent bug reports ;), I'm currently adding > support for debconf-driven keymap choice to console-data and friends, > but need the following help for ppc/m68k machines: > > * what sub-architectures are there for each arch ? > My guess: m68k -> atari, amiga, sun, next(, mac) ; ppc -> mac, RS/6000
m68k: amiga, atari, mac, bvme* powerpc: apus, chrp, pmac, prep (mbx) > * how may I caracterize each of these archs ? IIRC I was told about > some field in a /proc file, but I'd need more precise info, > ie. exact strings/regexps to match > To select it from /proc this will help: case "$arch" in m68k) # When I was and my heart was an open book, I thought awk was not Essential... # machinemodel=$(cat /proc/hardware | ( read line; set -- $line; if [ "$1" = "Model:" ]; then echo $2 ; fi )) machinemodel=$(awk '/Model:/ { print $2 }' < /proc/hardware) case "$machinemodel" in Amiga) ln -sf amigamouse /dev/mouse ;; Atari) ln -sf atarimouse /dev/mouse ;; Macintosh) ln -sf adbmouse /dev/mouse ;; Motorola|BVME4000|BVME6000) echo "Warning: $machinemodel machines have no supported mouse type." ;; *) echo "Warning: cannot auto-detect mouse; unknown model of Motorola m68k machine." echo "Please send mail to <debian-68k@lists.debian.org> describing your hardware." ;; esac ;; powerpc) machinemodel=$(awk '/^machine/ { print $3 }' < /proc/cpuinfo) case "$machinemodel" in Apus) ln -sf amigamouse /dev/mouse ;; CHRP|PReP) ln -sf psaux /dev/mouse ;; PowerMac|[Pp]ower[Bb]ook*|Power) ln -sf adbmouse /dev/mouse ;; iMac*|PowerMac1*) ln -sf usb /dev/mouse ;; *) echo "Warning: cannot auto-detect mouse; unknown model of PowerPC machine. Please" echo "send mail to <debian-powerpc@lists.debian.org> describing your hardware." ;; esac esac > * what to those subarches use for a set keymap ? It may be obvious > for some, as we have the amiga, atari, mac, and sun sets of > keyboards in /usr/share/keymaps/, but as there are several > generations of machines for some sub-arches, I'd like to know all > that is is to know in this field. #if #cpu (m68k) struct d_choices keymaps_ami[]={ { "amiga-us", "U.S. English (Amiga)" , KBD_C}, { "amiga-de", "Germany (Amiga)" , KBD_de_DE} }; int nchoices_ami=2; struct d_choices keymaps_ata[]={ { "atari-us", "U.S. English (Atari)" , KBD_C}, { "atari-de", "Germany (Atari)" , KBD_de_DE}, { "atari-se", "Sweden (Atari)" , KBD_sv_SE}, { "atari-uk", "English (Atari Falcon)" , KBD_en_UK}, }; int nchoices_ata=4; struct d_choices keymaps_mac[]={ { "mac-us-std", "U.S. English (Mac, 82 keys)" , KBD_C}, { "mac-us-ext", "U.S. English (Mac, extended kbd)", 0}, { "mac-fr2-ext", "France (Mac, extended kbd)" , KBD_fr_FR} }; int nchoices_mac=3; int nchoices; #elif #cpu (powerpc) struct d_choices keymaps[]={ { "i386/qwerty/us", "U.S. English (QWERTY)" , KBD_C}, { "i386/azerty/be-latin1", "Belgium" , KBD_fr_BE}, { "i386/qwerty/bg", "Bulgarian Cyrillic" , 0}, { "i386/qwerty/cf", "French Canadian" , KBD_fr_CA}, { "i386/qwertz/croat", "Croatian" , 0}, { "i386/qwerty/cz-lat2", "Czech" , KBD_cs_CZ}, { "i386/qwertz/de-latin1-nodeadkeys","Germany" , KBD_de_DE}, { "i386/qwerty/dk-latin1", "Danish" , KBD_da_DK}, { "i386/dvorak/dvorak", "Dvorak" , 0}, { "i386/qwerty/es", "Spain" , KBD_es_ES}, { "i386/qwerty/fi-latin1", "Finland" , KBD_fi_FI}, { "i386/azerty/fr-latin1", "France" , KBD_fr_FR}, { "i386/qwerty/gr", "Greek" , KBD_el_GR}, { "i386/qwerty/hebrew", "Hebrew" , 0}, { "i386/qwertz/hu", "Hungary" , KBD_hu_HU}, { "i386/qwerty/is-latin1", "Iceland" , KBD_is_IS}, { "i386/qwerty/it", "Italy" , KBD_it_IT}, { "i386/qwerty/jp106", "Japan" , KBD_ja_JP}, { "i386/qwerty/no-latin1", "Norway" , KBD_no_NO}, { "i386/qwerty/pl", "Poland" , KBD_pl_PL}, { "i386/qwerty/ru", "Russia" , KBD_ru_RU}, { "i386/qwerty/se-latin1", "Sweden" , KBD_sv_SE}, { "i386/qwertz/slovene", "Slovene" , 0}, { "i386/qwerty/sk-qwerty", "Slovak" , 0}, { "i386/fgGIod/tr_f-latin5", "Turkish F" , KBD_tr_TR}, { "i386/qwerty/uk", "United Kingdom" , KBD_en_UK}, { "mac/mac-de-latin1-nodeadkeys", "Germany (Mac)" , 0}, { "mac/mac-fr2-ext", "France (Mac, extended kbd)" , 0}, { "mac/mac-us-ext", "U.S. English (Mac, extended kbd)", 0}, { "mac/mac-us-std", "U.S. English (Mac, 82 keys)" , 1} }; Hope this helps, Hartmut