wok-tiny view hardware-ibm-6272/receipt @ rev 104

Add ipxe, memtest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 07 14:42:58 2016 +0100 (2016-02-07)
parents 981558572b0f
children 0d8ef9102fc0
line source
1 # SliTaz package receipt.
3 PACKAGE="hardware-ibm-6272"
4 VERSION="1.0"
5 CATEGORY="meta"
6 MAINTAINER="devel@slitaz.org"
7 LICENSE="BSD"
8 SHORT_DESC="IBM 300GL 6272/6282 (P75-233 ISA/PCI/USB/ETH desktop) hardware support"
9 WEB_SITE="http://www.slitaz.org/"
11 DEPENDS="isapnptools module-cs89x0"
12 SUGGESTED="module-serial module-lp module-floppy"
14 # Post message when installing.
15 post_install()
16 {
17 [ -s $1/etc/init.d/pnp.sh ] || cat > $1/etc/init.d/pnp.sh <<EOT
18 #!/bin/sh
20 . /etc/init.d/rc.functions
21 EOT
22 chmod +x $1/etc/init.d/pnp.sh
23 cat >> $1/etc/init.d/pnp.sh <<EOT
25 echo -n "Switching on cs89x0 isa pnp ethernet card "
26 for io in \$(seq 360 -10 250); do for irq in IRQ_CS89X0_LIST; do
27 pnpdump | awk "BEGIN {s=0} \\
28 /CONFIGURE CSC6040/ {s=1} { \\
29 if (s==0) print; \\
30 else if (/INT 0/) print \\"(INT 0 (IRQ \$irq (MODE +E)))\\"; \\
31 else if (/IO 0/) print \\"(IO 0 (SIZE 16) (BASE 0x0\$io) (CHECK))\\"; \\
32 else if (/ACT Y/) { s=0; print \\"(ACT Y)\\"} \\
33 else print \\
34 }" > /etc/isapnp.conf
35 grep CSC6040 /etc/isapnp.conf || break 2
36 if isapnp /etc/isapnp.conf ; then
37 modprobe cs89x0 io=0x\$io irq=\$irq
38 break 2
39 fi
40 done ; done > /dev/null 2>&1
41 status
42 EOT
43 grep pnp.sh $1/etc/rcS.conf ||
44 sed -i 's/EARLY_RUN_SCRIPTS="/&pnp.sh /' $1/etc/rcS.conf
45 list=""
46 for i in $IRQ_CS89X0_LIST ; do
47 case " 15 12 11 10 9 7 6 5 4 3 " in
48 *\ $i\ *) list="$list $i"
49 esac
50 done
51 sed -i "s/ IRQ_CS89X0_LIST/${list:- 15 12 11 10}/" $1/etc/init.d/pnp.sh
52 sed -i 's/cs89x0[^ "]* //' $1/etc/rcS.conf
53 sed -i '/rm -f .sbin.*pnp/d' $1/etc/init.d/pnp.sh
54 [ "$CS89X0_WIPEPNP" == "on" ] &&
55 echo 'rm -f /sbin/pnpdump /sbin/isapnp /etc/isapnp.conf' >> $1/etc/init.d/pnp.sh
56 }
58 config_form()
59 {
60 cat <<EOT
61 <table>
62 <tr>
63 <td>Allowed IRQ for the Ethernet driver cs89x0</td>
64 <td><input type="text" name="IRQ_CS89X0_LIST" value="${IRQ_LIST:-15 12 11 10 9 7 6 5 4 3}" /></td>
65 </tr>
66 </table>
67 <input type="checkbox" name="CS89X0_WIPEPNP" />Remove PNP binaries after use<br>
68 EOT
69 }