From owner-freebsd-arm@freebsd.org Mon Aug 6 04:22:40 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 C3D6B1068E00 for ; Mon, 6 Aug 2018 04:22:40 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6201486436 for ; Mon, 6 Aug 2018 04:22:40 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.15.2/8.15.2) with ESMTPS id w764LNTU093744 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 5 Aug 2018 21:21:23 -0700 (PDT) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.15.2/8.15.2/Submit) id w764LMkh093743 for freebsd-arm@freebsd.org; Sun, 5 Aug 2018 21:21:22 -0700 (PDT) (envelope-from warlock) Date: Sun, 5 Aug 2018 21:21:22 -0700 From: John Kennedy To: freebsd-arm@freebsd.org Subject: usb-only rpi 3b+ (+UART foo) Message-ID: <20180806042122.GD30738@phouka1.phouka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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 04:22:41 -0000 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