From nobody Thu Jul 04 11:48:50 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WFFKd3hHlz5Pvp9 for ; Thu, 04 Jul 2024 11:48:53 +0000 (UTC) (envelope-from SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WFFKc5bNKz4JTt for ; Thu, 4 Jul 2024 11:48:52 +0000 (UTC) (envelope-from SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=NA9mulb1; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl" Date: Thu, 4 Jul 2024 13:48:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1720093730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u2ErYYxOAffCCSbmzOd0DD0UAHOYLXtCnrGFrktAe6c=; b=NA9mulb1ALxPIoV6jCTzUAXpngfF/tKyJYztA54c4TCFFlccCogPFXsS3XH+ZHjKW5G+8Q M9r2em7OeZmRu2snnO+Ow1xUjej946norZ+aZV36WNiNoYsLRjK7MLOXk46BKHYVmGhT2J zql6I9l/omNO2SKieM/GMhUZUpeBSWFLGqDEFywwUHe5PRVbTH3z1S1nj9DX9jalbT4yN3 ppg2LlHHBB4/cy4bOtsMlMg47bu4md+5bgKKZxG9vdoMDoj2P7K/M8s/Jp2L/Qz4clqY/7 tLg1tGJvJZsw45jIkpfcc30r+CmhKdrxd5LPov3aSHNfUKIYxL6nzurCSWFX1A== From: Ronald Klop To: FreeBSD ARM List , "Patrick M. Hausen" Message-ID: <775871968.4613.1720093730415@localhost> In-Reply-To: <1128281839.5949.1720092998746@localhost> References: <6B3A59F7-92CF-4614-9501-8C7D62FF676B@hausen.com> <1128281839.5949.1720092998746@localhost> Subject: Re: Update boot partition on a Pi - necessary? How? List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4612_879390193.1720093730380" X-Mailer: Realworks (709.1) Importance: Normal X-Priority: 3 (Normal) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.18 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=Q8r5=OE=klop.ws=ronald-lists@realworks.nl]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_COUNT_ZERO(0.00)[0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[klop.ws:+] X-Rspamd-Queue-Id: 4WFFKc5bNKz4JTt ------=_Part_4612_879390193.1720093730380 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Ronald Klop Datum: donderdag, 4 juli 2024 13:36 Aan: "Patrick M. Hausen" CC: FreeBSD ARM List Onderwerp: Re: Update boot partition on a Pi - necessary? How? > > > Van: "Patrick M. Hausen" > Datum: donderdag, 4 juli 2024 09:02 > Aan: FreeBSD ARM List > Onderwerp: Update boot partition on a Pi - necessary? How? >> >> Hi all, >> >> my first release upgrade on the Pi platform - 14.0 --> 14.1. >> Smooth as usual. Special thanks to ronald@ for the >> smsc(4) improvements. >> >> Now I wonder how to do what I regularly do on amd64, >> namely update either the legacy boot partition or the >> EFI boot loader? >> >> What *are* all these files on that FAT partition, anyway? >> Is there any documentation on this? >> >> Thanks for pointers. >> >> Kind regards, >> Patrick >> >> >> >> > > > Hi, > > Thanks :-) > > The files in the FAT partition are a combination of > https://www.freshports.org/sysutils/rpi-firmware/ > and > https://www.freshports.org/sysutils/u-boot-rpi4/ > > But we also have https://www.freshports.org/sysutils/u-boot-rpi-arm64/ and I don't know what the difference is. > > You can install the rpi-firmware and u-boot-rpi4 ports/pkgs and copy the content to the FAT partition. Unfortunately I don't know an automated way to do this and if it will overwrite config files. > > Another solution: > > What I usually do is > - download the https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-arm64-aarch64-RPI.img.xz release file > - mount it using mdconfig > - backup and empty the current FAT partition > - copy the content of the FAT partition from the mounted img > - diff the config files with my backup. > At least than I know I have all the files which were also in the release and hopefully tested by some people. > > A mdconfig+mount example can be found here: https://wiki.freebsd.org/arm/Raspberry%20Pi#Boot_Loader_Issues although they copy files into the image instead of the other way around. > > Regards, > Ronald. > BTW. If you are familiar with some scripting. The release image is build from this: /usr/src/release/release.sh and the boot files for RPI-4 come from the arm64/RPI.conf file in that directory. Apparently the release does use the u-boot-rpi-arm64 pkg instead of u-boot-rpi4. Others have much more hands-on experience with these script as I do. But I think, if you can read scripts this is the best documentation on what files are in the FAT partition. Regards, Ronald. ------=_Part_4612_879390193.1720093730380 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Ronald Klop <ronald-lists@klop.ws>
Datum: donderdag, 4 juli 2024 13:36
Aan: "Patrick M. Hausen" <pmh@hausen.com>
CC: FreeBSD ARM List <freebsd-arm@freebsd.org>
Onderwerp: Re: Update boot partition on a Pi - necessary? How?

 

Van: "Patrick M. Hausen" <pmh@hausen.com>
Datum: donderdag, 4 juli 2024 09:02
Aan: FreeBSD ARM List <freebsd-arm@freebsd.org>
Onderwerp: Update boot partition on a Pi - necessary? How?

Hi all,

my first release upgrade on the Pi platform - 14.0 --> 14.1.
Smooth as usual. Special thanks to ronald@ for the
smsc(4) improvements.

Now I wonder how to do what I regularly do on amd64,
namely update either the legacy boot partition or the
EFI boot loader?

What *are* all these files on that FAT partition, anyway?
Is there any documentation on this?

Thanks for pointers.

Kind regards,
Patrick
 



Hi,

Thanks :-)

The files in the FAT partition are a combination of
https://www.freshports.org/sysutils/rpi-firmware/
and
https://www.freshports.org/sysutils/u-boot-rpi4/

But we also have https://www.freshports.org/sysutils/u-boot-rpi-arm64/ and I don't know what the difference is.

You can install the rpi-firmware and u-boot-rpi4 ports/pkgs and copy the content to the FAT partition. Unfortunately I don't know an automated way to do this and if it will overwrite config files.

Another solution:

What I usually do is
- download the https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-arm64-aarch64-RPI.img.xz release file
- mount it using mdconfig
- backup and empty the current FAT partition
- copy the content of the FAT partition from the mounted img
- diff the config files with my backup.
At least than I know I have all the files which were also in the release and hopefully tested by some people.

A mdconfig+mount example can be found here: https://wiki.freebsd.org/arm/Raspberry%20Pi#Boot_Loader_Issues although they copy files into the image instead of the other way around.

Regards,
Ronald.
 

BTW. If you are familiar with some scripting.

The release image is build from this: /usr/src/release/release.sh and the boot files for RPI-4 come from the arm64/RPI.conf file in that directory.
Apparently the release does use the u-boot-rpi-arm64 pkg instead of u-boot-rpi4.

Others have much more hands-on experience with these script as I do. But I think, if you can read scripts this is the best documentation on what files are in the FAT partition.

Regards,
Ronald.

  ------=_Part_4612_879390193.1720093730380--