From owner-freebsd-arm@freebsd.org Fri Jan 6 14:37:26 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A6BCA2137 for ; Fri, 6 Jan 2017 14:37:26 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8361D3D for ; Fri, 6 Jan 2017 14:37:26 +0000 (UTC) (envelope-from rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1483713443; l=2309; s=domk; d=obsigna.com; h=To:Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type: From; bh=xpvI1jlDpL9WoE8ulbjXWH77aKuQ36WGXW2FqzBz95k=; b=tvbuyEcjOOUVuycHHfM5ig/qZC6QUCcfKTc2pdH0dtJRTqZ15wYqlboVp03nq9VCLm 3mZm3PK+V1UoIQDO9vDVPaJ7NcK4d06WiaHHUSLNexb2P9hfRCESrl6HB1IuktR8p+zM F3S3nC5E8Y8Me2rQVucqOCFLW0EQDtc5V5jrQ= X-RZG-AUTH: :O2kGeEG7b/pS1EK7WHa0hxqKZr4lnx6UhT0M0o35iAdWtoM07Gt3wQHFGhIh99LgMA== X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com (bb02ac17.virtua.com.br [187.2.172.23]) by smtp.strato.de (RZmta 39.11 DYNA|AUTH) with ESMTPSA id e06161t06EbNBux (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Fri, 6 Jan 2017 15:37:23 +0100 (CET) Received: from rolf.projectworld.net (rolf.projectworld.net [192.168.222.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 76BC27506D97 for ; Fri, 6 Jan 2017 12:37:20 -0200 (BRST) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: BeagleBone Black MMC ordering clashes Message-Id: <7D750433-59FC-4999-AC24-041683E17310@obsigna.com> Date: Fri, 6 Jan 2017 12:37:19 -0200 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 14:37:27 -0000 The BeagleBone Black comes with 2 MMC facilities, one built-in (internal = 4 GB) and one provided by a removable SD card. For unknown reasons the = BBB defined on the removable SD card to be MMC0 and the internal flash = memory is MMC0. 1) In the first go, I dd'd the FreeBSD-12 BBB snapshot (20161221) onto = a SD card and I was able to start the device from that card. gpart = showed me that the device identifier of the SD card is mmcsd0 and that = of the internal flash memory is mmcsd1. OK, that matches the already = mentioned definitions. 2) Now, I destroyed the partition of the internal mmcsd1 and created a = new one: =3D> 63 7552961 mmcsd1 MBR (3.6G) 63 8129 - free - (4.0M) 8192 8192 1 fat32 [active] (4.0M) 16384 7536640 2 freebsd (3.6G) =3D> 0 7536640 mmcsd1s2 BSD (3.6G) 0 7536640 1 freebsd-ufs (3.6G) 3) I copied over the contents of /boot/msdos from the external SD card = to the msdosfs on mmcsd1s1 and I installed the FreeBSD 12 snapshot on = mmcsd1s1a. Restarting the device from the internal flash and no external = SD inserted with FreeBSD 12-CURRENT works well at the first glance. 4) However, the internal flash got now the device identifier mmcsd0: ... mmc0: No compatible cards found on bus ... mmcsd0: 4GB = at mmc1 48.0MHz/8bit/65535-block ... I know, this is how FreeBSD deals with the device numbering, i.e. serial = numbers starting at zero without particular meaning, and I know that we = should not rely on the number ordering. But it seems that the MMC device driver does cont on the external SD = card is at MMC0 when I insert it into the BBB once it has been started = from the internal flash. It seems to insist to assign the device ID = mmcsd0, which results in the device ordering clash because mmcsd0 has = been assigned to the internal flash at MMC1 (s. above). In the moment, I can have both flash device active at the same time only = when I start the BBB from the external SD. I would be glad to hear suggestions on how to deal with the issue. At = the end of the day, I want to start the device from the mostly static OS = file system on the internal flash and keep the volatile data on the = external SD. Best regards Rolf