定制编译openWrt

  • 修改密码
    默认情况下root是没有密码的,需设定密码才能开启ssh。
    修改shadow文件,位于 package/base-files/files/etc
    root:$1$wEehtjxj$YBu4quNfVUjzfv8p/PBo5.:0:0:99999:7:::
    密码经过加密,将密码修改成admin

  • 默认中文
    修改feeds/luci/libs/web/root/etc/config
    option lang auto

    改为
    option lang zh_cn

    并添加

    config internal languages
            option en 'English'
            option zh_cn 'chinese'
    
  • 添加主题

    • 打开trunk/feeds/luci/themes这个目录,你会发现里面有很多主题(除了base为基础包外)每一个文件夹就是一个主题

    • 我们得修改makefile文件,使其制定编译的时候能找到openwrtcn这个主题

      找到路径为 trunk/feeds/luci/contrib/package/luci下面的makefile文件双击打开

      搜索OpenWrt.org这样很快就定位到添加主题的地方了,在下面空白处增加一句

      效果如下

      $(eval $(call theme,base,Common base for all themes))
      $(eval $(call theme,openwrt,OpenWrt.org ))
      $(eval $(call theme,bootstrap,Bootstrap Theme))
      $(eval $(call theme,openwrtcn,openwrtcn Theme (default),,,1))
        
      $(eval $(call theme,freifunk-bno,Freifunk Berlin Nordost Theme,\
          Stefan Pirwitz <stefan-at-freifunk-bno-dot-de>))
        
      $(eval $(call theme,freifunk-generic,Freifunk Generic Theme,\
          Manuel Munz <freifunk-at-somakoma-dot-de>))
      

      保存退出即可。

  • 修改默认主题
    修改 feeds/luci/libs/web/root/etc/config
    option mediaurlbase /luci-static/openwrt.org
    `可根据需要将openwrt.org修改为

    • Bootstap
    • openwrtcn
    • freifunk-bno
    • freifunk-generic
  • 修改主机名,设定时区
    修改 package/base-files/files/etc/config/system

    config system
    option conloglevel 8
    option cronloglevel 8
    option hostname Openwrt   ## 设定主机名
    option timezone Asia/Shanghai   ##时区设置为亚洲/上海
    option timezone CST-8   ##正8区
    config timeserver ntp
    list server 0.openwrt.pool.ntp.org    ##就是ntp服务器了。 自动更新时间
    list server 1.openwrt.pool.ntp.org
    list server 2.openwrt.pool.ntp.org
    list server 3.openwrt.pool.ntp.org
    option enable_server 0
    
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 摘要:Lua作为一门方便嵌入(其它应用程序)并可扩展的轻量级脚本语言来设计的,因此她一直遵从着简单、小巧、可移植、...
    Masukio阅读 66,053评论 5 41
  • 前置条件 编译环境:Linuxmint 18.2 64-Bit 路由器型号:TP-LINK TL-WR720N v...
    suanite阅读 20,686评论 2 13
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,943评论 19 139
  • 主要思路: 了解openwrt的目录框架结构,往其中添加所需软件功能xxx模块 编写package/xxx/目录下...
    jrglinux阅读 9,830评论 3 1
  • 黑夜 牵扯着死亡 沉睡了的灯火烛明 消散了的欢声笑语 那一刻 生命在喘息中挣扎 没有月光的夜 抓不住动人的心跳 千...
    江南少城主阅读 1,522评论 1 7

友情链接更多精彩内容