mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Installer repariert
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@46 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -1,159 +1,159 @@
|
|||||||
!!! List of softwares used to build IPFire Version:1.4.11
|
!!! List of softwares used to build IPFire Version:1.4.11
|
||||||
* 3c5x9setup-1.00
|
* 3c5x9setup-1.00
|
||||||
* 3cp4218-2003-10-22
|
* 3cp4218-2003-10-22
|
||||||
* CnxADSL-TgrATMcln-20041004
|
* CnxADSL-TgrATMcln-20041004
|
||||||
* Compress-Zlib-1.35
|
* Compress-Zlib-1.35
|
||||||
* Digest-1.08
|
* Digest-1.08
|
||||||
* Digest-HMAC-1.01
|
* Digest-HMAC-1.01
|
||||||
* Digest-SHA1-2.10
|
* Digest-SHA1-2.10
|
||||||
* GD-2.12
|
* GD-2.12
|
||||||
* HTML-Parser-3.45
|
* HTML-Parser-3.45
|
||||||
* HTML-Tagset-3.04
|
* HTML-Tagset-3.04
|
||||||
* LPRng-3.8.28
|
* LPRng-3.8.28
|
||||||
* Linux-PAM-0.99.3.0
|
* Linux-PAM-0.99.3.0
|
||||||
* Net-DNS-0.47
|
* Net-DNS-0.47
|
||||||
* Net-IPv4Addr-0.10
|
* Net-IPv4Addr-0.10
|
||||||
* Net_SSLeay.pm-1.25
|
* Net_SSLeay.pm-1.25
|
||||||
* Python-2.3.4
|
* Python-2.3.4
|
||||||
* URI-1.35
|
* URI-1.35
|
||||||
* amedyn-2004-08-04
|
* amedyn-2004-08-04
|
||||||
* apache_1.3.34
|
* apache_1.3.34
|
||||||
* arping-2.05
|
* arping-2.05
|
||||||
* as86-0.16.17
|
* as86-0.16.17
|
||||||
* autoconf-2.59
|
* autoconf-2.59
|
||||||
* automake-1.8.4
|
* automake-1.8.4
|
||||||
* bash-2.05b
|
* bash-2.05b
|
||||||
* bast-0.9.0
|
* bast-0.9.0
|
||||||
* beep-1.2.2
|
* beep-1.2.2
|
||||||
* bind-9.2.5
|
* bind-9.2.5
|
||||||
* binutils-2.15.90.0.3
|
* binutils-2.15.90.0.3
|
||||||
* bison-1.875
|
* bison-1.875
|
||||||
* busybox-0.60.5
|
* busybox-0.60.5
|
||||||
* bzip2-1.0.3
|
* bzip2-1.0.3
|
||||||
* capi4k-utils-2004-10-06
|
* capi4k-utils-2004-10-06
|
||||||
* ccache-2.3
|
* ccache-2.3
|
||||||
* cdrtools-2.01
|
* cdrtools-2.01
|
||||||
* coreutils-5.93
|
* coreutils-5.93
|
||||||
* cxacru-2003-10-05
|
* cxacru-2003-10-05
|
||||||
* dhcp-3.0.2
|
* dhcp-3.0.2
|
||||||
* dhcpcd-1.3.22-pl4
|
* dhcpcd-1.3.22-pl4
|
||||||
* diffutils-2.8.1
|
* diffutils-2.8.1
|
||||||
* dnsmasq-2.22
|
* dnsmasq-2.22
|
||||||
* dosfstools-2.11
|
* dosfstools-2.11
|
||||||
* e2fsprogs-1.35
|
* e2fsprogs-1.35
|
||||||
* eagle-usb-2.3.2
|
* eagle-usb-2.3.2
|
||||||
* eciadsl-usermode-0.11
|
* eciadsl-usermode-0.11
|
||||||
* ed-0.2
|
* ed-0.2
|
||||||
* ethtool-3
|
* ethtool-3
|
||||||
* expat-1.95.7
|
* expat-1.95.7
|
||||||
* ez-ipupdate-3.0.11b8
|
* ez-ipupdate-3.0.11b8
|
||||||
* fcdsl-suse8.2-03.11.02
|
* fcdsl-suse8.2-03.11.02
|
||||||
* fcdsl2-suse9.0-03.11.04
|
* fcdsl2-suse9.0-03.11.04
|
||||||
* fcdslsl-suse8.2-03.11.02
|
* fcdslsl-suse8.2-03.11.02
|
||||||
* fcdslslusb-suse8.2-03.11.04
|
* fcdslslusb-suse8.2-03.11.04
|
||||||
* fcdslusb-suse8.2-03.11.02
|
* fcdslusb-suse8.2-03.11.02
|
||||||
* fcron-2.0.2
|
* fcron-2.0.2
|
||||||
* file-4.16
|
* file-4.16
|
||||||
* findutils-4.1.20
|
* findutils-4.1.20
|
||||||
* flex-2.5.4a
|
* flex-2.5.4a
|
||||||
* gawk-3.1.3
|
* gawk-3.1.3
|
||||||
* gcc-3.3.3
|
* gcc-3.3.3
|
||||||
* gd-2.0.20
|
* gd-2.0.20
|
||||||
* gdbm-1.8.3
|
* gdbm-1.8.3
|
||||||
* gettext-0.14.1
|
* gettext-0.14.1
|
||||||
* glibc-2.3.3-lfs-5.1
|
* glibc-2.3.3-lfs-5.1
|
||||||
* gmp-4.1.2
|
* gmp-4.1.2
|
||||||
* gnupg-1.4.2
|
* gnupg-1.4.2
|
||||||
* grep-2.5.1
|
* grep-2.5.1
|
||||||
* groff-1.19
|
* groff-1.19
|
||||||
* grub-0.95
|
* grub-0.95
|
||||||
* gzip-1.3.5
|
* gzip-1.3.5
|
||||||
* hdparm-6.3
|
* hdparm-6.3
|
||||||
* httpd-2.2.0
|
* httpd-2.2.0
|
||||||
* iana-etc-2.00
|
* iana-etc-2.00
|
||||||
* ibod
|
* ibod
|
||||||
* inetutils-1.4.2
|
* inetutils-1.4.2
|
||||||
* ipac-ng-1.31
|
* ipac-ng-1.31
|
||||||
* ipaddr-1.2
|
* ipaddr-1.2
|
||||||
* iproute2-2.4.7-now-ss010824
|
* iproute2-2.4.7-now-ss010824
|
||||||
* iptables-1.3.5
|
* iptables-1.3.5
|
||||||
* iptstate-1.4
|
* iptstate-1.4
|
||||||
* iputils-ss020927
|
* iputils-ss020927
|
||||||
* isapnptools-1.26
|
* isapnptools-1.26
|
||||||
* isdn4k-utils.v3.2p1
|
* isdn4k-utils.v3.2p1
|
||||||
* kbd-1.12
|
* kbd-1.12
|
||||||
* kudzu-0.99.50
|
* kudzu-0.99.50
|
||||||
* less-382
|
* less-382
|
||||||
* libcap-1.10
|
* libcap-1.10
|
||||||
* libnet-1.1.2.1
|
* libnet-1.1.2.1
|
||||||
* libpcap-0.8.3
|
* libpcap-0.8.3
|
||||||
* libpng-1.2.8
|
* libpng-1.2.8
|
||||||
* libsafe_2.0-16
|
* libsafe_2.0-16
|
||||||
* libtool-1.5.6
|
* libtool-1.5.6
|
||||||
* libusb-0.1.7
|
* libusb-0.1.7
|
||||||
* libwww-perl-5.803
|
* libwww-perl-5.803
|
||||||
* linux-2.4.31
|
* linux-2.4.31
|
||||||
* linux-atm-2.4.1
|
* linux-atm-2.4.1
|
||||||
* logrotate-3.7
|
* logrotate-3.7
|
||||||
* logwatch-6.1.2
|
* logwatch-6.1.2
|
||||||
* m4-1.4
|
* m4-1.4
|
||||||
* make-3.80
|
* make-3.80
|
||||||
* make_devices-1.2
|
* make_devices-1.2
|
||||||
* man-1.5p
|
* man-1.5p
|
||||||
* man-pages-2.17
|
* man-pages-2.17
|
||||||
* mbr-1.1.8
|
* mbr-1.1.8
|
||||||
* mingetty-1.06
|
* mingetty-1.06
|
||||||
* misc-progs
|
* misc-progs
|
||||||
* mktemp-1.5
|
* mktemp-1.5
|
||||||
* modutils-2.4.27
|
* modutils-2.4.27
|
||||||
* mtools-3.9.9
|
* mtools-3.9.9
|
||||||
* nano-1.2.4
|
* nano-1.2.4
|
||||||
* nash
|
* nash
|
||||||
* nasm-0.98.36
|
* nasm-0.98.36
|
||||||
* ncurses-5.4
|
* ncurses-5.4
|
||||||
* net-tools-1.60
|
* net-tools-1.60
|
||||||
* newt-utf8_0.50.17
|
* newt-utf8_0.50.17
|
||||||
* noip_updater_v1.6
|
* noip_updater_v1.6
|
||||||
* ntp-4.2.0
|
* ntp-4.2.0
|
||||||
* oinkmaster-1.2
|
* oinkmaster-1.2
|
||||||
* openssh-3.9p1
|
* openssh-3.9p1
|
||||||
* openssl-0.9.7i
|
* openssl-0.9.7i
|
||||||
* openswan-1.0.10
|
* openswan-1.0.10
|
||||||
* patch-2.5.4
|
* patch-2.5.4
|
||||||
* pciutils-2.1.11
|
* pciutils-2.1.11
|
||||||
* pcmcia-cs-3.2.8
|
* pcmcia-cs-3.2.8
|
||||||
* pcre-4.5
|
* pcre-4.5
|
||||||
* perl-5.8.5
|
* perl-5.8.5
|
||||||
* popt-1.7
|
* popt-1.7
|
||||||
* ppp-2.4.2
|
* ppp-2.4.2
|
||||||
* pptp-1.6.0
|
* pptp-1.6.0
|
||||||
* procinfo-18
|
* procinfo-18
|
||||||
* procps-3.2.5
|
* procps-3.2.5
|
||||||
* psmisc-21.4
|
* psmisc-21.4
|
||||||
* pulsar-4.0.19
|
* pulsar-4.0.19
|
||||||
* rp-pppoe-3.5
|
* rp-pppoe-3.5
|
||||||
* rrdtool-1.0.49
|
* rrdtool-1.0.49
|
||||||
* sed-4.0.9
|
* sed-4.0.9
|
||||||
* setserial-2.17
|
* setserial-2.17
|
||||||
* shadow-4.0.4.1
|
* shadow-4.0.4.1
|
||||||
* slang-1.4.5-mini
|
* slang-1.4.5-mini
|
||||||
* snort-2.3.3
|
* snort-2.3.3
|
||||||
* speedtouch-1.2
|
* speedtouch-1.2
|
||||||
* squid-2.5.STABLE12
|
* squid-2.5.STABLE12
|
||||||
* squid-graph-3.1
|
* squid-graph-3.1
|
||||||
* stund_0.96_Aug13
|
* stund_0.96_Aug13
|
||||||
* sysklogd-1.4.1
|
* sysklogd-1.4.1
|
||||||
* syslinux-2.11
|
* syslinux-2.11
|
||||||
* sysvinit-2.86
|
* sysvinit-2.86
|
||||||
* tar-1.13.25
|
* tar-1.13.25
|
||||||
* tcpdump-3.8.3
|
* tcpdump-3.8.3
|
||||||
* texinfo-4.7
|
* texinfo-4.7
|
||||||
* traceroute-1.4a12
|
* traceroute-1.4a12
|
||||||
* uClibc-0.9.26
|
* uClibc-0.9.26
|
||||||
* unzip552
|
* unzip552
|
||||||
* util-linux-2.12r
|
* util-linux-2.12r
|
||||||
* vim-6.3
|
* vim-6.3
|
||||||
* vlan.1.9
|
* vlan.1.9
|
||||||
* wireless_tools.27
|
* wireless_tools.27
|
||||||
* xampp-linux-1.5.1
|
* xampp-linux-1.5.1
|
||||||
* zlib-1.2.3
|
* zlib-1.2.3
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.6.2.2 2006/01/11 01:01:38 franck78 Exp $
|
# $Id: Makefile,v 1.6 2004/02/24 21:24:10 alanh Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
@@ -16,57 +16,18 @@ LINK = $(LD) $(LDFLAGS)
|
|||||||
|
|
||||||
all : programs
|
all : programs
|
||||||
|
|
||||||
programs : install install2
|
programs : install
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
-rm -f *.o install core
|
-rm -f *.o install core
|
||||||
|
|
||||||
######
|
######
|
||||||
# Macro to extract from the full set of translations only what is really used
|
|
||||||
# into the installer (install&install2). Each needed entry have a "comment
|
|
||||||
# inside the main source file"
|
|
||||||
define lang_install
|
|
||||||
rm $(OBJS3); \
|
|
||||||
for i in /usr/src/langs/*/install/lang_*.c ; do \
|
|
||||||
path=$${i%/*}/; \
|
|
||||||
file=../libsmooth/$${i/$$path/}; \
|
|
||||||
echo "#include \"libsmooth.h\"" > $$file; \
|
|
||||||
grep "^char \*" $$i >> $$file; \
|
|
||||||
echo "#include \"libsmooth.h\"" > $$file; \
|
|
||||||
grep "^char \*" $$i >> $$file; \
|
|
||||||
grep "^/\* TR_*" ../install/$$SELECT|xargs -i% grep -FA1 % $$i >> $$file; \
|
|
||||||
echo "};">>$$file; \
|
|
||||||
done
|
|
||||||
#build the tr_strings include file
|
|
||||||
awk 'BEGIN{ print"enum trstrings{" } \
|
|
||||||
$$0 ~/\/\* (TR_[A-Z0-9_]*)/ {print $$2"," }\
|
|
||||||
END{ print "};" }' ../libsmooth/lang_en.c > ../libsmooth/langs.h
|
|
||||||
endef
|
|
||||||
|
|
||||||
lang_install:
|
OBJS=main.o ide.o cdrom.o nic.o net.o config.o ../libsmooth/libsmooth.o \
|
||||||
SELECT=main.c; \
|
pcmcia.o upgrade-v12-v13.o upgrade-v130-v140.o usb.o scsi.o
|
||||||
$(lang_install)
|
|
||||||
cp ../libsmooth/langs.h main_langs.h
|
|
||||||
|
|
||||||
lang_install2:
|
install: $(OBJS)
|
||||||
SELECT=install2.c; \
|
$(LINK) $(OBJS) -o $@ $(LIBS)
|
||||||
$(lang_install)
|
|
||||||
cp ../libsmooth/langs.h install_langs.h
|
|
||||||
|
|
||||||
OBJS1=main.o ide.o cdrom.o nic.o net.o config.o pcmcia.o usb.o scsi.o
|
|
||||||
OBJS2=install2.o upgrade-v12-v13.o upgrade-v130-v140.o
|
|
||||||
OBJS3=../libsmooth/main.o ../libsmooth/netstuff.o ../libsmooth/varval.o
|
|
||||||
|
|
||||||
install: lang_install $(OBJS1) $(OBJS3) install.h ../libsmooth/langs.h ../libsmooth/libsmooth.h /install/include/newt.h
|
|
||||||
$(LINK) $(OBJS1) $(OBJS3) -o $@ $(LIBS)
|
|
||||||
|
|
||||||
install2: lang_install2 $(OBJS2) $(OBJS3)
|
|
||||||
#strange 'make': even if files $OBJS3 are deleted, they are not recompiled,
|
|
||||||
#so I explicitly recompile them (needed because langs.h have changed).
|
|
||||||
$(foreach I, $(OBJS3), $(COMPILE) $(patsubst %.o,%.c,$(I)) -o $(I);)
|
|
||||||
$(LINK) $(OBJS2) $(OBJS3) -o $@ $(LIBS)
|
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
$(COMPILE) $< -o $@
|
$(COMPILE) $< -o $@
|
||||||
|
|
||||||
.PHONY : lang_install lang_install2 clean
|
|
||||||
|
|||||||
@@ -6,46 +6,74 @@
|
|||||||
* (c) Lawrence Manning, 2001
|
* (c) Lawrence Manning, 2001
|
||||||
* Write the config and get password stuff.
|
* Write the config and get password stuff.
|
||||||
*
|
*
|
||||||
* $Id: config.c,v 1.6.2.3 2005/12/07 20:42:48 franck78 Exp $
|
* $Id: config.c,v 1.6.2.2 2004/08/23 21:09:44 alanh Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "install.h"
|
#include "install.h"
|
||||||
extern char **ctr; // text translation table
|
|
||||||
|
extern FILE *flog;
|
||||||
|
extern char *mylog;
|
||||||
|
|
||||||
|
extern char **ctr;
|
||||||
|
|
||||||
|
extern int raid_disk;
|
||||||
|
|
||||||
/* called to write out all config files using the keyvalue interface. */
|
/* called to write out all config files using the keyvalue interface. */
|
||||||
int write_disk_configs(struct devparams *dp)
|
int write_disk_configs(struct devparams *dp)
|
||||||
{
|
{
|
||||||
char devnode[STRING_SIZE];
|
char devnode[STRING_SIZE];
|
||||||
char partition[STRING_SIZE];
|
|
||||||
char *messages[5] = { NULL,
|
|
||||||
ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK1],
|
|
||||||
ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK2],
|
|
||||||
ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK3],
|
|
||||||
ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK4]
|
|
||||||
};
|
|
||||||
/* dev node links. */
|
/* dev node links. */
|
||||||
sprintf(devnode, "%s", dp->devnode_disk_run);
|
snprintf(devnode, STRING_SIZE, "%s", dp->devnode);
|
||||||
if (symlink(devnode, "/harddisk/dev/harddisk"))
|
if (symlink(devnode, "/harddisk/dev/harddisk"))
|
||||||
{
|
{
|
||||||
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK]);
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (raid_disk)
|
||||||
int j;
|
snprintf(devnode, STRING_SIZE, "%sp1", dp->devnode);
|
||||||
for (j=1; j<5; j++) {
|
else
|
||||||
sprintf(devnode, "%s%d", dp->devnode_part_run,j);
|
snprintf(devnode, STRING_SIZE, "%s1", dp->devnode);
|
||||||
sprintf(partition,"/harddisk/dev/harddisk%d",j);
|
if (symlink(devnode, "/harddisk/dev/harddisk1"))
|
||||||
if (symlink(devnode, partition))
|
{
|
||||||
{
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK1]);
|
||||||
errorbox( messages[j] );
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
if (raid_disk)
|
||||||
|
snprintf(devnode, STRING_SIZE, "%sp2", dp->devnode);
|
||||||
|
else
|
||||||
|
snprintf(devnode, STRING_SIZE, "%s2", dp->devnode);
|
||||||
|
if (symlink(devnode, "/harddisk/dev/harddisk2"))
|
||||||
|
{
|
||||||
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK2]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (raid_disk)
|
||||||
|
snprintf(devnode, STRING_SIZE, "%sp3", dp->devnode);
|
||||||
|
else
|
||||||
|
snprintf(devnode, STRING_SIZE, "%s3", dp->devnode);
|
||||||
|
if (symlink(devnode, "/harddisk/dev/harddisk3"))
|
||||||
|
{
|
||||||
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK3]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (raid_disk)
|
||||||
|
snprintf(devnode, STRING_SIZE, "%sp4", dp->devnode);
|
||||||
|
else
|
||||||
|
snprintf(devnode, STRING_SIZE, "%s4", dp->devnode);
|
||||||
|
if (symlink(devnode, "/harddisk/dev/harddisk4"))
|
||||||
|
{
|
||||||
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_HARDDISK4]);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add /dev/root symlink linking to the root filesystem to
|
/* Add /dev/root symlink linking to the root filesystem to
|
||||||
* keep updfstab happy */
|
* keep updfstab happy */
|
||||||
sprintf(devnode, "%s4", dp->devnode_part_run);
|
if (raid_disk)
|
||||||
|
snprintf(devnode, STRING_SIZE, "%sp4", dp->devnode);
|
||||||
|
else
|
||||||
|
snprintf(devnode, STRING_SIZE, "%s4", dp->devnode);
|
||||||
if (symlink(devnode, "/harddisk/dev/root"))
|
if (symlink(devnode, "/harddisk/dev/root"))
|
||||||
{
|
{
|
||||||
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_ROOT]);
|
errorbox(ctr[TR_UNABLE_TO_MAKE_SYMLINK_DEV_ROOT]);
|
||||||
@@ -123,3 +151,4 @@ int getpassword(char *password, char *text)
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* (c) Lawrence Manning, 2001
|
* (c) Lawrence Manning, 2001
|
||||||
* Main include file.
|
* Main include file.
|
||||||
*
|
*
|
||||||
* $Id: install.h,v 1.10.2.4 2006/01/11 01:01:38 franck78 Exp $
|
* $Id: install.h,v 1.10 2004/02/24 21:24:10 alanh Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,13 +20,10 @@
|
|||||||
/* CDROMS and harddisks. */
|
/* CDROMS and harddisks. */
|
||||||
struct devparams
|
struct devparams
|
||||||
{
|
{
|
||||||
char devnode_disk[30]; // when single partition is addressed
|
char devnode[STRING_SIZE];
|
||||||
char devnode_part[30]; // when the RAID partition is addressed
|
int module;
|
||||||
char devnode_disk_run[30]; // the same dev but after installation
|
|
||||||
char devnode_part_run[30];
|
|
||||||
char modulename[STRING_SIZE];
|
char modulename[STRING_SIZE];
|
||||||
char options[STRING_SIZE];
|
char options[STRING_SIZE];
|
||||||
// int module;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ide.c */
|
/* ide.c */
|
||||||
@@ -59,34 +56,7 @@ int upgrade_v130_v140();
|
|||||||
/* usb.c */
|
/* usb.c */
|
||||||
int initialize_usb();
|
int initialize_usb();
|
||||||
int write_usb_modules_conf();
|
int write_usb_modules_conf();
|
||||||
int checkusb (char *partition);
|
|
||||||
|
|
||||||
/* scsi.c */
|
/* scsi.c */
|
||||||
int try_scsi(char *dev);
|
int try_scsi(char *dev);
|
||||||
int get_boot(char *dev);
|
int get_boot(char *dev);
|
||||||
|
|
||||||
/*main.c */
|
|
||||||
int modprobe (char *mod);
|
|
||||||
int rmmod (char *mod);
|
|
||||||
|
|
||||||
extern char *bz_tr[];
|
|
||||||
extern char *cs_tr[];
|
|
||||||
extern char *da_tr[];
|
|
||||||
extern char *en_tr[];
|
|
||||||
extern char *es_tr[];
|
|
||||||
extern char *fi_tr[];
|
|
||||||
extern char *fr_tr[];
|
|
||||||
extern char *hu_tr[];
|
|
||||||
extern char *la_tr[];
|
|
||||||
extern char *nl_tr[];
|
|
||||||
extern char *de_tr[];
|
|
||||||
extern char *tr_tr[];
|
|
||||||
extern char *it_tr[];
|
|
||||||
extern char *el_tr[];
|
|
||||||
extern char *pl_tr[];
|
|
||||||
extern char *pt_tr[];
|
|
||||||
extern char *sk_tr[];
|
|
||||||
extern char *so_tr[];
|
|
||||||
extern char *sv_tr[];
|
|
||||||
extern char *no_tr[];
|
|
||||||
extern char *vi_tr[];
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
|||||||
* Contains stuff related to firing up the network card, including a crude
|
* Contains stuff related to firing up the network card, including a crude
|
||||||
* autodector.
|
* autodector.
|
||||||
*
|
*
|
||||||
* $Id: nic.c,v 1.8.2.2 2005/12/24 09:08:26 franck78 Exp $
|
* $Id: nic.c,v 1.8.2.1 2004/04/14 22:05:40 gespinasse Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
extern FILE *flog;
|
extern FILE *flog;
|
||||||
extern char *mylog;
|
extern char *mylog;
|
||||||
|
|
||||||
extern char **ctr;
|
extern char **ctr;
|
||||||
|
|
||||||
extern struct nic nics[];
|
extern struct nic nics[];
|
||||||
|
|
||||||
int networkmenu(struct keyvalue *ethernetkv)
|
int networkmenu(struct keyvalue *ethernetkv)
|
||||||
@@ -27,6 +29,7 @@ int networkmenu(struct keyvalue *ethernetkv)
|
|||||||
int rc;
|
int rc;
|
||||||
char driver[STRING_SIZE] = "";
|
char driver[STRING_SIZE] = "";
|
||||||
char driveroptions[STRING_SIZE] = "";
|
char driveroptions[STRING_SIZE] = "";
|
||||||
|
struct keyvalue *kv = initkeyvalues();
|
||||||
int result = 0;
|
int result = 0;
|
||||||
char commandstring[STRING_SIZE];
|
char commandstring[STRING_SIZE];
|
||||||
char address[STRING_SIZE], netmask[STRING_SIZE];
|
char address[STRING_SIZE], netmask[STRING_SIZE];
|
||||||
@@ -92,6 +95,7 @@ int networkmenu(struct keyvalue *ethernetkv)
|
|||||||
result = 1;
|
result = 1;
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
freekeyvalues(kv);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
|
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
|
||||||
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
|
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* $Id: pcmcia.c,v 1.6.2.4 2005/12/08 02:12:28 franck78 Exp $
|
* $Id: pcmcia.c,v 1.6.2.2 2005/01/31 15:49:43 alanh Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern FILE *flog;
|
extern FILE *flog;
|
||||||
extern int modprobe(char *);
|
|
||||||
|
|
||||||
/*====================================================================*/
|
/*====================================================================*/
|
||||||
|
|
||||||
@@ -141,8 +140,6 @@ static u_char i365_get(u_short sock, u_short reg)
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // the following code do nothing usefull, it ends with return 0 anyway
|
|
||||||
|
|
||||||
static void i365_set(u_short sock, u_short reg, u_char data)
|
static void i365_set(u_short sock, u_short reg, u_char data)
|
||||||
{
|
{
|
||||||
u_char val = I365_REG(sock, reg);
|
u_char val = I365_REG(sock, reg);
|
||||||
@@ -162,12 +159,11 @@ static void i365_bclr(u_short sock, u_short reg, u_char mask)
|
|||||||
d &= ~mask;
|
d &= ~mask;
|
||||||
i365_set(sock, reg, d);
|
i365_set(sock, reg, d);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int i365_probe()
|
int i365_probe()
|
||||||
{
|
{
|
||||||
int val, slot, sock, done;
|
int val, slot, sock, done;
|
||||||
// char *name = "i82365sl";
|
char *name = "i82365sl";
|
||||||
|
|
||||||
ioperm(i365_base, 4, 1);
|
ioperm(i365_base, 4, 1);
|
||||||
ioperm(0x80, 1, 1);
|
ioperm(0x80, 1, 1);
|
||||||
@@ -176,17 +172,17 @@ int i365_probe()
|
|||||||
val = i365_get(sock, I365_IDENT);
|
val = i365_get(sock, I365_IDENT);
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0x82:
|
case 0x82:
|
||||||
// name = "i82365sl A step";
|
name = "i82365sl A step";
|
||||||
// break;
|
break;
|
||||||
case 0x83:
|
case 0x83:
|
||||||
// name = "i82365sl B step";
|
name = "i82365sl B step";
|
||||||
// break;
|
break;
|
||||||
case 0x84:
|
case 0x84:
|
||||||
// name = "VLSI 82C146";
|
name = "VLSI 82C146";
|
||||||
// break;
|
break;
|
||||||
case 0x88: case 0x89: case 0x8a:
|
case 0x88: case 0x89: case 0x8a:
|
||||||
// name = "IBM Clone";
|
name = "IBM Clone";
|
||||||
// break;
|
break;
|
||||||
case 0x8b: case 0x8c:
|
case 0x8b: case 0x8c:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -202,7 +198,6 @@ int i365_probe()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // the following code do nothing usefull, it ends with return 0 anyway
|
|
||||||
if ((sock == 2) && (strcmp(name, "VLSI 82C146") == 0))
|
if ((sock == 2) && (strcmp(name, "VLSI 82C146") == 0))
|
||||||
name = "i82365sl DF";
|
name = "i82365sl DF";
|
||||||
|
|
||||||
@@ -236,7 +231,7 @@ int i365_probe()
|
|||||||
name = "VIA VT83C469";
|
name = "VIA VT83C469";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} /* i365_probe */
|
} /* i365_probe */
|
||||||
@@ -303,30 +298,38 @@ int tcic_probe(ioaddr_t base)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*====================================================================*/
|
/*====================================================================*/
|
||||||
|
|
||||||
char * initialize_pcmcia (void)
|
char * initialize_pcmcia (void)
|
||||||
{
|
{
|
||||||
#ifndef __alpha__
|
#ifndef __alpha__
|
||||||
ioaddr_t tcic_base = TCIC_BASE;
|
ioaddr_t tcic_base = TCIC_BASE;
|
||||||
#endif
|
#endif
|
||||||
char* pcmcia;
|
int len;
|
||||||
|
char *pcmcia = NULL;
|
||||||
if ((pcmcia = pci_probe()))
|
|
||||||
return pcmcia; /* we're all done */
|
if ((pcmcia = pci_probe())) {
|
||||||
|
/* we're all done */
|
||||||
#ifndef __alpha__
|
#ifndef __alpha__
|
||||||
else if (i365_probe() == 0)
|
} else if (i365_probe() == 0) {
|
||||||
return "i82365";
|
len = strlen("i82365") + 1;
|
||||||
else if (tcic_probe(tcic_base) == 0)
|
pcmcia = calloc(1, len);
|
||||||
return "tcic";
|
strncpy(pcmcia, "i82365", len);
|
||||||
|
} else if (tcic_probe(tcic_base) == 0) {
|
||||||
|
len = strlen("tcic") + 1;
|
||||||
|
pcmcia = calloc(1, len);
|
||||||
|
strncpy(pcmcia, "tcic", len);
|
||||||
#endif
|
#endif
|
||||||
else {
|
} else {
|
||||||
/* Detect ISAPNP based i82365 controllers */
|
/* Detect ISAPNP based i82365 controllers */
|
||||||
FILE *f;
|
FILE *f;
|
||||||
modprobe("i82365");
|
mysystem("modprobe i82365");
|
||||||
if ((f = fopen("/proc/bus/pccard/00/info", "r"))) {
|
if ((f = fopen("/proc/bus/pccard/00/info", "r"))) {
|
||||||
|
len = strlen("i82365") + 1;
|
||||||
|
pcmcia = calloc(1, len);
|
||||||
|
strncpy(pcmcia, "i82365", len);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return "i82365";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return pcmcia;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ try_scsi(char *disk_device)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
// remove usb scsi
|
|
||||||
return ( checkusb(disk_device) ? 0:1 );
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2002: Mark Wormgoor <mark@wormgoor.com>
|
* Copyright 2002: Mark Wormgoor <mark@wormgoor.com>
|
||||||
*
|
*
|
||||||
* $Id: usb.c,v 1.9.2.8 2005/12/10 00:18:23 franck78 Exp $
|
* $Id: usb.c,v 1.9.2.3 2004/11/16 22:48:43 alanh Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,114 +28,71 @@ int usbohci = 0;
|
|||||||
int ehcihcd = 0;
|
int ehcihcd = 0;
|
||||||
|
|
||||||
int initialize_usb() {
|
int initialize_usb() {
|
||||||
modprobe("sd_mod");
|
mysystem("/sbin/modprobe sd_mod");
|
||||||
modprobe("sr_mod");
|
mysystem("/sbin/modprobe sr_mod");
|
||||||
modprobe("usb-storage");
|
mysystem("/sbin/modprobe usb-storage");
|
||||||
|
|
||||||
if (ehcihcd) {
|
if (ehcihcd) {
|
||||||
rmmod("ehci-hcd");
|
mysystem("/sbin/rmmod ehci-hcd");
|
||||||
ehcihcd = 0;
|
ehcihcd = 0;
|
||||||
}
|
}
|
||||||
if (usbohci) {
|
if (usbohci) {
|
||||||
rmmod("usb-ohci");
|
mysystem("/sbin/rmmod usb-ohci");
|
||||||
usbohci = 0;
|
usbohci = 0;
|
||||||
}
|
}
|
||||||
if (usbuhci) {
|
if (usbuhci) {
|
||||||
rmmod("usb-uhci");
|
mysystem("/sbin/rmmod usb-uhci");
|
||||||
usbuhci = 0;
|
usbuhci = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modprobe("ehci-hcd") == 0) ehcihcd = 1;
|
if (mysystem("/sbin/modprobe ehci-hcd") == 0)
|
||||||
if (modprobe("usb-ohci") == 0) usbohci = 1;
|
ehcihcd = 1;
|
||||||
if (modprobe("usb-uhci") == 0) usbuhci = 1;
|
if (mysystem("/sbin/modprobe usb-ohci") == 0)
|
||||||
|
usbohci = 1;
|
||||||
|
if (mysystem("/sbin/modprobe usb-uhci") == 0)
|
||||||
|
usbuhci = 1;
|
||||||
|
|
||||||
modprobe("hid");
|
mysystem("/sbin/modprobe hid");
|
||||||
modprobe("keybdev");
|
mysystem("/sbin/modprobe keybdev");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int write_usb_modules_conf() {
|
int write_usb_modules_conf() {
|
||||||
int index = 0;
|
int index;
|
||||||
FILE *handle;
|
FILE *handle;
|
||||||
|
|
||||||
if (!(handle = fopen("/harddisk/etc/modules.conf", "a")))
|
if (!(handle = fopen("/harddisk/etc/modules.conf", "a")))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
index = 0;
|
||||||
|
|
||||||
#if 0 /* we don't do this yet, because one of the drivers has a problem
|
#if 0 /* we don't do this yet, because one of the drivers has a problem
|
||||||
* with it */
|
* with it */
|
||||||
if (ehcihcd) {
|
if (ehcihcd) {
|
||||||
fprintf(handle,"alias usb-controller");
|
|
||||||
if (index)
|
if (index)
|
||||||
fprintf(handle,"%d",index);
|
fprintf(handle,"alias usb-controller%d ehci-hcd\n",index);
|
||||||
fprintf(handle," ehci-hcd\n");
|
else
|
||||||
|
fprintf(handle,"alias usb-controller ehci-hcd\n");
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (usbohci) {
|
if (usbohci) {
|
||||||
fprintf(handle,"alias usb-controller");
|
|
||||||
if (index)
|
if (index)
|
||||||
fprintf(handle,"%d",index);
|
fprintf(handle,"alias usb-controller%d usb-ohci\n",index);
|
||||||
fprintf(handle," usb-ohci\n");
|
else
|
||||||
|
fprintf(handle,"alias usb-controller usb-ohci\n");
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usbuhci) {
|
if (usbuhci) {
|
||||||
fprintf(handle,"alias usb-controller");
|
|
||||||
if (index)
|
if (index)
|
||||||
fprintf(handle,"%d",index);
|
fprintf(handle,"alias usb-controller%d usb-uhci\n",index);
|
||||||
fprintf(handle," usb-uhci\n");
|
else
|
||||||
|
fprintf(handle,"alias usb-controller usb-uhci\n");
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
fclose(handle);
|
fclose(handle);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checkusb().
|
|
||||||
Scans the named partitions and returns true if USB-removable.
|
|
||||||
a bug? in "cat /proc/partitions" with superfloppy scheme device
|
|
||||||
make them appearing always with four 'false' partitions:
|
|
||||||
sda and sda1 sda2 sda3 sda4.
|
|
||||||
No easy way to decide if /dev/sda1 exists or not.
|
|
||||||
*/
|
|
||||||
int checkusb(char *partition)
|
|
||||||
{
|
|
||||||
FILE *f = NULL;
|
|
||||||
char filename[STRING_SIZE];
|
|
||||||
char buffer[STRING_SIZE];
|
|
||||||
char *pchar = &buffer[0];
|
|
||||||
if (!(f = fopen("/proc/partitions", "r")))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
short int major = 0, minor = 0;
|
|
||||||
while (fgets(buffer, STRING_SIZE, f)) {
|
|
||||||
/* look for partition*/
|
|
||||||
if (strstr (buffer, partition)) {
|
|
||||||
major = atoi (buffer);
|
|
||||||
if (major != 8) break ; /* not scsi */
|
|
||||||
//get minor
|
|
||||||
while (*pchar != '8') pchar++;
|
|
||||||
minor = atoi (++pchar);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(f);
|
|
||||||
if (major != 8) return 0; /* nothing found */
|
|
||||||
|
|
||||||
//now check for usb-storage-MINOR
|
|
||||||
minor >>= 4; // get index from minor
|
|
||||||
sprintf (filename, "/proc/scsi/usb-storage-%d/%d", minor,minor);
|
|
||||||
|
|
||||||
if (!(f = fopen(filename, "r")))
|
|
||||||
return 0;
|
|
||||||
int count = 0;
|
|
||||||
while (fgets(buffer, STRING_SIZE, f)) {
|
|
||||||
if (strstr(buffer,"usb-storage")) count++;
|
|
||||||
if (strstr(buffer,"SCSI")) count++;
|
|
||||||
if (strstr(buffer,"Attached: Yes")) count++;
|
|
||||||
}
|
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
return (count==3 ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user