diff mbox series

[v2] Nokia RX-51: Add automated test for running RX-51 build in qemu

Message ID 20200425090006.30889-1-pali@kernel.org
State Superseded
Headers show
Series [v2] Nokia RX-51: Add automated test for running RX-51 build in qemu | expand

Commit Message

Pali Rohár April 25, 2020, 9 a.m. UTC
This patch contains test/nokia_rx51_test.sh script which automatically
download and compile all needed tools in local temporary directory to
generate a simple MTD images for booting Maemo kernel image by U-Boot from
RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
provided by qemu-linaro project.

This script does not need any special privileges, so it can be run as
non-root nobody user.

It can be used to check that U-Boot for Nokia N900 is not broken and can be
successfully booted in emulator.

Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
.travis.yml so it would be automatically run on those CI services.

Signed-off-by: Pali Roh?r <pali at kernel.org>
---
Changes in v2:
* Fix apt dependences for Travis CI
* Move definition of Travis job into own section
* Add definition for Azure and Gitlab CI services
* Add script to MAINTAINERS file
* Build U-Boot binary in test script too
* Show error message when some dependency for script is missing
* Fix addresses for booting kernel from OneNAND
* Do all stuff in nokia_rx51_tmp temporary directory
* Use upstream mformat (from mtools) for generating FAT32 MBR filesystems
  (instead of mkfs.fat from dosfstools with custom patches)
* Show more verbose log messages
* Do not use sudo, instead run parts of script under fakeroot
  (fakeroot just run binary with own LD_PRELOAD library which emulates
   mknod() function for later usage by stat() function)
* So script can be now run as non-root nobody user and it put all stuff
  in nokia_rx51_tmp temporary directory, so can be run locally without
  any issue.
---
 .azure-pipelines.yml         |   7 +
 .gitlab-ci.yml               |   6 +
 .travis.yml                  |   7 +
 board/nokia/rx51/MAINTAINERS |   1 +
 test/nokia_rx51_test.sh      | 262 +++++++++++++++++++++++++++++++++++
 5 files changed, 283 insertions(+)
 create mode 100755 test/nokia_rx51_test.sh

Comments

Pali Rohár April 27, 2020, 8:40 a.m. UTC | #1
On Saturday 25 April 2020 11:00:06 Pali Roh?r wrote:
> This patch contains test/nokia_rx51_test.sh script which automatically
> download and compile all needed tools in local temporary directory to
> generate a simple MTD images for booting Maemo kernel image by U-Boot from
> RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
> provided by qemu-linaro project.
> 
> This script does not need any special privileges, so it can be run as
> non-root nobody user.
> 
> It can be used to check that U-Boot for Nokia N900 is not broken and can be
> successfully booted in emulator.
> 
> Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
> .travis.yml so it would be automatically run on those CI services.
> 
> Signed-off-by: Pali Roh?r <pali at kernel.org>

Hello Tom, could you please review this new patch with testing script?

With strto patch, script passed on Travis CI:
https://travis-ci.org/github/u-boot/u-boot/jobs/679162986

Are there any other issues or could be this patch series accepted and
merged?

