From owner-freebsd-mobile@FreeBSD.ORG Sun May 15 05:05:15 2005 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 626B316A4CE for ; Sun, 15 May 2005 05:05:15 +0000 (GMT) Received: from mailhost.m5p.com (209-162-215-52.dq1sn.easystreet.com [209.162.215.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1E1543DAB for ; Sun, 15 May 2005 05:05:14 +0000 (GMT) (envelope-from george@m5p.com) Received: from m5p.com (ssh.m5p.com [IPv6:2001:418:3fd::fb]) by mailhost.m5p.com (8.13.2/8.13.2) with ESMTP id j4F55Dhn077037 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK) for ; Sat, 14 May 2005 22:05:13 -0700 (PDT) Received: (from george@localhost) by m5p.com (8.13.2/8.13.2/Submit) id j4F55DA7073488; Sat, 14 May 2005 22:05:13 -0700 (PDT) Date: Sat, 14 May 2005 22:05:13 -0700 (PDT) Message-Id: <200505150505.j4F55DA7073488@m5p.com> From: george+freebsd@m5p.com To: freebsd-mobile@freebsd.org X-Scanned-By: MIMEDefang 2.49 on IPv6:2001:418:3fd::f7 Subject: Patched 5.4 kernel for Compaq R3000 series X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2005 05:05:15 -0000 Symptom: You have a Compaq Presario R3000-series machine. When you put the 5.4 CD-ROM in and boot up, the machine powers down shortly after you leave the beastie boot menu. Workaround: You need a version of the patch originated by Jung-uk Kim (http://docs.freebsd.org/cgi/mid.cgi?200407021130.58247.jkim). But you can't apply the patch until after you install the system, but you can't install the system until ... (etc., etc.). I have posted a patched version of the kernel TEMPORARILY at: http://www.m5p.com/freebsd/kernel-5.4-r3000.tar.bz2 (My version of the patch, attached, is slightly different from the original version and disables the keyboard controller test under the control of a device hint.) Here is how you can use this patched kernel, after logging in as root: A. Unpack the contents of a FreeBSD CD-ROM in some temporary space. For example, mount the CD-ROM on /cdrom and make a directory /usr/tmp/5.4. Then cd to /usr/tmp/5.4 and do: (cd /cdrom, gtar cvf - .) | gtar xvfp - B. Replace the distributed kernel with the patched kernel. cd /usr/tmp/5.4/boot/kernel mv kernel kernel.orig tar xvfy kernel-5.4-r3000.tar.bz2 C. cd to /usr/tmp/5.4/boot. Add the lines: hint.atkbdtest.0.disabled="1" hint.acpi.0.disabled="1" to the end of the file loader.conf (unless you know that ACPI works on your R3000). D. cd to /usr/tmp/5.4 and burn a new CD-ROM with this command: mkisofs -R -b boot/cdboot -no-emul-boot . | burncd data - fixate E. Install with the patched CD-ROM. Install in the usual way. But after the base distribution has been extracted, go to the emergency holographic shell (ALT-F4) and replace the kernel which was just installed with the patched kernel: cp /dist/boot/kernel/kernel /boot/kernel You should now have a working system. Here is my modified version of Jung-ok Kim's patch. -- George Mitchell --- dev/kbd/atkbdc.c.orig Sun Aug 24 10:49:15 2003 +++ dev/kbd/atkbdc.c Tue Dec 14 15:28:11 2004 @@ -944,53 +944,59 @@ int test_kbd_port(KBDC p) { - int retry = KBD_MAXRETRY; - int again = KBD_MAXWAIT; - int c = -1; + if (resource_disabled("atkbdtest", 0)) return 0; + else { + int retry = KBD_MAXRETRY; + int again = KBD_MAXWAIT; + int c = -1; - while (retry-- > 0) { - empty_both_buffers(p, 10); - if (write_controller_command(p, KBDC_TEST_KBD_PORT)) - break; - } - if (retry < 0) - return FALSE; + while (retry-- > 0) { + empty_both_buffers(p, 10); + if (write_controller_command(p, KBDC_TEST_KBD_PORT)) + break; + } + if (retry < 0) + return FALSE; - emptyq(&kbdcp(p)->kbd); - while (again-- > 0) { - c = read_controller_data(p); - if (c != -1) /* try again if the controller is not ready */ - break; + emptyq(&kbdcp(p)->kbd); + while (again-- > 0) { + c = read_controller_data(p); + if (c != -1) /* try again if the controller is not ready */ + break; + } + if (verbose || bootverbose) + log(LOG_DEBUG, "kbdc: TEST_KBD_PORT status:%04x\n", c); + return c; } - if (verbose || bootverbose) - log(LOG_DEBUG, "kbdc: TEST_KBD_PORT status:%04x\n", c); - return c; } int test_aux_port(KBDC p) { - int retry = KBD_MAXRETRY; - int again = KBD_MAXWAIT; - int c = -1; + if (resource_disabled("atkbdtest", 0)) return 0; + else { + int retry = KBD_MAXRETRY; + int again = KBD_MAXWAIT; + int c = -1; - while (retry-- > 0) { - empty_both_buffers(p, 10); - if (write_controller_command(p, KBDC_TEST_AUX_PORT)) - break; - } - if (retry < 0) - return FALSE; + while (retry-- > 0) { + empty_both_buffers(p, 10); + if (write_controller_command(p, KBDC_TEST_AUX_PORT)) + break; + } + if (retry < 0) + return FALSE; - emptyq(&kbdcp(p)->kbd); - while (again-- > 0) { - c = read_controller_data(p); - if (c != -1) /* try again if the controller is not ready */ - break; + emptyq(&kbdcp(p)->kbd); + while (again-- > 0) { + c = read_controller_data(p); + if (c != -1) /* try again if the controller is not ready */ + break; + } + if (verbose || bootverbose) + log(LOG_DEBUG, "kbdc: TEST_AUX_PORT status:%04x\n", c); + return c; } - if (verbose || bootverbose) - log(LOG_DEBUG, "kbdc: TEST_AUX_PORT status:%04x\n", c); - return c; } int