实验室实验备忘

OpenWrt:
1. OpenWrt 系统的编译:
https://wiki.openwrt.org/doc/start
https://wiki.openwrt.org/doc/howto/buildroot.exigence

sudo apt-get update
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip

12.09版本安装:(不要使用trunk版本,trunk版本测试版不稳定,使用稳定版本如12.09、14.07、15.05,安装过程出现错误请善用搜索引擎,12.09软件安装包目前官方不提供支持,最好使用最新的稳定版)

git clone git://git.openwrt.org/12.09/openwrt.git
git clone git://git.openwrt.org/12.09/packages.git

修改feeds.conf.default,将luci那一行替换为
src-git luci https://github.com/openwrt/luci.git;luci-0.11
复制feeds.conf.default一份改名为feeds.conf

cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig

luci中选择Collections -> luci,translations -> luci-i18n-chinese

编译USB支持软件包:https://wiki.openwrt.org/doc/howto/usb.storage,在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).
kmod-scsi-core Any mass storage is a generic SCSI device.
  1. 清空编译结果的几种方法:
    a. make clean:清空目录/bin和/build_dir。
    b. make dirclean:清空目录/bin,/build_dir,/staging_dir,/toolchain (=the cross-compile tools)和/logs。这个命令是基础的“完全清理”操作。
    c. make distclean:删除所有编译和配置的文件,包含所有下载的feeds和package,也清空/.config,toolchain和其他资源。这个命令要小心使用。

  2. 交叉编译的几种方法:
    https://github.com/airplug/airplug/wiki/Cross-compiling-for-OpenWRT
    https://wiki.openwrt.org/doc/devel/crosscompile
    使用第二种方法交叉编译rtptools。
    注意:PATH和STAGING_DIR设置一定要定位到OpenWrt-SDK目录下相应位置。需要对host2ip.c文件patch -p0 < rtptools-01-host2ip-no-nis-on-uClibc.patch。path文件在https://github.com/maximeh/buildroot/tree/master/package/rtptools

OVS:
1. Open vSwitch 的安装:https://github.com/pichuang/openvwrt/tree/devhttps://github.com/schuza/openvswitch#installation-in-openwrt
2. OVS 命令使用时不能设置外部控制器
3. OVS 默认使用 in-band 模式,ovs-appctl bridge/dump-flows br0 会出现隐藏流表,需要设置 ovs-vsctl set controller br0 connection-mode=out-of-band。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值