busybox for openwrt 12.09 rc1(ls支持中文 )

openwrt ls命是busybox提供的,中文通通显示为???,google了一些资料,重新配置编译了一下busybox,中文能正常显示了。

先搭建好交叉编译环境(不在本文讨论范围内),我用的openwrt 12.09 rc1 的源码路由器是WR703N。进入源码目录make menuconfig,进入Base System -> Busybox -> Busybox Settings -> General Configuration 配置页面,按下面所示配置busybox(195101的值是根据参考文章中的十六制值得来的)保存配置。

 [*] Support Unicode                                                                                                                                         │ │  
 [ ]   Check $LANG environment variable                                                                                                                      │ │  
 (195101) Character code to substitute unprintable characters with                                                                                           │ │  
 (195101) Range of supported Unicode characters                                                                                                              │ │  
 [*]   Allow zero-width Unicode characters on output                                                                                                         │ │  
 [*]   Allow wide Unicode characters on output                                                                                                               │ │  
 [*]   Bidirectional character-aware line input                                                                                                              │ │  
 [*]     In bidi input, support non-ASCII neutral chars too                                                                                                  │ │  
 [*]   Make it possible to enter sequences of chars which are not Unicode

然后执行make package/busybox/compile,编译完成后在build_dir/target-mips_r2_uClibc-0.9.33.2/busybox-1.19.4/ 找到新生成的busybox可执行文件,替换掉openwrt的/bin/busybox文件即可。

下面是我自己编译的版本,用之前最好先测试,比如把busybox传到/root目录下,创建ls软链接 ln -s /root/busybox /root/ls,然后执行/root/ls <含中文文件名的文件夹> ,如果可以正常执行并且中文显示正常,再替换掉/bin/busybox。

下载busybox

参考文章:

13 thoughts on “busybox for openwrt 12.09 rc1(ls支持中文 )

  1. 亲能帮忙编译个 barrier_breaker 14.07 的 wr720n v3 的 busybox 么。。。编译出错了。。。[openwrt@localhost barrier_breaker]$ make package/busybox/compile V=99make : Entering directory `/home/openwrt/barrier_breaker’make : Entering directory `/home/openwrt/barrier_breaker/package/libs/toolchain’cp -fpR /home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libuClibc-*.so /home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libcrypt-*.so /home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libm-*.so /home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libpthread-*.so /home/openwrt/barrier_breaker/build_dir/target-mips_34kc_uClibc-0.9.33.2/toolchain/cp: cannot stat `/home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libuClibc-*.so’: No such file or directorycp: cannot stat `/home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libcrypt-*.so’: No such file or directorycp: cannot stat `/home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libm-*.so’: No such file or directorycp: cannot stat `/home/openwrt/barrier_breaker/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libpthread-*.so’: No such file or directorymake : *** [/home/openwrt/barrier_breaker/build_dir/target-mips_34kc_uClibc-0.9.33.2/toolchain/.built] Error 1make : Leaving directory `/home/openwrt/barrier_breaker/package/libs/toolchain’make : *** [package/libs/toolchain/compile] Error 2make : Leaving directory `/home/openwrt/barrier_breaker’make: *** [package/busybox/compile] Error 2

发表评论

电子邮件地址不会被公开。 必填项已用*标注


Verify Code   If you cannot see the CheckCode image,please refresh the page again!