-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfpga.sh
54 lines (39 loc) · 1010 Bytes
/
fpga.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
cd /root
insmod sdio_raw.ko
mknod /dev/sdioa c 140 1
mknod /dev/sdiob c 141 1
mknod /dev/sdioc c 142 1
ifconfig eth0 down
#udhcpc eth0
#insmod 8192eu.ko
insmod /root/cfg80211.ko
insmod 8723bu.ko
ifconfig wlan0 192.168.1.1 up
hostapd hostapd.conf &
#busybox udhcpd udhcpd.conf
# insmod ip_tables
# please copy all files in /lib/modules/4.13.16
modprobe ip_tables
modprobe nf_conntrack
modprobe nf_nat
modprobe nf_defrag_ipv4
modprobe nf_defrag_ipv6
modprobe nf_nat_ipv4
modprobe nf_conntrack_ipv4
modprobe nf_nat_ipv6
modprobe nf_conntrack_ipv6
modprobe iptable_nat
modprobe xt_nat
# now start iptables
iptables -t nat -A PREROUTING -d 0/0 -p tcp --dport 80 -j REDIRECT --to-port 80
# now start DNS server and DHCP server
dnsmasq
sleep 2
busybox devmem 0x1c20828 32 0x00777770
export LD_LIBRARY_PATH=/opt/lib
./carplayer /storage YottaCar /work/uuid_rdr /run/shm &
sleep 2
./d.sh
/root/DeviceConfig &
exit 0