[U-Boot] [PATCH v2 0/2] uboot-test-hooks: aspeed ast2500 support

Hi Stephen,
Here is support for the aspeed machine. The qemu setup is a bit different in that we load u-boot from an emulated flash device, so I've included a script that does this.
v2 is a resend to include the u-boot list.
I'll send out patches for the u-boot travis setup. I've given it a spin and it appears to work:
https://travis-ci.com/shenki/u-boot/builds/117772801
Joel Stanley (2): flash: Script to create a flash image from u-boot travis: Add ASPEED AST2500 EVB Qemu
bin/flash.create_image_32mb | 9 +++++++++ bin/travis-ci/conf.evb-ast2500_qemu | 11 +++++++++++ py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100755 bin/flash.create_image_32mb create mode 100644 bin/travis-ci/conf.evb-ast2500_qemu create mode 100644 py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py

This creates an empty flash image and places u-boot at the start of it. It will be used by the ASPEED Qemu tests which boot u-boot from an emaulated flash device.
Signed-off-by: Joel Stanley joel@jms.id.au --- bin/flash.create_image_32mb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/flash.create_image_32mb
diff --git a/bin/flash.create_image_32mb b/bin/flash.create_image_32mb new file mode 100755 index 000000000000..8c2770d50e2b --- /dev/null +++ b/bin/flash.create_image_32mb @@ -0,0 +1,9 @@ +# Copyright 2019 IBM Corp. +# Joel Stanley joel@jms.id.au +# SPDX-License-Identifier: GPL-2.0+ + +# TODO: Work out a better temp directory +FLASH_IMG="${U_BOOT_BUILD_DIR}"/flash.img + +dd if=/dev/zero of="${FLASH_IMG}" count=32 bs=1M +dd if="${U_BOOT_BUILD_DIR}"/u-boot.bin of="${FLASH_IMG}" conv=notrunc

On 7/15/19 5:14 PM, Joel Stanley wrote:
This creates an empty flash image and places u-boot at the start of it. It will be used by the ASPEED Qemu tests which boot u-boot from an emaulated flash device.
diff --git a/bin/flash.create_image_32mb b/bin/flash.create_image_32mb
I can foresee a future where we rename this flash.create_image and pass in the image size via a variable that's set by the conf.xxx file. But this is fine for now.
I've applied both patches. Thanks.

Signed-off-by: Joel Stanley joel@jms.id.au --- bin/travis-ci/conf.evb-ast2500_qemu | 11 +++++++++++ py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 bin/travis-ci/conf.evb-ast2500_qemu create mode 100644 py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py
diff --git a/bin/travis-ci/conf.evb-ast2500_qemu b/bin/travis-ci/conf.evb-ast2500_qemu new file mode 100644 index 000000000000..41406fe38112 --- /dev/null +++ b/bin/travis-ci/conf.evb-ast2500_qemu @@ -0,0 +1,11 @@ +# Copyright 2019 IBM Corp. +# Joel Stanley joel@jms.id.au +# SPDX-License-Identifier: GPL-2.0+ + +console_impl=qemu +qemu_machine="ast2500-evb" +qemu_binary="qemu-system-arm" +qemu_extra_args="-nographic -m 512M -serial mon:stdio -net nic,model=ftgmac100 -net user,id=net0,tftp=${UBOOT_TRAVIS_BUILD_DIR}" +qemu_kernel_args="-drive file=${U_BOOT_BUILD_DIR}/flash.img,format=raw,if=mtd" +reset_impl=none +flash_impl=create_image_32mb diff --git a/py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py b/py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py new file mode 100644 index 000000000000..9a10a56e15dc --- /dev/null +++ b/py/travis-ci/u_boot_boardenv_evb-ast2500_qemu.py @@ -0,0 +1,7 @@ +import travis_tftp + +env__spl_skipped = True + +env__net_dhcp_server = True + +env__net_tftp_readable_file = travis_tftp.file2env('u-boot')
participants (2)
-
Joel Stanley
-
Stephen Warren