All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
@ 2022-10-22  8:28 Neal Frager via buildroot
  2022-10-22  9:09 ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Neal Frager via buildroot @ 2022-10-22  8:28 UTC (permalink / raw)
  To: buildroot
  Cc: terry.oneal, luca.ceresoli, kris.chaplin, thomas.petazzoni,
	Neal Frager, michal.simek

This patch adds Xilinx bootgen as a host package to buildroot.
bootgen is a required utility for generating a boot.bin for
Xilinx versal products.

In addition, for developers who wish to use secure boot with
Xilinx SoC products such as zynq and zynqmp, bootgen has a
more complete offering in secure boot features than the u-boot
mkimage utility.

https://github.com/Xilinx/bootgen

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 DEVELOPERS                     |  1 +
 package/Config.in.host         |  1 +
 package/bootgen/Config.in.host | 10 ++++++++++
 package/bootgen/bootgen.mk     | 24 ++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 package/bootgen/Config.in.host
 create mode 100644 package/bootgen/bootgen.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index c0e6f8bbef..c8183b2290 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2175,6 +2175,7 @@ F:	configs/zynq_zc706_defconfig
 F:	configs/zynqmp_zcu102_defconfig
 F:	configs/zynqmp_zcu106_defconfig
 F:	configs/zynqmp_kria_kv260_defconfig
+F:	package/bootgen
 
 N:	Nicola Di Lieto <nicola.dilieto@gmail.com>
 F:	package/uacme/
diff --git a/package/Config.in.host b/package/Config.in.host
index d6b9ee0e2d..8ccbf40a84 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -7,6 +7,7 @@ menu "Host utilities"
 	source "package/asn1c/Config.in.host"
 	source "package/babeltrace2/Config.in.host"
 	source "package/bmap-tools/Config.in.host"
+	source "package/bootgen/Config.in.host"
 	source "package/btrfs-progs/Config.in.host"
 	source "package/cbootimage/Config.in.host"
 	source "package/checkpolicy/Config.in.host"
