From owner-freebsd-mobile Wed Jan 12 18: 5:34 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from afs.itc.keio.ac.jp (afs.itc.keio.ac.jp [131.113.212.3]) by hub.freebsd.org (Postfix) with SMTP id 7D84314A24 for ; Wed, 12 Jan 2000 18:04:33 -0800 (PST) (envelope-from hosokawa@itc.keio.ac.jp) Received: (qmail 11311 invoked from network); 13 Jan 2000 01:37:51 -0000 Received: from dhcp-000.hc.cc.keio.ac.jp (HELO ringo.FromTo.Cc) (131.113.234.230) by afs.itc.keio.ac.jp with SMTP; 13 Jan 2000 01:37:51 -0000 Date: Thu, 13 Jan 2000 10:39:01 +0900 Message-ID: <86so02da2y.wl@ringo.FromTo.Cc> From: Tatsumi Hosokawa To: imp@village.org Cc: freebsd-mobile@freebsd.org Subject: Re: Patch to eliminate pccard disk. In-Reply-To: In your message of "Tue, 11 Jan 2000 17:36:22 -0700" <200001120036.RAA07946@harmony.village.org> References: <200001120036.RAA07946@harmony.village.org> User-Agent: Wanderlust/2.2.13 (Keep The Faith) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 8) (Bryce Canyon) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At Tue, 11 Jan 2000 17:36:22 -0700, Warner Losh wrote: > Here's a message that I've edited and translated to English from the > orignal Japanese. Hosokawa-san has produced changes needed to > eliminate the pccard disk by moving the functionality to the normal > installation disk. Please comment on the following patches. The > original Japanese message is <86zoucnoe4.wl@localhost.my.domain> and > can be retrieved from the bsd-nomads mailing list archives. > > The patches look good to me. Please send me your comments and I'll > work with Hosokawa-san to make sure that we can integrate this before > the deadline. I fixed some minor bugs of this patch and compiled the test version. New boot.flp, kern.flp, and mfsroot.flp can be found at http://wing-yee.ntc.keio.ac.jp/hosokawa/current/ Checksums: MD5 (boot.flp) = fca1c097fe1ef9fe3f70bfd98f84b178 MD5 (kern.flp) = d956eef7c8fc07dda76e405d4d21b9c0 MD5 (mfsroot.flp) = 425206f9c8caf17c3dbcdb1157bbfd88 Please test it. Especially, I can't test it under APA-1460. When I used it with desktop, it works just like generic installation floppy. Updated patch follows. Index: Makefile =================================================================== RCS file: /home/ncvs/src/release/Makefile,v retrieving revision 1.524 diff -u -r1.524 Makefile --- Makefile 2000/01/10 16:27:32 1.524 +++ Makefile 2000/01/11 14:54:39 @@ -25,15 +25,6 @@ # If this is a -stable snapshot, then set #RELEASETAG=RELENG_3 -PCCARD?=NO - -.if ${PCCARD} == "YES" -CARDDEV=card0 card1 card2 card3 -.else -CARDDEV= -.endif - -# We now use GENERIC for the pccard kernel. KERNCONF=GENERIC # If you are using a local CVS repository with components stored in @@ -278,9 +269,6 @@ rm -rf ${_R}/* mkdir ${RD} mkdir ${RD}/floppies -.if ${MACHINE_ARCH} == "i386" - mkdir ${RD}/floppies/pccard -.endif mkdir ${RD}/trees mkdir ${RD}/dists mkdir ${RD}/kernels @@ -330,11 +318,7 @@ # Tcl and Perl APIs. See also /usr/src/usr.bin/vi/Makefile. release.4: @mkdir -p /stand -.if ${PCCARD} == "YES" - cp ${.CURDIR}/boot_crunch.conf.pccard ${.OBJDIR}/boot_crunch.conf -.else cp ${.CURDIR}/boot_crunch.conf.generic ${.OBJDIR}/boot_crunch.conf -.endif cd ${.CURDIR}/sysinstall && make obj depend all install rm -rf ${RD}/crunch mkdir -p ${RD}/crunch @@ -464,14 +448,12 @@ @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ DIR=${RD}/mfsfd/stand ZIP=false ( cd ${RD}/trees/bin/dev && \ - ls console tty bpf0 ttyv0 ttyv1 ttyv2 ttyv3 null zero ${CARDDEV} | \ + ls console tty bpf0 ttyv0 ttyv1 ttyv2 ttyv3 null zero card0 card1 card2 card3 | \ cpio -dump ${RD}/mfsfd/dev ) ( cd ${RD}/mfsfd/dev && rm -f *[swo]d*[bdefgh] ) ( cd ${RD}/mfsfd && mkdir -p bin sbin && ln -s /stand/sh bin/sh ) cp /sbin/dhclient-script ${RD}/mfsfd/sbin -.if ${PCCARD} == "YES" cp ${.CURDIR}/../etc/pccard.conf.sample ${RD}/mfsfd/etc/pccard.conf -.endif cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand echo "nameserver 42/tcp name" > ${RD}/mfsfd/stand/etc/services echo "ftp 21/tcp" >> ${RD}/mfsfd/stand/etc/services @@ -535,10 +517,6 @@ # Do our last minute floppies directory setup in a convenient place. @cp ${.CURDIR}/texts/FLOPPIES.TXT ${RD}/floppies/README.TXT @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5) -.if ${MACHINE_ARCH} == "i386" - @cp ${.CURDIR}/texts/PCCARD.TXT ${RD}/floppies/pccard/README.TXT - @(cd ${RD}/floppies/pccard; md5 *.flp > CHECKSUM.MD5) -.endif touch release.9 # @@ -648,11 +626,6 @@ @echo "Release done" floppies: -.if ${MACHINE_ARCH} == "i386" - @cd ${.CURDIR} && ${MAKE} PCCARD=YES boot.flp - mv ${RD}/floppies/boot.flp ${RD}/floppies/kern.flp \ - ${RD}/floppies/mfsroot.flp ${RD}/floppies/pccard -.endif @cd ${.CURDIR} && ${MAKE} boot.flp @cd ${.CURDIR} && ${MAKE} fixit.flp @cd ${RD} && find floppies -print | cpio -dumpl ${FD} Index: boot_crunch.conf.generic =================================================================== RCS file: /home/ncvs/src/release/boot_crunch.conf.generic,v retrieving revision 1.9 diff -u -r1.9 boot_crunch.conf.generic --- boot_crunch.conf.generic 1999/12/14 22:41:08 1.9 +++ boot_crunch.conf.generic 2000/01/11 14:55:30 @@ -2,12 +2,14 @@ srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 +srcdirs /usr/src/usr.sbin/pccard -progs sh find sed test +progs sh find sed test rm progs pwd ppp progs sysinstall newfs minigzip cpio fsck ifconfig route slattach progs mount_nfs progs dhclient arp hostname +progs pccardc pccardd wicontrol ln minigzip gzip ln minigzip gunzip ln minigzip zcat Index: sysinstall/Makefile =================================================================== RCS file: /home/ncvs/src/release/sysinstall/Makefile,v retrieving revision 1.89 diff -u -r1.89 Makefile --- sysinstall/Makefile 2000/01/04 04:50:04 1.89 +++ sysinstall/Makefile 2000/01/11 15:27:39 @@ -5,7 +5,7 @@ NOSHARED=YES CLEANFILES+= makedevs.c rtermcap rtermcap.tmp dumpnlist -CLEANFILES+= keymap.tmp keymap.h pccard_conf.h +CLEANFILES+= keymap.tmp keymap.h .PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum @@ -15,22 +15,13 @@ label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \ msg.c network.c nfs.c options.c package.c pccard.c \ system.c tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \ - keymap.h pccard_conf.h + keymap.h CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} CFLAGS+= -I${.CURDIR}/../../sys -PCCARD?= NO - DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio - -pccard_conf.h: -.if ${PCCARD} == "YES" - echo "#define PCCARD 1" > pccard_conf.h -.else - echo "#undef PCCARD" > pccard_conf.h -.endif makedevs.c: Makefile rtermcap keymap.h rm -f makedevs.tmp Index: sysinstall/main.c =================================================================== RCS file: /home/ncvs/src/release/sysinstall/main.c,v retrieving revision 1.55 diff -u -r1.55 main.c --- sysinstall/main.c 2000/01/04 04:31:29 1.55 +++ sysinstall/main.c 2000/01/11 15:28:59 @@ -35,7 +35,6 @@ */ #include "sysinstall.h" -#include "pccard_conf.h" #include #include @@ -88,10 +87,8 @@ if (DebugFD) dup2(DebugFD, 2); -#ifdef PCCARD /* Initialize PC-card */ pccardInitialize(); -#endif /* Probe for all relevant devices on the system */ deviceGetAll(); Index: sysinstall/pccard.c =================================================================== RCS file: /home/ncvs/src/release/sysinstall/pccard.c,v retrieving revision 1.7 diff -u -r1.7 pccard.c --- sysinstall/pccard.c 1999/12/14 04:25:29 1.7 +++ sysinstall/pccard.c 2000/01/12 21:39:13 @@ -15,13 +15,10 @@ */ #include "sysinstall.h" -#include "pccard_conf.h" #include #include #include -#ifdef PCCARD - int pccard_mode = 0; DMenu MenuPCICMem = { @@ -83,6 +80,19 @@ return; } + sprintf(card_device, CARD_DEVICE, 0); + + if ((fd = open(card_device, O_RDWR)) < 0) { + msgDebug("Can't open PC-card controller %s.\n", + card_device); + return; + } + else if (msgYesNo("Found PC-card slot(s).\n" + "Use PC-card device as installation media?\n")) { + return; + } + close(fd); + dmenuOpenSimple(&MenuPCICMem, FALSE); spcic_mem = variable_get("_pcicmem"); dmenuOpenSimple(&MenuCardIRQ, FALSE); @@ -122,8 +132,6 @@ break; } - sprintf(card_device, CARD_DEVICE, 0); - w = savescr(); dialog_clear_norefresh(); msgConfirm("Now we start initializing PC-card controller and cards.\n" @@ -163,7 +171,3 @@ vsystem(pccardd_cmd); restorescr(w); } - -#endif /* PCCARD */ - - Index: sysinstall/sysinstall.h =================================================================== RCS file: /home/ncvs/src/release/sysinstall/sysinstall.h,v retrieving revision 1.179 diff -u -r1.179 sysinstall.h --- sysinstall/sysinstall.h 2000/01/04 04:50:07 1.179 +++ sysinstall/sysinstall.h 2000/01/11 16:40:30 @@ -691,6 +691,9 @@ extern int package_extract(Device *dev, char *name, Boolean depended); extern Boolean package_exists(char *name); +/* pccard.c */ +extern void pccardInitialize(void); + /* system.c */ extern void systemInitialize(int argc, char **argv); extern void systemShutdown(int status); -- --------------------------- Tatsumi Hosokawa hosokawa@itc.keio.ac.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message