On Sat, Oct 28, 2023 at 06:55:58PM +0200, Stefan Hagen wrote:
> cat wrote (2023-10-28 12:42 CEST):
> > Updated coreboot-utils to most recent point release, now also includes
> > cbfstool which is one of the most useful utilities coreboot provides.
> >
> > One patch was necessary for cbfstool support - removing a flag in the
> > Makefile.inc file which caused building it to fail.
> >
> > Tested on amd64.
> >
> > I do not wish to maintain this further, and regardless coreboot-utils
> > does not change much from release to release so I don't figure this
> > will be much of an issue.
> >
> > Best regards,
> > cat
>
> Hi,
>
> thanks for the update. No need to tell us about not wanting to maintain
> it. You didn't include yourself as MAINTAINER in the file, so no
> worries. We're happy for any help - even if it's not on a regular basis.
>
> Regarding your update:
>
> - Drop REVISION when you update the port version
> - Run make update-patches as last step, so the patch hunk locations are
> updated.
> - If you manually weed out the PLIST, @comment the lines you don't want,
> so make update-plist doesn't put them back in.
>
> Also: Updates are better provided as diffs than archives.
>
> Other than that, this looks good to me.
I don't have means to test this, but this port-wise this looks good,
thanks to both of you.
>
> I don't know much about coreboot. Please read over the executables
> I commented and confirm that those are not desired.
>
> Diff below with the changes I mentioned. I also sorted UTILS.
>
> Index: sysutils/coreboot-utils/Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/coreboot-utils/Makefile,v
> diff -u -p -u -p -r1.13 Makefile
> --- sysutils/coreboot-utils/Makefile 27 Sep 2023 17:16:24 -0000 1.13
> +++ sysutils/coreboot-utils/Makefile 28 Oct 2023 16:45:55 -0000
> @@ -4,10 +4,9 @@ ONLY_FOR_ARCHS = amd64
>
> COMMENT = utilities to work on firmware images and hardware
>
> -V = 4.17
> +V = 4.21
> DISTNAME = coreboot-${V}
> PKGNAME = coreboot-utils-${V}
> -REVISION = 0
>
> CATEGORIES = sysutils devel
>
> @@ -21,7 +20,7 @@ WANTLIB = c
> SITES = https://coreboot.org/releases/
>
> EXTRACT_SUFX = .tar.xz
> -EXTRACT_FILES = ${DISTNAME}/{src/commonlib,util}
> +EXTRACT_FILES =
> ${DISTNAME}/{src/commonlib,src/vendorcode,util,3rdparty}
>
> USE_GMAKE = Yes
>
> @@ -34,7 +33,8 @@ MAKE_FLAGS = CC=${CC} \
> FAKE_FLAGS = PREFIX=${PREFIX}
>
> # XXX intelmetool requires unsupported pcilib access methods
> -UTILS = cbmem \
> +UTILS = cbfstool \
> + cbmem \
> ectool \
> ifdtool \
> nvramtool
> Index: sysutils/coreboot-utils/distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/coreboot-utils/distinfo,v
> diff -u -p -u -p -r1.7 distinfo
> --- sysutils/coreboot-utils/distinfo 4 Jul 2022 16:36:53 -0000 1.7
> +++ sysutils/coreboot-utils/distinfo 28 Oct 2023 16:45:55 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (coreboot-4.17.tar.xz) = ldoR0cakUDhRAaaHmSWKOYzpZfTkbM5v6NXr105QwSU=
> -SIZE (coreboot-4.17.tar.xz) = 55676844
> +SHA256 (coreboot-4.21.tar.xz) = /RtIhHnBZNgU03Ocw7bPm/WH+INywWayToaGABWAlWU=
> +SIZE (coreboot-4.21.tar.xz) = 59528772
> Index: sysutils/coreboot-utils/patches/patch-util_cbfstool_Makefile_inc
> ===================================================================
> RCS file: sysutils/coreboot-utils/patches/patch-util_cbfstool_Makefile_inc
> diff -N sysutils/coreboot-utils/patches/patch-util_cbfstool_Makefile_inc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ sysutils/coreboot-utils/patches/patch-util_cbfstool_Makefile_inc 28 Oct
> 2023 16:45:55 -0000
> @@ -0,0 +1,11 @@
> +Index: util/cbfstool/Makefile.inc
> +--- util/cbfstool/Makefile.inc.orig
> ++++ util/cbfstool/Makefile.inc
> +@@ -134,7 +134,6 @@ TOOLCPPFLAGS += -I$(top)/src
> + TOOLCPPFLAGS += -I$(top)/src/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include
> +
> + TOOLLDFLAGS ?=
> +-HOSTCFLAGS += -fms-extensions
> +
> + ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
> + TOOLCFLAGS += -mno-ms-bitfields
> Index: sysutils/coreboot-utils/patches/patch-util_cbmem_cbmem_c
> ===================================================================
> RCS file:
> /cvs/ports/sysutils/coreboot-utils/patches/patch-util_cbmem_cbmem_c,v
> diff -u -p -u -p -r1.6 patch-util_cbmem_cbmem_c
> --- sysutils/coreboot-utils/patches/patch-util_cbmem_cbmem_c 4 Jul 2022
> 16:36:53 -0000 1.6
> +++ sysutils/coreboot-utils/patches/patch-util_cbmem_cbmem_c 28 Oct 2023
> 16:45:55 -0000
> @@ -3,7 +3,7 @@ Hint at mem(4) in error message
> Index: util/cbmem/cbmem.c
> --- util/cbmem/cbmem.c.orig
> +++ util/cbmem/cbmem.c
> -@@ -1582,7 +1582,7 @@ int main(int argc, char** argv)
> +@@ -1811,7 +1811,7 @@ int main(int argc, char** argv)
>
> mem_fd = open("/dev/mem", timestamp_id ? O_RDWR : O_RDONLY, 0);
> if (mem_fd < 0) {
> Index: sysutils/coreboot-utils/pkg/DESCR
> ===================================================================
> RCS file: /cvs/ports/sysutils/coreboot-utils/pkg/DESCR,v
> diff -u -p -u -p -r1.3 DESCR
> --- sysutils/coreboot-utils/pkg/DESCR 3 Mar 2022 18:04:46 -0000 1.3
> +++ sysutils/coreboot-utils/pkg/DESCR 28 Oct 2023 16:45:55 -0000
> @@ -5,6 +5,7 @@ Source project it provides auditability
> This package contains the following utilities to work on firmware images or
> to
> communicate with hardware:
>
> +* cbfstool Management utility for CBFS formatted ROM images
> * cbmem CBMEM parser to read e.g. timestamps and console log
> * ectool Dump the RAM of a laptop's Embedded/Environmental Controller
> (EC)
> * ifdtool Extract and dump Intel Firmware Descriptor information
> Index: sysutils/coreboot-utils/pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/coreboot-utils/pkg/PLIST,v
> diff -u -p -u -p -r1.2 PLIST
> --- sysutils/coreboot-utils/pkg/PLIST 3 Mar 2022 18:04:46 -0000 1.2
> +++ sysutils/coreboot-utils/pkg/PLIST 28 Oct 2023 16:45:55 -0000
> @@ -1,4 +1,13 @@
> +@comment @bin bin/cbfs-compression-tool
> +@bin bin/cbfstool
> +@comment @bin bin/cse_fpt
> +@comment @bin bin/cse_serger
> +@comment @bin bin/elogtool
> +@comment @bin bin/fmaptool
> @bin bin/ifdtool
> +@comment @bin bin/ifittool
> +@comment @bin bin/ifwitool
> +@comment @bin bin/rmodtool
> @man man/man8/nvramtool.8
> @bin sbin/cbmem
> @bin sbin/ectool
>