diff --git a/package/bootgen/Config.in.host b/package/bootgen/Config.in.host
new file mode 100644
index 0000000000..0acb58dee0
--- /dev/null
+++ b/package/bootgen/Config.in.host
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_BOOTGEN
+	bool "host bootgen"
+	help
+	  bootgen is a tool to generate a boot.bin firmware
+	  for Xilinx versal, zynqmp and zynq product families.
+
+	  Additional secure boot features are supported beyond
+	  what is included with u-boot mkimage.
+
+	  https://github.com/Xilinx/bootgen
diff --git a/package/bootgen/bootgen.mk b/package/bootgen/bootgen.mk
new file mode 100644
index 0000000000..8ba91918f7
--- /dev/null
+++ b/package/bootgen/bootgen.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# bootgen
+#
+################################################################################
+
+BOOTGEN_VERSION = xilinx_v2022.2
+BOOTGEN_SITE = $(call github,Xilinx,bootgen,$(BOOTGEN_VERSION))
+HOST_BOOTGEN_DEPENDENCIES = host-openssl
+BOOTGEN_LICENSE = Apache-2.0
+BOOTGEN_LICENSE_FILES = LICENSE
+
+BOOTGEN_EXTRA_CFLAGS = "LIBS=$(HOST_DIR)/lib/libssl.a $(HOST_DIR)/lib/libcrypto.a -ldl -lpthread"
+BOOTGEN_EXTRA_CFLAGS += "INCLUDE_USER=-I$(HOST_DIR)/include/openssl"
+
+define HOST_BOOTGEN_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(BOOTGEN_EXTRA_CFLAGS) -C $(@D)
+endef
+
+define HOST_BOOTGEN_INSTALL_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/bootgen $(HOST_DIR)/bin/bootgen
+endef
+
+$(eval $(host-generic-package))
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-22  8:28 [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package Neal Frager via buildroot
@ 2022-10-22  9:09 ` Peter Korsgaard
  2022-10-22  9:22   ` Frager, Neal via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2022-10-22  9:09 UTC (permalink / raw)
  To: Neal Frager
  Cc: terry.oneal, luca.ceresoli, kris.chaplin, thomas.petazzoni,
	buildroot, michal.simek

>>>>> "Neal" == Neal Frager <neal.frager@amd.com> writes:

Hi,

 > This patch adds Xilinx bootgen as a host package to buildroot.
 > bootgen is a required utility for generating a boot.bin for
 > Xilinx versal products.

 > In addition, for developers who wish to use secure boot with
 > Xilinx SoC products such as zynq and zynqmp, bootgen has a
 > more complete offering in secure boot features than the u-boot
 > mkimage utility.

 > https://github.com/Xilinx/bootgen

 > Signed-off-by: Neal Frager <neal.frager@amd.com>

 > +################################################################################
 > +#
 > +# bootgen
 > +#
 > +################################################################################
 > +
 > +BOOTGEN_VERSION = xilinx_v2022.2
 > +BOOTGEN_SITE = $(call github,Xilinx,bootgen,$(BOOTGEN_VERSION))
 > +HOST_BOOTGEN_DEPENDENCIES = host-openssl
 > +BOOTGEN_LICENSE = Apache-2.0
 > +BOOTGEN_LICENSE_FILES = LICENSE
 > +
 > +BOOTGEN_EXTRA_CFLAGS = "LIBS=$(HOST_DIR)/lib/libssl.a $(HOST_DIR)/lib/libcrypto.a -ldl -lpthread"
 > +BOOTGEN_EXTRA_CFLAGS += "INCLUDE_USER=-I$(HOST_DIR)/include/openssl"

I have a package for bootgen as well at $WORK, where I instead use
host-pkgcon which is a bit nicer than these hard coded values, E.G.:

HOST_BOOTGEN_DEPENDENCIES = host-openssl host-pkgconf

define HOST_BOOTGEN_BUILD_CMDS
        $(MAKE) $(HOST_CONFIGURE_OPTS) \
                LIBS="`$(HOST_MAKE_ENV) $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" \
                INCLUDE_USER="`$(HOST_MAKE_ENV) $(PKG_CONFIG_HOST_BINARY) --cflags libssl libcrypto`" \
                -C $(@D)
endef

Bootgen also use modern C++ features, so we need to pass -std=c++0x to
fix building on older host machines, E.G.:

CXXFLAGS="$(HOST_CXXFLAGS) -std=c++0x"

I also had issues with linking with the embedded copy of flex if the
build host has the flex development package installed unless I
add the following patch, which unfortunately is still not merged:

https://github.com/Xilinx/bootgen/pull/20

Please also add a bootgen.hash file with the hash of the tarball and
LICENSE file.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-22  9:09 ` Peter Korsgaard
@ 2022-10-22  9:22   ` Frager, Neal via buildroot
  2022-10-22  9:52     ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Frager, Neal via buildroot @ 2022-10-22  9:22 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

Hi Peter,

Thank you for the quick feedback.

 > This patch adds Xilinx bootgen as a host package to buildroot.
 > bootgen is a required utility for generating a boot.bin for  > Xilinx versal products.

 > In addition, for developers who wish to use secure boot with  > Xilinx SoC products such as zynq and zynqmp, bootgen has a  > more complete offering in secure boot features than the u-boot  > mkimage utility.

 > https://github.com/Xilinx/bootgen

 > Signed-off-by: Neal Frager <neal.frager@amd.com>

 > +################################################################################
 > +#
 > +# bootgen
 > +#
 > +################################################################################
 > +
 > +BOOTGEN_VERSION = xilinx_v2022.2
 > +BOOTGEN_SITE = $(call github,Xilinx,bootgen,$(BOOTGEN_VERSION))
 > +HOST_BOOTGEN_DEPENDENCIES = host-openssl  > +BOOTGEN_LICENSE = Apache-2.0  > +BOOTGEN_LICENSE_FILES = LICENSE  > +  > +BOOTGEN_EXTRA_CFLAGS = "LIBS=$(HOST_DIR)/lib/libssl.a $(HOST_DIR)/lib/libcrypto.a -ldl -lpthread"
 > +BOOTGEN_EXTRA_CFLAGS += "INCLUDE_USER=-I$(HOST_DIR)/include/openssl"

> I have a package for bootgen as well at $WORK, where I instead use host-pkgcon which is a bit nicer than these hard coded values, E.G.:

What do you mean by $WORK?

> HOST_BOOTGEN_DEPENDENCIES = host-openssl host-pkgconf

> define HOST_BOOTGEN_BUILD_CMDS
>        $(MAKE) $(HOST_CONFIGURE_OPTS) \
>                LIBS="`$(HOST_MAKE_ENV) $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" \
>                INCLUDE_USER="`$(HOST_MAKE_ENV) $(PKG_CONFIG_HOST_BINARY) --cflags libssl libcrypto`" \
>                -C $(@D)
> endef

Ok.  I will update this for v2.

> Bootgen also use modern C++ features, so we need to pass -std=c++0x to fix building on older host machines, E.G.:

> CXXFLAGS="$(HOST_CXXFLAGS) -std=c++0x"

Ok.  I will update this for v2.

> I also had issues with linking with the embedded copy of flex if the build host has the flex development package installed unless I add the following patch, which unfortunately is still not merged:

> https://github.com/Xilinx/bootgen/pull/20

Thank you for sharing.  I will push this internally to see if we can get this prioritized.

> Please also add a bootgen.hash file with the hash of the tarball and LICENSE file.

Would you mind giving me instructions for generating the bootgen.hash, so I do not need to search for it?

Thank you for your help!

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-22  9:22   ` Frager, Neal via buildroot
@ 2022-10-22  9:52     ` Peter Korsgaard
  2022-11-03 10:52       ` Frager, Neal via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2022-10-22  9:52 UTC (permalink / raw)
  To: Frager, Neal
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

>>>>> "Frager," == Frager, Neal <neal.frager@amd.com> writes:

Hi,

 >> I have a package for bootgen as well at $WORK, where I instead use
 >> host-pkgcon which is a bit nicer than these hard coded values, E.G.:

 > What do you mean by $WORK?

Simply that I have done it for an internal Buildroot external tree that
I use at work.


 >> I also had issues with linking with the embedded copy of flex if the
 >> build host has the flex development package installed unless I add
 >> the following patch, which unfortunately is still not merged:

 >> https://github.com/Xilinx/bootgen/pull/20

 > Thank you for sharing.  I will push this internally to see if we can get this prioritized.

Thanks!


 >> Please also add a bootgen.hash file with the hash of the tarball and LICENSE file.

 > Would you mind giving me instructions for generating the bootgen.hash, so I do not need to search for it?

It is simply a question of running sha256sum on the tarball and LICENSE
files. See
https://buildroot.org/downloads/manual/manual.html#adding-packages-hash
for details.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-22  9:52     ` Peter Korsgaard
@ 2022-11-03 10:52       ` Frager, Neal via buildroot
  2022-11-03 11:02         ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-03 10:52 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

Hi Peter,

>> I also had issues with linking with the embedded copy of flex if the  >> build host has the flex development package installed unless I add  >> the following patch, which unfortunately is still not merged:

 >> https://github.com/Xilinx/bootgen/pull/20

 > Thank you for sharing.  I will push this internally to see if we can get this prioritized.

https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed

Committed, thanks.

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-11-03 10:52       ` Frager, Neal via buildroot
@ 2022-11-03 11:02         ` Peter Korsgaard
  2022-11-03 11:03           ` Frager, Neal via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2022-11-03 11:02 UTC (permalink / raw)
  To: Frager, Neal
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

>>>>> "Frager," == Frager, Neal <neal.frager@amd.com> writes:

 > Hi Peter,
 >>> I also had issues with linking with the embedded copy of flex if
 > the >> build host has the flex development package installed unless I
 > add >> the following patch, which unfortunately is still not merged:

 >>> https://github.com/Xilinx/bootgen/pull/20

 >> Thank you for sharing.  I will push this internally to see if we can get this prioritized.

 > https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed

 > Committed, thanks.

Thanks! Is there any specific reason why the PR was not merged / my
authorship was dropped?

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-11-03 11:02         ` Peter Korsgaard
@ 2022-11-03 11:03           ` Frager, Neal via buildroot
  2022-11-03 11:24             ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-03 11:03 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

Hi Peter,

>>> I also had issues with linking with the embedded copy of flex if  > the >> build host has the flex development package installed unless I  > add >> the following patch, which unfortunately is still not merged:

 >>> https://github.com/Xilinx/bootgen/pull/20

 >> Thank you for sharing.  I will push this internally to see if we can get this prioritized.

 > https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed

 > Committed, thanks.

> Thanks! Is there any specific reason why the PR was not merged / my authorship was dropped?

I don't know.  I will ask and get back to you.

Best regards,
Neal Frager
AMD


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-11-03 11:03           ` Frager, Neal via buildroot
@ 2022-11-03 11:24             ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2022-11-03 11:24 UTC (permalink / raw)
  To: Frager, Neal
  Cc: O'Neal, Terry, luca.ceresoli, Chaplin, Kris,
	thomas.petazzoni, buildroot, Simek, Michal

>>>>> "Frager," == Frager, Neal <neal.frager@amd.com> writes:

 > Hi Peter,
 >>>> I also had issues with linking with the embedded copy of flex if >
 >> the >> build host has the flex development package installed unless
 >> I > add >> the following patch, which unfortunately is still not
 >> merged:

 >>>> https://github.com/Xilinx/bootgen/pull/20

 >>> Thank you for sharing.  I will push this internally to see if we can get this prioritized.

 >> https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed

 >> Committed, thanks.

 >> Thanks! Is there any specific reason why the PR was not merged / my authorship was dropped?

 > I don't know.  I will ask and get back to you.

It is no big deal, but I found my commit message clearer than what was
finally committed.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-25 14:57 ` Aaltonen Eero via buildroot
@ 2022-10-25 15:00   ` Frager, Neal via buildroot
  0 siblings, 0 replies; 11+ messages in thread
From: Frager, Neal via buildroot @ 2022-10-25 15:00 UTC (permalink / raw)
  To: Aaltonen Eero
  Cc: luca.ceresoli, giulio.benetti, Simek, Michal, ju.o, buildroot

Hi Eero,


> Le 25 oct. 2022 à 16:57, Aaltonen Eero <eero.aaltonen@vaisala.com> a écrit :
> 
> On Sat, 2022-10-22 at 02:26 -0600, Neal Frager via buildroot wrote:
>> This patch adds Xilinx bootgen as a host package to buildroot.
>> bootgen is a required utility for generating a boot.bin for
>> Xilinx versal products.
>> 
>> In addition, for developers who wish to use secure boot with
>> Xilinx SoC products such as zynq and zynqmp, bootgen has a
>> more complete offering in secure boot features than the u-boot
>> mkimage utility.
> 
> AFAIU, this should also have a bootgen.hash file
> https://nightly.buildroot.org/#adding-packages-hash
> 
> -- 
> Regards,
> Eero

Yes, this is superseded with v2 of the patch which has a hash file.  Thank you for your feedback.

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
  2022-10-22  8:26 Neal Frager via buildroot
@ 2022-10-25 14:57 ` Aaltonen Eero via buildroot
  2022-10-25 15:00   ` Frager, Neal via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Aaltonen Eero via buildroot @ 2022-10-25 14:57 UTC (permalink / raw)
  To: neal.frager, buildroot; +Cc: luca.ceresoli, giulio.benetti, michal.simek, ju.o

On Sat, 2022-10-22 at 02:26 -0600, Neal Frager via buildroot wrote:
> This patch adds Xilinx bootgen as a host package to buildroot.
> bootgen is a required utility for generating a boot.bin for
> Xilinx versal products.
> 
> In addition, for developers who wish to use secure boot with
> Xilinx SoC products such as zynq and zynqmp, bootgen has a
> more complete offering in secure boot features than the u-boot
> mkimage utility.

AFAIU, this should also have a bootgen.hash file
https://nightly.buildroot.org/#adding-packages-hash

-- 
Regards,
Eero
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package
@ 2022-10-22  8:26 Neal Frager via buildroot
  2022-10-25 14:57 ` Aaltonen Eero via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Neal Frager via buildroot @ 2022-10-22  8:26 UTC (permalink / raw)
  To: buildroot; +Cc: ju.o, Neal Frager, giulio.benetti, michal.simek, luca.ceresoli

This patch adds Xilinx bootgen as a host package to buildroot.
bootgen is a required utility for generating a boot.bin for
Xilinx versal products.

In addition, for developers who wish to use secure boot with
Xilinx SoC products such as zynq and zynqmp, bootgen has a
more complete offering in secure boot features than the u-boot
mkimage utility.

https://github.com/Xilinx/bootgen

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 DEVELOPERS                     |  1 +
 package/Config.in.host         |  1 +
 package/bootgen/Config.in.host | 10 ++++++++++
 package/bootgen/bootgen.mk     | 24 ++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 package/bootgen/Config.in.host
 create mode 100644 package/bootgen/bootgen.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index c0e6f8bbef..c8183b2290 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2175,6 +2175,7 @@ F:	configs/zynq_zc706_defconfig
 F:	configs/zynqmp_zcu102_defconfig
 F:	configs/zynqmp_zcu106_defconfig
 F:	configs/zynqmp_kria_kv260_defconfig
+F:	package/bootgen
 
 N:	Nicola Di Lieto <nicola.dilieto@gmail.com>
 F:	package/uacme/
diff --git a/package/Config.in.host b/package/Config.in.host
index d6b9ee0e2d..8ccbf40a84 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -7,6 +7,7 @@ menu "Host utilities"
 	source "package/asn1c/Config.in.host"
 	source "package/babeltrace2/Config.in.host"
 	source "package/bmap-tools/Config.in.host"
+	source "package/bootgen/Config.in.host"
 	source "package/btrfs-progs/Config.in.host"
 	source "package/cbootimage/Config.in.host"
 	source "package/checkpolicy/Config.in.host"
diff --git a/package/bootgen/Config.in.host b/package/bootgen/Config.in.host
new file mode 100644
index 0000000000..0acb58dee0
--- /dev/null
+++ b/package/bootgen/Config.in.host
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_BOOTGEN
+	bool "host bootgen"
+	help
+	  bootgen is a tool to generate a boot.bin firmware
+	  for Xilinx versal, zynqmp and zynq product families.
+
+	  Additional secure boot features are supported beyond
+	  what is included with u-boot mkimage.
+
+	  https://github.com/Xilinx/bootgen
diff --git a/package/bootgen/bootgen.mk b/package/bootgen/bootgen.mk
new file mode 100644
index 0000000000..8ba91918f7
--- /dev/null
+++ b/package/bootgen/bootgen.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# bootgen
+#
+################################################################################
+
+BOOTGEN_VERSION = xilinx_v2022.2
+BOOTGEN_SITE = $(call github,Xilinx,bootgen,$(BOOTGEN_VERSION))
+HOST_BOOTGEN_DEPENDENCIES = host-openssl
+BOOTGEN_LICENSE = Apache-2.0
+BOOTGEN_LICENSE_FILES = LICENSE
+
+BOOTGEN_EXTRA_CFLAGS = "LIBS=$(HOST_DIR)/lib/libssl.a $(HOST_DIR)/lib/libcrypto.a -ldl -lpthread"
+BOOTGEN_EXTRA_CFLAGS += "INCLUDE_USER=-I$(HOST_DIR)/include/openssl"
+
+define HOST_BOOTGEN_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(BOOTGEN_EXTRA_CFLAGS) -C $(@D)
+endef
+
+define HOST_BOOTGEN_INSTALL_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/bootgen $(HOST_DIR)/bin/bootgen
+endef
+
+$(eval $(host-generic-package))
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-03 11:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-22  8:28 [Buildroot] [PATCH v1 1/1] package/bootgen: add bootgen host package Neal Frager via buildroot
2022-10-22  9:09 ` Peter Korsgaard
2022-10-22  9:22   ` Frager, Neal via buildroot
2022-10-22  9:52     ` Peter Korsgaard
2022-11-03 10:52       ` Frager, Neal via buildroot
2022-11-03 11:02         ` Peter Korsgaard
2022-11-03 11:03           ` Frager, Neal via buildroot
2022-11-03 11:24             ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2022-10-22  8:26 Neal Frager via buildroot
2022-10-25 14:57 ` Aaltonen Eero via buildroot
2022-10-25 15:00   ` Frager, Neal via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.