From owner-freebsd-arm@freebsd.org Fri Jan 27 02:21:47 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 81E53CC3DC3 for ; Fri, 27 Jan 2017 02:21:47 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 444C3C1C for ; Fri, 27 Jan 2017 02:21:47 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qt0-x22f.google.com with SMTP id v23so109780776qtb.0 for ; Thu, 26 Jan 2017 18:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=j7EV4Xq9uBmCLxay1yutavr7V3+6JPdwYWaD+jat9Vo=; b=SCobGfeVSQqGD3R0Cip3TODq+8i7ohfoieyqObuBfbWjI5MtIv44tXfk/EsGyqNoVU jcg41AGpZBOh6BM/KdxYg+ektt/g6jPEo4P0q9t09LLZu8grWSB2UHHO5gW8SOeXup3T 5FNpUCw6OQPW5m2W2ot8OtsoXS5dxSKj2Vv84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=j7EV4Xq9uBmCLxay1yutavr7V3+6JPdwYWaD+jat9Vo=; b=ij6yaatMu7z7o9Vmba9q7z/ORApMCP0fOIvAse1pjSun2ov2KcSmoiMDXs/QNhkd/i 63bYEkrEdttd6x97rf3GKN7KhUpikmf6W/LmRV1Kq7GEYVAqqtsUKoH63YXSFMVc6uUa 4GoVVtSi3TlC31csdHzkHCSJ1iKUknoOGmFA0KHG69QdfVeT54ec2FenFqRfP+dni5Ow aXDBu5r39YCZOSXaqnTSC9C5naCTHbbyK6itrBxB1TawgaFKn5pE3KeWWCNwll68ElZh P8gxAWb+HI6pYJZf+3n38niojM05+aaCAiqHj1k5urgP89HPURsl+L4bHL45wWBUDKsP eNpg== X-Gm-Message-State: AIkVDXKyOvGX3KF7MQcgVEHgEzTfY7Bjw6Jg0fYvEP7nBato5Wze5ua7X0/nQcz2uXK6EQ== X-Received: by 10.55.19.66 with SMTP id d63mr5723174qkh.73.1485483705962; Thu, 26 Jan 2017 18:21:45 -0800 (PST) Received: from [192.168.0.11] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id t7sm2901319qtb.11.2017.01.26.18.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 18:21:45 -0800 (PST) Subject: Re: FreeBSD 12 r312227 dont boots on Beaglebone black To: Oleksandr Tymoshenko References: <51d197a2-1332-617a-32a8-9901f474afa2@bsd.com.br> <20170125221350.GA92571@bluezbox.com> <3ad9c97c-e40c-0a37-f603-a08b5a72ebd3@bsd.com.br> <20170127013142.GA2921@bluezbox.com> <13aa921f-b65f-8bf6-f298-ccb286c7ed6e@bsd.com.br> <20170127020035.GA3187@bluezbox.com> Cc: "freebsd-arm@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <55637733-f4f5-6bcc-1d00-4c4b7d1b1b3d@bsd.com.br> Date: Thu, 26 Jan 2017 23:21:33 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170127020035.GA3187@bluezbox.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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, 27 Jan 2017 02:21:47 -0000 Em 26/01/2017 23:00, Oleksandr Tymoshenko escreveu: > Otacílio (otacilio.neto@bsd.com.br) wrote: >> Em 26/01/2017 22:31, Oleksandr Tymoshenko escreveu: >>> Otacílio (otacilio.neto@bsd.com.br) wrote: >>>> Em 25/01/2017 19:13, Oleksandr Tymoshenko escreveu: >>>>> Otacílio (otacilio.neto@bsd.com.br) wrote: >>>>>> Dears >>>>>> >>>>>> I'm trying boot a FreeBSD12-armv6-r312227 >>>>>> (u-boot-beaglebone-2017.01.00.1) on a beaglebone black. The snapshot >>>>>> FreeBSD-12.0-CURRENT-arm-armv6-BEAGLEBONE-20170105-r311461.img that I >>>>>> downloaded from >>>>>> ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/12.0/ >>>>>> works fine, but when I try boot the image that I build on my machine >>>>>> using crouchet I get: >>>>>> >>>>>> U-Boot SPL 2017.01-rc3 (Jan 22 2017 - 23:17:18) >>>>>> Trying to boot from MMC1MMC partition switch failed >>>>>> *** Warning - MMC partition switch failed, using default environment >>>>>> >>>>>> reading u-boot.img >>>>>> reading u-boot.img >>>>>> >>>>>> And boot stops. Someone can confirm that the revision 312227 is working >>>>>> fine? >>>>> I did some digging at the breakage is caused by this commit in U-Boot: >>>>> https://www.mail-archive.com/u-boot@lists.denx.de/msg234317.html >>>>> >>>>> Crochet is using FAT12 for Beaglebone Black. Switching to FAT16 fixes >>>>> the problem. Try applying this patch to crochet and re-build image: >>>>> >>>>> https://people.freebsd.org/~gonzo/patches/crochet-bbb-fat16.diff >>>>> >>>> I have applied the patch and now I'm getting this error. Some hints? >>> FreeBSD uses dtb names that do not match upstream ones. After updating >>> to 2017.01 that change was lost in progress. Possible workaround (HACK >>> ALERT!!!) would be to do something like this: >>> >>> => setenv findfdt 'setenv fdtfile beaglebone-black.dtb' >>> => saveenv >>> >>> Copy-paste to U-Boot serial console does not work for me on BBB, so >>> you'll have have to enter these commands >>> >>> I will submit update to u-boot ports so all these workarounds will >>> not be required. >>> >> I'm getting this: >> >> Type '?' for a list of commands, 'help' for more detailed help. >> loader> setenv findfdt 'setenv fdtfile beaglebone-black.dtb' >> Error: stack underflow >> loader> > No, setenv/saveenv should be done in u-boot. But this gave me > an idea. You can also mount root partition on SD card and > add following line to /boot/loader.conf: > > fdt_file="beaglebone-black.dtb" > > That should do the trick as well > I have added fdt_file="bboneblk.dtb" (because this is the name that I found on fat partition) to /boot/loader.conf but still getting DRAM: 512MB Number of U-Boot devices: 3 U-Boot env: loaderdev not set, will probe all devices. Found U-Boot device: disk Probing all disk devices... Checking unit=0 slice= partition=... good. Booting from disk0s2a: /boot/kernel/kernel data=0x609624+0x1a29dc syms=[0x4+0x89070+0x4+0x9d363] /boot/kernel/geom_label.ko text=0x4de8 data=0x870+0x4 syms=[0x4+0x12c0+0x4+0x1061] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... No valid device tree blob found! Type '?' for a list of commands, 'help' for more detailed help. loader>