wok-6.x annotate hardware-ibm-6272/receipt @ rev 12847
Up: ffmpeg-dev (0.10.3)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Wed May 23 13:00:38 2012 +0200 (2012-05-23) |
parents | |
children | 7bb096863642 |
rev | line source |
---|---|
pascal@11552 | 1 # SliTaz package receipt. |
pascal@11552 | 2 |
pascal@11552 | 3 PACKAGE="hardware-ibm-6272" |
pascal@11552 | 4 VERSION="1.0" |
pascal@11552 | 5 CATEGORY="base-system" |
pascal@11552 | 6 MAINTAINER="devel@slitaz.org" |
pascal@11552 | 7 SHORT_DESC="IBM 300GL 6272/6282 (P75-233 ISA/PCI/USB/ETH desktop) hardware support" |
pascal@11552 | 8 WEB_SITE="http://www.slitaz.org/" |
pascal@11552 | 9 |
pascal@11552 | 10 DEPENDS="isapnptools" |
pascal@11552 | 11 |
pascal@11552 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11552 | 13 genpkg_rules() |
pascal@11552 | 14 { |
pascal@11552 | 15 mkdir -p $fs/etc/init.d |
pascal@11552 | 16 cat > $fs/etc/init.d/pnp.sh <<EOT |
pascal@11552 | 17 #!/bin/sh |
pascal@11552 | 18 |
pascal@11552 | 19 status="\\\\033[70G[ \\\\033[1;31mFailed\\\\033[0;39m ]" |
pascal@11552 | 20 echo -n "Switching on isa pnp ethernet card " |
pascal@11552 | 21 # io 0x360..0x250 by 0x10, irq 15 12 11 10 9 7 6 5 4 3 |
pascal@11552 | 22 for io in \$(seq 360 -10 250); do for irq in 15 12 11 10; do |
pascal@11552 | 23 pnpdump | busybox awk "BEGIN {s=0} \\ |
pascal@11552 | 24 /CONFIGURE CSC6040/ {s=1} { \\ |
pascal@11552 | 25 if (s==0) print; \\ |
pascal@11552 | 26 else if (/INT 0/) print \\"(INT 0 (IRQ \$irq (MODE +E)))\\"; \\ |
pascal@11552 | 27 else if (/IO 0/) print \\"(IO 0 (SIZE 16) (BASE 0x0\$io) (CHECK))\\"; \\ |
pascal@11552 | 28 else if (/ACT Y/) { s=0; print \\"(ACT Y)\\"} \\ |
pascal@11552 | 29 else print \\ |
pascal@11552 | 30 }" > /etc/isapnp.conf |
pascal@11552 | 31 if isapnp /etc/isapnp.conf > /dev/null 2>&1 ; then |
pascal@11552 | 32 modprobe cs89x0 io=0x\$io irq=\$irq > /dev/null 2>&1 |
pascal@11552 | 33 status="\\\\033[70G[ \\\\033[1;33mOK\\\\033[0;39m ]" |
pascal@11552 | 34 break 2 |
pascal@11552 | 35 fi |
pascal@11552 | 36 done ; done |
pascal@11552 | 37 echo -e "\$status" |
pascal@11552 | 38 EOT |
pascal@11552 | 39 chmod +x $fs/etc/init.d/pnp.sh |
pascal@11552 | 40 } |
pascal@11552 | 41 |
pascal@11552 | 42 # Pre and post install commands for Tazpkg. |
pascal@11552 | 43 post_install() |
pascal@11552 | 44 { |
pascal@11552 | 45 grep pnp.sh $1/etc/rcS.conf || |
pascal@11552 | 46 sed -i 's/RUN_SCRIPTS="/&pnp.sh /' $1/etc/rcS.conf |
pascal@11552 | 47 } |