blob: 1a0f1509b4156408453b089cf3e975a5e775f5e7 [file] [log] [blame]
Simon Glassb2c1cac2014-02-26 15:59:21 -07001#!/bin/sh
2
Simon Glass4fb08172015-01-25 08:26:56 -07003die() {
4 echo $1
5 exit 1
6}
7
Simon Glassb2c1cac2014-02-26 15:59:21 -07008NUM_CPUS=$(cat /proc/cpuinfo |grep -c processor)
Simon Glass4fb08172015-01-25 08:26:56 -07009make O=sandbox sandbox_config || die "Cannot configure U-Boot"
10make O=sandbox -s -j${NUM_CPUS} || die "Cannot build U-Boot"
Simon Glassabae56d2014-10-13 23:42:10 -060011dd if=/dev/zero of=spi.bin bs=1M count=2
Simon Glass31680482015-03-25 12:23:05 -060012echo -n "this is a test" > testflash.bin
13dd if=/dev/zero bs=1M count=4 >>testflash.bin
Joe Hershberger9dc1d712015-05-20 14:27:29 -050014./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
Simon Glassabae56d2014-10-13 23:42:10 -060015rm spi.bin
Simon Glass31680482015-03-25 12:23:05 -060016rm testflash.bin