[u-boot-test-hooks][PATCH 1/2] bin/writer.rpi_mount: Use kernel= and simplify logic

Tom Rini trini at konsulko.com
Fri Aug 30 18:45:13 CEST 2024


On Fri, Aug 30, 2024 at 08:19:04AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Thu, Aug 29, 2024, 19:49 Tom Rini <trini at konsulko.com> wrote:
> >
> > On Thu, Aug 29, 2024 at 07:06:06PM -0600, Simon Glass wrote:
> > > On Thu, 29 Aug 2024 at 12:56, Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > Rather than guess what we need to name our u-boot.bin file as for it to
> > > > boot make use of the kernel= option to always call it u-boot.bin and
> > > > then on 64bit platforms (and since future platforms use rpi_arm64 this
> > > > list should not grow) also pass in arm_64bit=1.
> > > >
> > > > Signed-off-by: Tom Rini <trini at konsulko.com>
> > > > ---
> > > >  bin/writer.rpi_mount | 25 ++++++-------------------
> > > >  1 file changed, 6 insertions(+), 19 deletions(-)
> > > >
> > >
> > > Reviewed-by: Simon Glass <sjg at chromium.org>
> > >
> > > > diff --git a/bin/writer.rpi_mount b/bin/writer.rpi_mount
> > > > index 73fb8bf6af04..ab7c3b5a2430 100755
> > > > --- a/bin/writer.rpi_mount
> > > > +++ b/bin/writer.rpi_mount
> > > > @@ -25,30 +25,17 @@ build=${U_BOOT_BUILD_DIR}
> > > >
> > > >  echo "Writing to ${mount_dir} from build at ${build}"
> > > >
> > > > +sudo cp -v ${build}/u-boot.bin ${mount_dir}/u-boot.bin
> > > > +
> > > > +echo "enable_uart=1" | sudo tee ${mount_dir}/config.txt
> > > > +echo "kernel=u-boot.bin" | sudo tee -a ${mount_dir}/config.txt
> > >
> > > Does this keep appending more and more lines?
> >
> > No, the first tee will zero the file and subsequent -a's append.
> 
> Oh yes.
> 
> This is one trouble I have with rpi - there is an existing config.txt
> and some of it seems to be necessary on some boards. But I don't have
> the code to set up everything. Typically I just get a config from a
> distro and that is how stays, with just an addition or two. If we can
> generate it from scratch as you do here, then things are easier.

Yeah, it's very possible to go down a large rabbit-hole with Pi and the
config.txt and getting everything Just Right(tm). Enabling the UART and
as needed, saying it's 64bit is enough for basic testing but more is
likely needed if say a follow up step was to run some wayland tests and
confirm that output.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240830/12692bf0/attachment.sig>


More information about the U-Boot mailing list