修复 OpenWrt 中文支持

2014-12-18 14:32:39 +08:00
 yangyang
一般情况下 OpenWrt 上用 ls 等命令,中文是乱码的,这是因为默认的 busybox 不支持中文。我自己重新编译了一个支持中文的 trunk 版本 busybox,安装后中文支持就正常了。

下载: https://dl.dropboxusercontent.com/u/61164983/busybox_latest_ar71xx.ipk


软件包我会不定期更新,最少会做到一月一次。
2408 次点击
所在节点    OpenWrt
14 条回复
cncaihua
2014-12-18 14:41:02 +08:00
如此便是甚好啊
20150517
2014-12-18 16:11:25 +08:00
要大了不少吧openwrt上大家最在意的就是包大小了
zro
2014-12-18 16:28:49 +08:00
@20150517 就是,现在没几个路由器是用16M以上的内存做ROM的,都是4M
582033
2014-12-18 16:41:49 +08:00
opkg默认下载的文件放到哪个目录了?
安装了几个文件,提示可用存储空间不足,然后空间从400k可用减少到了50k,但是程序也没安装成功。。

怎么删除?
@20150517
@yangyang
@zro
jasontse
2014-12-18 17:08:55 +08:00
@582033
opkg install busybox --force-reinstall
yangyang
2014-12-18 18:56:21 +08:00
@cncaihua
@20150517
@zro
@582033
@jasontse

不会「大不少」,只是调整了几个参数而已。

要删除安装的软件,用「opkg remove ******」
20150517
2014-12-18 19:00:20 +08:00
@yangyang openwrt那格式删软件空间也不会回来
jacy
2014-12-18 19:14:14 +08:00
@582033
/usr/lib 里把没安装成功的lib删掉
yangyang
2014-12-18 20:25:52 +08:00
@20150517 你哪来的这种错误印象?


注意到删掉 wget 后 rootfs 减小了 1% 没?
20150517
2014-12-18 20:45:50 +08:00
@yangyang
取决于你是不是SquashFS
SquashFS is a read only compressed filesystem. While gzip is available, at OpenWrt it uses LZMA for the compression. Since SquashFS is a read only filesystem, it doesn't need to align the data, allowing it to pack the files tighter thus taking up significantly less space than JFFS2 (20-30% savings over a JFFS2 filesystem)!

+ taking up as little space as possible
+ allowing the implementation of an idiot proof FailSafe for recovery, since it is not possible to write to it
- read only
- waste space, since each time a file contained on it is modified, actually a copy of it is being copied to the second (JFFS2) partition

你的可能不是squashfs,输条mount来看看?
yangyang
2014-12-18 22:36:36 +08:00
@20150517 你又错了,Trunk 里只有 SquashFS ,而我下载的就是这个。
20150517
2014-12-18 23:02:46 +08:00
@yangyang 大哥,讨论问题不需要这么傲娇好吗?你的overlay是jffs2格式,所以你能free space,不是因为你是Squashfs
装在squashfs上的包是没法free的

https://forum.openwrt.org/viewtopic.php?id=31246

OpenWRT uses squashfs. Read about squashfs at http://en.wikipedia.org/wiki/SquashFS

In short you cannot remove preinstalled packages such that flash space it released. But preinstalled packages have the advantage of being compressed in flash and therefor take a lot less flash space. Packages installed using opkg are not compressed on your router so they are less efficient in regards to the amount of flash space they occupy but they can be removed.

To do what you want you need to build your own version of openwrt using make menuconfig to select the packages you want preinstalled.
SkYoung
2014-12-27 17:44:54 +08:00
lz ,请教,这种情况怎么办

Upgrading busybox on root from 1.22.1-2 to 1.22.1-5...
Configuring busybox.
//usr/lib/opkg/info/busybox.postinst: line 4: default_postinst: not found
Collected errors:
* pkg_run_script: package "busybox" postinst script returned status 127.
* opkg_configure: busybox.postinst returned 127.
v2exhehehehe
2015-02-01 11:05:40 +08:00
楼主来个patch吧,我给我的也加上

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/154858

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX