Difference between revisions of "OpenWrt"

From ElectroDragon
Jump to navigation Jump to search
(Redirected page to Category:Openwrt)
(Tag: New redirect)
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Compile ==
#redirect [[category: Openwrt]]
* https://github.com/openwrt/openwrt
* no need to run it as root
* git clone:
branch openwrt-18.06: git clone -b openwrt-18.06 https://github.com/openwrt/openwrt.git
branch chaos_calmer is legacy: git clone -b chaos_calmer https://github.com/openwrt/openwrt.git
* update
cd openwrt          //enter into openwrt folder
./scripts/feeds update -a    // update install package
./scripts/feeds install -a      //install updates
* make menuconfig
* Setup for MicroSD card & IOT Device mode or IOT gateway modes
Kernel modules    --->
  Other modules    --->
    <*> kmod-sdhci-mt7620
* Make it - make V=s
* Find the firmware - openwrt/bin/ramips/openwrt-ramips-mt7628-mt7628-squashfs-sysupgrade.bin
* IPK packages - openwrt/ bin/ramips/packages/
* Firmware could be updated via LUCI webpage
== Openwrt Folder List ==
== Menuconfig ==
== Build and Use Toolchain ==
* in menuconfig, tick option "Build the OpenWrt based Toolchain"
* Toolchain can be found at "/bin/ramips/OpenWrt-Toolchain-ramips-mt7628_gcc-4.8-linaro_uClibc-"
* Install toolchain: sudo tar -jxvf ./bin/ramips/OpenWrt-Toolchain-ramips-mt7628_gcc-4.8-linaro_uClibc-    -C /opt/
== C application ==
* Compile use mipsel-openwrt-linux-gcc
* mipsel-openwrt-linux-gcc hello_world.c -o hello_world
Run the complied application
* chmod +x /tmp/hello_world  //add executable rights
* /tmp/hello_world          //run“hello_world”application
== IPK Application ==
* Save src file at ./package/utils
* In menuconfig -> Utilities , add this package
=== Compile ===
* cd ./package/utils    //enter into package/utils folder
* mkdir hello_world        //make“hello_world” folder for source code
* cd hello_world
* mkdir src      //make src folder for source code
* nano src/hello_world.c  //create hello_world.c file in src
* nano src/Makefile    // add a new Makefile
* make menuconfig
* Utilities    --->
<M> hello_world.................... Hello world -prints a hello world message
* make V=s
* find installation file at openwrt/ bin/ramips/packages/base/hello_world_1.0_ramips_24kec.ipk
=== Install ===
* opkg install /tmp/usbutils_007-1_ramips_24kec.ipk
=== Applications ===
* 4G network card: kmod-mii, kmod-usb-net, kmod-usb-wdm, kmod-usb-net-qmi-wwan, uqmi
* USB file system: ntfs-3g, kmod-fs-ext4, kmod-fs-vfat
* Audio play: kmod-usb-audio, madplay-alsa
* Audio Misc: zlib, libffi, libattr, libpthread, glib2, libflac, libmad, libcurl, libogg, libvorbisidec, mpd-mini
* libmpdclient, mpc
* USB webcamera: libjpeg, mjpg-streamer
* Web SIP Call: zlib, libopenssl, libpthread, libre, librem, baresip, kmod-sound-core, kmod-usb-audio, librt, alsa-lib, baresip-mod-alsa
== Usage ==
File:Openwrt set style and lanuage.png | Set lanuage and UI style
File:Openwrt bridge network.png | bridge the network, add Vlan2, Vlan2 is already setup in this firmware
File:Openwrt set DHCP network.png | Set Static network environment,  IP address -, gateway&DNS -, netmask -
File:Openwrt Diagnostics network.png | diagnostic network
File:Openwrt vlan switch.png | Completed turn off Vlan2, set Vlan1 as follow, now the router can be visited via the main network
File:Openwrit error returned 127.png | Error "returned 127" can be ignore when install packages.
* No need to setup anything for firewall
* Apps list can check on this page [[:category: Linux]]
* Use [[Transmission]]
* change mode to STA-client -> wifi -> find SSID:openwrt -> edit -> mode -> client -> scan -> join network -> enter password -> save
== Luci ==
Programming tutorial in chinese
* 1.http://www.right.com.cn/forum/thread-183560-1-1.html
* 2.http://www.tuicool.com/articles/zaUNfy
* 3.http://blog.chinaunix.net/uid-23780428-id-4367351.html
* 4.http://blog.csdn.net/lvshaorong/article/details/53939138
Relvant connector can check this page: feeds/luci/modules/luci-base/luasrc/

Latest revision as of 02:21, 10 October 2019

Redirect to: