基于gclibc的buildroot上的语言环境激活

时间:2017-09-04 09:59:01

标签: utf-8 locale embedded-linux glibc buildroot

有人可以帮助激活 gclibc-buildroot 上的区域设置吗? 我的系统工作正常,但有问题。我没有看到任何俄语字母(我需要ru_RU的UTF-8和CP1251)。

我做了:

System configuration -> Generate local data (en_US, ru_RU)
(*) Copy gconv libraries -> <empty> (all)

在uclibc上成功构建buildroot之前的一段时间,我使用uclibc-menuconfig来设置locales。但gclibc没有gclibc-menuconfig ...

1 个答案:

答案 0 :(得分:0)

问题出现是由于glibc升级到2.27版本。区域设置发生了变化(alt名称支持)。 Buildroot的localedef实用程序的主机版本(用于编译语言环境)与新glibc中的语言环境定义不兼容。

你可以将glibc降级回2.26以获得工作机会:

diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash
index 1fab3a245c..150ba4a375 100644
--- a/package/glibc/glibc.hash
+++ b/package/glibc/glibc.hash
@@ -1,5 +1,6 @@
 # Locally calculated (fetched from Github)
 sha256  33189b3f10c88730a1f686fac794bc01f31765f12ffd75bc5e8a0f2a690d217a     glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e.tar.gz
+sha256  0766875391224153502c5542a71b6e46db53b44691078b3130e1a0df41586430     glibc-glibc-2.26-107-g73a92363619e52c458146e903dfb9b1ba823aa40.tar.gz
 # Locally calculated (fetched from Github)
 sha256  ddc63360393ab88ab6a4a0c81d33481f34c5a9ebd758eec2e6bb35385058b4cb     glibc-arc-2018.03-rc2.tar.gz

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index f764b5da9c..ecab623a1a 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -10,7 +10,7 @@ GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VE
 else
 # Generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master
-GLIBC_VERSION = glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e
+GLIBC_VERSION = glibc-2.26-107-g73a92363619e52c458146e903dfb9b1ba823aa40
 # Upstream doesn't officially provide an https download link.
 # There is one (https://sourceware.org/git/glibc.git) but it's not reliable,
 # sometimes the connection times out. So use an unofficial github mirror.