Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: "Łukasz Tekieli" <tekieli.lukasz@gmail.com>
Cc: Francois Dugast <francois.dugast.foss@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 2/2] board/visionfive2: enable u-boot
Date: Sun, 24 Mar 2024 08:58:29 +0100	[thread overview]
Message-ID: <87zfuogixm.fsf@48ers.dk> (raw)
In-Reply-To: <CAFfxiozPcc5QisMEsKadCX2wb0F-oQ1GqQ2fXmJDK_+7xk=qXA@mail.gmail.com> ("Łukasz Tekieli"'s message of "Sun, 24 Mar 2024 08:35:44 +0100")

>>>>> "Łukasz" == Łukasz Tekieli <tekieli.lukasz@gmail.com> writes:

 > Hello,
 > On Sat, Mar 23, 2024 at 9:25 PM Peter Korsgaard <peter@korsgaard.com> wrote:
 >> 
 >> Hmm, so to use that we need to change the boot mode to SD, otherwise the
 >> SBI/U-Boot in the SPI flash will still be used - So we should add a note
 >> about that.

 > Yes, SD mode is required to use this. I have a patch that builds also
 > the SPI flash image, but didn't submit yet.
 > I'll add a note in the board readme.

 >> I gave it a quick try here and it does boot, but USB is broken in U-Boot
 >> and Linux, is that a known issue?
 >> 
 >> [    8.728592] xhci_hcd 0000:01:00.0: Error while assigning device slot ID
 >> [    8.735301] xhci_hcd 0000:01:00.0: Max number of devices this xHCI host supports is 32.
 >> [    8.743495] usb usb2-port2: couldn't allocate usb_device
 >> [    8.748984] xhci_hcd 0000:01:00.0: Error while assigning device slot ID
 >> [    8.755660] xhci_hcd 0000:01:00.0: Max number of devices this xHCI host supports is 32.
 >> [    8.763686] usb usb1-port1: couldn't allocate usb_device

 > I've already fixed emac0 problems in upstream u-boot. I noticed that
 > the changes between StarFive forks and upstream are quite extensive
 > and they definately missed some parts.
 > I'll take a look at this.

Possibly we need to bump the Linux kernel. How is the mainline support
situation by now? Ideally we would use mainline Linux as well.

 >> > U-Boot config uses BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME with value
 >> > "u-boot.itb". Using BR2_TARGET_UBOOT_FORMAT_ITB fails, because the
 >> > build does not support u-boot.itb make target.
 >> 
 >> Hmm, odd.

 > Yes, there are other boards that use this approach as well:

 > rock64_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > andes_ae350_45_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > rockpro64_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > pine64_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > roc_pc_rk3399_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > friendlyarm_nanopi_r2s_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > pine64_sopine_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 > hifive_unleashed_defconfig:BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"

 > Might be also worth fixing this in u-boot.

Possibly, yes - But we need to verify that it doesn't break the existing
users:

git grep BR2_TARGET_UBOOT_FORMAT_ITB
zynqmp_kria_kd240_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y
zynqmp_kria_kr260_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y
zynqmp_kria_kv260_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y
zynqmp_zcu102_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y
zynqmp_zcu104_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y
zynqmp_zcu106_defconfig:BR2_TARGET_UBOOT_FORMAT_ITB=y

I finally ended up applying this patch after all, as it moves us in the
right direction. I did the following changes:

- Added note about changing the boot mode pins in the board readme and
  linked to
  https://doc-en.rvspace.org/VisionFive2/Quick_Start_Guide/VisionFive2_SDK_QSG/boot_mode_settings.html

- Added a link to the U-Boot documentation which describes the boot
  flow in the commit message

Thanks!

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-03-24  7:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 21:15 [Buildroot] [PATCH v2 0/2] board/visionfive2: enable u-boot Lukasz Tekieli
2024-02-08 21:15 ` [Buildroot] [PATCH v2 1/2] board/visionfive2: fix genimage.cfg path Lukasz Tekieli
2024-03-23 20:22   ` Peter Korsgaard
2024-03-25  7:57     ` Peter Korsgaard
2024-02-08 21:15 ` [Buildroot] [PATCH v2 2/2] board/visionfive2: enable u-boot Lukasz Tekieli
2024-03-23 20:25   ` Peter Korsgaard
2024-03-24  7:35     ` Łukasz Tekieli
2024-03-24  7:58       ` Peter Korsgaard [this message]
2024-03-24  8:19         ` Łukasz Tekieli

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=87zfuogixm.fsf@48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    --cc=francois.dugast.foss@gmail.com \
    --cc=tekieli.lukasz@gmail.com \
    --cc=thomas.petazzoni@bootlin.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