mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Add dhcp server and client package (#124)
This commit is contained in:
6
board/miyoo/main/apps/dhclient/dhclient.sh
Executable file
6
board/miyoo/main/apps/dhclient/dhclient.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
st -k -e "/bin/sh" "-c" "echo -e \"Acquiring ip address from DHCP, please wait...\"; sleep 2"
|
||||
ln -s /run /var/lib/dhcp
|
||||
dhclient
|
||||
|
||||
3
board/miyoo/main/apps/showip/showip.sh
Executable file
3
board/miyoo/main/apps/showip/showip.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
st -k -e "/bin/sh" "-c" "ifconfig usb0; sleep 5"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/busybox sh
|
||||
st -k -e "/bin/sh" "-c" "echo -e \"Starting USB network, please wait...\"; sleep 2"
|
||||
|
||||
MAC_HOST="12:34:56:78:9a:bd"
|
||||
MAC_DEV="12:34:56:78:9a:bc"
|
||||
@@ -42,10 +43,13 @@ ln -s functions/rndis.usb0 configs/c.1
|
||||
ln -s configs/c.1 os_desc
|
||||
sleep 1
|
||||
|
||||
ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/g2/UDC
|
||||
sleep 5
|
||||
echo "" > UDC
|
||||
#ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/g2/UDC
|
||||
#sleep 5
|
||||
#echo "" > UDC
|
||||
|
||||
echo "0x00" > bDeviceClass
|
||||
ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/g2/UDC
|
||||
ifconfig usb0 up 169.254.147.2
|
||||
|
||||
ifconfig usb0 up 192.168.137.1
|
||||
sleep 10
|
||||
/etc/init.d/S80dhcp-server restart
|
||||
|
||||
3
board/miyoo/main/gmenu2x/sections/applications/dhclient
Normal file
3
board/miyoo/main/gmenu2x/sections/applications/dhclient
Normal file
@@ -0,0 +1,3 @@
|
||||
title=DHCP client
|
||||
description=Start DHCP client
|
||||
exec=/mnt/apps/dhclient/dhclient.sh
|
||||
3
board/miyoo/main/gmenu2x/sections/applications/showip
Normal file
3
board/miyoo/main/gmenu2x/sections/applications/showip
Normal file
@@ -0,0 +1,3 @@
|
||||
title=Show IP addr
|
||||
description=Show IP address of handheld
|
||||
exec=/mnt/apps/showip/showip.sh
|
||||
@@ -1,3 +1,3 @@
|
||||
title=USB Network
|
||||
description=IP:169.254.147.2
|
||||
description=IP:192.168.137.1
|
||||
exec=/mnt/apps/usb-network/usb-network.sh
|
||||
|
||||
Reference in New Issue
Block a user