设为首页收藏本站

恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
小博无线
查看: 14420|回复: 14

3步定制hg255d的trunk固件(包含3千多个packages)

[复制链接]
发表于 2014-1-15 12:46 | 显示全部楼层 |阅读模式
本帖最后由 wood1939 于 2014-1-15 12:46 编辑

下面的步骤需要一台x86_64的linux主机。我的盒子是lintel的uboot,原版uboot没试过。

==================================
1. 下载trunk的ramips的ImageBuilder

http://downloads.openwrt.org/snapshots/trunk/ramips/OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64.tar.bz2

2. 解开压缩文件,修改Makefile

tar xjf OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64.tar.bz2
cd OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64
vi target/linux/ramips/image/Makefile
查找255, 有两行和hg255d相关,去掉这两行前面的“#”

3. 创建固件

make image PROFILE=HG255D

make结束以后,会生成bin/ramips/openwrt-ramips-rt305x-hg255d-squashfs-sysupgrade.bin,就可以用来刷机了。

可以根据自己需要,加上PACKAGES列表来定制固件的内容(packages目录下面有大概3千多个ipk包)

make image PROFILE=HG255D  PACKAGES="6relayd aria2 arptables base-files block-mount bridge busybox chat comgt curl ddns-scripts dnsmasq dropbear etherwake firewall hostapd hostapd-common hostapd-utils ip ip6tables ipset iptables iptables-mod-conntrack-extra iptables-mod-filter iptables-mod-ipopt iw jshn kernel kmod-8021q kmod-arptables kmod-ath kmod-ath9k-common kmod-ath9k-htc kmod-brcmfmac kmod-brcmutil kmod-bridge kmod-carl9170 kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-authenc kmod-crypto-cbc kmod-crypto-core kmod-crypto-deflate kmod-crypto-des kmod-crypto-ecb kmod-crypto-hash kmod-crypto-hmac kmod-crypto-iv kmod-crypto-manager kmod-crypto-md5 kmod-crypto-pcompress kmod-crypto-rng kmod-crypto-sha1 kmod-crypto-wq kmod-eeprom-93cx6 kmod-fs-ext4 kmod-fs-vfat kmod-gpio-button-hotplug kmod-gre kmod-gre6 kmod-ifb kmod-input-core kmod-ip6-tunnel kmod-ip6tables kmod-ipip kmod-ipsec kmod-ipsec4 kmod-ipsec6 kmod-ipt-compat-xtables kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-core kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-ipset kmod-ipt-nat kmod-ipt-nathelper kmod-ipt-sysrq kmod-iptunnel kmod-iptunnel4 kmod-iptunnel6 kmod-ipv6 kmod-leds-gpio kmod-lib-crc-ccitt kmod-lib-crc-itu-t kmod-lib-crc16 kmod-lib-textsearch kmod-lib-zlib kmod-llc kmod-mac80211 kmod-mmc kmod-mppe kmod-nfnetlink kmod-nls-base kmod-p54-common kmod-p54-usb kmod-ppp kmod-pppoe kmod-pppox kmod-pptp kmod-rt2500-usb kmod-rt2800-lib kmod-rt2800-mmio kmod-rt2800-soc kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-mmio kmod-rt2x00-usb kmod-rt73-usb kmod-rtl8187 kmod-rtl8192c-common kmod-rtl8192cu kmod-rtlwifi kmod-rtlwifi-usb kmod-sched-connmark kmod-sched-core kmod-scsi-core kmod-scsi-generic kmod-slhc kmod-stp kmod-tun kmod-usb-core kmod-usb-rt305x-dwc_otg kmod-usb-serial kmod-usb-serial-ch341 kmod-usb-serial-ftdi kmod-usb-serial-pl2303 kmod-usb-storage kmod-usb-storage-extras lftp libblobmsg-json libc libcurl libcyassl libevent2 libexpat libgcc libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua liblzo libmnl libncurses libnfnetlink libnl-tiny libopenssl libpcap libplist libpolarssl libpopt libpthread libreadline librt libstdcpp libubox libubus libubus-lua libuci libuci-lua libusb-1.0 libusbmuxd libustream-cyassl libxml2 libxtables lua luci luci-app-commands luci-app-ddns luci-app-firewall luci-app-qos luci-app-wol luci-i18n-english luci-lib-core luci-lib-ipkg luci-lib-nixio luci-lib-sys luci-lib-web luci-mod-admin-core luci-mod-admin-full luci-proto-3g luci-proto-core luci-proto-ipv6 luci-proto-ppp luci-proto-relay luci-sgi-cgi luci-ssl luci-theme-base luci-theme-bootstrap minicom miniupnpd mtd mtr multiwan netifd odhcp6c openvirtual**-openssl opkg ppp ppp-mod-pppoe ppp-mod-pptp procd px5g qos-scripts relayd resolveip rsync socat swconfig tc tcpdump-mini terminfo tmux ubox ubus ubusd uci uclibcxx uhttpd uhttpd-mod-ubus usb-modeswitch usbmuxd wireless-tools wpa-supplicant wpad zlib"

