From owner-freebsd-ppc@FreeBSD.ORG Fri Jan 30 14:49:05 2004 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2246D16A4CE for ; Fri, 30 Jan 2004 14:49:05 -0800 (PST) Received: from liberty.onthenet.com.au (liberty.OntheNet.com.au [203.22.124.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3707C43D2F for ; Fri, 30 Jan 2004 14:49:03 -0800 (PST) (envelope-from grehan@freebsd.org) Received: from freebsd.org (CPE-30-4.dsl.onthenet.net [203.144.30.4]) i0UMn1ZG048804; Sat, 31 Jan 2004 08:49:01 +1000 (EST) (envelope-from grehan@freebsd.org) Message-ID: <401ADFD4.8090604@freebsd.org> Date: Sat, 31 Jan 2004 08:51:00 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030524 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rafal Jaworowski References: <401845DE.90409@freebsd.org> <401AD442.704@motorola.com> In-Reply-To: <401AD442.704@motorola.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD/powerpc on PPCBug-based embedded boards X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2004 22:49:05 -0000 Hi Rafal, > here is some early boot log (for the evidence:) Excellent ! :-) > ravenpic0: on nexus0 > ravenpic0: Version 1.3, supports 2 CPUs and 16 irqs I've done some major surgery on the OpenPIC code so that the register don't have to be touched at nexus probe time. You might want to check that out. The driver will be a little obtuse since it needs both a nexus attachment and also a h/w bus attachment, but there's examples in the ofw openpic and the psim iobus openpic. > pci0: at device 11.0 (no driver attached) Are there many ISA peripherals on this device ? The ISA bus is a bit difficult to handle on PPC. > pci0: at device 11.1 (no driver attached) PCI ATA should work fine, so long as you handle i/o mapping in your PCI bridge code. I haven't done it yet in UniNorth, but the Grackle code has an example that has been tested with PCI/ATA controllers. > pci0: at device 11.2 (no driver attached) USB works great, you should add it to your config file if this is OHCI. > pci0: at device 11.3 (no driver attached) If OpenFirmware sets this up in fb8 mode, the ofw framebuffer console will work on this, with maybe some tweaking in the probe code. But, if it's just a VGA card plugged into a PCI slot, you're out of luck. > de0: port 0xfffff00-0xfffff7f mem > 0x3bffff00-0x3bffff7f irq 10 at device 14.0 on pci0 > de0: 21140A [10-100Mb/s] pass 2.2 > de0: address 00:01:af:01:48:b7 Does this work OK ? If so, I'll add it to GENERIC. > Manual root filesystem specification: > : Mount using filesystem > eg. ufs:/dev/da0a > ? List valid disk boot devices > Abort manual input > > mountroot> During early phases of development, I often use CD9660 mem disks. At the loader prompt, it's "> load -t md_image iso.img"m, and then at the mountroot> prompt, "cd9660:md0", or set vfs.root.mountfrom at the loader prompt. However, it does require a minor change to vfs_mount.c to allow a r/o ramdisk to be mounted as root. Patch appended. later, Peter. diff -u -r1.115 vfs_mount.c --- vfs_mount.c 14 Nov 2003 05:27:41 -0000 1.115 +++ vfs_mount.c 23 Nov 2003 11:25:23 -0000 @@ -113,6 +113,9 @@ static int usermount = 0; /* if 1, non-root can mount fs. */ SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, ""); +static int mdrofs = 0; /* 1 if md root is read-only (i.e. iso9660) */ +TUNABLE_INT("vfs.mdrofs", &mdrofs); + MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); /* List of mounted filesystems. */ @@ -1318,8 +1321,11 @@ if ((path[0] != 0) && setrootbyname(path)) printf("setrootbyname failed\n"); - /* If the root device is a type "memory disk", mount RW */ - if (rootdev != NODEV && devsw(rootdev) != NULL) { + /* + * If the root device is a type "memory disk", mount RW + * unless requested otherwise by the loader + */ + if (mdrofs == 0 && rootdev != NODEV && devsw(rootdev) != NULL) { devname = devtoname(rootdev); if (devname[0] == 'm' && devname[1] == 'd') mp->mnt_flag &= ~MNT_RDONLY;