NetBSD Problem Report #50891
From www@NetBSD.org Fri Mar 4 10:25:14 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id DA7057ACA7
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Mar 2016 10:25:13 +0000 (UTC)
Message-Id: <20160304102512.BABFE7ACD3@mollari.NetBSD.org>
Date: Fri, 4 Mar 2016 10:25:12 +0000 (UTC)
From: dalibor.gudzic@gmail.com
Reply-To: dalibor.gudzic@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Boot fails after "transferring control to NetBSD stage-2 loader (at address 40007800)" on BPi M1
X-Send-Pr-Version: www-1.0
>Number: 50891
>Category: port-evbarm
>Synopsis: Boot fails after "transferring control to NetBSD stage-2 loader (at address 40007800)" on BPi M1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-evbarm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 04 10:30:00 +0000 2016
>Closed-Date: Sat May 14 20:03:25 +0000 2022
>Last-Modified: Sat May 14 20:03:25 +0000 2022
>Originator: Dalibor G
>Release: NetBSD 7.0
>Organization:
n/a
>Environment:
N/A cannot get past boot sequence
>Description:
Trying to boot NetBSD 7.0 armv7 image results in a failed boot. I closely followed instructions on NetBSD Wiki page for Allwinner A20, but booting fails after last line: "transferring control to NetBSD stage-2 loader (at address 40007800)".
BananaPi is connected via HDMI to a Samsung LED TV, that's why I cannot include a console output here, but here's a picture of failed boot where everything could be seen:
http://imgur.com/uMNI7ay
After that I get a black screen, sort of like it disconnects itself from TV.
BananaPi power comes from a 2A USB power adapter connected to power port, not OTG port.
>How-To-Repeat:
Boot NetBSD 7.0 armv7 image on BananaPi M1.
>Fix:
No fix, I also tried booting NetBSD snapshot images (I believe I also tried -current) from NYFTP but the outcome is the same.
>Release-Note:
>Audit-Trail:
From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: dalibor.gudzic@gmail.com
Subject: Re: port-evbarm/50891: Boot fails after
"transferring control to NetBSD stage-2 loader (at address 40007800)" on
BPi M1
Date: Fri, 4 Mar 2016 13:45:07 +0100
Not sure what is wrong with the dd images or wiki instructions, but I
reinstalled my BPi M1 manually the other day without issues.
I do see the screen corruption from your screenshot, but only for a second or two.
I think it might be caused by kernel debug messages before initializing framebuffer console.
(Is the HDMI device using an uncommon display resolution?)
Anyway, here are the steps I used to prepare the boot partition from scratch.
Maybe you can use it to find out what is wrong?
# mount -t msdos /dev/ld0e /mnt
# cd /mnt
# rm -r *
# wget http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi-mainline/u-boot-sunxi-mainline-latest/u-boot-sunxi-mainline-bananapi.tar.xz
# tar -xJf u-boot-sunxi-mainline-bananapi.tar.xz
# dd if=u-boot*/u-boot-sunxi-with-spl.bin of=/dev/ld0d bs=1k seek=8
# wget https://raw.githubusercontent.com/linux-sunxi/sunxi-boards/master/sys_config/a20/Bananapi.fex
# fex2bin Bananapi.fex Bananapi.bin
# cat << EOF > boot.cmd
setenv kernel_addr 82000000
setenv fex_addr 43000000
setenv fex Bananapi.bin
setenv kernel netbsd.ub
setenv bootargs "root=ld0a sysconfig=0x43000000 console=fb fb.margin=60"
fatload mmc 0:1 ${fex_addr} ${fex}
fatload mmc 0:1 ${kernel_addr} ${kernel}
bootm ${kernel_addr}
EOF
# mkubootimage -A arm -n armv7 -T script boot.cmd boot.scr
# wget http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201603040730Z/evbarm-earmv7hf/binary/kernel/netbsd-BPI.ub.gz
# gzcat netbsd-BPI.ub.gz > netbsd.ub
From: dalibor gudzic <dalibor.gudzic@gmail.com>
To: Tobias Nygren <tnn@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-evbarm/50891: Boot fails after "transferring control to
NetBSD stage-2 loader (at address 40007800)" on BPi M1
Date: Sat, 5 Mar 2016 12:21:37 +0100
--089e015385ac612e78052d4b6f56
Content-Type: text/plain; charset=UTF-8
Hi Tobias,
I used your boot.scr and it worked. I thought it was because I included
Bananapi.bin so I removed it and tried again. It booted. So I removed
console=fb part and than it stopped working. Actually, it may be working,
but I get black screen and cannot see anything, as I described earlier.
Instructions in wiki do not say I have to explicitly say console=fb, and I
thought that was the default anyway? Also, I do remember experimenting with
this line and some extra for screen resolution in uEnv.txt, but for some
reason I believe the board would not read this file at all.
All in all, NetBSD requires console=fb in boot.scr to continue showing the
picture over HDMI.
Thanks Tobias,
On Fri, Mar 4, 2016 at 1:45 PM, Tobias Nygren <tnn@netbsd.org> wrote:
> Not sure what is wrong with the dd images or wiki instructions, but I
> reinstalled my BPi M1 manually the other day without issues.
>
> I do see the screen corruption from your screenshot, but only for a second
> or two.
> I think it might be caused by kernel debug messages before initializing
> framebuffer console.
> (Is the HDMI device using an uncommon display resolution?)
>
> Anyway, here are the steps I used to prepare the boot partition from
> scratch.
> Maybe you can use it to find out what is wrong?
>
> # mount -t msdos /dev/ld0e /mnt
> # cd /mnt
> # rm -r *
> # wget
> http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi-mainline/u-boot-sunxi-mainline-latest/u-boot-sunxi-mainline-bananapi.tar.xz
> # tar -xJf u-boot-sunxi-mainline-bananapi.tar.xz
> # dd if=u-boot*/u-boot-sunxi-with-spl.bin of=/dev/ld0d bs=1k seek=8
> # wget
> https://raw.githubusercontent.com/linux-sunxi/sunxi-boards/master/sys_config/a20/Bananapi.fex
> # fex2bin Bananapi.fex Bananapi.bin
> # cat << EOF > boot.cmd
> setenv kernel_addr 82000000
> setenv fex_addr 43000000
> setenv fex Bananapi.bin
> setenv kernel netbsd.ub
> setenv bootargs "root=ld0a sysconfig=0x43000000 console=fb
> fb.margin=60"
> fatload mmc 0:1 ${fex_addr} ${fex}
> fatload mmc 0:1 ${kernel_addr} ${kernel}
> bootm ${kernel_addr}
> EOF
> # mkubootimage -A arm -n armv7 -T script boot.cmd boot.scr
> # wget
> http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201603040730Z/evbarm-earmv7hf/binary/kernel/netbsd-BPI.ub.gz
> # gzcat netbsd-BPI.ub.gz > netbsd.ub
>
--089e015385ac612e78052d4b6f56
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi Tobias,<div><br></div><div>I used your boot.scr and it =
worked. I thought it was because I included Bananapi.bin so I removed it an=
d tried again. It booted. So I removed console=3Dfb part and than it stoppe=
d working. Actually, it may be working, but I get black screen and cannot s=
ee anything, as I described earlier.</div><div>Instructions in wiki do not =
say I have to explicitly say console=3Dfb, and I thought that was the defau=
lt anyway? Also, I do remember experimenting with this line and some extra =
for screen resolution in uEnv.txt, but for some reason I believe the board =
would not read this file at all.</div><div>All in all, NetBSD requires cons=
ole=3Dfb in boot.scr to continue showing the picture over HDMI.</div><div><=
br></div><div>Thanks Tobias,</div></div><div class=3D"gmail_extra"><br><div=
class=3D"gmail_quote">On Fri, Mar 4, 2016 at 1:45 PM, Tobias Nygren <span =
dir=3D"ltr"><<a href=3D"mailto:tnn@netbsd.org" target=3D"_blank">tnn@net=
bsd.org</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Not sure wh=
at is wrong with the dd images or wiki instructions, but I<br>
reinstalled my BPi M1 manually the other day without issues.<br>
<br>
I do see the screen corruption from your screenshot, but only for a second =
or two.<br>
I think it might be caused by kernel debug messages before initializing fra=
mebuffer console.<br>
(Is the HDMI device using an uncommon display resolution?)<br>
<br>
Anyway, here are the steps I used to prepare the boot partition from scratc=
h.<br>
Maybe you can use it to find out what is wrong?<br>
<br>
# mount -t msdos /dev/ld0e /mnt<br>
# cd /mnt<br>
# rm -r *<br>
# wget <a href=3D"http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sun=
xi-mainline/u-boot-sunxi-mainline-latest/u-boot-sunxi-mainline-bananapi.tar=
.xz" rel=3D"noreferrer" target=3D"_blank">http://dl.linux-sunxi.org/nightly=
/u-boot-sunxi/u-boot-sunxi-mainline/u-boot-sunxi-mainline-latest/u-boot-sun=
xi-mainline-bananapi.tar.xz</a><br>
# tar -xJf u-boot-sunxi-mainline-bananapi.tar.xz<br>
# dd if=3Du-boot*/u-boot-sunxi-with-spl.bin of=3D/dev/ld0d bs=3D1k seek=3D8=
<br>
# wget <a href=3D"https://raw.githubusercontent.com/linux-sunxi/sunxi-board=
s/master/sys_config/a20/Bananapi.fex" rel=3D"noreferrer" target=3D"_blank">=
https://raw.githubusercontent.com/linux-sunxi/sunxi-boards/master/sys_confi=
g/a20/Bananapi.fex</a><br>
# fex2bin Bananapi.fex Bananapi.bin<br>
# cat << EOF > boot.cmd<br>
setenv kernel_addr=C2=A0 82000000<br>
setenv fex_addr=C2=A0 =C2=A0 =C2=A043000000<br>
setenv fex=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Bananapi.bin<br>
setenv kernel=C2=A0 =C2=A0 =C2=A0 =C2=A0netbsd.ub<br>
setenv bootargs=C2=A0 =C2=A0 =C2=A0"root=3Dld0a sysconfig=3D0x43000000=
console=3Dfb fb.margin=3D60"<br>
fatload mmc 0:1 ${fex_addr} ${fex}<br>
fatload mmc 0:1 ${kernel_addr} ${kernel}<br>
bootm ${kernel_addr}<br>
EOF<br>
# mkubootimage -A arm -n armv7 -T script boot.cmd boot.scr<br>
# wget <a href=3D"http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/20160304073=
0Z/evbarm-earmv7hf/binary/kernel/netbsd-BPI.ub.gz" rel=3D"noreferrer" targe=
t=3D"_blank">http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201603040730Z/ev=
barm-earmv7hf/binary/kernel/netbsd-BPI.ub.gz</a><br>
# gzcat netbsd-BPI.ub.gz > netbsd.ub<br>
</blockquote></div><br></div>
--089e015385ac612e78052d4b6f56--
State-Changed-From-To: open->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Sat, 14 May 2022 20:03:25 +0000
State-Changed-Why:
BPI kernel and fex booting are no longer supported.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.