diff mbox series

[meta-swupdate-boards] Move MACHINE specific recipes in separate layer

Message ID 1511189225-32686-1-git-send-email-sbabic@denx.de
State Accepted
Headers show
Series [meta-swupdate-boards] Move MACHINE specific recipes in separate layer | expand

Commit Message

Stefano Babic Nov. 20, 2017, 2:47 p.m. UTC
Build fails for beaglebone due to Raspberry rpi-uboot-scr.bbappend.
The recipe is just in meta-raspberry and it makes no sense to add
the layer when Beaglebone is built. Recipes are added only if
meta-raspberry is added to own bblayers.conf.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 conf/layer.conf                                               | 3 +++
 raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in       | 5 +++++
 raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend | 3 +++
 recipes-bsp/rpi-uboot-scr/files/boot.cmd.in                   | 5 -----
 recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend             | 3 ---
 5 files changed, 11 insertions(+), 8 deletions(-)
 create mode 100644 raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
 create mode 100644 raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
 delete mode 100644 recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
 delete mode 100644 recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend

Comments

Mirza Krak Nov. 20, 2017, 5:50 p.m. UTC | #1
On Nov 20, 2017 15:47, "Stefano Babic" <sbabic@denx.de> wrote:

Build fails for beaglebone due to Raspberry rpi-uboot-scr.bbappend.
The recipe is just in meta-raspberry and it makes no sense to add
the layer when Beaglebone is built. Recipes are added only if
meta-raspberry is added to own bblayers.conf.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 conf/layer.conf                                               | 3 +++
 raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in       | 5 +++++
 raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend | 3 +++
 recipes-bsp/rpi-uboot-scr/files/boot.cmd.in                   | 5 -----
 recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend             | 3 ---
 5 files changed, 11 insertions(+), 8 deletions(-)
 create mode 100644 raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
 create mode 100644 raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.
bbappend
 delete mode 100644 recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
 delete mode 100644 recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend

diff --git a/conf/layer.conf b/conf/layer.conf
index dbd5349..5764346 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -13,3 +13,6 @@ CORE_IMAGE_EXTRA_INSTALL_append = " swupdate swupdate-www
swupdate-tools u-boot-
 CORE_IMAGE_EXTRA_INSTALL_raspberrypi3_append = " parted"

 LAYERDEPENDS_swupdate-boards = "swupdate"
+
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.%s' % (layer, ext) \
+               for layer in '${BBFILE_COLLECTIONS}'.split() for ext in
['bb', 'bbappend'])}"
diff --git a/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
new file mode 100644
index 0000000..a2986ac
--- /dev/null
+++ b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
@@ -0,0 +1,5 @@
+saveenv
+fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
+fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
+if env exists rpipart;then setenv bootargs ${bootargs}
root=/dev/mmcblk0p${rpipart}; fi
+@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
b/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
new file mode 100644
index 0000000..d3ad9bd
--- /dev/null
+++ b/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+COMPATIBLE = "raspberrypi3"
diff --git a/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
b/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
deleted file mode 100644
index a2986ac..0000000
--- a/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
+++ /dev/null
@@ -1,5 +0,0 @@
-saveenv
-fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
-fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
-if env exists rpipart;then setenv bootargs ${bootargs}
root=/dev/mmcblk0p${rpipart}; fi
-@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
b/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
deleted file mode 100644
index d3ad9bd..0000000
--- a/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-COMPATIBLE = "raspberrypi3


Was actually preparing the same fix [1] as I was running some tests on
beaglebone and noticed the mentioned problems.

Guess you beat me to it :)

[1]. https://github.com/mirzak/meta-swupdate-boards/commits/dynamic-rpi


Best Regards
Mirza
Stefano Babic Nov. 20, 2017, 6:05 p.m. UTC | #2
Hi Mirza,

On 20/11/2017 18:50, Mirza Krak wrote:
> 
> 
> Was actually preparing the same fix [1] as I was running some tests on
> beaglebone and noticed the mentioned problems. 
> 
> Guess you beat me to it :) 
> 
> [1]. https://github.com/mirzak/meta-swupdate-boards/commits/dynamic-rpi

We fixed in the same way :-)

Best regards,
Stefano
diff mbox series

Patch

diff --git a/conf/layer.conf b/conf/layer.conf
index dbd5349..5764346 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -13,3 +13,6 @@  CORE_IMAGE_EXTRA_INSTALL_append = " swupdate swupdate-www swupdate-tools u-boot-
 CORE_IMAGE_EXTRA_INSTALL_raspberrypi3_append = " parted"
 
 LAYERDEPENDS_swupdate-boards = "swupdate"
+
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.%s' % (layer, ext) \
+               for layer in '${BBFILE_COLLECTIONS}'.split() for ext in ['bb', 'bbappend'])}"
diff --git a/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
new file mode 100644
index 0000000..a2986ac
--- /dev/null
+++ b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
@@ -0,0 +1,5 @@ 
+saveenv
+fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
+fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
+if env exists rpipart;then setenv bootargs ${bootargs} root=/dev/mmcblk0p${rpipart}; fi
+@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend b/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
new file mode 100644
index 0000000..d3ad9bd
--- /dev/null
+++ b/raspberrypi/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
@@ -0,0 +1,3 @@ 
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+COMPATIBLE = "raspberrypi3"
diff --git a/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in b/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
deleted file mode 100644
index a2986ac..0000000
--- a/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
+++ /dev/null
@@ -1,5 +0,0 @@ 
-saveenv
-fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
-fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
-if env exists rpipart;then setenv bootargs ${bootargs} root=/dev/mmcblk0p${rpipart}; fi
-@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend b/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
deleted file mode 100644
index d3ad9bd..0000000
--- a/recipes-bsp/rpi-uboot-scr/rpi-u-boot-scr.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@ 
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-COMPATIBLE = "raspberrypi3"