From: uhmgawa <uhmgawa@third-harmonic.com>
To: ps.report@gmx.net
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] Buildroot + u-boot + raspberry-pi Zero W
Date: Sun, 28 Jan 2024 15:19:18 -0500 [thread overview]
Message-ID: <65B6B6C6.6000507@third-harmonic.com> (raw)
In-Reply-To: <20240124182523.4471d181@gmx.net>
On 01/24/2024 12:25 PM, Peter Seiderer via buildroot wrote:
> Hello *,
>
> On Mon, 22 Jan 2024 12:31:58 -0500, uhmgawa <uhmgawa@third-harmonic.com> wrote:
>
>> I have a vanilla build of gitlab.com/buildroot.org/buildroot.git @ b200632b1ab for raspberrypi0w_defconfig
>> which seems fine directly booting the kernel using the stock Broadcom binary bootloader. However
>> changing the Buildroot bootloader config to BR2_TARGET_UBOOT=y, several issues appear:
>> • While output/images/u-boot.bin is generated, it is not present in output/images/boot.vfat nor does the file /boot/config.txt reflect the expected launch of u-boot with "kernel=u-boot.bin" but rather remains set to directly boot the kernel zImage.
>
> The buildroot defconfigs are very minimal starting points for your own development
> (mostly simple booting with minimal feature set and console output/login via serial
> line)..., everything more special has to be done by (local) adjustments..., e.g. in
> your case:
>
> - providing an adjusted genimage.cfg (more straight forward before autogenerated,
> see commit [1] and [2]) to include (additional) u-boot.bin to boot.vfat
>
> - providing an adjusted config.txt (see [1] and BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE):
>
> enable_uart=1
> kernel=u-boot.bin
I actually tried the above as a direct modification of /boot/config.txt before my prior mail.
Still didn't resolve my issue (below). Anyway after capturing the changes as prescribed
above, it took some rattling around to find a "make rpi-firmware-reinstall" was also required
to percolate the change into the buildroot's make scope.
>
>
> After copying u-booot.bin manually to the boot partition and overwriting
> the config.txt my RPi zero w boots u-boot with the following output via serial line:
>
> U-Boot 2024.01 (Jan 24 2024 - 16:37:26 +0100)
>
> DRAM: 448 MiB
> RPI Zero W (0x9000c1)
> Core: 67 devices, 14 uclasses, devicetree: embed
> MMC: mmc@7e202000: 0, mmc@7e300000: 1
> Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
> In: serial,usbkbd
> Out: serial,vidconsole
> Err: serial,vidconsole
> Net: No ethernet found.
> starting USB...
> Bus usb@7e980000: USB DWC2
> scanning bus usb@7e980000 for devices... 1 USB Device(s) found
> scanning usb for storage devices... 0 Storage Device(s) found
> Hit any key to stop autoboot: 0
> Card did not respond to voltage select! : -110
> No ethernet found.
> No ethernet found.
I'd hazard your config.txt doesn't have "dtoverlay=miniuart-bt" which was the root cause of my
issue as by default the miniuart is intended to serve as the u-boot console. Once that's gone
both u-boot and the kernel (via u-boot bootargs) successfully speak to the miniuart. I started
to get suspicious after realizing /boot/cmdline.txt contained "console=ttyAMA0,115200" which
was successfully booting the default kernel directly from the bootcode.bin/start.elf firmware.
> [1] https://gitlab.com/buildroot.org/buildroot/-/commit/e37ee5acdcebb59c0bcc89eca69540cea2ed441d
> [2] https://gitlab.com/buildroot.org/buildroot/-/commit/fc5cdeed724174d248dd1f979acea40af6e344ce
> [3] https://hechao.li/2021/12/20/Boot-Raspberry-Pi-4-Using-uboot-and-Initramfs/
All of the above was very helpful. Thanks!
-john (AKA '*')
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-01-28 20:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 17:31 [Buildroot] Buildroot + u-boot + raspberry-pi Zero W uhmgawa
2024-01-24 17:25 ` Peter Seiderer via buildroot
2024-01-28 20:19 ` uhmgawa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65B6B6C6.6000507@third-harmonic.com \
--to=uhmgawa@third-harmonic.com \
--cc=buildroot@buildroot.org \
--cc=ps.report@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox