zoukankan      html  css  js  c++  java
  • 树莓派3(Raspberry pi 3)刷OpenWrt

    原文在

    https://my.oschina.net/wangandi/blog/687389

    1.下载镜像,这个lede好像是openwrt的一个分支,openwrt本身还没有支持pi3,https://downloads.lede-project.org/snapshots/targets/brcm2708/bcm2710/lede-brcm2708-bcm2710-rpi-3-ext4-sdcard.img

    2.刻录到tf卡,windows使用Win32DiskImager,linux使用dd命令。

    3.树莓派接电,使用网线连接电脑。

    4.修改/etc/config/network

    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd11:8629:b448::/48'
    
    config interface 'lan'
             option type 'bridge'
    #       option ifname 'eth0'
            option proto 'static'
            option ipaddr '192.168.1.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface wan
            option proto dhcp
            option ifname eth0

    5.修改/etc/wireless

    config wifi-device radio0
            option type     mac80211
            option channel  11
            option hwmode   11g
            option path     'platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
            option htmode   HT20
            # REMOVE THIS LINE TO ENABLE WIFI:
            option disabled 0
    
    config wifi-iface
            option device   radio0
            option network  lan
            option mode     ap
            option ssid     OpenWrt_RPI3
            option encryption psk2
            option key      yourwifikey

    允许通过wan连接ssh

    /etc/config/firewall

    #open ssh on wan interface
    config rule                
            option src              wan
            option dest_port        22
            option target           ACCEPT     
            option proto  


     

    6.重启,网线连接路由器dhcp获取ip,电脑用wifi连接树莓派。

    7.安装luci界面,可以通过浏览器访问路由

    opkg install luci
    /etc/init.d/uhttpd start
    /etc/init.d/uhttpd enable

    8.tf卡不是所有空间都用了,调整rootfs空间大小,下载Gparted系统刻录到u盘启动,启动后调整mmcblk0p2大小。

    9.可以开始折腾了。

  • 相关阅读:
    设计模式之观察者模式
    设计模式之建造者模式
    设计模式之外观模式
    设计模式之模板方法模式
    设计模式之原型模式
    自己动手写计算器v1.1
    自己动手写计算器v1.0
    Guid的使用
    设计模式学习---代理类
    StringBuilder的使用
  • 原文地址:https://www.cnblogs.com/shinedream/p/7228946.html
Copyright © 2011-2022 走看看