]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - test/dm/test-dm.sh
6158f6833f9bf5f3c5cd5e1dbddd22b88ff7c18e
[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 echo -n "this is a test" > testflash.bin
14 dd if=/dev/zero bs=1M count=4 >>testflash.bin
15 ./sandbox/u-boot -d test/dm/test.dtb -c "dm test"
16 rm spi.bin
17 rm testflash.bin