OpenWRT Kickoff_1

OpenWRT Kickoff_1

本节主要讲 openwrt trunk代码的下载编译,以及平台的烧录,硬件平台是以Netgear Wndr3800为例

1,代码下载编译
1.1,download sourcecode
  1. git clone git://git.openwrt.org/14.07/openwrt.git
1.2,Update feeds:
  1. ./scripts/feeds update -a
1.3,Make downloaded package/packages available in make menuconfig:
  1. ./scripts/feeds install -a
1.4, Make menuconfig
  1. make menuconfig
  1. Target Profile -> WNDR 3800
  2. luCI -> Collections ->luci
  3. -> Translatins ->chiese
1.5,compile
  1. make V=99
  1. Top command make world calls the following sequence of the commands:
  2. make target/compile
  3. make package/cleanup
  4. make package/compile
  5. make package/install
  6. make package/preconfig
  7. make target/install
  8. make package/index
2, Install and config luci
参考:http://see.sl088.com/wiki/%E7%BC%96%E8%AF%91Openwrt%E5%9B%BA%E4%BB%B6/%E7%BC%96%E8%AF%91%E5%B5%8C%E5%85%A5LUCI
 2.1,menuconfig
 2.2.添加luci
 LuCI—>Collections—– <*> luci
 2.3.添加luci的中文语言包
 LuCI—>Translations—- <*> luci-i18n-chinese
 2.4.添加DDNS
 LuCI—>Applications —> <*>luci-app-ddns.
再执行
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make -j16
$ ./image.sh
烧录即可,起来默认启动http server
3,U盘支持
3.1,make menuconfig
  • kmod-usb-storage required … Kernel support for USB Mass Storage devices.
  • kmod-fs-<file_system> required … the file system you formatted your partition in. Common examples include kmod-fs-ext4, kmod-fs-hfs, kmod-fs-hfsplus, kmod-fs-msdos, kmod-fs-ntfs, kmod-fs-reiserfs and kmod-fs-xfs.
  • kmod-usb-storage-extras optional … Kernel support for some more drivers, such as for SmartMedia card readers.
  • block-mount recommended & required (if using fstab UCI configuration or luci Mount Points) … Scripts used to mount and check block devices (filesystems and swap) and hotplug capability (recognition when device is plugged in). //at Base system
  • kmod-scsi-core Any mass storage is a generic SCSI device.
     还需要
Kernel modules->   Native Language Support  —>
*kmod-nls-cp437
*kmod-nls-iso8859-1
否则会出现mount错误
3.2,重新编译,烧录,再进入串口mount
mount -o rw -t vfat /dev/sda1 /mnt
done!
4,固件的烧录
4.1,串口sysupgrade命令升级和luci的在线安装 https://kyonli.com/p/18
wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci/luci-i18n-chinese_0.12%2bsvn-r10530-1_ar71xx.ipk
opkg install luci-i18n-chinese_0.12%2bsvn-r10530-1_ar71xx.ipk
 
5,OpenWRT编译前后代码目录对比
6,参考
  1. reference:
  2. http://www.cnblogs.com/shudai/p/3256534.html
  3. https://forum.openwrt.org/viewtopic.php?id=9180
  4. http://wiki.openwrt.org/doc/howto/build
  5. **http://wiki.openwrt.org/doc/howto/obtain.firmware.generate#download_openwrt_barrier_breaker_1407
  6. http://blog.chinaunix.net/uid/23780428/cid-196688-list-3.html
  7. ***https://dev.openwrt.org/wiki/GetSource
  8. http://wiki.openwrt.org/doc/howto/usb.storage
TOP