OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
yangyang
V2EX  ›  OpenWrt

修复 OpenWrt 中文支持

  •  
  •   yangyang · Dec 18, 2014 · 3599 views
    This topic created in 4167 days ago, the information mentioned may be changed or developed.
    一般情况下 OpenWrt 上用 ls 等命令,中文是乱码的,这是因为默认的 busybox 不支持中文。我自己重新编译了一个支持中文的 trunk 版本 busybox,安装后中文支持就正常了。

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


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

    怎么删除?
    @20150517
    @yangyang
    @zro
    jasontse
        5
    jasontse  
       Dec 18, 2014 via iPad
    @582033
    opkg install busybox --force-reinstall
    yangyang
        6
    yangyang  
    OP
       Dec 18, 2014
    @cncaihua
    @20150517
    @zro
    @582033
    @jasontse

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

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


    注意到删掉 wget 后 rootfs 减小了 1% 没?
    20150517
        10
    20150517  
       Dec 18, 2014
    @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
       Dec 18, 2014
    @20150517 你又错了,Trunk 里只有 SquashFS ,而我下载的就是这个。
    20150517
        12
    20150517  
       Dec 18, 2014
    @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  
       Dec 27, 2014
    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  
       Feb 1, 2015
    楼主来个patch吧,我给我的也加上
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   952 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 19:36 · PVG 03:36 · LAX 12:36 · JFK 15:36
    ♥ Do have faith in what you're doing.