TL_WR710N build OpenWRT image with Image Generator

sezione dedicata ai sistemi operativi alternativi Open Source

TL_WR710N build OpenWRT image with Image Generator

Messaggio da leggereda root » 18/07/2016, 16:43

1) use a Ubuntu 64bit O.S. (real or virtual)

2) install dependencies:
sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc wget

3) download software and prepare the system:

su - root
cd ~
mkdir openwrt && cd openwrt
wget https://downloads.openwrt.org/barrier_b ... 64.tar.bz2
tar -xvjf OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64.tar.bz2
cd OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64
make clean
mkdir dl


4) Configure Package Repositories for Barrier_Breaker (chaos_calmer sucks!):
nano repositories.conf

## Place your custom repositories here, they must match the architecture and version.
# src/gz chaos_calmer http://downloads.openwrt.org/chaos_calm ... c/packages
# src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_br ... /packages/
# src custom file:///usr/src/openwrt/bin/ar71xx/packages
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_br ... s/packages
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_br ... kages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_br ... kages/luci
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_br ... management
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_br ... es/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_br ... /telephony
## This is the local package repository, do not remove!
src imagebuilder file:packages


5) generate image

Note: first run make info to obtain a list of defined profiles:
make info

than create default minimal image (with no options):
make image PROFILE=TLWR710

CREATION OF IMAGES WITH SPECIFIC PACKAGES

Tip: The list of currently installed packages on your router running OpenWrt can be obtained with the command below:
echo $(opkg list_installed | awk '{ print $1 }')

Tip: The list of packages present in the current release of OpenWrt, Barrier Breaker 14.07, can be obtained with this Linux command:
echo $(wget -qO - http://downloads.openwrt.org/barrier_br ... xx_generic | sed -ne 's/^CONFIG_PACKAGE_\([a-z0-9-]*\)=y/\1/ip')
(this example is for ar71xx. Change the architecture and name of the config file as necessary)

Default packages of Barrier Breaker AR71xx:
base-files busybox dnsmasq dropbear firewall fstools jsonfilter libc libgcc mtd netifd opkg procd swconfig ubox ubus ubusd uci kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-nls-base kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper kmod-ipv6 kmod-ppp kmod-pppoe kmod-pppox kmod-slhc kmod-gpio-button-hotplug kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-mac80211 libiwinfo-lua lua libip4tc libip6tc libxtables libblobmsg-json libiwinfo libjson-c liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua luci luci-mod-admin-full luci-app-firewall luci-theme-openwrt luci-proto-ipv6 luci-proto-ppp luci-base luci-lib-nixio ip6tables iptables uhttpd uhttpd-mod-ubus hostapd-common iw odhcp6c odhcpd ppp ppp-mod-pppoe wpad-mini iwinfo jshn libjson-script uboot-envtools

create image with specific packages installed or removed (-namepackage):
make image PROFILE=XXX PACKAGES="pkg1 pkg2 pkg3 -pkg4 -pkg5 -pkg6"


(the following example is to generate a standard image without ppp and ipv6)

make image PROFILE=TLWR710 PACKAGES="base-files busybox dnsmasq dropbear firewall fstools jsonfilter libc libgcc mtd netifd opkg procd swconfig ubox ubus ubusd uci kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core -kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-nls-base -kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper -kmod-ipv6 -kmod-ppp -kmod-pppoe -kmod-pppox kmod-slhc kmod-gpio-button-hotplug kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-mac80211 libiwinfo-lua lua libip4tc -libip6tc libxtables libblobmsg-json libiwinfo libjson-c liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua luci luci-mod-admin-full luci-app-firewall luci-theme-openwrt -luci-proto-ipv6 -luci-proto-ppp luci-base luci-lib-nixio -ip6tables iptables uhttpd uhttpd-mod-ubus hostapd-common iw -odhcp6c odhcpd -ppp -ppp-mod-pppoe wpad-mini iwinfo jshn libjson-script uboot-envtools"


After the make command is finished, the generated images are stored in the bin/architecture directory.

Note: before recreating another image run:
make clean
followed by:
mkdir dl

Extra: FILES Variable

The FILES variable allows custom configuration files to be included in images built with Image Generator. This is especially useful if you need to change the network configuration from default before flashing.

Syntax:

make image PROFILE=XXX PACKAGES="XXX" FILES=files/

The following example shows:

Creating the directory for the configuration files
Using scp to transfer uci configuration files from an OpenWrt router to the files/etc/config directory
Generating an image for TLWR710 with custom packages and uci configuration files

mkdir -p files/etc/config

scp root@192.168.1.1:/etc/config/network files/etc/config/
scp root@192.168.1.1:/etc/config/wireless files/etc/config/
scp root@192.168.1.1:/etc/config/firewall files/etc/config/


make image PROFILE=TLWR710 PACKAGES="nano openvpn -ppp -ppp-mod-pppoe" FILES=files/

Note: The files/ folder must be in the same folder where you issue the make command.
Maurizio
Avatar utente
root
Amministratore
 
Messaggi: 347
Iscritto il: 10/04/2012, 10:55
Località: Ovada

Torna a OpenWRT e sistemi operativi vari

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron