summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-raspberrypi
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-08-07 14:05:25 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-08-13 10:10:14 +0000
commit0819413f7bb0fb035cbee42eaf5d2e56cb133db3 (patch)
tree0f410a5e2304c0aae55f18c1724cbebad04eea70 /meta-agl-bsp/meta-raspberrypi
parent852d5cc0d5ceea62ae12377c20586b552deb4e64 (diff)
meta-agl-bsp: meta-raspberrypi updates for YP 3.1.2
Changes include: - Rename bcm2835-bootfiles.bbappend to bootfiles.bbappend to match the recipe rename done in meta-raspberrypi - Update bootfile paths in rpi-config_git.bbappend to match the rename done in meta-raspberrypi - Remove local u-boot bbappend, as none of its changes are required with latest meta-raspberrypi and meta-updater - A previously silently failing command in the create-combined-dtb recipe's do_install when building with agl-sota enabled now triggers a build failure, logic has been added to handle meta-updater's disabling of the required overlay file. Bug-AGL: SPEC-3529 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ib5fd9f308fcd2da76ae882dd5b2413e56d3eee40 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25081 Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-raspberrypi')
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend (renamed from meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend)0
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend32
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch82
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend7
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb3
5 files changed, 18 insertions, 106 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend
index adb19c09c..adb19c09c 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
index 9891fa200..bbab3df46 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
@@ -4,49 +4,49 @@ TOTAL_BOARD_MEM = "3072"
do_deploy_append_raspberrypi4() {
# ENABLE CAN
if [ "${ENABLE_CAN}" = "1" ]; then
- echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable CAN" >>${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bootfiles/config.txt
fi
# Handle setup with armstub file
if [ -n "${ARMSTUB}" ]; then
- echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bootfiles/config.txt
case "${ARMSTUB}" in
*-gic.bin)
- echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "enable_gic=1" >> ${DEPLOYDIR}/bootfiles/config.txt
;;
esac
fi
if [ "${AGL_XEN_WANTED}" = "1" ]; then
- echo "total_mem=${TOTAL_BOARD_MEM}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "total_mem=${TOTAL_BOARD_MEM}" >> ${DEPLOYDIR}/bootfiles/config.txt
fi
}
do_deploy_append() {
if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_LWM}" ]; then
- sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bootfiles/config.txt
fi
if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_HWM}" ]; then
- sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bootfiles/config.txt
fi
- echo "avoid_warnings=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "avoid_warnings=2" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtparam=audio=on" >> ${DEPLOYDIR}/bootfiles/config.txt
}
do_deploy_append_raspberrypi4() {
- echo -e "\n[pi4]" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "max_framebuffers=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo -e "\n[pi4]" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "max_framebuffers=2" >> ${DEPLOYDIR}/bootfiles/config.txt
}
do_deploy_append_sota() {
- echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bootfiles/config.txt
}
ENABLE_UART_raspberrypi3 = "1"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch
deleted file mode 100644
index 964cdb7a2..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001
-From: Anton Gerasimov <anton.gerasimov@here.com>
-Date: Fri, 1 Feb 2019 14:39:48 +0100
-Subject: [PATCH] board: raspberrypi: add serial and revision to the device
- tree
-
-Raspberry Pi bootloader adds this node to fdt, but if u-boot script
-doesn't reuse the tree provided by it, this information is lost.
-
-Revision and serial are displayed in /proc/cpuinfo after boot.
-
-Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
----
- board/raspberrypi/rpi/rpi.c | 31 +++++++++++++++++++++++++++++--
- 1 file changed, 29 insertions(+), 2 deletions(-)
-
-diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
-index 35f5939552..114178397e 100644
---- a/board/raspberrypi/rpi/rpi.c
-+++ b/board/raspberrypi/rpi/rpi.c
-@@ -241,6 +241,8 @@ static uint32_t rev_scheme;
- static uint32_t rev_type;
- static const struct rpi_model *model;
-
-+uint64_t serial;
-+
- #ifdef CONFIG_ARM64
- static struct mm_region bcm2837_mem_map[] = {
- {
-@@ -384,8 +386,8 @@ static void set_serial_number(void)
- return;
- }
-
-- snprintf(serial_string, sizeof(serial_string), "%016llx",
-- msg->get_board_serial.body.resp.serial);
-+ serial = msg->get_board_serial.body.resp.serial;
-+ snprintf(serial_string, sizeof(serial_string), "%016llx", serial);
- env_set("serial#", serial_string);
- }
-
-@@ -478,6 +480,29 @@ void *board_fdt_blob_setup(void)
- return (void *)fw_dtb_pointer;
- }
-
-+static int ft_add_revision_info(void *blob) {
-+ int off;
-+ int ret;
-+
-+ off = fdt_subnode_offset(blob, 0, "system");
-+
-+ if (off < 0) {
-+ off = fdt_add_subnode(blob, 0, "system");
-+ if (off < 0)
-+ return -1;
-+ }
-+
-+ ret = fdt_setprop_u64(blob, off, "linux,serial", serial);
-+ if (ret < 0)
-+ return -1;
-+
-+ ret = fdt_setprop_u32(blob, off, "linux,revision", revision);
-+ if (ret < 0)
-+ return -1;
-+
-+ return 0;
-+}
-+
- int ft_board_setup(void *blob, bd_t *bd)
- {
- /*
-@@ -487,6 +512,8 @@ int ft_board_setup(void *blob, bd_t *bd)
- */
- lcd_dt_simplefb_add_node(blob);
-
-+ ft_add_revision_info(blob);
-+
- #ifdef CONFIG_EFI_LOADER
- /* Reserve the spin table */
- efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0);
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend
deleted file mode 100644
index ba2ecb599..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-# Update the patch for u-boot 2019.07
-SRC_URI_remove_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch"
-SRC_URI_append_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch"
-
-DEPENDS_append_rpi = " rpi-u-boot-scr"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
index c82e6fd22..c365715fa 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
@@ -22,7 +22,8 @@ do_compile () {
if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then
fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
fi
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then
+ # NOTE: meta-updater currently disables rpi-ft5406.dtbo on rpi4, so need to check if it is present
+ if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" -a -f "${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo" ]; then
fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
fi
vided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.