mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-18 03:28:19 +01:00
Pullrequest fix backlight (#291)
* project : Merge the board configurations of Luckfox Pico Mini A and Luckfox Pico Mini B; Merge the board configurations of Luckfox Pico Pro and Luckfox pico Max Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/boot/dts : Merge the device tree configurations of Luckfox Pico Mini A and Luckfox Mini B; Merge the device tree configurations of Luckfox Pico Pro and Luckfox Pico Max Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot : uboot add support for automatically executing custom commands defined by Luckfox Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel : The Luckfox Pico series dynamically loads the BLACKLIGHT_PWM driver, which hides display abnormalities that occur during the screen initialization process Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Update the BoardConfig file and overlay file of the Luckfox Pico model that supports RGB, so that the BLACKLIGHT_PWM driver will be automatically loaded Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Add rtl8723bs module support for Luckfox Pico Mini / Luckfox Pico Plus / Luckfox Pico WebBee / Luckfox Pico Pro Max Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/drv_ko/wifi/insmod_wifi.sh : Add support for identifying rtl8723bs Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig : Add usb_audio, ch343 and rtl8723bs support Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/tools/board/buildroot : Enable the pcre2 package by default on startup Signed-off-by: eng29 <eng29@luckfox.com> * project/app/rkipc/rkipc/common/network/network.c : Fix missing DNS issue when bringing up Wi-Fi interface Signed-off-by: eng29 <eng29@luckfox.com> * README.md : Update description README_CN.md : Update description Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config : Disable UART2_M1 pinmux configuration Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/etc/init.d/S99luckfoxconfigload : Remove the function of pressing the boot button to switch the screen model Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/boot/dts : Standardize the writing format of the dst files Signed-off-by: eng29 <eng29@luckfox.com> --------- Signed-off-by: eng29 <eng29@luckfox.com>
This commit is contained in:
@@ -674,7 +674,7 @@ int rk_network_get_cable_state() {
|
||||
struct sockaddr_nl addr;
|
||||
struct nlmsghdr *nh;
|
||||
struct ifinfomsg *ifinfo;
|
||||
char name[IFNAMSIZ], cmd1[64], cmd2[64];
|
||||
char name[IFNAMSIZ], cmd1[64], cmd2[64], cmd3[64];
|
||||
// struct rtattr *attr;
|
||||
|
||||
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
@@ -700,8 +700,10 @@ int rk_network_get_cable_state() {
|
||||
|
||||
memset(cmd1, 0, 32);
|
||||
memset(cmd2, 0, 32);
|
||||
memset(cmd3, 0, 32);
|
||||
sprintf(cmd1, "udhcpc -i %s -T 1 -A 0 -b -q", name);
|
||||
sprintf(cmd2, "ifconfig %s 0.0.0.0", name);
|
||||
sprintf(cmd3, "udhcpc -i eth0 -T 1 -A 0 -b -q");
|
||||
|
||||
if (ifinfo->ifi_flags & IFF_LOWER_UP) {
|
||||
status = 1;
|
||||
@@ -709,6 +711,7 @@ int rk_network_get_cable_state() {
|
||||
system("route del default gw 0.0.0.0");
|
||||
system("cat /dev/null > /etc/resolv.conf");
|
||||
system(cmd1);
|
||||
system(cmd3);
|
||||
} else {
|
||||
status = 0;
|
||||
system(cmd2);
|
||||
|
||||
Reference in New Issue
Block a user