這個問題最終就是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中文):