最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

TQ3568 Buildroot文件系統(tǒng)終端上支持中文顯示調(diào)試方法

2023-07-27 14:51 作者:天嵌-倪工  | 我要投稿

▲點擊上方“廣州天嵌”關(guān)注公眾號后回復(fù)TQ3568獲取板卡硬件資料

修改busybox配置單??

如果是buildroot 則 make busybox-menuconfig ARCH=arm64diff --git a/rootfs/buildroot/package/busybox/busybox.config b/rootfs/buildroot/package/busybox/busybox.config ? ? ? ? ? ?
index 02b1ee1..abc857e 100644 ? ? ? ? ? ?
--- a/rootfs/buildroot/package/busybox/busybox.config ? ? ? ? ? ?
+++ b/rootfs/buildroot/package/busybox/busybox.config ? ? ? ? ? ?
@@ -26,14 +26,14 @@ CONFIG_FEATURE_VERBOSE_USAGE=y ? ? ? ? ? ?
CONFIG_BUSYBOX=y ? ? ? ? ? ?
CONFIG_FEATURE_INSTALLER=y ? ? ? ? ? ?
# CONFIG_INSTALL_NO_USR is not set ? ? ? ? ? ?
-# CONFIG_LOCALE_SUPPORT is not set ? ? ? ? ? ?
-# CONFIG_UNICODE_SUPPORT is not set ? ? ? ? ? ?
+CONFIG_LOCALE_SUPPORT=y ? ? ? ? ? ?
+CONFIG_UNICODE_SUPPORT=y ? ? ? ? ? ?
# CONFIG_UNICODE_USING_LOCALE is not set ? ? ? ? ? ?
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set ? ? ? ? ? ?
-CONFIG_SUBST_WCHAR=0 ? ? ? ? ? ?
-CONFIG_LAST_SUPPORTED_WCHAR=0 ? ? ? ? ? ?
+CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y ? ? ? ? ? ?
+CONFIG_SUBST_WCHAR=63 ? ? ? ? ? ?
+CONFIG_LAST_SUPPORTED_WCHAR=40907 ? ? ? ? ? ?
# CONFIG_UNICODE_COMBINING_WCHARS is not set ? ? ? ? ? ?
-# CONFIG_UNICODE_WIDE_WCHARS is not set ? ? ? ? ? ?
# 這個好像可以不用. ? ? ? ? ? ?
+CONFIG_UNICODE_WIDE_WCHARS=y ? ? ? ? ? ?
# CONFIG_UNICODE_BIDI_SUPPORT is not set ? ? ? ? ? ?
# CONFIG_UNICODE_NEUTRAL_TABLE is not set ? ? ? ? ? ?
# CONFIG_UNICODE_PRESERVE_BROKEN is not set ? ? ? ? ? ?
@@ -805,13 +805,13 @@ CONFIG_ARPING=y ? ? ? ? ? ?

修改busybox源碼?? ?

busybox-1.34.1From eb3ae4ea53dde8018524a0ed9dc08a65625197cc Mon Sep 17 00:00:00 2001 ? ? ? ? ? ?
From: "hero.huang"
Date: Wed, 23 Aug 2017 11:33:47 +0800 ? ? ?
Subject: [PATCH 3/4] busybox: support chinese display in terminal ? ? ?
? ? ?
Signed-off-by: hero.huang
--- ? ? ? ?
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 a814fd0..f4c7b00 100644 ? ? ? ?
--- a/libbb/printable_string.c ? ? ? ?
+++ b/libbb/printable_string.c ? ? ? ?
@@ -28,8 +28,6 @@ const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str) ? ? ? ?
??????????????? } ? ? ? ?
??????????????? if (c < ' ') ? ? ? ?
??????????????????????? break; ? ? ? ?
-?????????????? if (c >= 0x7f) ? ? ? ?
-?????????????????????? break; ? ? ? ?
??????????????? s++; ? ? ? ?
??????? } ? ? ? ?
? ? ? ?
@@ -42,7 +40,7 @@ const char* FAST_FUNC printable_string2(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 e98cbbf..677db1f 100644 ? ? ? ?
--- a/libbb/unicode.c ? ? ? ?
+++ b/libbb/unicode.c ? ? ? ?
@@ -1027,7 +1027,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'; ? ? ? ?
@@ -1035,7 +1035,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++; ? ? ? ?
??????????????????????? } ? ? ? ?
-- ? ? ? ?
2.20.1??

設(shè)置文件系統(tǒng)??

1.設(shè)置環(huán)境變量

export LC_ALL="zh_CN.UTF-8" ? ? ? ? ? ?export LANG="zh_CN.UTF-8"

2.確認(rèn)文件系統(tǒng)中l(wèi)s是不是指向 busybox3.增加掛載時字符選擇diff --git a/buildroot-201611/target/user_rootfs_extra/etc/udev/scripts/mount.sh b/buildroot-201611/target/user_rootfs_extra/etc/udev/scripts/mount.sh ? ? ? ? ? ?
index 29a4f48..817a4aa 100755 ? ? ? ? ? ?
--- a/buildroot-201611/target/user_rootfs_extra/etc/udev/scripts/mount.sh ? ? ? ? ? ?
+++ b/buildroot-201611/target/user_rootfs_extra/etc/udev/scripts/mount.sh ? ? ? ? ? ?
@@ -31,7 +31,7 @@ automount() { ? ? ? ? ? ?
???????? # grant it with? w/r/x permissions. ? ? ? ? ? ?
???????? case $ID_FS_TYPE in ? ? ? ? ? ?
???????? vfat|fat) ? ? ? ? ? ?
-??????????????? MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" ? ? ? ? ? ?
+??????????????? MOUNT="$MOUNT -o iocharset=utf8,umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" ? ? ? ? ? ?
???????????????? ;; ? ? ? ? ? ?
???????? # TODO ? ? ? ? ? ?
???????? *)??

其它問題??

理論上應(yīng)該可以了,如果不行試下:1.minicom上有可能不支持utf-8顯示,可以使用命令 minicom -D /dev/ttyUSB0 -R utf82.在內(nèi)核配置要加上CONFIG_NLS=y,CONFIG_NLS_UTF8=y,CONFIG_NLS_CODEPAGE_936=y(這個最好也加上)


TQ3568 Buildroot文件系統(tǒng)終端上支持中文顯示調(diào)試方法的評論 (共 條)

分享到微博請遵守國家法律
班玛县| 来凤县| 甘孜县| 晋宁县| 南皮县| 新昌县| 五原县| 夏邑县| 定日县| 涟水县| 佛学| 宝丰县| 西和县| 南昌市| 沙雅县| 长乐市| 合山市| 油尖旺区| 乌拉特后旗| 金堂县| 霍林郭勒市| 锦屏县| 老河口市| 合阳县| 延津县| 承德县| 彭州市| 石河子市| 濮阳市| 城市| 阳山县| 兴安盟| 花垣县| 黑河市| 通江县| 辽中县| 东阿县| 万山特区| 敖汉旗| 新建县| 东宁县|