V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
yangyang
V2EX  ›  OpenWrt

修复 OpenWrt 中文支持

  •  
  •   yangyang · 2014-12-18 14:32:39 +08:00 · 2596 次点击
    这是一个创建于 3628 天前的主题,其中的信息可能已经有所发展或是发生改变。
    一般情况下 OpenWrt 上用 ls 等命令,中文是乱码的,这是因为默认的 busybox 不支持中文。我自己重新编译了一个支持中文的 trunk 版本 busybox,安装后中文支持就正常了。

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


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

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

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

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


    注意到删掉 wget 后 rootfs 减小了 1% 没?
    20150517
        10
    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
        11
    yangyang  
    OP
       2014-12-18 22:36:36 +08:00
    @20150517 你又错了,Trunk 里只有 SquashFS ,而我下载的就是这个。
    20150517
        12
    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
        13
    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
        14
    v2exhehehehe  
       2015-02-01 11:05:40 +08:00
    楼主来个patch吧,我给我的也加上
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1725 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 16:42 · PVG 00:42 · LAX 08:42 · JFK 11:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.