这个问题最终就是locale命令的移植,使用buildroot-2017编译出locale,替换掉自己rootfs中的locale命令和它使用的so库文件,并在/etc/profile配置“LANG=en_US.UTF-8”就可以了。
第一步:使用buildroot2017编译出如下文件并拷贝到自己的rootfs:
第二步:修改etc/profile文件:
验证(之前python3不能print中文):
这个问题最终就是locale命令的移植,使用buildroot-2017编译出locale,替换掉自己rootfs中的locale命令和它使用的so库文件,并在/etc/profile配置“LANG=en_US.UTF-8”就可以了。
第一步:使用buildroot2017编译出如下文件并拷贝到自己的rootfs:
第二步:修改etc/profile文件:
验证(之前python3不能print中文):