diff options
Diffstat (limited to 'external/meta-updater-raspberrypi')
20 files changed, 102 insertions, 480 deletions
diff --git a/external/meta-updater-raspberrypi/.gitlab-ci.yml b/external/meta-updater-raspberrypi/.gitlab-ci.yml index eb097fb6..59d2132f 100644 --- a/external/meta-updater-raspberrypi/.gitlab-ci.yml +++ b/external/meta-updater-raspberrypi/.gitlab-ci.yml @@ -31,7 +31,7 @@ Checkout: stage: checkout variables: - MANIFEST: thud + MANIFEST: dunfell CURRENT_PROJECT: meta-updater-raspberrypi except: - pushes diff --git a/external/meta-updater-raspberrypi/COPYING.MIT b/external/meta-updater-raspberrypi/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/external/meta-updater-raspberrypi/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/external/meta-updater-raspberrypi/LICENSE b/external/meta-updater-raspberrypi/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/external/meta-updater-raspberrypi/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/external/meta-updater-raspberrypi/README.md b/external/meta-updater-raspberrypi/README.md index 29ea2989..5ec94a2b 100644 --- a/external/meta-updater-raspberrypi/README.md +++ b/external/meta-updater-raspberrypi/README.md @@ -23,7 +23,12 @@ You can see examples of the first two approaches in [the linux-raspberrypi bbapp | Name | Default | Description | |---|---|---| -| RPI_WIFI_ENABLE | "0" | A flag to enable ("1") or disable "0" WiFi support (drivers and configuration) | -| RPI_WIFI_SSID | N/A| ID of a wireless network to connect to. Mandatory if RPI_WIFI_ENABLE is "1" | -| RPI_WIFI_PWD | N/A | Password for a connection to a wireless network | +| RPI_WIFI_ENABLE | "0" | A flag to enable ("1") or disable "0" WiFi support (drivers and configuration). | +| RPI_WIFI_SSID | N/A| ID of a wireless network to connect to. Be aware this is case sensitive! Mandatory if RPI_WIFI_ENABLE is "1". | +| RPI_WIFI_PWD | N/A | Password for a connection to a wireless network. | +## License + +This code is licensed under the [MIT license](COPYING.MIT), a copy of which can be found in this repository. All code is copyright HERE Europe B.V., 2016-2020. + +We require that contributors accept the terms of Linux Foundation's [Developer Certificate of Origin](https://developercertificate.org/). Please see the [contribution instructions of aktualizr](https://github.com/advancedtelematic/aktualizr/blob/master/CONTRIBUTING.md) for more information. diff --git a/external/meta-updater-raspberrypi/conf/layer.conf b/external/meta-updater-raspberrypi/conf/layer.conf index 6d3859bb..07a810be 100644 --- a/external/meta-updater-raspberrypi/conf/layer.conf +++ b/external/meta-updater-raspberrypi/conf/layer.conf @@ -10,11 +10,8 @@ BBFILE_PATTERN_updater-raspberrypi = "^${LAYERDIR}/" BBFILE_PRIORITY_updater-raspberrypi = "7" LAYERDEPENDS_updater-raspberrypi = "sota" -LAYERDEPENDS_updater-raspberrypi += "meta-python" LAYERDEPENDS_updater-raspberrypi += "raspberrypi" -LAYERSERIES_COMPAT_updater-raspberrypi = "thud" +LAYERSERIES_COMPAT_updater-raspberrypi = "dunfell" RPI_WIFI_ENABLE ?= "0" IMAGE_INSTALL_append += "${@ ' wifi-systemd-service ' if d.getVar('RPI_WIFI_ENABLE') == '1' else ''}" - -PREFERRED_VERSION_linux-raspberrypi ?= "4.19.%" diff --git a/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend index adb19c09..adb19c09 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend +++ b/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend diff --git a/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend index 5073560f..6ade9f3d 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend +++ b/external/meta-updater-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend @@ -2,16 +2,17 @@ DISABLE_OVERSCAN = "1" 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_DIR_NAME}/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_DIR_NAME}/config.txt fi - echo "avoid_warnings=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "avoid_warnings=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt } -ENABLE_UART_raspberrypi3 = "1" +ENABLE_UART_raspberrypi3 ?= "1" +ENABLE_UART_raspberrypi4 ?= "1" diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/external/meta-updater-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb index 4dceb27c..0ecd792b 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb @@ -16,13 +16,13 @@ S = "${WORKDIR}" inherit deploy do_deploy() { - install -d ${DEPLOYDIR}/bcm2835-bootfiles + install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} - mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Ostree boot script" -d ${S}/boot.scr ${DEPLOYDIR}/bcm2835-bootfiles/boot.scr - install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt + mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Ostree boot script" -d ${S}/boot.scr ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/boot.scr + install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/uEnv.txt } addtask deploy before do_package after do_install -do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" +do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch deleted file mode 100644 index 394f0ee6..00000000 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c849889cce23b41df45cfa4efd9fde8eb682195f Mon Sep 17 00:00:00 2001 -From: Laurent Bonnans <laurent.bonnans@here.com> -Date: Wed, 5 Jun 2019 18:12:21 +0200 -Subject: [PATCH] Enable FIT and bootcount on RPi3 - ---- - configs/rpi_3_32b_defconfig | 6 ++++++ - configs/rpi_3_defconfig | 6 ++++++ - 2 files changed, 12 insertions(+) - -diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index 9e142cae63..d5d32a202d 100644 ---- a/configs/rpi_3_32b_defconfig -+++ b/configs/rpi_3_32b_defconfig -@@ -39,3 +39,9 @@ CONFIG_SYS_WHITE_ON_BLACK=y - CONFIG_CONSOLE_SCROLL_LINES=10 - CONFIG_PHYS_TO_BUS=y - CONFIG_OF_LIBFDT_OVERLAY=y -+ -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+ -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index f46e504497..80fb70119e 100644 ---- a/configs/rpi_3_defconfig -+++ b/configs/rpi_3_defconfig -@@ -39,3 +39,9 @@ CONFIG_SYS_WHITE_ON_BLACK=y - CONFIG_CONSOLE_SCROLL_LINES=10 - CONFIG_PHYS_TO_BUS=y - CONFIG_OF_LIBFDT_OVERLAY=y -+ -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+ -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y --- -2.20.1 - - diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch index 1a6940e0..90ecefd2 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch @@ -1,4 +1,4 @@ -From a4a9b71ac4900fee8081c85c630d55e20b233a81 Mon Sep 17 00:00:00 2001 +From c7d936ae239e9609d95537746600e42892f3dcfb Mon Sep 17 00:00:00 2001 From: Laurent Bonnans <laurent.bonnans@here.com> Date: Wed, 5 Jun 2019 19:22:01 +0200 Subject: [PATCH] Increase rpi BOOTM_LEN @@ -8,17 +8,14 @@ Subject: [PATCH] Increase rpi BOOTM_LEN 1 file changed, 1 insertion(+) diff --git a/include/configs/rpi.h b/include/configs/rpi.h -index a97550b732..4ce9b2f99e 100644 +index 77d2d5458a..dd60042200 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h -@@ -56,6 +56,7 @@ +@@ -54,6 +54,7 @@ #define CONFIG_SYS_MEMTEST_START 0x00100000 #define CONFIG_SYS_MEMTEST_END 0x00200000 #define CONFIG_LOADADDR 0x00200000 +#define CONFIG_SYS_BOOTM_LEN SZ_64M - /* Devices */ - /* GPIO */ --- -2.20.1 - + #ifdef CONFIG_ARM64 + #define CONFIG_SYS_BOOTM_LEN SZ_64M diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch index 44774c0e..73f6e2d9 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch @@ -1,8 +1,7 @@ -From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001 +From fb48900977dbbfc6f921822abc6728b6075efc4f 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 +Subject: [PATCH] board: raspberrypi: add serial and revision to 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. @@ -10,31 +9,33 @@ 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> +Signed-off-by: Patrick Vacek <patrick.vacek@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 +index e367ba3092..d70e07f0a6 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c -@@ -241,6 +241,8 @@ static uint32_t rev_scheme; +@@ -252,6 +252,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[] = { - { + int dram_init(void) + { + ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_arm_mem, msg, 1); @@ -384,8 +386,8 @@ static void set_serial_number(void) return; } -- snprintf(serial_string, sizeof(serial_string), "%016" PRIx64, +- 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), "%016" PRIx64, serial); ++ snprintf(serial_string, sizeof(serial_string), "%016llx", serial); env_set("serial#", serial_string); } @@ -77,6 +78,3 @@ index 35f5939552..114178397e 100644 #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/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/bootcount.cfg b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/bootcount.cfg new file mode 100644 index 00000000..9fc35894 --- /dev/null +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/bootcount.cfg @@ -0,0 +1,2 @@ +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fit.cfg b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fit.cfg new file mode 100644 index 00000000..79639520 --- /dev/null +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fit.cfg @@ -0,0 +1,2 @@ +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fw_env.config b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fw_env.config new file mode 100644 index 00000000..79204290 --- /dev/null +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/fw_env.config @@ -0,0 +1 @@ +/mnt/bootpart/uboot.env 0x0000 0x4000 diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/rpi4-fixup-mem.cfg b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/rpi4-fixup-mem.cfg new file mode 100644 index 00000000..230ef286 --- /dev/null +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/rpi4-fixup-mem.cfg @@ -0,0 +1 @@ +CONFIG_ARCH_FIXUP_FDT_MEMORY=y diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend new file mode 100644 index 00000000..af8a7445 --- /dev/null +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_rpi = " \ + file://fw_env.config \ + " + +do_install_append_rpi () { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config +} diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend deleted file mode 100644 index 77649653..00000000 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend +++ /dev/null @@ -1,9 +0,0 @@ - -do_install_append () { - - cat >${D}${sysconfdir}/fw_env.config <<EOF - -/mnt/bootpart/uboot.env 0x0000 0x4000 - -EOF -} diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend index 32812600..5032e217 100644 --- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1,7 +1,32 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI_append = " \ - file://0001-Enable-FIT-and-bootcount-on-RPi3.patch \ - file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch \ - file://0001-Increase-rpi-BOOTM_LEN.patch \ - " +SRC_URI_append_rpi = " \ + file://0001-Increase-rpi-BOOTM_LEN.patch \ + file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch \ + file://fit.cfg \ + file://bootcount.cfg \ + " + +SRC_URI_append_raspberrypi4 = " \ + file://rpi4-fixup-mem.cfg \ + " + +# build u-boot image suitable for use with qemu +# we need to masquerade a kernel uImage, due to qemu limitations +# (see https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg05094.html) +# thus, we cannot use u-boot default rule for u-boot.img which sets a correct +# "u-boot" as image type + +DEPENDS_append_rpi = " u-boot-mkimage-native" + +UBOOT_LOAD_ADDR = "0x8000" +UBOOT_LOAD_ADDR_raspberrypi3-64 = "0x80000" +UBOOT_LOAD_ADDR_raspberrypi4-64 = "0x80000" + +do_compile_append_rpi() { + uboot-mkimage -A arm -T kernel -C none -O linux -a ${UBOOT_LOAD_ADDR} -e ${UBOOT_LOAD_ADDR} -d ${B}/u-boot.bin ${B}/u-boot-qemu.img +} + +do_deploy_append_rpi() { + install -m 644 ${B}/u-boot-qemu.img ${DEPLOYDIR}/u-boot-qemu.img +} diff --git a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend index 1587fbe5..f4f7a450 100644 --- a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend +++ b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend @@ -16,3 +16,5 @@ do_configure_append_sota() { kernel_configure_variable BLK_DEV_RAM y } +ENABLE_UART_raspberrypi3 ?= "1" +ENABLE_UART_raspberrypi4 ?= "1" diff --git a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb deleted file mode 100644 index 23bd0811..00000000 --- a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb +++ /dev/null @@ -1,12 +0,0 @@ -LINUX_VERSION ?= "4.19.44" -LINUX_RPI_BRANCH ?= "rpi-4.19.y" - -require recipes-kernel/linux/linux-raspberrypi.inc - -SRCREV = "b45a32b47b76cb64225d19841c20ee85ea97874d" -SRC_URI = " \ - git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \ - " - -# checksum of this kernel version differs from the one specified in linux-raspberrypi.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" |