From owner-freebsd-drivers@FreeBSD.ORG Sun Aug 3 23:53:43 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02F4DC70 for ; Sun, 3 Aug 2014 23:53:43 +0000 (UTC) Received: from mail-ig0-x242.google.com (mail-ig0-x242.google.com [IPv6:2607:f8b0:4001:c05::242]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBBD52058 for ; Sun, 3 Aug 2014 23:53:42 +0000 (UTC) Received: by mail-ig0-f194.google.com with SMTP id r2so1145975igi.1 for ; Sun, 03 Aug 2014 16:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=B/u2QDS15QGcDlKzwIBd2FgZ9fxhQi+BalCkabsHad4=; b=VA+3VlvB0jmLJ3WBnKFneAnjiXf5+UA/AxVuQo0VwfGmUVhsVPvW+6hygmXVWB8Q71 BiX70al6ACnV4/H7+33ZILULYYgqGJNiYGC9CR4DRBCGiq7BJpDhW2YYZJZk1dIxZnmd m6iFgedy3AGKEbPenWWy1EsSaFI+9SFQTLuCunuUXNA/6HNkX2Gj9ymEmRyg5OPfFkny ijwacffpDQ/34jwmdFFxZgj2WXRbcWFMbhgrBMJx0FA6sBBK5WWPRgdquly/QEhsHhof uvProp2LjZN7QPvpL6ca9sk1chnc3yT/UuA5nBNW6WPwUd3MKeFY04S+uGC2KpchPAYb 8A6w== MIME-Version: 1.0 X-Received: by 10.50.43.202 with SMTP id y10mr31189348igl.10.1407110021329; Sun, 03 Aug 2014 16:53:41 -0700 (PDT) Received: by 10.64.7.203 with HTTP; Sun, 3 Aug 2014 16:53:41 -0700 (PDT) Date: Sun, 3 Aug 2014 16:53:41 -0700 Message-ID: Subject: Re: sil3124 sata controller panics kernel From: Dieter BSD To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 23:53:43 -0000 > After that, it's an adventure to get it on the controller. I keep > a DOS hard drive image for netbooting for that sort of thing. There really needs to be Unix utility to do this. The Silicon Image clowns assume that everyone has a wintel peecee. Wrong. Archive: /tmp/wget/UpdFlash_v336.zip Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 39936 Defl:N 7563 81% 10-25-2007 12:46 a561390f ReadMe.doc 79504 Defl:N 38218 52% 10-24-2007 17:44 62039151 UPDFLASH.EXE A "doc" file? Seriously? Do these idiots own stock in microshit, or what? The FreeDOS clowns assume that all computers have cd drives and floppy drives. Floppy drives? Did I fall into a wormhole and end up back in 1982? So I attempt to build a hard drive that will boot this freedos thingy. Put a NetBSD bootselect MBR on the disk, with a nice menu item "freedos". Run FreeBSD's newfs_msdos to create an obese filesystem. Give it -B and the metaboot.bot file so it installs the partition boot sector. Well, the nbr refuses to execute the partition boot sector and reports error 3, which the man page says means: The bootsector was loaded successfully, but it was not valid (i.e., the magic number check failed, or it contained no code). Turns out that FreeBSD's newfs_msdos changed some stuff in that sector, although the 55AA thing is still there, so I don't know what the mbr's problem is. 1,6c1,6 < 00000000 52 0e 1f 0e 07 fc b9 00 01 be 00 7c bf 00 6c f3 |R..........|..l.| < 00000010 a5 b8 16 6c ff e0 b8 e0 1f 8e d8 be 00 7c bf 00 |...l.........|..| < 00000020 7c b9 00 01 f3 a5 0e 1f 81 3e fe 7d 55 aa 75 26 ||........>.}U.u&| < 00000030 b8 4d 45 bf a2 6c 89 05 bd 00 7c e8 28 00 75 16 |.ME..l....|.(.u.| < 00000040 89 f7 be c0 6c b9 0b 00 f3 a4 be ad 6c e8 34 00 |....l.......l.4.| < 00000050 5a ea 00 7c 00 00 be e8 6c e8 28 00 31 c0 cd 16 |Z..|....l.(.1...| --- > 00000000 52 0e 1f 0e 07 fc b9 00 01 be 00 00 02 40 20 00 |R............@ .| > 00000010 02 00 00 00 00 f0 00 00 3f 00 10 00 00 00 00 00 |........?.......| > 00000020 fc 08 3d 00 e9 01 00 00 00 00 00 00 02 00 00 00 |..=.............| > 00000030 01 00 02 00 a2 6c 89 05 bd 00 7c e8 28 00 75 16 |.....l....|.(.u.| > 00000040 89 f7 29 17 14 74 63 4e 4f 5f 4e 41 4d 45 20 20 |..)..tcNO_NAME | > 00000050 20 20 46 41 54 33 32 20 20 20 28 00 31 c0 cd 16 | FAT32 (.1...| Okay... so then I copy a fresh metaboot.bot into sector 0 (the mbr sector). This time it runs, but complains: "No FreeDOS boot sector in RAM at 0x1fe00x7c00 giving up press a key to reboot" Searching a bit with google gives me the idea that whoever wrote this freedos boot stuff did some rather wacky things. No useful info of course. What, exactly, is supposed to go in sector 0? A normal MBR that works great with multiple OSes is not the answer. What, exactly, goes into the 1st sector of the partition? metaboot.bot? With or without the changes from newfs_msdos? Anything else I need to do? Sacrifice a goat? If and when I ever get this freedos thingy running, I should probably update the 3132 firmware as well.