From: Peter Seiderer via buildroot <buildroot@buildroot.org>
To: uhmgawa <uhmgawa@third-harmonic.com>
Cc: buildroot@busybox.net
Subject: Re: [Buildroot] Buildroot + u-boot + raspberry-pi Zero W
Date: Wed, 24 Jan 2024 18:25:23 +0100 [thread overview]
Message-ID: <20240124182523.4471d181@gmx.net> (raw)
In-Reply-To: <65AEA68E.3080104@third-harmonic.com>
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
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.
> • Implementing #1 manually (which is the drill for grafting a standalone u-boot into an existing PI install) does not result in u-boot coming up out of reset.
> • If I take the same Buildroot built u-boot and install it (per #2) in a creaky Raspbian 9 install, u-boot functions just fine.
> • If I take a git.denx.de/u-boot.git standalome build of u-boot.bin which known to work on the above Raspbian 9, it similarly fails in the Buildroot generated install.
> So a few thoughts:
> • I may be missing some configuration step given the seeming lack of image preparation in #1.
> • Otherwise #1 may imply full Buildroot + u-boot integration remains a WIP, at least for a Raspberry Pi Zero W.
> • The actual root cause may be an incompatible holy binary Broadcom firmware package being selected as the only other source of root cause appears to be the /boot installed bootcode.bin and/or start.elf. I do find a limited set of config knobs in the form "BR2_PACKAGE_RPI_FIRMWARE*" but at this point would like to have some sense of where in this problem space I may be.
> For reference, this is the Buildroot .config content change from a successful direct boot of the kernel zImage to the selection of u-boot as an intermediate boot loader:
>
> dot-config-default ? .config
> ---------------------------------------------------------------------------------------------------
> # BR2_TARGET_UBOOT is not set | BR2_TARGET_UBOOT=y
> > BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES=""
> > BR2_TARGET_UBOOT_PATCH=""
> > BR2_TARGET_UBOOT_CUSTOM_DTS_PATH=""
> > BR2_TARGET_UBOOT_FORMAT_BIN=y
> > BR2_TARGET_UBOOT_VERSION="2024.01"
> > BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> > BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_0_w"
> > BR2_TARGET_UBOOT_LATEST_VERSION=y
> > BR2_TARGET_UBOOT_USE_DEFCONFIG=y
> > BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS=""
> Any illumination here much appreciated.
>
>
Regards,
Peter
[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/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-24 17:25 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 [this message]
2024-01-28 20:19 ` uhmgawa
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=20240124182523.4471d181@gmx.net \
--to=buildroot@buildroot.org \
--cc=buildroot@busybox.net \
--cc=ps.report@gmx.net \
--cc=uhmgawa@third-harmonic.com \
/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