mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-18 03:28:19 +01:00
Add Luckfox Pico 86Panel Support (#274)
* project/cfg/BoardConfig_IPC/overlay : Add Luckfox Pico 86Panel overlay files Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/boot/dts : Add Luckfox Pico 86Panel device tree files Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Add Luckfox Pico 86Panel BoardConfig files Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/build.sh : Add the lunch menu item of Luckfox Pico 86Panel Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/configs : Add Goodix driver module configuration for RV1106 Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig : Add rsync command for Luckfox Pico Buildroot system Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config : Add rysnc command for Luckfox Pico Ubuntu system Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/etc/init.d : Add MIC initialization script to improve default recording quality Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/tools/board/buildroot/busybox_patch : Add patches to enable Chinese display support in the terminal and allow the reboot command to accept parameters Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/Makefile : Automatically apply BusyBox patches when building the Buildroot image Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/kernel/setup.c : Make the kernel retrieve the unique CPU serial number Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config : Fix errors and add support for eMMC rootfs backup Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/boot/dts : Make Luckfox Pico Ultra and Luckfox Pico Pi default to using i2c4 for CSI cameras Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/wifi_bt_init.sh : Enable wireless module initialization support for Ubuntu on Luckfox Pico 86Panel and Luckfox Pico Pi Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Add executable permission to the BoardConfig scripts Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/uboot : Resolve the issue of fast boot failure on certain eMMC models Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/luckfox-rv1106-tb-emmc-post.sh : Resolve the issue of file system initialization failure during eMMC fast boot Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/build.sh : Fix the issue of submodule switch failure Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/app/rkipc/rkipc/src : Make sure that changes to rkipc.ini can be applied and take effect after modification Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Discontinue support for Ubuntu Signed-off-by: eng29 <eng29@luckfox.com> * project/build.sh : Discontinue support for Ubuntu Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/Makefile : Discontinue support for Ubuntu Signed-off-by: eng29 <eng29@luckfox.com> * README.md : Update description README_CN.md : Update description Signed-off-by: eng29 <eng29@luckfox.com> * . : Delete the Ubuntu rootfs submodule Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/drv_ko/wifi/aic8800dc : Update the aic8800dc driver Signed-off-by: eng29 <eng29@luckfox.com> --------- Signed-off-by: luckfox-eng29 <eng29@luckfox.com> Signed-off-by: eng29 <eng29@luckfox.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
From 095248c1d232c147f53d4c8666b80b4c1cbb2d2a Mon Sep 17 00:00:00 2001
|
||||
From: "hero.huang" <hero.huang@rock-chips.com>
|
||||
Date: Wed, 23 Aug 2017 11:33:47 +0800
|
||||
Subject: [PATCH] busybox: support chinese display in terminal
|
||||
|
||||
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
|
||||
---
|
||||
libbb/printable_string.c | 4 +---
|
||||
libbb/unicode.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libbb/printable_string.c b/libbb/printable_string.c
|
||||
index 077d58d..e7399ae 100644
|
||||
--- a/libbb/printable_string.c
|
||||
+++ b/libbb/printable_string.c
|
||||
@@ -28,8 +28,6 @@ const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str)
|
||||
}
|
||||
if (c < ' ')
|
||||
break;
|
||||
- if (c >= 0x7f)
|
||||
- break;
|
||||
s++;
|
||||
}
|
||||
|
||||
@@ -42,7 +40,7 @@ const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str)
|
||||
unsigned char c = *d;
|
||||
if (c == '\0')
|
||||
break;
|
||||
- if (c < ' ' || c >= 0x7f)
|
||||
+ if (c < ' ')
|
||||
*d = '?';
|
||||
d++;
|
||||
}
|
||||
diff --git a/libbb/unicode.c b/libbb/unicode.c
|
||||
index 9c4da50..c7eba06 100644
|
||||
--- a/libbb/unicode.c
|
||||
+++ b/libbb/unicode.c
|
||||
@@ -1019,7 +1019,7 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char
|
||||
while ((int)--width >= 0);
|
||||
break;
|
||||
}
|
||||
- *d++ = (c >= ' ' && c < 0x7f) ? c : '?';
|
||||
+ *d++ = (c >= ' ') ? c : '?';
|
||||
src++;
|
||||
}
|
||||
*d = '\0';
|
||||
@@ -1027,7 +1027,7 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char
|
||||
d = dst = xstrndup(src, width);
|
||||
while (*d) {
|
||||
unsigned char c = *d;
|
||||
- if (c < ' ' || c >= 0x7f)
|
||||
+ if (c < ' ')
|
||||
*d = '?';
|
||||
d++;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
--- a/init/halt.c
|
||||
+++ b/init/halt.c
|
||||
@@ -93,6 +93,8 @@
|
||||
|
||||
#include "libbb.h"
|
||||
#include "reboot.h"
|
||||
+#include <linux/reboot.h>
|
||||
+#include <sys/syscall.h>
|
||||
|
||||
#if ENABLE_FEATURE_WTMP
|
||||
#include <sys/utsname.h>
|
||||
@@ -119,6 +121,49 @@
|
||||
#define write_wtmp() ((void)0)
|
||||
#endif
|
||||
|
||||
+
|
||||
+static volatile int caught_sigterm = FALSE;
|
||||
+static void signal_handler(int sig)
|
||||
+{
|
||||
+ bb_error_msg("Caught signal %d", sig);
|
||||
+
|
||||
+ if (sig == SIGTERM)
|
||||
+ caught_sigterm = TRUE;
|
||||
+}
|
||||
+
|
||||
+static int reboot_with_arg(const char *arg)
|
||||
+{
|
||||
+ struct sigaction sa;
|
||||
+ int pid;
|
||||
+
|
||||
+ /* Fork new thread to handle reboot */
|
||||
+ if ((pid = fork()))
|
||||
+ return pid < 0 ? pid : 0;
|
||||
+
|
||||
+ /* Handle signal and reboot in child thread */
|
||||
+ sigemptyset(&sa.sa_mask);
|
||||
+ sa.sa_flags = 0;
|
||||
+ sa.sa_handler = signal_handler;
|
||||
+ sigaction_set(SIGTERM, &sa);
|
||||
+
|
||||
+ bb_error_msg("Waiting for SIGTERM");
|
||||
+
|
||||
+ /* The init will send SIGTERM to us after SHUTDOWN actions */
|
||||
+ while (!caught_sigterm)
|
||||
+ usleep(50000);
|
||||
+
|
||||
+ bb_error_msg("Ready to reboot");
|
||||
+
|
||||
+ /* Wait 200ms for other processes to exit */
|
||||
+ usleep(200000);
|
||||
+ sync();
|
||||
+
|
||||
+ bb_error_msg("Rebooting with arg(%s)", arg);
|
||||
+ return syscall(__NR_reboot, LINUX_REBOOT_MAGIC1,
|
||||
+ LINUX_REBOOT_MAGIC2,
|
||||
+ LINUX_REBOOT_CMD_RESTART2, arg);
|
||||
+}
|
||||
+
|
||||
#if ENABLE_FEATURE_WAIT_FOR_INIT
|
||||
/* In Linux, "poweroff" may be spawned even before init.
|
||||
* For example, with ACPI:
|
||||
@@ -239,6 +284,11 @@
|
||||
CONFIG_TELINIT_PATH);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /* Handle rebooting with arg */
|
||||
+ if (signals[which] == SIGTERM && argc > 1 && argv[1][0] != '-')
|
||||
+ rc = reboot_with_arg(argv[1]);
|
||||
+
|
||||
} else {
|
||||
rc = reboot(magic[which]);
|
||||
}
|
||||
@@ -66,6 +66,7 @@ BR2_PACKAGE_LIBV4L=y
|
||||
BR2_PACKAGE_LIBV4L_UTILS=y
|
||||
BR2_PACKAGE_CJSON=y
|
||||
BR2_PACKAGE_CJSON_UTILS=y
|
||||
BR2_PACKAGE_LIBRSYNC=y
|
||||
BR2_PACKAGE_PCRE2=y
|
||||
BR2_PACKAGE_BLUEZ_TOOLS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
@@ -81,6 +82,7 @@ BR2_PACKAGE_OPENSSH=y
|
||||
BR2_PACKAGE_PPPD=y
|
||||
BR2_PACKAGE_PPPD_FILTER=y
|
||||
BR2_PACKAGE_PPPD_RADIUS=y
|
||||
BR2_PACKAGE_RSYNC=y
|
||||
BR2_PACKAGE_SAMBA4=y
|
||||
BR2_PACKAGE_SOCAT=y
|
||||
BR2_PACKAGE_BASH=y
|
||||
|
||||
Reference in New Issue
Block a user