==================================
常见错误:
1.  * opkg_install_cmd: Cannot install package kmod-rt2800-pci
    在PACKAGES参数里面加上"-kmod-rt2800-pci"
    make image PROFILE=HG255D PACKAGES="-kmod-rt2800-pci"
2. 找不到dtc文件
    build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.26/scripts/dtc/dtc
解决方案:把附件里的dtc.zip解开,放到对应的地方。


dtc.zip

41.45 KB, 下载次数: 99

点评

高大上~~顶~  发表于 2014-2-27 19:10

评分

参与人数 1恩山币 +1 收起 理由
龙吟之耀 + 1 切糕党手持切糕刀强势围观楼主!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2014-1-15 15:30 | 显示全部楼层
有个说法是kmod-rt2800-pci已经编译到kernel里面了,不需要单独安装。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-2-25 15:00 | 显示全部楼层
楼主能直接编译一个带wifidog 的HG255d的固件吗?
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-2-27 14:01 | 显示全部楼层
本帖最后由 shen012 于 2014-2-27 14:02 编辑

哈哈哈,太好了,真是感谢啊
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-3 20:13 | 显示全部楼层
学习了
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-4 08:50 来自手机 | 显示全部楼层
这是Pandora box的代码吗?我要安装它的包。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-4 09:29 来自手机 | 显示全部楼层
代码在此https://openwrt.org.cn/wiki/branchstat
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-6 23:17 | 显示全部楼层
base-files busybox ddns-scripts dnsmasq dropbear etherwake firewall hd-idle hotplug2 ip iptables iptables-mod-conntrack-extra iptables-mod-filter iptables-mod-hashlimit iptables-mod-ipopt iptables-mod-iprange iw jshn kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ifb kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-core kmod-ipt-filter kmod-ipt-hashlimit kmod-ipt-ipopt kmod-ipt-iprange kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-nathelper kmod-ipt-nathelper-extra kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-lib-textsearch kmod-mac80211 kmod-macvlan kmod-nls-base kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 kmod-ppp kmod-pppoe kmod-pppox kmod-sched kmod-sched-connmark kmod-sched-core kmod-usb-core kmod-usb2 kmod-wdt-ath79 libblobmsg-json libc libgcc libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c liblua libnfnetlink libnl-tiny libpthread libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-ddns luci-app-firewall luci-app-hd-idle luci-app-nwan luci-app-qos luci-app-qos-emong luci-app-upnp luci-app-wol luci-i18n-chinese luci-i18n-english luci-lib-core luci-lib-ipkg luci-lib-nixio luci-lib-sys luci-lib-web luci-mod-admin-core luci-mod-admin-full luci-proto-core luci-proto-ppp luci-sgi-cgi luci-sgi-uhttpd luci-theme-base luci-theme-openwrt miniupnpd mtd netifd opkg ppp ppp-mod-pppoe qos-scripts swconfig tc uboot-envtools ubus ubusd uci uhttpd uhttpd-mod-lua wpad-mini
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-22 19:27 | 显示全部楼层
哪位发个编译好的给大家用用吧。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-3-24 17:46 | 显示全部楼层
专门来注册个账号感谢一下!另外,那个dtc文件具体从哪里来?希望举一反三,谢谢
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-4-12 17:37 | 显示全部楼层
同请教一下dtc文件的来源,{:soso_e113:}。多写楼主分享。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-7-4 10:24 | 显示全部楼层
编OP这么简单?怎么编TT那么复杂尼,我弄了好几个星期都没成功过!
留个记号,,以后好查,,
我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-7-4 11:33 | 显示全部楼层
本帖最后由 yumin9822 于 2014-7-4 11:35 编辑

centos 6 测试成功,默认用make image PROFILE=HG255D PACKAGES="-kmod-rt2800-pci"
出来的bin文件才2.8M
  1. drwxr-xr-x 2 root root  4.0K Jul  3 23:28 .
  2. drwxr-xr-x 3 root root  4.0K Jul  3 23:20 ..
  3. -rw-r--r-- 1 root root   360 Jul  3 23:28 md5sums
  4. -rw-r--r-- 1 root root  2.8M Jul  3 23:28 openwrt-ramips-rt305x-hg255d-squashfs-sysupgrade.bin
  5. -rw-r--r-- 1 root root  1.8M Jul  3 23:28 openwrt-ramips-rt305x-root.squashfs
  6. -rw-r--r-- 1 root root 1018K Jul  3 23:28 openwrt-ramips-rt305x-uImage.bin
  7. -rwxr-xr-x 1 root root  3.0M Jul  3 23:28 openwrt-ramips-rt305x-vmlinux.bin
  8. -rwxr-xr-x 1 root root  3.1M Jul  3 23:28 openwrt-ramips-rt305x-vmlinux.elf
复制代码



我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-11-11 11:24 | 显示全部楼层
怎么加lighttp呢?
我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛 ( 苏ICP备05084872号-1 )  

GMT+8, 2018-9-25 09:11

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表