From owner-freebsd-arm@freebsd.org Mon Aug 6 14:46:14 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F205105B020 for ; Mon, 6 Aug 2018 14:46:14 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns1.nethead.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 366CB7AEFE for ; Mon, 6 Aug 2018 14:46:14 +0000 (UTC) (envelope-from peo@nethead.se) X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1533566765; bh=vMo2M83mT6q35PVUv8xMqPXP0sOL8YY0KTeBidG1xDw=; h=Subject:To:References:From:Date:In-Reply-To; b=LHlCchUnXBNWc697CTs4rvP+/1OUmtBxgo84ybTSMkDdlfwSoCtpmkiFmQdk8XWYk 0eflHYRe32a8MoKmAddZu8NEnX0qGktTFnkfvbhVLBnTvFtb55jp6MBdN2qRiBybBA Ce2U8fQ9AlLdgA6mQjDNRoA4BQuvokUdLRzHYLps= Subject: Re: usb-only rpi 3b+ (+UART foo) To: John Kennedy , freebsd-arm@freebsd.org References: <20180806042122.GD30738@phouka1.phouka.net> From: Per olof Ljungmark Message-ID: <0a6af236-84cc-66fb-c2fc-4e1976cbb1f7@nethead.se> Date: Mon, 6 Aug 2018 16:46:03 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180806042122.GD30738@phouka1.phouka.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 14:46:14 -0000 On 8/6/18 6:21 AM, John Kennedy wrote: > I'm trying to boot using only USB (no SD card). Seems like it should be easy. > > Booted up via my SD card with the USB drive attached, I can see and use it easily: > > # usbconfig > ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) > ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA) > ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA) > ugen0.4: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA) > ugen0.5: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (98mA) > --> ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > The RPI doesn't get the green boot-light or the rainbow screen. So low-level > stuff is obviously AWOL. I've put program_usb_boot_mode=1 into the config.txt, > but can't verify it with vcgencmd since that won't compile on arm64 (I haven't > tried burning raspbian and seeing if they have a working port to verify). > > As a real disk, it's power light comes up delayed. It seems like it should be > lit before 5-seconds, but I don't know if that is enough for the RPI to try > and enumerate it. Currently I'm trying to divide and conquer by putting the > MSDOS boot partition on an SD card and then boot USB off of that, or at least > try to figure out what is wrong from there. > > So my USB console cable finally arrived and I plugged it in: > > kernel: ugen0.4: at usbus0 > kernel: uslcom0 on uhub0 > kernel: uslcom0: on usbus0 > > Connecting via this from my amd64 FreeBSD box: > > screen /dev/cuaU0 115200 > > It's dropping some characters, so hopefully I won't add typos: > > [usb reset] > U-Boot> usb reset > resetting USB... > USB0: scanning bus 0 for devices... 5 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > > U-Boot> usb start > > If anybody has some suggestions on how to get that cable to not murder the > serial output (from the RPI), that would be helpful. The input (to RPI) seems > totally fine looking at the HDMI console output, but what comes back is very > spotty (lots of dropped characters, don't see mangling). In any case: > > Murdered info from usb info: > 1: Hub (u-boot root hub) > 2: Hub (vendor 0x0424, product 0x2514) > 3: Hub (vendor 0x0424, product 0x2514) > 4: Human interface (boot keyboard, boot mouse, should be the logitech) > 5: vendor specific (vendor 0x0424, product 0x7800) > > So u-boot isn't even seeing my Samsung drive? > > [version] > aarch64-none-elf-gcc (FreeBSD Ports Collection for aarch64noneelf) 6.4.0 > GNU ld (GNU Binutils) 2.30 > > That (and it's supporting partition of files) should be from: > FreeBSD-12.0-CURRENT-arm64-aarch64-RPI3-20180726-r336739.img > > [cat /boot/msdos/config.txt] > arm_control=0x200 > dtparam=audio=on,i2c_arm=on,spi=on > dtoverlay=mmc > dtoverlay=pwm > dtoverlay=pi3-disable-bt > device_tree_address=0x4000 > kernel=u-boot.bin > > program_usb_boot_mode=1 > enable_uart=1 Did you try FreeBSD 12.0-CURRENT #0 r336479: Thu Jul 19 14:52:02 UTC 2018 ? Neither my rpi3b or rpi3b+ will boot images made after that rev. //per