> ---
> Changes in v2:
> * Fix apt dependences for Travis CI
> * Move definition of Travis job into own section
> * Add definition for Azure and Gitlab CI services
> * Add script to MAINTAINERS file
> * Build U-Boot binary in test script too
> * Show error message when some dependency for script is missing
> * Fix addresses for booting kernel from OneNAND
> * Do all stuff in nokia_rx51_tmp temporary directory
> * Use upstream mformat (from mtools) for generating FAT32 MBR filesystems
>   (instead of mkfs.fat from dosfstools with custom patches)
> * Show more verbose log messages
> * Do not use sudo, instead run parts of script under fakeroot
>   (fakeroot just run binary with own LD_PRELOAD library which emulates
>    mknod() function for later usage by stat() function)
> * So script can be now run as non-root nobody user and it put all stuff
>   in nokia_rx51_tmp temporary directory, so can be run locally without
>   any issue.
> ---
>  .azure-pipelines.yml         |   7 +
>  .gitlab-ci.yml               |   6 +
>  .travis.yml                  |   7 +
>  board/nokia/rx51/MAINTAINERS |   1 +
>  test/nokia_rx51_test.sh      | 262 +++++++++++++++++++++++++++++++++++
>  5 files changed, 283 insertions(+)
>  create mode 100755 test/nokia_rx51_test.sh
> 
> diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> index d3e7b4dd02..a812f7f906 100644
> --- a/.azure-pipelines.yml
> +++ b/.azure-pipelines.yml
> @@ -151,6 +151,13 @@ jobs:
>            # seems to hang forever with pre-configured "container" environment
>            docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
>  
> +  - job: nokia_rx51_test
> +    displayName: 'Run tests for Nokia RX-51 (aka N900)'
> +    pool:
> +      vmImage: $(ubuntu_vm)
> +    steps:
> +      - script: test/nokia_rx51_test.sh
> +
>    - job: test_py
>      displayName: 'test.py'
>      pool:
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 08bdf81e74..678f4323a0 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -170,6 +170,12 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
>        ./tools/patman/patman --test;
>        make testconfig
>  
> +Run tests for Nokia RX-51 (aka N900):
> +  tags: [ 'all' ]
> +  stage: testsuites
> +  script:
> +    - test/nokia_rx51_test.sh
> +
>  # Test sandbox with test.py
>  sandbox test.py:
>    tags: [ 'all' ]
> diff --git a/.travis.yml b/.travis.yml
> index 82e3b91523..b32555d89f 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -49,6 +49,8 @@ addons:
>      - mtools
>      - openssl
>      - sbsigntool
> +    - fakeroot
> +    - mtd-utils
>  
>  install:
>   # Clone uboot-test-hooks
> @@ -491,6 +493,11 @@ matrix:
>        script:
>          - make tools-only_config envtools -j$(nproc)
>  
> +    - name: "Run tests for Nokia RX-51 (aka N900)"
> +      script:
> +        - export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> +        - test/nokia_rx51_test.sh
> +
>      # test/py
>      - name: "test/py sandbox"
>        env:
> diff --git a/board/nokia/rx51/MAINTAINERS b/board/nokia/rx51/MAINTAINERS
> index f2a712620b..58b16bf9a9 100644
> --- a/board/nokia/rx51/MAINTAINERS
> +++ b/board/nokia/rx51/MAINTAINERS
> @@ -5,3 +5,4 @@ F:	board/nokia/rx51/
>  F:	include/configs/nokia_rx51.h
>  F:	configs/nokia_rx51_defconfig
>  F:	doc/README.nokia_rx51
> +F:	test/nokia_rx51_test.sh
> diff --git a/test/nokia_rx51_test.sh b/test/nokia_rx51_test.sh
> new file mode 100755
> index 0000000000..a5b6a9d565
> --- /dev/null
> +++ b/test/nokia_rx51_test.sh
> @@ -0,0 +1,262 @@
> +#!/bin/sh -e
> +# SPDX-License-Identifier: GPL-2.0+
> +# (C) 2020 Pali Roh?r <pali at kernel.org>
> +
> +# External tools needed for this test:
> +echo '
> +	wget
> +	git
> +	truncate
> +	tar
> +	dpkg
> +	dd
> +	make
> +	gcc
> +	arm-linux-gnueabi-gcc
> +	fakeroot		(homepage http://fakeroot-ng.lingnu.com/)
> +	mcopy			(from mtools, homepage http://www.gnu.org/software/mtools/)
> +	mformat			(from mtools, homepage http://www.gnu.org/software/mtools/)
> +	/usr/sbin/mkfs.ubifs	(from mtd-utils, homepage http://www.linux-mtd.infradead.org/)
> +	/usr/sbin/ubinize	(from mtd-utils, homepage http://www.linux-mtd.infradead.org/)
> +' | while read tool info; do
> +	if test -z "$tool"; then continue; fi
> +	if ! which $tool 1>/dev/null 2>&1; then
> +		echo "Tool $tool was not found and is required to run this test"
> +		echo "First install $tool $info"
> +		exit 1
> +	fi
> +done || exit 1
> +
> +echo
> +echo "============================================================"
> +echo "========== Compiling U-Boot for Nokia RX-51 board =========="
> +echo "============================================================"
> +echo
> +
> +# First compile u-boot.bin binary for Nokia RX-51 board
> +make nokia_rx51_config
> +make -j4 u-boot.bin ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
> +
> +# And then do all stuff in temporary directory
> +mkdir -p nokia_rx51_tmp
> +cd nokia_rx51_tmp
> +
> +test -f mkimage || ln -s ../tools/mkimage .
> +test -f u-boot.bin || ln -s ../u-boot.bin .
> +
> +echo
> +echo "=========================================================================="
> +echo "========== Downloading and compiling qemu from qemu-linaro fork =========="
> +echo "=========================================================================="
> +echo
> +
> +# Download and compile linaro version qemu which has support for n900 machine
> +# Last working commit is 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1
> +if ! test -f qemu-system-arm; then
> +	test -d qemu-linaro || git clone https://git.linaro.org/qemu/qemu-linaro.git
> +	cd qemu-linaro
> +	git checkout 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1
> +	./configure --enable-system --target-list=arm-softmmu --disable-sdl --disable-gtk --disable-curses --audio-drv-list= --audio-card-list= --disable-werror --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-vnc --disable-curl --disable-slirp --disable-kvm --disable-user --disable-linux-user --disable-bsd-user --disable-guest-base --disable-uuid --disable-vde --disable-linux-aio --disable-cap-ng --disable-attr --disable-blobs --disable-docs --disable-spice --disable-libiscsi --disable-smartcard-nss --disable-usb-redir --disable-guest-agent --disable-seccomp --disable-glusterfs --disable-nptl --disable-fdt
> +	make -j4
> +	cd ..
> +	ln -s qemu-linaro/arm-softmmu/qemu-system-arm .
> +fi
> +
> +echo
> +echo "==================================================="
> +echo "========== Downloading external binaries =========="
> +echo "==================================================="
> +echo
> +
> +# Download qflasher and nolo images
> +# This is proprietary qemu flasher tool with first stage images, but license allows non-commercial redistribution
> +wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz
> +tar -xf qemu-n900.tar.gz
> +
> +# Download Maemo script u-boot-gen-combined
> +if ! test -f u-boot-gen-combined; then
> +	test -d u-boot-maemo || git clone https://github.com/pali/u-boot-maemo.git
> +	chmod +x u-boot-maemo/debian/u-boot-gen-combined
> +	ln -s u-boot-maemo/debian/u-boot-gen-combined .
> +fi
> +
> +# Download Maemo fiasco kernel
> +wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb
> +dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28
> +
> +# Download Maemo libc
> +wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb
> +dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1
> +
> +# Download Maemo busybox
> +wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb
> +dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2
> +
> +echo
> +echo "======================================="
> +echo "========== Generating images =========="
> +echo "======================================="
> +echo
> +
> +# Generate rootfs directory
> +mkdir -p rootfs
> +mkdir -p rootfs/dev/
> +mkdir -p rootfs/bin/
> +mkdir -p rootfs/sbin/
> +mkdir -p rootfs/lib/
> +cp -a busybox_1.10.2/bin/busybox rootfs/bin/
> +cp -a libc6_2.5.1/lib/ld-linux.so.3 rootfs/lib/
> +cp -a libc6_2.5.1/lib/ld-2.5.so rootfs/lib/
> +cp -a libc6_2.5.1/lib/libc.so.6 rootfs/lib/
> +cp -a libc6_2.5.1/lib/libc-2.5.so rootfs/lib/
> +cp -a libc6_2.5.1/lib/libcrypt.so.1 rootfs/lib/
> +cp -a libc6_2.5.1/lib/libcrypt-2.5.so rootfs/lib/
> +test -f rootfs/bin/sh || ln -sf busybox rootfs/bin/sh
> +test -f rootfs/sbin/poweroff || ln -sf ../bin/busybox rootfs/sbin/poweroff
> +cat > rootfs/sbin/preinit << EOF
> +#!/bin/sh
> +echo
> +echo "Successfully booted"
> +echo
> +/sbin/poweroff -f
> +EOF
> +chmod +x rootfs/sbin/preinit
> +
> +# Generate ubi config file for ubi rootfs image
> +cat > ubi.ini << EOF
> +[rootfs]
> +mode=ubi
> +image=ubifs.img
> +vol_id=0
> +vol_size=160MiB
> +vol_type=dynamic
> +vol_name=rootfs
> +vol_alignment=1
> +vol_flags=autoresize
> +EOF
> +
> +# Generate ubi rootfs image from rootfs directory
> +# NOTE: Character device on host filesystem can be created only by root
> +#       But we do not need it on host filesystem, just in ubifs image
> +#       So run mknod and mkfs.ubifs commands under fakeroot program
> +#       which via LD_PRELOAD simulate mknod() and stat() functions
> +#       so mkfs.ubifs will see dev/console as character device and
> +#       put it correctly as character device into final ubifs image
> +#       Therefore we can run whole script as non-root nobody user
> +fakeroot sh -c '
> +	rm -f rootfs/dev/console;
> +	mknod rootfs/dev/console c 5 1;
> +	/usr/sbin/mkfs.ubifs -m 2048 -e 129024 -c 2047 -r rootfs ubifs.img;
> +'
> +/usr/sbin/ubinize -o ubi.img -p 128KiB -m 2048 -s 512 ubi.ini
> +
> +# Generate bootmenu for eMMC booting
> +cat > bootmenu_emmc << EOF
> +setenv bootmenu_0 'uImage-2.6.28-omap1 from eMMC=setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat; setenv bootargs; setenv setup_omap_atag 1; setenv mmckernfile uImage-2.6.28-omap1; run trymmckernboot';
> +setenv bootmenu_1;
> +setenv bootmenu_delay 1;
> +setenv bootdelay 1;
> +EOF
> +./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_emmc bootmenu_emmc.scr
> +
> +# Generate bootmenu for OneNAND booting
> +cat > bootmenu_nand << EOF
> +setenv bootmenu_0 'uImage-2.6.28-omap1 from OneNAND=mtd read initfs \${kernaddr}; setenv bootargs; setenv setup_omap_atag 1; bootm \${kernaddr}';
> +setenv bootmenu_1;
> +setenv bootmenu_delay 1;
> +setenv bootdelay 1;
> +EOF
> +./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_nand bootmenu_nand.scr
> +
> +# Generate combined image from u-boot and Maemo fiasco kernel
> +dd if=kernel_2.6.28/boot/zImage-2.6.28-20103103+0m5.fiasco of=zImage-2.6.28-omap1 skip=95 bs=1
> +./mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n zImage-2.6.28-omap1 -d zImage-2.6.28-omap1 uImage-2.6.28-omap1
> +./u-boot-gen-combined u-boot.bin uImage-2.6.28-omap1 combined.bin
> +
> +# Generate combined hack image from u-boot and Maemo fiasco kernel (kernel starts at 2MB offset and qflasher puts 2kB header before supplied image)
> +cp u-boot.bin combined_hack.bin
> +dd if=uImage-2.6.28-omap1 of=combined_hack.bin bs=1024 seek=$((2048-2))
> +
> +# Generate FAT32 eMMC image for eMMC booting
> +truncate -s 50MiB emmc_emmc.img
> +mformat -m 0xf8 -F -h 4 -s 16 -c 1 -t $((50*1024*1024/(4*16*512))) :: -i emmc_emmc.img
> +mcopy uImage-2.6.28-omap1 ::/uImage-2.6.28-omap1 -i emmc_emmc.img
> +mcopy bootmenu_emmc.scr ::/bootmenu.scr -i emmc_emmc.img
> +
> +# Generate FAT32 eMMC image for OneNAND booting
> +truncate -s 50MiB emmc_nand.img
> +mformat -m 0xf8 -F -h 4 -s 16 -c 1 -t $((50*1024*1024/(4*16*512))) :: -i emmc_nand.img
> +mcopy bootmenu_nand.scr ::/bootmenu.scr -i emmc_nand.img
> +
> +# Generate MTD image for RAM booting from bootloader nolo images, compiled image and rootfs image
> +rm -f mtd_ram.img
> +./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined.bin -r ubi.img -m rx51 -o mtd_ram.img
> +
> +# Generate MTD image for eMMC booting from bootloader nolo images, u-boot image and rootfs image
> +rm -f mtd_emmc.img
> +./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k u-boot.bin -r ubi.img -m rx51 -o mtd_emmc.img
> +
> +# Generate MTD image for OneNAND booting from bootloader nolo images, combined hacked image and rootfs image
> +# Kernel image is put into initfs area, but qflasher reject to copy kernel image into initfs area because it does not have initfs signature
> +# This is hack to workaround this problem, tell qflasher that kernel area for u-boot is bigger and put big combined hacked image (u-boot + kernel with correct offset)
> +rm -f mtd_nand.img
> +./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined_hack.bin -r ubi.img -m rx51 -p k=4094,i=2 -o mtd_nand.img
> +
> +echo
> +echo "======================================================"
> +echo "========== Running test images in n900 qemu =========="
> +echo "======================================================"
> +echo
> +
> +# Run MTD image in qemu and wait for 300s if kernel from RAM is correctly booted
> +rm -f qemu_ram.log
> +./qemu-system-arm -M n900 -mtdblock mtd_ram.img -serial /dev/stdout -display none > qemu_ram.log &
> +qemu_pid=$!
> +tail -F qemu_ram.log &
> +tail_pid=$!
> +{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
> +sleep_pid=$!
> +wait $qemu_pid || true
> +kill -9 $tail_pid $sleep_pid 2>/dev/null || true
> +
> +# Run MTD image in qemu and wait for 300s if kernel from eMMC is correctly booted
> +rm -f qemu_emmc.log
> +./qemu-system-arm -M n900 -mtdblock mtd_emmc.img -sd emmc_emmc.img -serial /dev/stdout -display none > qemu_emmc.log &
> +qemu_pid=$!
> +tail -F qemu_emmc.log &
> +tail_pid=$!
> +{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
> +sleep_pid=$!
> +wait $qemu_pid || true
> +kill -9 $tail_pid $sleep_pid 2>/dev/null || true
> +
> +# Run MTD image in qemu and wait for 300s if kernel from OneNAND is correctly booted
> +rm -f qemu_nand.log
> +./qemu-system-arm -M n900 -mtdblock mtd_nand.img -sd emmc_nand.img -serial /dev/stdout -display none > qemu_nand.log &
> +qemu_pid=$!
> +tail -F qemu_nand.log &
> +tail_pid=$!
> +{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
> +sleep_pid=$!
> +wait $qemu_pid || true
> +kill -9 $tail_pid $sleep_pid 2>/dev/null || true
> +
> +echo
> +echo "============================="
> +echo "========== Results =========="
> +echo "============================="
> +echo
> +
> +if grep -q 'Successfully booted' qemu_ram.log; then echo "Kernel was successfully booted from RAM"; else echo "Failed to boot kernel from RAM"; fi
> +if grep -q 'Successfully booted' qemu_emmc.log; then echo "Kernel was successfully booted from eMMC"; else echo "Failed to boot kernel from eMMC"; fi
> +if grep -q 'Successfully booted' qemu_nand.log; then echo "Kernel was successfully booted from OneNAND"; else echo "Failed to boot kernel from OneNAND"; fi
> +
> +echo
> +
> +if grep -q 'Successfully booted' qemu_ram.log && grep -q 'Successfully booted' qemu_emmc.log && grep -q 'Successfully booted' qemu_nand.log; then
> +	echo "All tests passed"
> +	exit 0
> +else
> +	echo "Some tests failed"
> +	exit 1
> +fi
> -- 
> 2.20.1
>
Tom Rini April 27, 2020, 6 p.m. UTC | #2
On Sat, Apr 25, 2020 at 11:00:06AM +0200, Pali Roh?r wrote:
> This patch contains test/nokia_rx51_test.sh script which automatically
> download and compile all needed tools in local temporary directory to
> generate a simple MTD images for booting Maemo kernel image by U-Boot from
> RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
> provided by qemu-linaro project.
> 
> This script does not need any special privileges, so it can be run as
> non-root nobody user.
> 
> It can be used to check that U-Boot for Nokia N900 is not broken and can be
> successfully booted in emulator.
> 
> Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
> .travis.yml so it would be automatically run on those CI services.
> 
> Signed-off-by: Pali Roh?r <pali at kernel.org>
> ---
> Changes in v2:
> * Fix apt dependences for Travis CI
> * Move definition of Travis job into own section
> * Add definition for Azure and Gitlab CI services
> * Add script to MAINTAINERS file
> * Build U-Boot binary in test script too
> * Show error message when some dependency for script is missing
> * Fix addresses for booting kernel from OneNAND
> * Do all stuff in nokia_rx51_tmp temporary directory
> * Use upstream mformat (from mtools) for generating FAT32 MBR filesystems
>   (instead of mkfs.fat from dosfstools with custom patches)
> * Show more verbose log messages
> * Do not use sudo, instead run parts of script under fakeroot
>   (fakeroot just run binary with own LD_PRELOAD library which emulates
>    mknod() function for later usage by stat() function)
> * So script can be now run as non-root nobody user and it put all stuff
>   in nokia_rx51_tmp temporary directory, so can be run locally without
>   any issue.
> ---
>  .azure-pipelines.yml         |   7 +
>  .gitlab-ci.yml               |   6 +
>  .travis.yml                  |   7 +
>  board/nokia/rx51/MAINTAINERS |   1 +
>  test/nokia_rx51_test.sh      | 262 +++++++++++++++++++++++++++++++++++
>  5 files changed, 283 insertions(+)
>  create mode 100755 test/nokia_rx51_test.sh
> 
> diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> index d3e7b4dd02..a812f7f906 100644
> --- a/.azure-pipelines.yml
> +++ b/.azure-pipelines.yml
> @@ -151,6 +151,13 @@ jobs:
>            # seems to hang forever with pre-configured "container" environment
>            docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
>  
> +  - job: nokia_rx51_test
> +    displayName: 'Run tests for Nokia RX-51 (aka N900)'
> +    pool:
> +      vmImage: $(ubuntu_vm)
> +    steps:
> +      - script: test/nokia_rx51_test.sh
> +
>    - job: test_py
>      displayName: 'test.py'
>      pool:
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 08bdf81e74..678f4323a0 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -170,6 +170,12 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
>        ./tools/patman/patman --test;
>        make testconfig
>  
> +Run tests for Nokia RX-51 (aka N900):
> +  tags: [ 'all' ]
> +  stage: testsuites
> +  script:
> +    - test/nokia_rx51_test.sh
> +
>  # Test sandbox with test.py
>  sandbox test.py:
>    tags: [ 'all' ]
> diff --git a/.travis.yml b/.travis.yml
> index 82e3b91523..b32555d89f 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -49,6 +49,8 @@ addons:
>      - mtools
>      - openssl
>      - sbsigntool
> +    - fakeroot
> +    - mtd-utils

So the Docker container for Azure/GitLab will need an update too.  I'll
take care of that shortly.  Otherwise:

Reviewed-by: Tom Rini <trini at konsulko.com>
Pali Rohár April 28, 2020, 7:37 a.m. UTC | #3
On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> On Sat, Apr 25, 2020 at 11:00:06AM +0200, Pali Roh?r wrote:
> > This patch contains test/nokia_rx51_test.sh script which automatically
> > download and compile all needed tools in local temporary directory to
> > generate a simple MTD images for booting Maemo kernel image by U-Boot from
> > RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
> > provided by qemu-linaro project.
> > 
> > This script does not need any special privileges, so it can be run as
> > non-root nobody user.
> > 
> > It can be used to check that U-Boot for Nokia N900 is not broken and can be
> > successfully booted in emulator.
> > 
> > Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
> > .travis.yml so it would be automatically run on those CI services.
> > 
> > Signed-off-by: Pali Roh?r <pali at kernel.org>
> > ---
> > Changes in v2:
> > * Fix apt dependences for Travis CI
> > * Move definition of Travis job into own section
> > * Add definition for Azure and Gitlab CI services
> > * Add script to MAINTAINERS file
> > * Build U-Boot binary in test script too
> > * Show error message when some dependency for script is missing
> > * Fix addresses for booting kernel from OneNAND
> > * Do all stuff in nokia_rx51_tmp temporary directory
> > * Use upstream mformat (from mtools) for generating FAT32 MBR filesystems
> >   (instead of mkfs.fat from dosfstools with custom patches)
> > * Show more verbose log messages
> > * Do not use sudo, instead run parts of script under fakeroot
> >   (fakeroot just run binary with own LD_PRELOAD library which emulates
> >    mknod() function for later usage by stat() function)
> > * So script can be now run as non-root nobody user and it put all stuff
> >   in nokia_rx51_tmp temporary directory, so can be run locally without
> >   any issue.
> > ---
> >  .azure-pipelines.yml         |   7 +
> >  .gitlab-ci.yml               |   6 +
> >  .travis.yml                  |   7 +
> >  board/nokia/rx51/MAINTAINERS |   1 +
> >  test/nokia_rx51_test.sh      | 262 +++++++++++++++++++++++++++++++++++
> >  5 files changed, 283 insertions(+)
> >  create mode 100755 test/nokia_rx51_test.sh
> > 
> > diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> > index d3e7b4dd02..a812f7f906 100644
> > --- a/.azure-pipelines.yml
> > +++ b/.azure-pipelines.yml
> > @@ -151,6 +151,13 @@ jobs:
> >            # seems to hang forever with pre-configured "container" environment
> >            docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
> >  
> > +  - job: nokia_rx51_test
> > +    displayName: 'Run tests for Nokia RX-51 (aka N900)'
> > +    pool:
> > +      vmImage: $(ubuntu_vm)
> > +    steps:
> > +      - script: test/nokia_rx51_test.sh
> > +
> >    - job: test_py
> >      displayName: 'test.py'
> >      pool:
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index 08bdf81e74..678f4323a0 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -170,6 +170,12 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
> >        ./tools/patman/patman --test;
> >        make testconfig
> >  
> > +Run tests for Nokia RX-51 (aka N900):
> > +  tags: [ 'all' ]
> > +  stage: testsuites
> > +  script:
> > +    - test/nokia_rx51_test.sh
> > +
> >  # Test sandbox with test.py
> >  sandbox test.py:
> >    tags: [ 'all' ]
> > diff --git a/.travis.yml b/.travis.yml
> > index 82e3b91523..b32555d89f 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -49,6 +49,8 @@ addons:
> >      - mtools
> >      - openssl
> >      - sbsigntool
> > +    - fakeroot
> > +    - mtd-utils
> 
> So the Docker container for Azure/GitLab will need an update too.

Do not forget to put arm-linux-gnueabi-gcc into PATH for rx51 test script.

> I'll take care of that shortly.  Otherwise:
> 
> Reviewed-by: Tom Rini <trini at konsulko.com>

Ok, thank you!
Pali Rohár May 8, 2020, 12:52 p.m. UTC | #4
On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > I'll take care of that shortly.  Otherwise:
> > 
> > Reviewed-by: Tom Rini <trini at konsulko.com>
> 
> Ok, thank you!

Hello Tom! Will you take whole patch series? Or is there anything else
needed to be done from my side for this N900 patch series?
Tom Rini May 8, 2020, 1:10 p.m. UTC | #5
On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > I'll take care of that shortly.  Otherwise:
> > > 
> > > Reviewed-by: Tom Rini <trini at konsulko.com>
> > 
> > Ok, thank you!
> 
> Hello Tom! Will you take whole patch series? Or is there anything else
> needed to be done from my side for this N900 patch series?

Lokesh is the custodian for the TI tree these days, so whenever it's in
his next PR.  Thanks!
Lokesh Vutla May 9, 2020, 4:28 p.m. UTC | #6
On 08/05/20 6:40 PM, Tom Rini wrote:
> On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
>> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
>>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
>>>> I'll take care of that shortly.  Otherwise:
>>>>
>>>> Reviewed-by: Tom Rini <trini at konsulko.com>
>>>
>>> Ok, thank you!
>>
>> Hello Tom! Will you take whole patch series? Or is there anything else
>> needed to be done from my side for this N900 patch series?
> 
> Lokesh is the custodian for the TI tree these days, so whenever it's in
> his next PR.  Thanks!
> 

I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
changed?

[0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228

Thanks and regards,
Lokesh
Pali Rohár May 9, 2020, 4:35 p.m. UTC | #7
On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> On 08/05/20 6:40 PM, Tom Rini wrote:
> > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> >>>> I'll take care of that shortly.  Otherwise:
> >>>>
> >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> >>>
> >>> Ok, thank you!
> >>
> >> Hello Tom! Will you take whole patch series? Or is there anything else
> >> needed to be done from my side for this N900 patch series?
> > 
> > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > his next PR.  Thanks!
> > 
> 
> I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> changed?
> 
> [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228

Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.

I figured out that on Travis it is available in ~/.buildman-toolchains
but not exported to $PATH. So for Travis build I added...

export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH

... as can be seen in the last patch.

Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
Maybe Tom knows it as he already wrote that would take care of updating
Gitlab image.

> Thanks and regards,
> Lokesh
Tom Rini May 9, 2020, 8:56 p.m. UTC | #8
On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > >>>> I'll take care of that shortly.  Otherwise:
> > >>>>
> > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > >>>
> > >>> Ok, thank you!
> > >>
> > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > >> needed to be done from my side for this N900 patch series?
> > > 
> > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > his next PR.  Thanks!
> > > 
> > 
> > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > changed?
> > 
> > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> 
> Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> 
> I figured out that on Travis it is available in ~/.buildman-toolchains
> but not exported to $PATH. So for Travis build I added...
> 
> export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> 
> ... as can be seen in the last patch.
> 
> Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> Maybe Tom knows it as he already wrote that would take care of updating
> Gitlab image.

All of the buildman-fetched toolchains are always in the same place, so
a similar change to gitlab/azure will fix those.  Thanks!
Pali Rohár May 14, 2020, 10:41 p.m. UTC | #9
On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > >>>> I'll take care of that shortly.  Otherwise:
> > > >>>>
> > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > >>>
> > > >>> Ok, thank you!
> > > >>
> > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > >> needed to be done from my side for this N900 patch series?
> > > > 
> > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > his next PR.  Thanks!
> > > > 
> > > 
> > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > changed?
> > > 
> > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > 
> > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > 
> > I figured out that on Travis it is available in ~/.buildman-toolchains
> > but not exported to $PATH. So for Travis build I added...
> > 
> > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > 
> > ... as can be seen in the last patch.
> > 
> > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > Maybe Tom knows it as he already wrote that would take care of updating
> > Gitlab image.
> 
> All of the buildman-fetched toolchains are always in the same place, so
> a similar change to gitlab/azure will fix those.  Thanks!

I see that all patches except this one were merged, thanks.

Tom, are you going to take look at this last patch?

It already passed on travis [1] [2] but I do not have those gitlab and
azure accounts to trigger their jobs. But I think that only correct
$PATH is needed for azure and gitlab.

[1] - https://github.com/u-boot/u-boot/pull/30
[2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
Tom Rini May 15, 2020, 12:01 a.m. UTC | #10
On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > >>>>
> > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > >>>
> > > > >>> Ok, thank you!
> > > > >>
> > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > >> needed to be done from my side for this N900 patch series?
> > > > > 
> > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > his next PR.  Thanks!
> > > > > 
> > > > 
> > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > changed?
> > > > 
> > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > 
> > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > 
> > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > but not exported to $PATH. So for Travis build I added...
> > > 
> > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > 
> > > ... as can be seen in the last patch.
> > > 
> > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > Maybe Tom knows it as he already wrote that would take care of updating
> > > Gitlab image.
> > 
> > All of the buildman-fetched toolchains are always in the same place, so
> > a similar change to gitlab/azure will fix those.  Thanks!
> 
> I see that all patches except this one were merged, thanks.
> 
> Tom, are you going to take look at this last patch?
> 
> It already passed on travis [1] [2] but I do not have those gitlab and
> azure accounts to trigger their jobs. But I think that only correct
> $PATH is needed for azure and gitlab.
> 
> [1] - https://github.com/u-boot/u-boot/pull/30
> [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986

No, I've been waiting for you to make an attempt at fixing the jobs.
Anyone can get Azure running and there's enough examples to make a
reasonable attempt at making it work without testing.
Pali Rohár May 15, 2020, 7:33 a.m. UTC | #11
On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > >>>>
> > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > >>>
> > > > > >>> Ok, thank you!
> > > > > >>
> > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > 
> > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > his next PR.  Thanks!
> > > > > > 
> > > > > 
> > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > changed?
> > > > > 
> > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > 
> > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > 
> > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > but not exported to $PATH. So for Travis build I added...
> > > > 
> > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > 
> > > > ... as can be seen in the last patch.
> > > > 
> > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > Gitlab image.
> > > 
> > > All of the buildman-fetched toolchains are always in the same place, so
> > > a similar change to gitlab/azure will fix those.  Thanks!
> > 
> > I see that all patches except this one were merged, thanks.
> > 
> > Tom, are you going to take look at this last patch?
> > 
> > It already passed on travis [1] [2] but I do not have those gitlab and
> > azure accounts to trigger their jobs. But I think that only correct
> > $PATH is needed for azure and gitlab.
> > 
> > [1] - https://github.com/u-boot/u-boot/pull/30
> > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> 
> No, I've been waiting for you to make an attempt at fixing the jobs.
> Anyone can get Azure running and there's enough examples to make a
> reasonable attempt at making it work without testing.

So can you give me pointers how to run it?

And is there something more needed for travis job?
Tom Rini May 15, 2020, 1:20 p.m. UTC | #12
On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > >>>>
> > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > >>>
> > > > > > >>> Ok, thank you!
> > > > > > >>
> > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > 
> > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > his next PR.  Thanks!
> > > > > > > 
> > > > > > 
> > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > changed?
> > > > > > 
> > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > 
> > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > 
> > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > but not exported to $PATH. So for Travis build I added...
> > > > > 
> > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > 
> > > > > ... as can be seen in the last patch.
> > > > > 
> > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > Gitlab image.
> > > > 
> > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > 
> > > I see that all patches except this one were merged, thanks.
> > > 
> > > Tom, are you going to take look at this last patch?
> > > 
> > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > azure accounts to trigger their jobs. But I think that only correct
> > > $PATH is needed for azure and gitlab.
> > > 
> > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > 
> > No, I've been waiting for you to make an attempt at fixing the jobs.
> > Anyone can get Azure running and there's enough examples to make a
> > reasonable attempt at making it work without testing.
> 
> So can you give me pointers how to run it?

It's a well documented public service.  The only slight trick is you
need to point it at .azure-pipeline.yml and not whatever the default
non-dotfile name is.

> And is there something more needed for travis job?

All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
Since Azure/GitLab share the same docker image (which sadly I don't see
how to make Travis also do), that's why fixing Azure should let you see
what to drop in for GitLab.
Pali Rohár May 15, 2020, 1:46 p.m. UTC | #13
On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > >>>>
> > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > >>>
> > > > > > > >>> Ok, thank you!
> > > > > > > >>
> > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > 
> > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > his next PR.  Thanks!
> > > > > > > > 
> > > > > > > 
> > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > changed?
> > > > > > > 
> > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > 
> > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > 
> > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > 
> > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > 
> > > > > > ... as can be seen in the last patch.
> > > > > > 
> > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > Gitlab image.
> > > > > 
> > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > 
> > > > I see that all patches except this one were merged, thanks.
> > > > 
> > > > Tom, are you going to take look at this last patch?
> > > > 
> > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > azure accounts to trigger their jobs. But I think that only correct
> > > > $PATH is needed for azure and gitlab.
> > > > 
> > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > 
> > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > Anyone can get Azure running and there's enough examples to make a
> > > reasonable attempt at making it work without testing.
> > 
> > So can you give me pointers how to run it?
> 
> It's a well documented public service.  The only slight trick is you
> need to point it at .azure-pipeline.yml and not whatever the default
> non-dotfile name is.

Tom, sorry, but I grepped whole u-boot source code repository and I did
not find any documentation nor README nor any other information how to
run / extend or modify this service. That is why I asked for some
information... e.g. how I can I run it and check if it is working or
not.

> > And is there something more needed for travis job?
> 
> All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> Since Azure/GitLab share the same docker image (which sadly I don't see
> how to make Travis also do), that's why fixing Azure should let you see
> what to drop in for GitLab.

I prepared this N900 Travis setup for your request [1] and I do not like
to see it thrown away, just because there is unrelated issue on Azure.

I have used Travis before, so I know that opening pull request on github
triggers Travis build and Github directly shows me links to result.

But whatever I did, I was not able to trigger that azure from github
pull request.

[1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
Tom Rini May 15, 2020, 1:48 p.m. UTC | #14
On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > >>>>
> > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > >>>
> > > > > > > > >>> Ok, thank you!
> > > > > > > > >>
> > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > 
> > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > his next PR.  Thanks!
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > changed?
> > > > > > > > 
> > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > 
> > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > 
> > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > 
> > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > 
> > > > > > > ... as can be seen in the last patch.
> > > > > > > 
> > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > Gitlab image.
> > > > > > 
> > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > 
> > > > > I see that all patches except this one were merged, thanks.
> > > > > 
> > > > > Tom, are you going to take look at this last patch?
> > > > > 
> > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > $PATH is needed for azure and gitlab.
> > > > > 
> > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > 
> > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > Anyone can get Azure running and there's enough examples to make a
> > > > reasonable attempt at making it work without testing.
> > > 
> > > So can you give me pointers how to run it?
> > 
> > It's a well documented public service.  The only slight trick is you
> > need to point it at .azure-pipeline.yml and not whatever the default
> > non-dotfile name is.
> 
> Tom, sorry, but I grepped whole u-boot source code repository and I did
> not find any documentation nor README nor any other information how to
> run / extend or modify this service. That is why I asked for some
> information... e.g. how I can I run it and check if it is working or
> not.
> 
> > > And is there something more needed for travis job?
> > 
> > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > Since Azure/GitLab share the same docker image (which sadly I don't see
> > how to make Travis also do), that's why fixing Azure should let you see
> > what to drop in for GitLab.
> 
> I prepared this N900 Travis setup for your request [1] and I do not like
> to see it thrown away, just because there is unrelated issue on Azure.
> 
> I have used Travis before, so I know that opening pull request on github
> triggers Travis build and Github directly shows me links to result.
> 
> But whatever I did, I was not able to trigger that azure from github
> pull request.
> 
> [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html

Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
plugs in to GitHub just as easy as Travis does, but runs quicker.
Pali Rohár May 15, 2020, 1:51 p.m. UTC | #15
On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > >>>>
> > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > >>>
> > > > > > > > > >>> Ok, thank you!
> > > > > > > > > >>
> > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > 
> > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > changed?
> > > > > > > > > 
> > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > 
> > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > 
> > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > 
> > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > 
> > > > > > > > ... as can be seen in the last patch.
> > > > > > > > 
> > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > Gitlab image.
> > > > > > > 
> > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > 
> > > > > > I see that all patches except this one were merged, thanks.
> > > > > > 
> > > > > > Tom, are you going to take look at this last patch?
> > > > > > 
> > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > $PATH is needed for azure and gitlab.
> > > > > > 
> > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > 
> > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > reasonable attempt at making it work without testing.
> > > > 
> > > > So can you give me pointers how to run it?
> > > 
> > > It's a well documented public service.  The only slight trick is you
> > > need to point it at .azure-pipeline.yml and not whatever the default
> > > non-dotfile name is.
> > 
> > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > not find any documentation nor README nor any other information how to
> > run / extend or modify this service. That is why I asked for some
> > information... e.g. how I can I run it and check if it is working or
> > not.
> > 
> > > > And is there something more needed for travis job?
> > > 
> > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > how to make Travis also do), that's why fixing Azure should let you see
> > > what to drop in for GitLab.
> > 
> > I prepared this N900 Travis setup for your request [1] and I do not like
> > to see it thrown away, just because there is unrelated issue on Azure.
> > 
> > I have used Travis before, so I know that opening pull request on github
> > triggers Travis build and Github directly shows me links to result.
> > 
> > But whatever I did, I was not able to trigger that azure from github
> > pull request.
> > 
> > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> 
> Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> plugs in to GitHub just as easy as Travis does, but runs quicker.

So seems it is buggy, it was not triggered, see that only Travis was
triggered in pull request: https://github.com/u-boot/u-boot/pull/30
Tom Rini May 15, 2020, 1:53 p.m. UTC | #16
On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > >>>>
> > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > >>>
> > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > >>
> > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > 
> > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > changed?
> > > > > > > > > > 
> > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > 
> > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > 
> > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > 
> > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > 
> > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > 
> > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > Gitlab image.
> > > > > > > > 
> > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > 
> > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > 
> > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > 
> > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > 
> > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > 
> > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > reasonable attempt at making it work without testing.
> > > > > 
> > > > > So can you give me pointers how to run it?
> > > > 
> > > > It's a well documented public service.  The only slight trick is you
> > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > non-dotfile name is.
> > > 
> > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > not find any documentation nor README nor any other information how to
> > > run / extend or modify this service. That is why I asked for some
> > > information... e.g. how I can I run it and check if it is working or
> > > not.
> > > 
> > > > > And is there something more needed for travis job?
> > > > 
> > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > what to drop in for GitLab.
> > > 
> > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > to see it thrown away, just because there is unrelated issue on Azure.
> > > 
> > > I have used Travis before, so I know that opening pull request on github
> > > triggers Travis build and Github directly shows me links to result.
> > > 
> > > But whatever I did, I was not able to trigger that azure from github
> > > pull request.
> > > 
> > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > 
> > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > plugs in to GitHub just as easy as Travis does, but runs quicker.
> 
> So seems it is buggy, it was not triggered, see that only Travis was
> triggered in pull request: https://github.com/u-boot/u-boot/pull/30

Did you configure your Azure account?  If you've used Travis elsewhere
that's why U-Boot just runs there.
Pali Rohár May 15, 2020, 1:58 p.m. UTC | #17
On Friday 15 May 2020 09:53:23 Tom Rini wrote:
> On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> > On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > > >>>>
> > > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > > >>>
> > > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > > >>
> > > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > > 
> > > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > > changed?
> > > > > > > > > > > 
> > > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > > 
> > > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > > 
> > > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > > 
> > > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > > 
> > > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > > 
> > > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > > Gitlab image.
> > > > > > > > > 
> > > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > > 
> > > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > > 
> > > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > > 
> > > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > > 
> > > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > > 
> > > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > > reasonable attempt at making it work without testing.
> > > > > > 
> > > > > > So can you give me pointers how to run it?
> > > > > 
> > > > > It's a well documented public service.  The only slight trick is you
> > > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > > non-dotfile name is.
> > > > 
> > > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > > not find any documentation nor README nor any other information how to
> > > > run / extend or modify this service. That is why I asked for some
> > > > information... e.g. how I can I run it and check if it is working or
> > > > not.
> > > > 
> > > > > > And is there something more needed for travis job?
> > > > > 
> > > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > > what to drop in for GitLab.
> > > > 
> > > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > > to see it thrown away, just because there is unrelated issue on Azure.
> > > > 
> > > > I have used Travis before, so I know that opening pull request on github
> > > > triggers Travis build and Github directly shows me links to result.
> > > > 
> > > > But whatever I did, I was not able to trigger that azure from github
> > > > pull request.
> > > > 
> > > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > > 
> > > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > > plugs in to GitHub just as easy as Travis does, but runs quicker.
> > 
> > So seems it is buggy, it was not triggered, see that only Travis was
> > triggered in pull request: https://github.com/u-boot/u-boot/pull/30
> 
> Did you configure your Azure account?  If you've used Travis elsewhere
> that's why U-Boot just runs there.

I do not have any Azure account.

For running Travis I do not need any account. It is enough if repository
owner (probably you?) on github enable Travis for particular github
repository. And then Travis is automatically triggered for every open
pull request (even for those who do not have Travis account).
Tom Rini May 15, 2020, 2:16 p.m. UTC | #18
On Fri, May 15, 2020 at 03:58:20PM +0200, Pali Roh?r wrote:
> On Friday 15 May 2020 09:53:23 Tom Rini wrote:
> > On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> > > On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > > > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > > > >>>>
> > > > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > > > >>>
> > > > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > > > >>
> > > > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > > > changed?
> > > > > > > > > > > > 
> > > > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > > > 
> > > > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > > > 
> > > > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > > > 
> > > > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > > > 
> > > > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > > > 
> > > > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > > > Gitlab image.
> > > > > > > > > > 
> > > > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > > > 
> > > > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > > > 
> > > > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > > > 
> > > > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > > > 
> > > > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > > > 
> > > > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > > > reasonable attempt at making it work without testing.
> > > > > > > 
> > > > > > > So can you give me pointers how to run it?
> > > > > > 
> > > > > > It's a well documented public service.  The only slight trick is you
> > > > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > > > non-dotfile name is.
> > > > > 
> > > > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > > > not find any documentation nor README nor any other information how to
> > > > > run / extend or modify this service. That is why I asked for some
> > > > > information... e.g. how I can I run it and check if it is working or
> > > > > not.
> > > > > 
> > > > > > > And is there something more needed for travis job?
> > > > > > 
> > > > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > > > what to drop in for GitLab.
> > > > > 
> > > > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > > > to see it thrown away, just because there is unrelated issue on Azure.
> > > > > 
> > > > > I have used Travis before, so I know that opening pull request on github
> > > > > triggers Travis build and Github directly shows me links to result.
> > > > > 
> > > > > But whatever I did, I was not able to trigger that azure from github
> > > > > pull request.
> > > > > 
> > > > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > > > 
> > > > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > > > plugs in to GitHub just as easy as Travis does, but runs quicker.
> > > 
> > > So seems it is buggy, it was not triggered, see that only Travis was
> > > triggered in pull request: https://github.com/u-boot/u-boot/pull/30
> > 
> > Did you configure your Azure account?  If you've used Travis elsewhere
> > that's why U-Boot just runs there.
> 
> I do not have any Azure account.
> 
> For running Travis I do not need any account. It is enough if repository
> owner (probably you?) on github enable Travis for particular github
> repository. And then Travis is automatically triggered for every open
> pull request (even for those who do not have Travis account).

Oh, interesting.  Since PRs to U-Boot github are ignored I didn't notice
you could get Travis triggered on that.  I've finally hooked "u-boot" in
to Azure as well, rather than just my repository, so a new PR may
trigger a build there.

If however you aren't willing to sign up and configure a project, since
both the Azure and GitLab pipelines are just shell in the relevant
areas, you can probably make an educated guess at what the changes
should be and post them.  Thanks!
Pali Rohár May 15, 2020, 5:40 p.m. UTC | #19
On Friday 15 May 2020 10:16:16 Tom Rini wrote:
> On Fri, May 15, 2020 at 03:58:20PM +0200, Pali Roh?r wrote:
> > On Friday 15 May 2020 09:53:23 Tom Rini wrote:
> > > On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> > > > On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > > > > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > > > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > > > > >>>>
> > > > > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > > > > >>>
> > > > > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > > > > >>
> > > > > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > 
> > > > > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > > > > changed?
> > > > > > > > > > > > > 
> > > > > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > > > > 
> > > > > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > > > > 
> > > > > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > > > > 
> > > > > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > > > > 
> > > > > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > > > > 
> > > > > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > > > > Gitlab image.
> > > > > > > > > > > 
> > > > > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > > > > 
> > > > > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > > > > 
> > > > > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > > > > 
> > > > > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > > > > 
> > > > > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > > > > 
> > > > > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > > > > reasonable attempt at making it work without testing.
> > > > > > > > 
> > > > > > > > So can you give me pointers how to run it?
> > > > > > > 
> > > > > > > It's a well documented public service.  The only slight trick is you
> > > > > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > > > > non-dotfile name is.
> > > > > > 
> > > > > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > > > > not find any documentation nor README nor any other information how to
> > > > > > run / extend or modify this service. That is why I asked for some
> > > > > > information... e.g. how I can I run it and check if it is working or
> > > > > > not.
> > > > > > 
> > > > > > > > And is there something more needed for travis job?
> > > > > > > 
> > > > > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > > > > what to drop in for GitLab.
> > > > > > 
> > > > > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > > > > to see it thrown away, just because there is unrelated issue on Azure.
> > > > > > 
> > > > > > I have used Travis before, so I know that opening pull request on github
> > > > > > triggers Travis build and Github directly shows me links to result.
> > > > > > 
> > > > > > But whatever I did, I was not able to trigger that azure from github
> > > > > > pull request.
> > > > > > 
> > > > > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > > > > 
> > > > > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > > > > plugs in to GitHub just as easy as Travis does, but runs quicker.
> > > > 
> > > > So seems it is buggy, it was not triggered, see that only Travis was
> > > > triggered in pull request: https://github.com/u-boot/u-boot/pull/30
> > > 
> > > Did you configure your Azure account?  If you've used Travis elsewhere
> > > that's why U-Boot just runs there.
> > 
> > I do not have any Azure account.
> > 
> > For running Travis I do not need any account. It is enough if repository
> > owner (probably you?) on github enable Travis for particular github
> > repository. And then Travis is automatically triggered for every open
> > pull request (even for those who do not have Travis account).
> 
> Oh, interesting.  Since PRs to U-Boot github are ignored I didn't notice
> you could get Travis triggered on that.  I've finally hooked "u-boot" in
> to Azure as well, rather than just my repository, so a new PR may
> trigger a build there.

Now I updated pull request on github and Azure build was triggered, thanks!

But job is failing because in your (probably?) runner image is missing
mtools package, see:

https://dev.azure.com/u-boot/u-boot/_build/results?buildId=587&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d

Could you add mtools, fakeroot and mtd-utils packages into that image?

> If however you aren't willing to sign up and configure a project, since
> both the Azure and GitLab pipelines are just shell in the relevant
> areas, you can probably make an educated guess at what the changes
> should be and post them.  Thanks!
> 
> -- 
> Tom
Tom Rini May 15, 2020, 6:34 p.m. UTC | #20
On Fri, May 15, 2020 at 07:40:25PM +0200, Pali Roh?r wrote:
> On Friday 15 May 2020 10:16:16 Tom Rini wrote:
> > On Fri, May 15, 2020 at 03:58:20PM +0200, Pali Roh?r wrote:
> > > On Friday 15 May 2020 09:53:23 Tom Rini wrote:
> > > > On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> > > > > On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > > > > > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > > > > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > > > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > > > > > >>>>
> > > > > > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > > > > > >>>
> > > > > > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > > > > > >>
> > > > > > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > > > > > changed?
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > > > > > 
> > > > > > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > > > > > 
> > > > > > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > > > > > Gitlab image.
> > > > > > > > > > > > 
> > > > > > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > > > > > 
> > > > > > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > > > > > 
> > > > > > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > > > > > 
> > > > > > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > > > > > 
> > > > > > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > > > > > 
> > > > > > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > > > > > reasonable attempt at making it work without testing.
> > > > > > > > > 
> > > > > > > > > So can you give me pointers how to run it?
> > > > > > > > 
> > > > > > > > It's a well documented public service.  The only slight trick is you
> > > > > > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > > > > > non-dotfile name is.
> > > > > > > 
> > > > > > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > > > > > not find any documentation nor README nor any other information how to
> > > > > > > run / extend or modify this service. That is why I asked for some
> > > > > > > information... e.g. how I can I run it and check if it is working or
> > > > > > > not.
> > > > > > > 
> > > > > > > > > And is there something more needed for travis job?
> > > > > > > > 
> > > > > > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > > > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > > > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > > > > > what to drop in for GitLab.
> > > > > > > 
> > > > > > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > > > > > to see it thrown away, just because there is unrelated issue on Azure.
> > > > > > > 
> > > > > > > I have used Travis before, so I know that opening pull request on github
> > > > > > > triggers Travis build and Github directly shows me links to result.
> > > > > > > 
> > > > > > > But whatever I did, I was not able to trigger that azure from github
> > > > > > > pull request.
> > > > > > > 
> > > > > > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > > > > > 
> > > > > > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > > > > > plugs in to GitHub just as easy as Travis does, but runs quicker.
> > > > > 
> > > > > So seems it is buggy, it was not triggered, see that only Travis was
> > > > > triggered in pull request: https://github.com/u-boot/u-boot/pull/30
> > > > 
> > > > Did you configure your Azure account?  If you've used Travis elsewhere
> > > > that's why U-Boot just runs there.
> > > 
> > > I do not have any Azure account.
> > > 
> > > For running Travis I do not need any account. It is enough if repository
> > > owner (probably you?) on github enable Travis for particular github
> > > repository. And then Travis is automatically triggered for every open
> > > pull request (even for those who do not have Travis account).
> > 
> > Oh, interesting.  Since PRs to U-Boot github are ignored I didn't notice
> > you could get Travis triggered on that.  I've finally hooked "u-boot" in
> > to Azure as well, rather than just my repository, so a new PR may
> > trigger a build there.
> 
> Now I updated pull request on github and Azure build was triggered, thanks!
> 
> But job is failing because in your (probably?) runner image is missing
> mtools package, see:
> 
> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=587&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d
> 
> Could you add mtools, fakeroot and mtd-utils packages into that image?

More PATH problems I guess, the Dockerfile is at
https://gitlab.denx.de/u-boot/gitlab-ci-runner/blob/master/Dockerfile
and I put mtools, etc, in last time I updated things.
Pali Rohár May 17, 2020, 12:31 p.m. UTC | #21
On Friday 15 May 2020 14:34:55 Tom Rini wrote:
> On Fri, May 15, 2020 at 07:40:25PM +0200, Pali Roh?r wrote:
> > On Friday 15 May 2020 10:16:16 Tom Rini wrote:
> > > On Fri, May 15, 2020 at 03:58:20PM +0200, Pali Roh?r wrote:
> > > > On Friday 15 May 2020 09:53:23 Tom Rini wrote:
> > > > > On Fri, May 15, 2020 at 03:51:22PM +0200, Pali Roh?r wrote:
> > > > > > On Friday 15 May 2020 09:48:48 Tom Rini wrote:
> > > > > > > On Fri, May 15, 2020 at 03:46:02PM +0200, Pali Roh?r wrote:
> > > > > > > > On Friday 15 May 2020 09:20:20 Tom Rini wrote:
> > > > > > > > > On Fri, May 15, 2020 at 09:33:47AM +0200, Pali Roh?r wrote:
> > > > > > > > > > On Thursday 14 May 2020 20:01:19 Tom Rini wrote:
> > > > > > > > > > > On Fri, May 15, 2020 at 12:41:52AM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > On Saturday 09 May 2020 16:56:10 Tom Rini wrote:
> > > > > > > > > > > > > On Sat, May 09, 2020 at 06:35:40PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > > > On Saturday 09 May 2020 21:58:19 Lokesh Vutla wrote:
> > > > > > > > > > > > > > > On 08/05/20 6:40 PM, Tom Rini wrote:
> > > > > > > > > > > > > > > > On Fri, May 08, 2020 at 02:52:55PM +0200, Pali Roh?r wrote:
> > > > > > > > > > > > > > > >> On Tuesday 28 April 2020 09:37:21 Pali Roh?r wrote:
> > > > > > > > > > > > > > > >>> On Monday 27 April 2020 14:00:47 Tom Rini wrote:
> > > > > > > > > > > > > > > >>>> I'll take care of that shortly.  Otherwise:
> > > > > > > > > > > > > > > >>>>
> > > > > > > > > > > > > > > >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> > > > > > > > > > > > > > > >>>
> > > > > > > > > > > > > > > >>> Ok, thank you!
> > > > > > > > > > > > > > > >>
> > > > > > > > > > > > > > > >> Hello Tom! Will you take whole patch series? Or is there anything else
> > > > > > > > > > > > > > > >> needed to be done from my side for this N900 patch series?
> > > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > > Lokesh is the custodian for the TI tree these days, so whenever it's in
> > > > > > > > > > > > > > > > his next PR.  Thanks!
> > > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > I see gitlab is failing to build this patch[0]. Does cross compiler needs to be
> > > > > > > > > > > > > > > changed?
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > [0] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/91228
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > Cross compiler arm-linux-gnueabi-gcc needs to be in $PATH.
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > I figured out that on Travis it is available in ~/.buildman-toolchains
> > > > > > > > > > > > > > but not exported to $PATH. So for Travis build I added...
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > ... as can be seen in the last patch.
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > Do you know where is installed arm-linux-gnueabi toolchain on Gitlab?
> > > > > > > > > > > > > > Maybe Tom knows it as he already wrote that would take care of updating
> > > > > > > > > > > > > > Gitlab image.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > All of the buildman-fetched toolchains are always in the same place, so
> > > > > > > > > > > > > a similar change to gitlab/azure will fix those.  Thanks!
> > > > > > > > > > > > 
> > > > > > > > > > > > I see that all patches except this one were merged, thanks.
> > > > > > > > > > > > 
> > > > > > > > > > > > Tom, are you going to take look at this last patch?
> > > > > > > > > > > > 
> > > > > > > > > > > > It already passed on travis [1] [2] but I do not have those gitlab and
> > > > > > > > > > > > azure accounts to trigger their jobs. But I think that only correct
> > > > > > > > > > > > $PATH is needed for azure and gitlab.
> > > > > > > > > > > > 
> > > > > > > > > > > > [1] - https://github.com/u-boot/u-boot/pull/30
> > > > > > > > > > > > [2] - https://travis-ci.org/github/u-boot/u-boot/jobs/679162986
> > > > > > > > > > > 
> > > > > > > > > > > No, I've been waiting for you to make an attempt at fixing the jobs.
> > > > > > > > > > > Anyone can get Azure running and there's enough examples to make a
> > > > > > > > > > > reasonable attempt at making it work without testing.
> > > > > > > > > > 
> > > > > > > > > > So can you give me pointers how to run it?
> > > > > > > > > 
> > > > > > > > > It's a well documented public service.  The only slight trick is you
> > > > > > > > > need to point it at .azure-pipeline.yml and not whatever the default
> > > > > > > > > non-dotfile name is.
> > > > > > > > 
> > > > > > > > Tom, sorry, but I grepped whole u-boot source code repository and I did
> > > > > > > > not find any documentation nor README nor any other information how to
> > > > > > > > run / extend or modify this service. That is why I asked for some
> > > > > > > > information... e.g. how I can I run it and check if it is working or
> > > > > > > > not.
> > > > > > > > 
> > > > > > > > > > And is there something more needed for travis job?
> > > > > > > > > 
> > > > > > > > > All 3 CIs need to pass, but no, if Travis is passing, that part is fine.
> > > > > > > > > Since Azure/GitLab share the same docker image (which sadly I don't see
> > > > > > > > > how to make Travis also do), that's why fixing Azure should let you see
> > > > > > > > > what to drop in for GitLab.
> > > > > > > > 
> > > > > > > > I prepared this N900 Travis setup for your request [1] and I do not like
> > > > > > > > to see it thrown away, just because there is unrelated issue on Azure.
> > > > > > > > 
> > > > > > > > I have used Travis before, so I know that opening pull request on github
> > > > > > > > triggers Travis build and Github directly shows me links to result.
> > > > > > > > 
> > > > > > > > But whatever I did, I was not able to trigger that azure from github
> > > > > > > > pull request.
> > > > > > > > 
> > > > > > > > [1] - https://lists.denx.de/pipermail/u-boot/2018-December/353019.html
> > > > > > > 
> > > > > > > Sorry, I mean Azure itself is a well documented public SaaS CI tool.  It
> > > > > > > plugs in to GitHub just as easy as Travis does, but runs quicker.
> > > > > > 
> > > > > > So seems it is buggy, it was not triggered, see that only Travis was
> > > > > > triggered in pull request: https://github.com/u-boot/u-boot/pull/30
> > > > > 
> > > > > Did you configure your Azure account?  If you've used Travis elsewhere
> > > > > that's why U-Boot just runs there.
> > > > 
> > > > I do not have any Azure account.
> > > > 
> > > > For running Travis I do not need any account. It is enough if repository
> > > > owner (probably you?) on github enable Travis for particular github
> > > > repository. And then Travis is automatically triggered for every open
> > > > pull request (even for those who do not have Travis account).
> > > 
> > > Oh, interesting.  Since PRs to U-Boot github are ignored I didn't notice
> > > you could get Travis triggered on that.  I've finally hooked "u-boot" in
> > > to Azure as well, rather than just my repository, so a new PR may
> > > trigger a build there.
> > 
> > Now I updated pull request on github and Azure build was triggered, thanks!
> > 
> > But job is failing because in your (probably?) runner image is missing
> > mtools package, see:
> > 
> > https://dev.azure.com/u-boot/u-boot/_build/results?buildId=587&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d
> > 
> > Could you add mtools, fakeroot and mtd-utils packages into that image?
> 
> More PATH problems I guess, the Dockerfile is at
> https://gitlab.denx.de/u-boot/gitlab-ci-runner/blob/master/Dockerfile
> and I put mtools, etc, in last time I updated things.

Seems that I was able to fix azure job and finally it passed for opened github pull request:
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=592&view=logs&jobId=9a06d2a9-1498-5de0-2a01-be581d48ba67&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d

I will sent updated patch which fixes this issue for azure.
diff mbox series

Patch

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index d3e7b4dd02..a812f7f906 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -151,6 +151,13 @@  jobs:
           # seems to hang forever with pre-configured "container" environment
           docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
 
+  - job: nokia_rx51_test
+    displayName: 'Run tests for Nokia RX-51 (aka N900)'
+    pool:
+      vmImage: $(ubuntu_vm)
+    steps:
+      - script: test/nokia_rx51_test.sh
+
   - job: test_py
     displayName: 'test.py'
     pool:
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 08bdf81e74..678f4323a0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -170,6 +170,12 @@  Run binman, buildman, dtoc, Kconfig and patman testsuites:
       ./tools/patman/patman --test;
       make testconfig
 
+Run tests for Nokia RX-51 (aka N900):
+  tags: [ 'all' ]
+  stage: testsuites
+  script:
+    - test/nokia_rx51_test.sh
+
 # Test sandbox with test.py
 sandbox test.py:
   tags: [ 'all' ]
diff --git a/.travis.yml b/.travis.yml
index 82e3b91523..b32555d89f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -49,6 +49,8 @@  addons:
     - mtools
     - openssl
     - sbsigntool
+    - fakeroot
+    - mtd-utils
 
 install:
  # Clone uboot-test-hooks
@@ -491,6 +493,11 @@  matrix:
       script:
         - make tools-only_config envtools -j$(nproc)
 
+    - name: "Run tests for Nokia RX-51 (aka N900)"
+      script:
+        - export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
+        - test/nokia_rx51_test.sh
+
     # test/py
     - name: "test/py sandbox"
       env:
diff --git a/board/nokia/rx51/MAINTAINERS b/board/nokia/rx51/MAINTAINERS
index f2a712620b..58b16bf9a9 100644
--- a/board/nokia/rx51/MAINTAINERS
+++ b/board/nokia/rx51/MAINTAINERS
@@ -5,3 +5,4 @@  F:	board/nokia/rx51/
 F:	include/configs/nokia_rx51.h
 F:	configs/nokia_rx51_defconfig
 F:	doc/README.nokia_rx51
+F:	test/nokia_rx51_test.sh
diff --git a/test/nokia_rx51_test.sh b/test/nokia_rx51_test.sh
new file mode 100755
index 0000000000..a5b6a9d565
--- /dev/null
+++ b/test/nokia_rx51_test.sh
@@ -0,0 +1,262 @@ 
+#!/bin/sh -e
+# SPDX-License-Identifier: GPL-2.0+
+# (C) 2020 Pali Roh?r <pali at kernel.org>
+
+# External tools needed for this test:
+echo '
+	wget
+	git
+	truncate
+	tar
+	dpkg
+	dd
+	make
+	gcc
+	arm-linux-gnueabi-gcc
+	fakeroot		(homepage http://fakeroot-ng.lingnu.com/)
+	mcopy			(from mtools, homepage http://www.gnu.org/software/mtools/)
+	mformat			(from mtools, homepage http://www.gnu.org/software/mtools/)
+	/usr/sbin/mkfs.ubifs	(from mtd-utils, homepage http://www.linux-mtd.infradead.org/)
+	/usr/sbin/ubinize	(from mtd-utils, homepage http://www.linux-mtd.infradead.org/)
+' | while read tool info; do
+	if test -z "$tool"; then continue; fi
+	if ! which $tool 1>/dev/null 2>&1; then
+		echo "Tool $tool was not found and is required to run this test"
+		echo "First install $tool $info"
+		exit 1
+	fi
+done || exit 1
+
+echo
+echo "============================================================"
+echo "========== Compiling U-Boot for Nokia RX-51 board =========="
+echo "============================================================"
+echo
+
+# First compile u-boot.bin binary for Nokia RX-51 board
+make nokia_rx51_config
+make -j4 u-boot.bin ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
+
+# And then do all stuff in temporary directory
+mkdir -p nokia_rx51_tmp
+cd nokia_rx51_tmp
+
+test -f mkimage || ln -s ../tools/mkimage .
+test -f u-boot.bin || ln -s ../u-boot.bin .
+
+echo
+echo "=========================================================================="
+echo "========== Downloading and compiling qemu from qemu-linaro fork =========="
+echo "=========================================================================="
+echo
+
+# Download and compile linaro version qemu which has support for n900 machine
+# Last working commit is 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1
+if ! test -f qemu-system-arm; then
+	test -d qemu-linaro || git clone https://git.linaro.org/qemu/qemu-linaro.git
+	cd qemu-linaro
+	git checkout 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1
+	./configure --enable-system --target-list=arm-softmmu --disable-sdl --disable-gtk --disable-curses --audio-drv-list= --audio-card-list= --disable-werror --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-vnc --disable-curl --disable-slirp --disable-kvm --disable-user --disable-linux-user --disable-bsd-user --disable-guest-base --disable-uuid --disable-vde --disable-linux-aio --disable-cap-ng --disable-attr --disable-blobs --disable-docs --disable-spice --disable-libiscsi --disable-smartcard-nss --disable-usb-redir --disable-guest-agent --disable-seccomp --disable-glusterfs --disable-nptl --disable-fdt
+	make -j4
+	cd ..
+	ln -s qemu-linaro/arm-softmmu/qemu-system-arm .
+fi
+
+echo
+echo "==================================================="
+echo "========== Downloading external binaries =========="
+echo "==================================================="
+echo
+
+# Download qflasher and nolo images
+# This is proprietary qemu flasher tool with first stage images, but license allows non-commercial redistribution
+wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz
+tar -xf qemu-n900.tar.gz
+
+# Download Maemo script u-boot-gen-combined
+if ! test -f u-boot-gen-combined; then
+	test -d u-boot-maemo || git clone https://github.com/pali/u-boot-maemo.git
+	chmod +x u-boot-maemo/debian/u-boot-gen-combined
+	ln -s u-boot-maemo/debian/u-boot-gen-combined .
+fi
+
+# Download Maemo fiasco kernel
+wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb
+dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28
+
+# Download Maemo libc
+wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb
+dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1
+
+# Download Maemo busybox
+wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb
+dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2
+
+echo
+echo "======================================="
+echo "========== Generating images =========="
+echo "======================================="
+echo
+
+# Generate rootfs directory
+mkdir -p rootfs
+mkdir -p rootfs/dev/
+mkdir -p rootfs/bin/
+mkdir -p rootfs/sbin/
+mkdir -p rootfs/lib/
+cp -a busybox_1.10.2/bin/busybox rootfs/bin/
+cp -a libc6_2.5.1/lib/ld-linux.so.3 rootfs/lib/
+cp -a libc6_2.5.1/lib/ld-2.5.so rootfs/lib/
+cp -a libc6_2.5.1/lib/libc.so.6 rootfs/lib/
+cp -a libc6_2.5.1/lib/libc-2.5.so rootfs/lib/
+cp -a libc6_2.5.1/lib/libcrypt.so.1 rootfs/lib/
+cp -a libc6_2.5.1/lib/libcrypt-2.5.so rootfs/lib/
+test -f rootfs/bin/sh || ln -sf busybox rootfs/bin/sh
+test -f rootfs/sbin/poweroff || ln -sf ../bin/busybox rootfs/sbin/poweroff
+cat > rootfs/sbin/preinit << EOF
+#!/bin/sh
+echo
+echo "Successfully booted"
+echo
+/sbin/poweroff -f
+EOF
+chmod +x rootfs/sbin/preinit
+
+# Generate ubi config file for ubi rootfs image
+cat > ubi.ini << EOF
+[rootfs]
+mode=ubi
+image=ubifs.img
+vol_id=0
+vol_size=160MiB
+vol_type=dynamic
+vol_name=rootfs
+vol_alignment=1
+vol_flags=autoresize
+EOF
+
+# Generate ubi rootfs image from rootfs directory
+# NOTE: Character device on host filesystem can be created only by root
+#       But we do not need it on host filesystem, just in ubifs image
+#       So run mknod and mkfs.ubifs commands under fakeroot program
+#       which via LD_PRELOAD simulate mknod() and stat() functions
+#       so mkfs.ubifs will see dev/console as character device and
+#       put it correctly as character device into final ubifs image
+#       Therefore we can run whole script as non-root nobody user
+fakeroot sh -c '
+	rm -f rootfs/dev/console;
+	mknod rootfs/dev/console c 5 1;
+	/usr/sbin/mkfs.ubifs -m 2048 -e 129024 -c 2047 -r rootfs ubifs.img;
+'
+/usr/sbin/ubinize -o ubi.img -p 128KiB -m 2048 -s 512 ubi.ini
+
+# Generate bootmenu for eMMC booting
+cat > bootmenu_emmc << EOF
+setenv bootmenu_0 'uImage-2.6.28-omap1 from eMMC=setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat; setenv bootargs; setenv setup_omap_atag 1; setenv mmckernfile uImage-2.6.28-omap1; run trymmckernboot';
+setenv bootmenu_1;
+setenv bootmenu_delay 1;
+setenv bootdelay 1;
+EOF
+./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_emmc bootmenu_emmc.scr
+
+# Generate bootmenu for OneNAND booting
+cat > bootmenu_nand << EOF
+setenv bootmenu_0 'uImage-2.6.28-omap1 from OneNAND=mtd read initfs \${kernaddr}; setenv bootargs; setenv setup_omap_atag 1; bootm \${kernaddr}';
+setenv bootmenu_1;
+setenv bootmenu_delay 1;
+setenv bootdelay 1;
+EOF
+./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_nand bootmenu_nand.scr
+
+# Generate combined image from u-boot and Maemo fiasco kernel
+dd if=kernel_2.6.28/boot/zImage-2.6.28-20103103+0m5.fiasco of=zImage-2.6.28-omap1 skip=95 bs=1
+./mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n zImage-2.6.28-omap1 -d zImage-2.6.28-omap1 uImage-2.6.28-omap1
+./u-boot-gen-combined u-boot.bin uImage-2.6.28-omap1 combined.bin
+
+# Generate combined hack image from u-boot and Maemo fiasco kernel (kernel starts at 2MB offset and qflasher puts 2kB header before supplied image)
+cp u-boot.bin combined_hack.bin
+dd if=uImage-2.6.28-omap1 of=combined_hack.bin bs=1024 seek=$((2048-2))
+
+# Generate FAT32 eMMC image for eMMC booting
+truncate -s 50MiB emmc_emmc.img
+mformat -m 0xf8 -F -h 4 -s 16 -c 1 -t $((50*1024*1024/(4*16*512))) :: -i emmc_emmc.img
+mcopy uImage-2.6.28-omap1 ::/uImage-2.6.28-omap1 -i emmc_emmc.img
+mcopy bootmenu_emmc.scr ::/bootmenu.scr -i emmc_emmc.img
+
+# Generate FAT32 eMMC image for OneNAND booting
+truncate -s 50MiB emmc_nand.img
+mformat -m 0xf8 -F -h 4 -s 16 -c 1 -t $((50*1024*1024/(4*16*512))) :: -i emmc_nand.img
+mcopy bootmenu_nand.scr ::/bootmenu.scr -i emmc_nand.img
+
+# Generate MTD image for RAM booting from bootloader nolo images, compiled image and rootfs image
+rm -f mtd_ram.img
+./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined.bin -r ubi.img -m rx51 -o mtd_ram.img
+
+# Generate MTD image for eMMC booting from bootloader nolo images, u-boot image and rootfs image
+rm -f mtd_emmc.img
+./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k u-boot.bin -r ubi.img -m rx51 -o mtd_emmc.img
+
+# Generate MTD image for OneNAND booting from bootloader nolo images, combined hacked image and rootfs image
+# Kernel image is put into initfs area, but qflasher reject to copy kernel image into initfs area because it does not have initfs signature
+# This is hack to workaround this problem, tell qflasher that kernel area for u-boot is bigger and put big combined hacked image (u-boot + kernel with correct offset)
+rm -f mtd_nand.img
+./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined_hack.bin -r ubi.img -m rx51 -p k=4094,i=2 -o mtd_nand.img
+
+echo
+echo "======================================================"
+echo "========== Running test images in n900 qemu =========="
+echo "======================================================"
+echo
+
+# Run MTD image in qemu and wait for 300s if kernel from RAM is correctly booted
+rm -f qemu_ram.log
+./qemu-system-arm -M n900 -mtdblock mtd_ram.img -serial /dev/stdout -display none > qemu_ram.log &
+qemu_pid=$!
+tail -F qemu_ram.log &
+tail_pid=$!
+{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep_pid=$!
+wait $qemu_pid || true
+kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+
+# Run MTD image in qemu and wait for 300s if kernel from eMMC is correctly booted
+rm -f qemu_emmc.log
+./qemu-system-arm -M n900 -mtdblock mtd_emmc.img -sd emmc_emmc.img -serial /dev/stdout -display none > qemu_emmc.log &
+qemu_pid=$!
+tail -F qemu_emmc.log &
+tail_pid=$!
+{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep_pid=$!
+wait $qemu_pid || true
+kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+
+# Run MTD image in qemu and wait for 300s if kernel from OneNAND is correctly booted
+rm -f qemu_nand.log
+./qemu-system-arm -M n900 -mtdblock mtd_nand.img -sd emmc_nand.img -serial /dev/stdout -display none > qemu_nand.log &
+qemu_pid=$!
+tail -F qemu_nand.log &
+tail_pid=$!
+{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep_pid=$!
+wait $qemu_pid || true
+kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+
+echo
+echo "============================="
+echo "========== Results =========="
+echo "============================="
+echo
+
+if grep -q 'Successfully booted' qemu_ram.log; then echo "Kernel was successfully booted from RAM"; else echo "Failed to boot kernel from RAM"; fi
+if grep -q 'Successfully booted' qemu_emmc.log; then echo "Kernel was successfully booted from eMMC"; else echo "Failed to boot kernel from eMMC"; fi
+if grep -q 'Successfully booted' qemu_nand.log; then echo "Kernel was successfully booted from OneNAND"; else echo "Failed to boot kernel from OneNAND"; fi
+
+echo
+
+if grep -q 'Successfully booted' qemu_ram.log && grep -q 'Successfully booted' qemu_emmc.log && grep -q 'Successfully booted' qemu_nand.log; then
+	echo "All tests passed"
+	exit 0
+else
+	echo "Some tests failed"
+	exit 1
+fi