]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - test/dm/test-dm.sh
8ebc39297cb53ec315c828a4d0429e8c7ae46dc7
[karo-tx-uboot.git] / test / dm / test-dm.sh
1 #!/bin/sh
2
3 die() {
4         echo $1
5         exit 1
6 }
7
8 NUM_CPUS=$(cat /proc/cpuinfo |grep -c processor)
9 dtc -I dts -O dtb test/dm/test.dts -o test/dm/test.dtb
10 make O=sandbox sandbox_config || die "Cannot configure U-Boot"
11 make O=sandbox -s -j${NUM_CPUS} || die "Cannot build U-Boot"
12 dd if=/dev/zero of=spi.bin bs=1M count=2
13 ./sandbox/u-boot -d test/dm/test.dtb -c "dm test"
14 rm spi.bin