| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| user:ja:my-openwrt-firmware-image-build-guide [2022/01/14 12:53] – [1. Prerequisites] update last test Windows/Debian version info. ja | user:ja:my-openwrt-firmware-image-build-guide [2022/04/02 08:42] – [4. Build image] Interwiki link replaced, cfr. " https://forum.openwrt.org/t/is-interwiki-link-for-https-wikidevi-wi-cat-ru-changed/124181 ". ja |
|---|
| ===== 1. Prerequisites ===== | ===== 1. Prerequisites ===== |
| [[faq:what_system_can_i_build_openwrt_on|A suitable case-sensitive file system]].\\ | [[faq:what_system_can_i_build_openwrt_on|A suitable case-sensitive file system]].\\ |
| Last tested on [[docs:guide-developer:toolchain:wsl|WSL2 (Windows Version 10.0.19044.1466)]] with [[https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6|Debian GNU/Linux 11 (bullseye)]]. | Last tested on [[docs:guide-developer:toolchain:wsl|WSL2 (Windows Version 10.0.19044.1586)]] with [[https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6|Debian GNU/Linux 11 (bullseye)]]. |
| <hidden onHidden="Click to display more info" onVisible="Click to hide the extra info"> | <hidden onHidden="Click to display more info" onVisible="Click to hide the extra info"> |
| See Windows [[wp>Ver_(command)|version]] information with [[wp>Cmd.exe|cmd.exe]] command: | See Windows [[wp>Ver_(command)|version]] information with [[wp>Cmd.exe|cmd.exe]] command: |
| Or with one Debian terminal command: | Or with one Debian terminal command: |
| <code> | <code> |
| sudo apt update && apt upgrade | sudo apt update && sudo apt upgrade |
| </code> | </code> |
| Other commands (e.g. **upgrade**) operate on package information (**update**).\\ | Other commands (e.g. **upgrade**) operate on package information (**update**).\\ |
| For OpenWrt 21.02 Debian terminal command: | For OpenWrt 21.02 Debian terminal command: |
| <code> | <code> |
| git checkout v21.02.0 | git checkout v21.02.2 |
| </code> | </code> |
| </columns> | </columns> |
| make menuconfig | make menuconfig |
| </code> | </code> |
| | :?: What about "make [[docs:guide-developer:toolchain:use-buildsystem#defconfig|defconfig]]"? |
| |
| ==== 3.1 Configure target system ==== | ==== 3.1 Configure target system ==== |
| |[[toh:tp-link:tl-wa730re|TP-Link TL-WA730RE]] v1 |19.07.8 |Atheros ATH79 (DTS) |Devices with small flash |TP-LINK TL-WA730RE v1 |ath79\tiny | | |[[toh:tp-link:tl-wa730re|TP-Link TL-WA730RE]] v1 |19.07.8 |Atheros ATH79 (DTS) |Devices with small flash |TP-LINK TL-WA730RE v1 |ath79\tiny | |
| |::: |21.02.0 |"images are too big by 306444 bytes" |||| | |::: |21.02.0 |"images are too big by 306444 bytes" |||| |
| |[[toh:ubiquiti:unifi|Ubiquiti UniFi AP-LR]] |21.02.1 |Atheros ATH79 |Generic |Ubiquiti UniFi |ath79\generic | | |[[toh:ubiquiti:unifi_ap|Ubiquiti UniFi AP-LR]] |21.02.2 |Atheros ATH79 |Generic |Ubiquiti UniFi |ath79\generic | |
| | |[[toh:ubiquiti:unifiac|Ubiquiti UniFi AP AC Pro]] |21.02.2 |Atheros ATH79 |Generic |Ubiquiti UniFi AC Pro |ath79\generic | |
| </hidden> | </hidden> |
| |
| ==== 3.2 Options ==== | ==== 3.2 Options ==== |
| To add “LuCI”:\\ | Maybe add “LuCI”:\\ |
| * "LuCI" ⇒ “Select” ⇒ "Collections" ⇒ “Select” ⇒ on "luci" press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” | * "LuCI" ⇒ “Select” ⇒ "Collections" ⇒ “Select” ⇒ on "luci" press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit”\\ |
| To remove "wpad-mini" | [[faq:which_packages_can_i_safely_remove_to_save_space|Maybe remove some packages to save space]].\\ |
| | - remove "PPP daemon": |
| | * "Network" ⇒ “Select” ⇒ on “ppp” press <N> to exclude (= “ ” excluded) ⇒ “Exit” |
| | - remove “IPv6 support”: |
| | * “Global build settings” ⇒ “Select” ⇒ on “Enable IPv6 support in packages” press <N> to exclude (= “ ” excluded) ⇒ “Exit”\\ |
| | Maybe make [[wp>WPA2_Enterprise|WPA2 Enterprise]] with [[docs:guide-user:network:wifi:wireless.utilities.wpa-supplicant|wpa_supplicant]] available by:\\ |
| | - remove "wpad-mini": |
| <columns 100% 50% -> | <columns 100% 50% -> |
| For OpenWrt 19.07: | For OpenWrt 19.07: |
| * "Network" ⇒ “Select” ⇒ "WirelessAPD" ⇒ “Select” ⇒ on "wpad-basic-wolfssl" press <N> to exclude (= “ ” excluded) ⇒ “Exit” ⇒ “Exit” | * "Network" ⇒ “Select” ⇒ "WirelessAPD" ⇒ “Select” ⇒ on "wpad-basic-wolfssl" press <N> to exclude (= “ ” excluded) ⇒ “Exit” ⇒ “Exit” |
| </columns> | </columns> |
| To add "wpad" | - add "wpad": |
| <columns 100% 50% -> | <columns 100% 50% -> |
| For OpenWrt 19.07: | For OpenWrt 19.07: |
| * "Network" ⇒ “Select” ⇒ "WirelessAPD" ⇒ “Select” ⇒ on "wpad" press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” | * "Network" ⇒ “Select” ⇒ "WirelessAPD" ⇒ “Select” ⇒ on "wpad" press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” |
| </columns> | </columns> |
| <hidden onHidden="Click to display more info" onVisible="Click to hide the extra info"> | Maybe add [[docs:guide-user:network:wan:multiwan:mwan3|load balancing/failover with multiple WAN interfaces]].\\ |
| See [[faq:which_packages_can_i_safely_remove_to_save_space|faq about removing packages to save space]].\\ | - add "MAC-VLAN support": |
| To remove "ppp" | * "Kernel modules" ⇒ “Select” ⇒ "Network Devices" ⇒ “Select” ⇒ on “kmod-macvlan” press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” |
| * "Network" ⇒ “Select” ⇒ on “ppp” press <N> to exclude (= “ ” excluded) ⇒ “Exit” | - add “LuCI support for the MWAN3 multiwan hotplug script”: |
| To remove “IPv6 support”: | * “LuCI” ⇒ “Select” ⇒ "3. Applications" ⇒ “Select” ⇒ on “luci-app-mwan3” press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” |
| * “Global build settings” ⇒ “Select” ⇒ on “Enable IPv6 support in packages” press <N> to exclude (= “ ” excluded) ⇒ “Exit” | - or without LuCI, add “Multiwan hotplug script with connection tracking support”: |
| </hidden> | * “Network” ⇒ “Select” ⇒ "Routing and Redirection" ⇒ “Select” ⇒ on “mwan3” press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit”\\ |
| | Maybe add [[docs:guide-user:advanced:watchcat|network watchdog utility]].\\ |
| | - add “LuCI Support for Watchcat”: |
| | * “LuCI” ⇒ “Select” ⇒ "3. Applications" ⇒ “Select” ⇒ on “luci-app-watchcat” press <Y> to include (= “*” built-in) ⇒ “Exit” ⇒ “Exit” |
| | - or without LuCI, add “Watchcat”: |
| | * “Utilities” ⇒ “Select” ⇒ on “Watchcat” press <Y> to include (= “*” built-in) ⇒ “Exit” |
| |
| ==== 3.3 Exit configuration ==== | ==== 3.3 Exit configuration ==== |
| * The *-sysupgrade.bin image file is for updating an existing OpenWrt installation. | * The *-sysupgrade.bin image file is for updating an existing OpenWrt installation. |
| |
| To recompile the images, remove files from directory ./bin/targets/<target directory> and build image ([[#build image|step 4]]) again. | To recompile the images, remove files from directory ./bin/targets/<target directory> and build image ([[#build image|step 4]]) again.\\ |
| | :?: What about [[docs:guide-developer:toolchain:use-buildsystem#cleaning_up|cleaning up]] "make clean", "make dirclean", "make distclean"? |
| |
| For faster compiling, use ''make -j N'', where N is the number of CPU cores + 1. Be aware that this method is prone to errors during compiling. In case you encounter compile errors, **your very first step is to compile again without ''-j N''**. Use of ''make download'' prior to parallel compilation is recommended to prevent some of these errors (''-jN'' is //generally// safe for the download step for those with faster Internet connectivity.) | For faster compiling, use ''make -j N'', where N is the number of CPU cores + 1. Be aware that this method is prone to errors during compiling. In case you encounter compile errors, **your very first step is to compile again without ''-j N''**. Use of ''make download'' prior to parallel compilation is recommended to prevent some of these errors (''-jN'' is //generally// safe for the download step for those with faster Internet connectivity.) |
| To build an OpenWrt firmware image for other hardware or with other options, use the OpenWrt Configuration ([[#build image|step 3]]) and then build image ([[#build image|step 4]]) again. | To build an OpenWrt firmware image for other hardware or with other options, use the OpenWrt Configuration ([[#build image|step 3]]) and then build image ([[#build image|step 4]]) again. |
| |
| Also more hardware info on [[hwinfo>User:JA|wikidevi]]. | Also more hardware info on [[https://wikidevi.wi-cat.ru/User:JA|wikidevi]]. |
| |
| Other OpenWrt pages: | Other OpenWrt pages: |
| * [[docs:guide-developer:start|Developer guide]] | * [[docs:guide-developer:start|Developer guide]] |
| * [[docs:guide-developer:toolchain:beginners-build-guide|Beginners guide to building your own firmware]] | * [[docs:guide-developer:toolchain:beginners-build-guide|Beginners guide to building your own firmware]] |