X-Git-Url: https://rtime.felk.cvut.cz/gitweb/can-eth-gw.git/blobdiff_plain/c6cc0dc64846347dbbec8dec2d23b256f0edb57a..2cb9544d8b92ef17f9765748473cbf524eb8451c:/rootfs/post-build.sh diff --git a/rootfs/post-build.sh b/rootfs/post-build.sh new file mode 100755 index 0000000..972fcf1 --- /dev/null +++ b/rootfs/post-build.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +TARGET=$1 +BR_TOOLCHAIN_DIR=$PWD/host/usr/bin + +make CC=$PWD/../host/usr/bin/i686-pc-linux-gnu-gcc -C ../../can-utils clean cegw + +install -v ../../can-utils/cegw $TARGET/bin + +cat < $TARGET/etc/init.d/S60can +for i in 0 1 2 3; do + ip link set can\$i up type can bitrate 1000000 + ifconfig can$i txqueuelen 1000 +done +ip link add vcan0 type vcan +ip link set vcan0 up +EOF +chmod +x $TARGET/etc/init.d/S60can + +fgrep -q eth0 $TARGET/etc/network/interfaces || cat <> $TARGET/etc/network/interfaces +auto eth0 +iface eth0 inet dhcp +EOF