]> rtime.felk.cvut.cz Git - can-eth-gw.git/blob - rootfs/post-build.sh
Add buildroot a linux config for easier testing
[can-eth-gw.git] / rootfs / post-build.sh
1 #!/bin/sh
2
3 TARGET=$1
4 BR_TOOLCHAIN_DIR=$PWD/host/usr/bin
5
6 make CC=$PWD/../host/usr/bin/i686-pc-linux-gnu-gcc -C ../../can-utils clean cegw
7
8 install -v ../../can-utils/cegw $TARGET/bin
9
10 cat <<EOF > $TARGET/etc/init.d/S60can
11 for i in 0 1 2 3; do
12     ip link set can\$i up type can bitrate 1000000
13     ifconfig can$i txqueuelen 1000
14 done
15 ip link add vcan0 type vcan
16 ip link set vcan0 up
17 EOF
18 chmod +x $TARGET/etc/init.d/S60can
19
20 fgrep -q eth0 $TARGET/etc/network/interfaces || cat <<EOF >> $TARGET/etc/network/interfaces
21 auto eth0
22 iface eth0 inet dhcp
23 EOF