wok view hardware-ibm-6272/receipt @ rev 15918

Up: slitaz-boot-scripts (5.4.1) Bug fix
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 16 19:43:02 2014 +0100 (2014-02-16)
parents 0b72ced79370
children 7d5789c51e7e
line source
1 # SliTaz package receipt.
3 PACKAGE="hardware-ibm-6272"
4 VERSION="1.0"
5 CATEGORY="base-system"
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"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/etc/init.d
17 cat > $fs/etc/init.d/pnp.sh <<EOT
18 #!/bin/sh
20 status="\\\\033[70G[ \\\\033[1;31mFailed\\\\033[0;39m ]"
21 echo -n "Switching on isa pnp ethernet card "
22 # io 0x360..0x250 by 0x10, irq 15 12 11 10 9 7 6 5 4 3
23 for io in \$(seq 360 -10 250); do for irq in 15 12 11 10; do
24 pnpdump | busybox awk "BEGIN {s=0} \\
25 /CONFIGURE CSC6040/ {s=1} { \\
26 if (s==0) print; \\
27 else if (/INT 0/) print \\"(INT 0 (IRQ \$irq (MODE +E)))\\"; \\
28 else if (/IO 0/) print \\"(IO 0 (SIZE 16) (BASE 0x0\$io) (CHECK))\\"; \\
29 else if (/ACT Y/) { s=0; print \\"(ACT Y)\\"} \\
30 else print \\
31 }" > /etc/isapnp.conf
32 if isapnp /etc/isapnp.conf > /dev/null 2>&1 ; then
33 modprobe cs89x0 io=0x\$io irq=\$irq > /dev/null 2>&1
34 status="\\\\033[70G[ \\\\033[1;33mOK\\\\033[0;39m ]"
35 break 2
36 fi
37 done ; done
38 echo -e "\$status"
39 EOT
40 chmod +x $fs/etc/init.d/pnp.sh
41 }
43 # Pre and post install commands for Tazpkg.
44 post_install()
45 {
46 grep pnp.sh $1/etc/rcS.conf ||
47 sed -i 's/RUN_SCRIPTS="/&pnp.sh /' $1/etc/rcS.conf
48 }