Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "kilian.zinnecker--- via buildroot" <buildroot@buildroot.org>
To: Kilian Zinnecker <kilian.zinnecker@mail.de>, buildroot@buildroot.org
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH v3 2/2] configs/beaglev_ahead: new defconfig
Date: Thu, 15 Feb 2024 00:03:08 +0100	[thread overview]
Message-ID: <4868466.GXAFRqVoOG@laptop> (raw)
In-Reply-To: <bf30e91f-1061-4aab-8670-c1ef9f7d895d@benettiengineering.com>

Hello Giulio, all,

[--SNIP--]

> > a/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
> > b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
> > new file mode 100644
> > index 0000000000..bcf5b965ce
> > --- /dev/null
> > +++
> > b/board/beaglev-ahead/patches/uboot/0001-Overwrite-bootcmd-by-force.patch
> > @@ -0,0 +1,30 @@
> > +From 81db2d155db74192e127ae1d98dd4ec415f53dd3 Mon Sep 17 00:00:00 2001
> > +From: Kilian Zinnecker <kilian.zinnecker@mail.de>
> > +Date: Mon, 21 Aug 2023 23:51:59 +0200
> > +Subject: [PATCH] Overwrite bootcmd by force
> > +
> > +This patch is a dirty hack: Trying to overwrite the bootcmd via the
> > +usual BOOT_COMMAND had no effect: Upon boot the bootcmd defaulted
> > +to some preset value and could not be changed easily. Therefore a
> > +hook is used to force the bootcmd to be overwritten.
> 
> This is strange because if so also the bootcmd content of uEnv.txt below
> should be skipped, or maybe there is a bug in this u-boot that evaluates
> bootcmd too early without taking into account environment variables.
> But I'm also noticing that you have your Environment variables in Fat,
> but it depends how u-boot deals with environment variables. Usually
> you have to specificy an offset in memory where environment variables
> live.
> 
> But I see in your "make uboot-menuconfig" that CONFIG_ENV_IS_IN_FAT is
> not enabled, but only CONFIG_ENV_IS_IN_MMC is and you have to specify:
> CONFIG_ENV_OFFSET
> CONFIG_ENV_SIZE
> 
> So if you want to go with vfat way you need to enable
> CONFIG_ENV_IS_IN_FAT and specify:
> CONFIG_ENV_FAT_INTERFACE
> CONFIG_ENV_FAT_DEVICE_AND_PART
> and most of all:
> CONFIG_ENV_FAT_FILE=uEnv.txt
> in uboot.fragment below
> 
> I would go with this last way instead of adding such dirty hack, can you
> work on that?

I tried, but so far I am not successful, maybe due to my lack of experience 
with uboot or maybe due to the customization of this particular uboot. I 
removed my custom-uboot patch and added the following configs to the 
uboot.fragment file, but it did not work yet:

# CONFIG_ENV_IS_IN_MMC is not set
CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_ENV_FAT_FILE="uEnv.txt"

I also tried to use mainline uboot v2024.01, which features the Lichee Pi 4A, 
which features the same SoC, but this didn't work either. I had a look at the 
custom uboot source and it defines a lot of configs inside this header file:

https://openbeagle.org/beaglev-ahead/beaglev-ahead-u-boot/-/blob/beaglev-v2020.01-1.1.2-ubuntu/include/configs/light-c910.h?ref_type=heads#L363-388

I tried to remove the hard-coded bootcmd from this header, but that also 
didn't work. I don't understand the inner workings of uboot well enough yet to 
get it properly working, so I appreciate all hints and any help here.

However, I will already send a v4 of the patches, in which I try to address 
all the other issues.

Thanks again for reviewing and best regards,
Kilian


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-02-14 23:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 12:08 [Buildroot] [PATCH v3 0/2] Add board support for the BeagleV-Ahead Kilian Zinnecker via buildroot
2024-02-11 12:08 ` [Buildroot] [PATCH v3 1/2] package/xuantie-bins: new package Kilian Zinnecker via buildroot
2024-02-13 17:49   ` Giulio Benetti
2024-02-11 12:08 ` [Buildroot] [PATCH v3 2/2] configs/beaglev_ahead: new defconfig Kilian Zinnecker via buildroot
2024-02-13 18:06   ` Giulio Benetti
2024-02-14 23:03     ` kilian.zinnecker--- via buildroot [this message]
2024-02-15 17:22       ` Giulio Benetti
2024-02-13 17:44 ` [Buildroot] [PATCH v3 0/2] Add board support for the BeagleV-Ahead Giulio Benetti

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=4868466.GXAFRqVoOG@laptop \
    --to=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=kilian.zinnecker@mail.de \
    --cc=robertcnelson@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