diff mbox series

dev-manual: show bin_package example wireless-regdb recipe

Message ID 0639bb4b-2e1c-2dde-098d-ac99d62bb646@crashcourse.ca
State Under Review
Headers show
Series dev-manual: show bin_package example wireless-regdb recipe | expand

Commit Message

Robert P. J. Day June 23, 2025, 5:40 p.m. UTC
Add a snippet from the wireless-regdb recipe to demonstrate a simple
example of a bin_package recipe.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

Comments

Quentin Schulz June 24, 2025, 9:44 a.m. UTC | #1
Hi Robert,

On 6/23/25 7:40 PM, Robert P. J. Day via lists.yoctoproject.org wrote:
> 
> Add a snippet from the wireless-regdb recipe to demonstrate a simple
> example of a bin_package recipe.
> 

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin
diff mbox series

Patch

diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index c49881efe..2d7a7efdf 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -1397,6 +1397,26 @@  doing the following:
    where you have installed them and whether those files are in
    different locations than the defaults.

+As a basic example of a :ref:`ref-classes-bin-package`-style recipe, consider
+this snippet from the
+:oe_git:`wireless-regdb </openembedded-core/tree/meta/recipes-kernel/wireless-regdb>`
+recipe file, which fetches a single tarball of binary content and manually
+installs with no need for any configuration or compilation::
+
+   SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
+   SRC_URI[sha256sum] = "57f8e7721cf5a880c13ae0c202edbb21092a060d45f9e9c59bcd2a8272bfa456"
+
+   inherit bin_package allarch
+
+   do_install() {
+       install -d -m0755 ${D}${nonarch_libdir}/crda
+       install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
+       install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
+       install -m 0644 wens.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/wens.key.pub.pem
+       install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
+       install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s
+   }
+
 Following Recipe Style Guidelines
 =================================