From owner-freebsd-arm@freebsd.org Mon Dec 12 03:26:12 2016 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 0C9BCC7342E for ; Mon, 12 Dec 2016 03:26:12 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DD7291233 for ; Mon, 12 Dec 2016 03:26:11 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id DCA73C7342D; Mon, 12 Dec 2016 03:26:11 +0000 (UTC) Delivered-To: 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 DAAD8C7342C for ; Mon, 12 Dec 2016 03:26:11 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (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 94E841232 for ; Mon, 12 Dec 2016 03:26:11 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by mail-oi0-x22c.google.com with SMTP id w63so75803913oiw.0 for ; Sun, 11 Dec 2016 19:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SVP8PrOMw70hdAnOfHN/rS6adiji4Duoh87nKZUFdIU=; b=chD767D7WfdiXXwwGTSf0nbFd1Skgfy/KBIJpwhVoK/1rz4hu9HXJJIUmU/AqvUWDZ TlOsshbbbEni7/9UyCVIlilB5wkHcLMO+JK3mUeg1EFnDh08YoQVNuzxQOP9JBrmZLlC rePJ40i9PxrYFp6Vs3nfVKtWIhnjP+GoJbu6C6Oz9IqjZLlBMMBvMfRxlto1xqKU+ooK RaRCOA3IRYjeDazN1X6YSw3yilbjKMTiPBAuq/FI7YsPydUN6LR1GuCHgzLToziHSQOe 2H0IeLMNpxbr0Vi/a9eLq9bIO1xYl5QL49erirpIq3rj8IOGPn5Krd33NN9GybagHb+m zcKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SVP8PrOMw70hdAnOfHN/rS6adiji4Duoh87nKZUFdIU=; b=gTwQDYKNMVQQ1KlwyI7xJI5+xehWxk+MjlePIp/6mexi7C7JqB9rLiJE1tbded7bqd HAgMvgsB84EtkAzgmluFBiXz1A27qWgDHwl8bRooMKLRDQtqPy1YVQ9nFLNKzNv5xN0e RQvGNXYKueIH0LlThshm5zhWnIpLxzC898GYU2lkii7Nm/9B65q8cBFn9LbxsZAhpLYW FKdgCKIldoOip82Fdt3oU+R+3norklJDFylw4TJqv80zKDUGK8JljzUd9ZYack1VjBV/ ghstgHkrQmgGmLF3gKXofaT2HsZQP+SnwivLdn0xtNBRzlpk3fg+E0xRN0jUUrP/4Cqn Z02g== X-Gm-Message-State: AKaTC02A+f2PhtfwmXIe5dhYVORlUxDVpEryoD1kB/UjItxiF5QiHo1YwQ0P74cg/uzDnkMjvMss/0NTNXyo6g== X-Received: by 10.157.0.73 with SMTP id 67mr48948342ota.141.1481513170944; Sun, 11 Dec 2016 19:26:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.145.33 with HTTP; Sun, 11 Dec 2016 19:26:10 -0800 (PST) In-Reply-To: <2660E67D-10E4-4680-B824-EBF138FBC3FF@cs.huji.ac.il> References: <7FD12DD6-B390-4EF3-811B-391798410BC0@cs.huji.ac.il> <1480950103.1889.251.camel@freebsd.org> <93729768-D887-4568-8686-FE691A881BC6@cs.huji.ac.il> <2660E67D-10E4-4680-B824-EBF138FBC3FF@cs.huji.ac.il> From: Ganbold Tsagaankhuu Date: Mon, 12 Dec 2016 11:26:10 +0800 Message-ID: Subject: Re: ubldr, was Re: dtb printout To: Daniel Braniss Cc: arm@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Mon, 12 Dec 2016 03:26:12 -0000 On Mon, Dec 12, 2016 at 1:29 AM, Daniel Braniss wrote= : > > On 11 Dec 2016, at 6:09 PM, Ganbold Tsagaankhuu wrote= : > > > > On Tue, Dec 6, 2016 at 5:17 PM, Daniel Braniss > wrote: > >> >> > On 5 Dec 2016, at 17:01, Ian Lepore wrote: >> > >> > On Mon, 2016-12-05 at 15:48 +0200, Daniel Braniss wrote: >> >> Hi, >> >> the short version: >> >> is there a way to obtain the dtb from the kernel? >> >> >> >> the longer version: >> >> I am developing on several different arm boards, rpi, rpi2, orangepi- >> >> one, orange-pc, to mention >> >> a few, and each one has a different u-boot, ubldr, dtb, and I keep >> >> loosing track :-( >> >> I find myself too often wondering which ddb file got loaded. >> >> >> >> cheers, >> >> danny >> > >> > First: each one does NOT have a different ubldr. All ubldr.bin files >> > are the same, they're not board-specific anymore. (The elf versions, >> > ubldr without the .bin, may have a different load address in the elf >> > header, but other than that, they're identical too and can actually be >> > loaded at any address.) >> > >> > To see the contents of the dtb, use ofwdump. The output is not >> > especially pretty. There is a manpage for it. >> > >> > To just get a quick reminder of which file was loaded, create a >> > /boot/loader.rc.local (<-- .rc not .conf) that contains >> > >> > ubenv import fdtfile fdt_file >> > >> > Then in the running system you can use kenv and you'll see >> > >> > uboot.fdtfile=3D"bcm2835-rpi-b-rev2.dtb" >> > >> > Unfortunately, some u-boots use fdtfile, some use fdt_file. Grrr. >> > >> > You can, of course, use that ubenv import thing to pull any variable >> > from the uboot environment into the kernel environment. If you just >> > say ubenv import without naming a variable, you get all the vars >> > (including vars that contain scripts, which is kind of messy). >> > >> > =E2=80=94 Ian >> > >> >> as usual, I get more than I bargained for :-) >> on rpi adding ubenv import worked, but on orange/allwinner I got a >> =E2=80=98syntax error=E2=80=99, >> I tried to upgrade the ubldr, but so far i get: >> >> U-Boot SPL 2016.09 (Dec 05 2016 - 15:02:38) >> DRAM: 1024 MiB >> Trying to boot from MMC1 >> >> >> U-Boot 2016.09 (Dec 05 2016 - 15:02:38 +0200) Allwinner Technology >> >> CPU: Allwinner H3 (SUN8I 1680) >> Model: Xunlong Orange Pi PC >> I2C: ready >> DRAM: 1 GiB >> WARNING: Caches not enabled >> MMC: SUNXI SD/MMC: 0 >> reading u-boot.env >> >> ** Unable to read "u-boot.env" from mmc0:1 ** >> Using default environment >> >> In: serial >> Out: serial >> Err: serial >> Net: phy interface0 >> eth0: ethernet@1c30000 >> starting USB... >> USB0: USB EHCI 1.00 >> USB1: USB OHCI 1.0 >> USB2: USB EHCI 1.00 >> USB3: USB OHCI 1.0 >> USB4: USB EHCI 1.00 >> USB5: USB OHCI 1.0 >> scanning bus 0 for devices... 1 USB Device(s) found >> scanning bus 2 for devices... 1 USB Device(s) found >> scanning bus 4 for devices... 1 USB Device(s) found >> Hit any key to stop autoboot: 0 >> Booting from: mmc 0 ubldr.bin >> reading ubldr.bin >> 223912 bytes read in 53 ms (4 MiB/s) >> ## No elf image at address 0x42000000 >> ## Starting application at 0x42000000 ... >> > > Did ubldr work for you? > I feel like I have same problem: > > Booting from: mmc 0 ubldr.bin > reading ubldr.bin > 228276 bytes read in 67 ms (3.2 MiB/s) > ## No elf image at address 0x42000000 > ## Starting application at 0x42000000 ... > > Ganbold > > > > > > the latest one hangs, just like with you. > I=E2=80=99m using an older ubldr > Just curious, how old is your working ubldr? thanks, Ganbold > > > >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > >