From owner-freebsd-arm@FreeBSD.ORG Thu Oct 13 05:32:15 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B24F106567A for ; Thu, 13 Oct 2011 05:32:15 +0000 (UTC) (envelope-from mrossi@swin.edu.au) Received: from gpo1.cc.swin.edu.au (gpo1.cc.swin.edu.au [136.186.1.30]) by mx1.freebsd.org (Postfix) with ESMTP id 566928FC08 for ; Thu, 13 Oct 2011 05:32:13 +0000 (UTC) Received: from [136.186.219.107] (dhcp219-107.wl.swin.edu.au [136.186.219.107]) by gpo1.cc.swin.edu.au (8.14.3/8.14.3) with ESMTP id p9D5Vlgm012429; Thu, 13 Oct 2011 16:31:48 +1100 Message-ID: <4E9669CB.2060707@swin.edu.au> Date: Thu, 13 Oct 2011 15:32:11 +1100 From: Mattia Rossi Organization: Swinburne University of Technology User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Warner Losh References: <4E9290FF.7090306@swin.edu.au> <4E92D2D8.8070500@swin.edu.au> <4E9535D0.2030706@swin.edu.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Create FAT partition/filesystem on the internal microSD flash of the Dreamplug X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mrossi@swin.edu.au List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2011 05:32:15 -0000 On 13/10/11 02:06, Warner Losh wrote: > > On Oct 12, 2011, at 12:38 AM, Mattia Rossi wrote: > >> -snip- >>>>> I've tried to recreate it using gpart and newfs_msdos, but can't >>>>> create any new FAT partition that mount_msdosfs would mount. >>>>> >>>>> See: >>>>> >>>>> dreamplug# gpart create -s mbr da0 >>>>> da0 created >>>>> dreamplug# gpart add -t fat32 -i 1 -s 32M da0 >>>>> da0s1 added >>>>> dreamplug# newfs_msdos da0s1 >>>>> /dev/da0s1: 65416 sectors in 8177 FAT16 clusters (4096 bytes/cluster) >>>>> BytesPerSec=512 SecPerClust=8 ResSectors=1 FATs=2 RootDirEnts=512 >>>>> Sectors=65520 Media=0xf0 FATsecs=32 SecPerTrack=63 Heads=255 >>>>> HiddenSecs=0 >>>>> dreamplug# mount_msdosfs /dev/da0s1 /mnt/usb >>>>> mount_msdosfs: /dev/da0s1: Invalid argument >>>>> >> -snap- >> >> I've tested the newfs_msdos command on a variety of i386 and amd64 based machines using different FreeBSD versions (8.2, 9-BETA2, 9-BETA3) and all of them work properly. FS can be craeed and mounts fine. >> >> So this is definitely an ARM problem.. Have no idea why though. >> If someone tells me where to look for the issue, I'll happily do it and help fixing the bug. > > Is there anything in dmesg? Have you tried turning on bootverbose to get more details about what the kernel part of mount_msdosfs hates? > Okay, rebootet with bootverbose built into the kernel (no idea how to activate it otherwise through u-boot). Used a preformatted SD card through a USB reader (as the inbuilt slot is used by my other SD card), but that makes no difference. Result: dreamplug# mount_msdosfs /dev/da2s1 /mnt/usb/ dreamplug# umount /mnt/usb/ dreamplug# newfs_msdos -F 32 /dev/da2s1 /dev/da2s1: 7739392 sectors in 120928 FAT32 clusters (32768 bytes/cluster) BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 H2 dreamplug# mount_msdosfs /dev/da2s1 /mnt/usb/ mount_msdosfs: /dev/da2s1: Invalid argument dmesg (all of it - just in case): KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-BETA3 #30 r226271M: Thu Oct 13 13:21:47 EST 2011 root@freebsd82fresh.matnina:/usr/obj/arm.arm/usr/devel/sys/DREAMPLUG arm Preloaded elf kernel "elf kernel" at 0xc0da2280. module mvs already present! CPU: Feroceon 88FR131 rev 1 (Marvell core) DC enabled IC enabled WB enabled EABT branch prediction enabled 16KB/32B 4-way Instruction cache 16KB/32B 4-way write-back-locking-C Data cache real memory = 536870912 (512 MB) Physical memory chunk(s): 00000000 - 0x8fffff, 9437184 bytes (2304 pages) 0xe96000 - 0x1f63bfff, 511336448 bytes (124838 pages) avail memory = 518504448 (494 MB) SOC: (0x6281:0x03) Marvell 88F6281 rev A1, TClock 200MHz wlan: <802.11 Link Layer> snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024] feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 f5 null: crypto: random: mem: openfirm: fdtbus0: on motherboard simplebus0: on fdtbus0 ic0: mem 0xf1020200-0xf102023b on sim0 timer0: mem 0xf1020300-0xf102032f irq 1 on simplebus0 Event timer "CPUTimer0" frequency 200000000 Hz quality 1000 Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000 gpio0: mem 0xf1010100-0xf101011f irq 35,360 device_attach: gpio0 attach returned 6 rtc0: mem 0xf1010300-0xf1010307 on simplebus0 rtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500) twsi0: mem 0xf1011000-0xf101101f irq 430 iicbus0: on twsi0 iic0: on iicbus0 mge0: mem 0xf1072000-0xf1073fff irq 12,130 mge0: bpf attached mge0: Ethernet address: f0:ad:4e:00:84:c7 miibus0: on mge0 e1000phy0: PHY 0 on miibus0 e1000phy0: OUI 0x000ac2, model 0x0024, rev. 0 e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 10o mge1: mem 0xf1076000-0xf1077fff irq 16,170 mge1: bpf attached mge1: Ethernet address: f0:ad:4e:00:84:c8 miibus1: on mge1 e1000phy1: PHY 1 on miibus1 e1000phy1: OUI 0x000ac2, model 0x0024, rev. 0 e1000phy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 10o uart0: <16550 or compatible> mem 0xf1012000-0xf101201f irq 33 on simplebus0 uart0: fast interrupt uart0: console (1056,n,8,1) uart1: <16550 or compatible> mem 0xf1012100-0xf101211f irq 34 on simplebus0 uart1: fast interrupt ehci0: mem 0xf1050000-0xf1050fff irq 480 ehci0: 5.24 GL USB-2 workaround enabled usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0: on ehci0 usbus0: bpf attached ehci0: usbpf: Attached sata0: mem 0xf1080000-0xf1085fff irq 21 on0 ata0: on sata0 ata0: hard reset ... ata0: SATA connect timeout status=00000000 ata1: on sata0 ata1: hard reset ... ata1: SATA connect timeout status=00000000 sdio0: mem 0xf1090000-0xf1090133 irq 0 sdio0: mv_gpio_setup_intrhandler failed! device_attach: sdio0 attach returned 6 cryptosoft0: on motherboard crypto: assign cryptosoft0 driver id 0, flags 100663296 crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 procfs registered Timecounters tick every 1.000 msec vlan: initialized, using hash tables with chaining lo0: bpf attached ata0: Identifying devices: 00000000 ata0: New devices: 00000000 ata1: Identifying devices: 00000000 ata1: New devices: 00000000 usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 uhub0: 1 port with 1 removable, self powered Root mount waiting for: usbus0 ugen0.2: at usbus0 uhub1: on usbus0 Root mount waiting for: usbus0 uhub1: 4 ports with 4 removable, self powered Root mount waiting for: usbus0 ugen0.3: at usbus0 umass0: on usbus0 umass0:0:0:-1: Attached to scbus0 (probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0? pass0 at umass-sim0 bus 0 scbus0 target 0 lun 0 pass0: Removable Direct Access SCSI-0 device pass0: Serial Number 000000009910 pass0: 40.000MB/s transfers GEOM: new disk da0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: Serial Number 000000009910 da0: 40.000MB/s transfers da0: 1876MB (3842048 512 byte sectors: 255H 63S/T 239C) (probe0:umass-sim0:0:0:1): Down reving Protocol Version from 2 to 0? (probe0:umass-sim0:0:0:1): SCSI status error (probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0 (probe0:umass-sim0:0:0:1): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:1): SCSI status: Check Condition (probe0:umass-sim0:0:0:1): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready to re) (probe0:umass-sim0:0:0:1): Retrying command (per sense data) pass1 at umass-sim0 bus 0 scbus0 target 0 lun 1 pass1: Removable Direct Access SCSI-0 device pass1: Serial Number 000000009910 pass1: 40.000MB/s transfers da1 at umass-sim0 bus 0 scbus0 target 0 lun 1 da1: Removable Direct Access SCSI-0 device da1: Serial Number 000000009910 da1: 40.000MB/s transfers da1: 974MB (1995264 512 byte sectors: 64H 32S/T 974C) GEOM: new disk da1 Root mount waiting for: usbus0 Root mount waiting for: usbus0 ugen0.4: at usbus0 umass1: on usbu0 umass1:1:1:-1: Attached to scbus1 (probe0:umass-sim1:1:0:0): Down reving Protocol Version from 2 to 0? pass2 at umass-sim1 bus 1 scbus1 target 0 lun 0 pass2: Removable Direct Access SCSI-0 device pass2: Serial Number 058F0O1111B1 pass2: 40.000MB/s transfers GEOM: new disk da2 da2 at umass-sim1 bus 1 scbus1 target 0 lun 0 da2: Removable Direct Access SCSI-0 device da2: Serial Number 058F0O1111B1 da2: 40.000MB/s transfers da2: 3780MB (7741440 512 byte sectors: 255H 63S/T 481C) (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Error 16, Retries exhausted (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Error 16, Retries exhausted Root mount waiting for: usbus0 ugen0.5: at usbus0 uaudio0: on uaudio0 pcm0: Mixer "vol" -> "none": child=0x00000010 pcm0: Mixer "pcm": parent="vol" pcm0: Mixer "mic": pcm0: clone manager: deadline=750ms flags=0x8000001e uhid0: