project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
#/bin/bash
|
|
BLUE='\e[1;34m'
|
|
GREEN='\e[1;32m'
|
|
CYAN='\e[1;36m'
|
|
RED='\e[1;31m'
|
|
PURPLE='\e[1;35m'
|
|
YELLOW='\e[1;33m'
|
|
# No Color
|
|
NC='\e[0m'
|
|
|
|
echo -e "${YELLOW}Load DHCP...${NC}"
|
|
echo -e "${YELLOW}Check DHCP Config...${NC}"
|
|
dhcp_config_file="/etc/dhcp/dhcpd.conf"
|
|
dhcp_domain="subnet 192.168.0.0 netmask 255.255.255.0"
|
|
dhcp_config=$(grep "subnet 192.168.0.0 netmask 255.255.255.0" $dhcp_config_file)
|
|
if [ "$dhcp_config" != "$dhcp_domain" ]; then
|
|
echo -en "${YELLOW}Config $dhcp_config_file.....${NC}"
|
|
echo "subnet 192.168.0.0 netmask 255.255.255.0" >> $dhcp_config_file
|
|
echo "{" >> $dhcp_config_file
|
|
echo " range 192.168.0.2 192.168.0.10;" >> $dhcp_config_file
|
|
echo " option routers 192.168.0.1;" >> $dhcp_config_file
|
|
echo " option domain-name-servers 168.95.1.1;" >> $dhcp_config_file
|
|
echo "}" >> $dhcp_config_file
|
|
|
|
echo -e "${YELLOW}OK${NC}"
|
|
else
|
|
echo -e "${YELLOW}192.168.0.x domain is existed${NC}"
|
|
fi
|
|
|
|
echo -e "${GREEN}Config IP.${NC}"
|
|
ifconfig wlan0
|
|
ifconfig wlan0 192.168.0.1 netmask 255.255.255.0
|
|
|
|
echo -e "${GREEN}Config DHCP Server.${NC}"
|
|
service isc-dhcp-server start
|
|
sleep 3
|
|
|
|
echo -e "${GREEN}Config routing table.${NC}"
|
|
bash -c "echo 1 >/proc/sys/net/ipv4/ip_forward"
|
|
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|