From 3ca6c578c302e5658ea78f6eed216188b50ed906 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 2 Aug 2017 17:27:25 -0400 Subject: raspberrypi: Fix U-Boot support In order to use U-Boot on the raspberrypi3 we need to have the equivalent of the following commit from upstream meta-raspberrypi: commit 67e02164929a7d8cc187315aaaab60f6f3aaf422 Author: Paul Barker Date: Mon Feb 13 23:32:43 2017 +0000 u-boot: Fix boot on rpi3 With that done, we can re-enable U-Boot support for raspberrypi3. With this done we can also now re-enable testing, so do so. For consistency we can now switch raspberrypi2 over to U-Boot as well. Change-Id: I9c96a66bf5644bf63f2566559ab7d9c4101b7a55 Bug-AGL: SPEC-409 Signed-off-by: Tom Rini Reviewed-on: https://gerrit.automotivelinux.org/gerrit/10491 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account Reviewed-by: Kevin Hilman ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- meta-agl-bsp/conf/include/agl_raspberrypi2.inc | 2 +- meta-agl-bsp/conf/include/agl_raspberrypi3.inc | 5 ++- .../raspberrypi3/test.disabled/hwtest.enable | 1 - .../raspberrypi3/test.disabled/hwtest.short.enable | 1 - .../test.disabled/hwtest.short.environment | 10 ----- .../raspberrypi3/test.disabled/testjob_short.yaml | 49 ---------------------- templates/machine/raspberrypi3/test/hwtest.enable | 1 + .../machine/raspberrypi3/test/hwtest.short.enable | 1 + .../raspberrypi3/test/hwtest.short.environment | 10 +++++ .../machine/raspberrypi3/test/testjob_short.yaml | 49 ++++++++++++++++++++++ 10 files changed, 66 insertions(+), 63 deletions(-) delete mode 100644 templates/machine/raspberrypi3/test.disabled/hwtest.enable delete mode 100644 templates/machine/raspberrypi3/test.disabled/hwtest.short.enable delete mode 100644 templates/machine/raspberrypi3/test.disabled/hwtest.short.environment delete mode 100644 templates/machine/raspberrypi3/test.disabled/testjob_short.yaml create mode 100644 templates/machine/raspberrypi3/test/hwtest.enable create mode 100644 templates/machine/raspberrypi3/test/hwtest.short.enable create mode 100644 templates/machine/raspberrypi3/test/hwtest.short.environment create mode 100644 templates/machine/raspberrypi3/test/testjob_short.yaml diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi2.inc b/meta-agl-bsp/conf/include/agl_raspberrypi2.inc index 5de54be63..0b531b11d 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi2.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi2.inc @@ -9,7 +9,7 @@ CORE_IMAGE_EXTRA_INSTALL += "wayland weston" MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" -KERNEL_IMAGETYPE = "Image" +KERNEL_IMAGETYPE = "uImage" KERNEL_DEVICETREE_append = " overlays/vc4-kms-v3d-overlay.dtb" PREFERRED_VERSION_linux-raspberrypi = "4.4.%" PREFERRED_VERSION_mesa = "12.%" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc b/meta-agl-bsp/conf/include/agl_raspberrypi3.inc index 5de54be63..1dd5f2989 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi3.inc @@ -9,7 +9,10 @@ CORE_IMAGE_EXTRA_INSTALL += "wayland weston" MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" -KERNEL_IMAGETYPE = "Image" +# The correct config for a Raspberry Pi 3 in 32bit mode +UBOOT_MACHINE = "rpi_3_32b_config" + +KERNEL_IMAGETYPE = "uImage" KERNEL_DEVICETREE_append = " overlays/vc4-kms-v3d-overlay.dtb" PREFERRED_VERSION_linux-raspberrypi = "4.4.%" PREFERRED_VERSION_mesa = "12.%" diff --git a/templates/machine/raspberrypi3/test.disabled/hwtest.enable b/templates/machine/raspberrypi3/test.disabled/hwtest.enable deleted file mode 100644 index 573541ac9..000000000 --- a/templates/machine/raspberrypi3/test.disabled/hwtest.enable +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/templates/machine/raspberrypi3/test.disabled/hwtest.short.enable b/templates/machine/raspberrypi3/test.disabled/hwtest.short.enable deleted file mode 100644 index 573541ac9..000000000 --- a/templates/machine/raspberrypi3/test.disabled/hwtest.short.enable +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/templates/machine/raspberrypi3/test.disabled/hwtest.short.environment b/templates/machine/raspberrypi3/test.disabled/hwtest.short.environment deleted file mode 100644 index db4a5a044..000000000 --- a/templates/machine/raspberrypi3/test.disabled/hwtest.short.environment +++ /dev/null @@ -1,10 +0,0 @@ -DEVICE_TYPE=raspberrypi3-uboot -DEVICE_NAME=raspberrypi3 -DEVICE_DTB=Image-bcm2710-rpi-3-b.dtb -DEVICE_KERNEL=Image -DEVICE_INITRAMFS=initramfs-netboot-image-raspberrypi3.ext4.gz -DEVICE_NBDROOT=agl-demo-platform-raspberrypi3.ext4.xz -DEVICE_NBDROOT_COMPRESSION=xz -DEVICE_BOOT_METHOD=u-boot -DEVICE_BOOT_TYPE=booti -#DEVICE_URL_PREFIX=https://download.automotivelinux.org/AGL \ No newline at end of file diff --git a/templates/machine/raspberrypi3/test.disabled/testjob_short.yaml b/templates/machine/raspberrypi3/test.disabled/testjob_short.yaml deleted file mode 100644 index 2ff1ac995..000000000 --- a/templates/machine/raspberrypi3/test.disabled/testjob_short.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Your first LAVA JOB definition for a porter board -device_type: @REPLACE_DEVICE_TYPE@ -job_name: AGL-short-smoke - -protocols: - lava-xnbd: - port: auto - -timeouts: - job: - minutes: 30 - action: - minutes: 15 - connection: - minutes: 5 - bootloader-commands: - minutes: 4 -priority: medium -visibility: public - -# ACTION_BLOCK -actions: -- deploy: - timeout: - minutes: 15 - to: nbd - dtb: - url: '@REPLACE_URL_PREFIX@/@REPLACE_DTB@' - kernel: - url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@' - initrd: - url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@' - allow_modify: false - nbdroot: - url: '@REPLACE_URL_PREFIX@/@REPLACE_NBDROOT@' - compression: @REPLACE_NBDROOT_COMPRESSION@ - os: debian - failure_retry: 2 - -# BOOT_BLOCK -- boot: - method: @REPLACE_BOOT_METHOD@ - commands: nbd - type: @REPLACE_BOOT_TYPE@ - prompts: ["root@@REPLACE_MACHINE@:~"] - auto_login: - login_prompt: "login:" - username: root - diff --git a/templates/machine/raspberrypi3/test/hwtest.enable b/templates/machine/raspberrypi3/test/hwtest.enable new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/templates/machine/raspberrypi3/test/hwtest.enable @@ -0,0 +1 @@ +0 diff --git a/templates/machine/raspberrypi3/test/hwtest.short.enable b/templates/machine/raspberrypi3/test/hwtest.short.enable new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/templates/machine/raspberrypi3/test/hwtest.short.enable @@ -0,0 +1 @@ +0 diff --git a/templates/machine/raspberrypi3/test/hwtest.short.environment b/templates/machine/raspberrypi3/test/hwtest.short.environment new file mode 100644 index 000000000..2f084f8ff --- /dev/null +++ b/templates/machine/raspberrypi3/test/hwtest.short.environment @@ -0,0 +1,10 @@ +DEVICE_TYPE=raspberrypi3-uboot +DEVICE_NAME=raspberrypi3 +DEVICE_DTB=uImage-bcm2710-rpi-3-b.dtb +DEVICE_KERNEL=uImage +DEVICE_INITRAMFS=initramfs-netboot-image-raspberrypi3.ext4.gz.u-boot +DEVICE_NBDROOT=agl-demo-platform-raspberrypi3.ext4.xz +DEVICE_NBDROOT_COMPRESSION=xz +DEVICE_BOOT_METHOD=u-boot +DEVICE_BOOT_TYPE=bootm +#DEVICE_URL_PREFIX=https://download.automotivelinux.org/AGL diff --git a/templates/machine/raspberrypi3/test/testjob_short.yaml b/templates/machine/raspberrypi3/test/testjob_short.yaml new file mode 100644 index 000000000..2ff1ac995 --- /dev/null +++ b/templates/machine/raspberrypi3/test/testjob_short.yaml @@ -0,0 +1,49 @@ +# Your first LAVA JOB definition for a porter board +device_type: @REPLACE_DEVICE_TYPE@ +job_name: AGL-short-smoke + +protocols: + lava-xnbd: + port: auto + +timeouts: + job: + minutes: 30 + action: + minutes: 15 + connection: + minutes: 5 + bootloader-commands: + minutes: 4 +priority: medium +visibility: public + +# ACTION_BLOCK +actions: +- deploy: + timeout: + minutes: 15 + to: nbd + dtb: + url: '@REPLACE_URL_PREFIX@/@REPLACE_DTB@' + kernel: + url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@' + initrd: + url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@' + allow_modify: false + nbdroot: + url: '@REPLACE_URL_PREFIX@/@REPLACE_NBDROOT@' + compression: @REPLACE_NBDROOT_COMPRESSION@ + os: debian + failure_retry: 2 + +# BOOT_BLOCK +- boot: + method: @REPLACE_BOOT_METHOD@ + commands: nbd + type: @REPLACE_BOOT_TYPE@ + prompts: ["root@@REPLACE_MACHINE@:~"] + auto_login: + login_prompt: "login:" + username: root + -- cgit 1.2.3-korg