Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
user:ahorner:build-guide [2022/10/01 13:58] ahorneruser:ahorner:build-guide [2022/10/01 14:19] ahorner
Line 9: Line 9:
 git branch -a git branch -a
 git tag git tag
-git checkout v21.02.3+git checkout v22.03.0
    
 # Update the feeds # Update the feeds
 ./scripts/feeds update -a ./scripts/feeds update -a
 ./scripts/feeds install -a ./scripts/feeds install -a
-  + 
-# Configure the firmware image and the kernel+# Optionally pull in a buildinfo for your build. Here is the buildbot config for v22.03.0 
 +wget https://downloads.openwrt.org/releases/22.03.0/targets/ramips/mt7621/config.buildinfo -O .config 
 + 
 +# Configure the firmware image, which may be based on the buildinfo
 make menuconfig make menuconfig
 +
 +# And optionally the kernel (note that changing the kernel in such a way that a different one is produced will change the vermagic, which will make it incompatible with officiak opkg kmods)
 make -j $(nproc) kernel_menuconfig make -j $(nproc) kernel_menuconfig
    
Line 22: Line 27:
 make -j $(nproc) defconfig download clean world make -j $(nproc) defconfig download clean world
 </code> </code>
 +
 +===== Buildinfo and .config =====
 +
 +When choosing what buildinfo you wish to use, you must consider what you want to end up with at the output. Merely taking the buildinfo file for a version and notr making any changes might be desirable if you wish to go through the logn build procedure of the OpenWRT official buildbot, but usually is not. Often, you'll want to make adjustments or even merge multiple buildinfo files together to achieve the desired result.
 +
 +An example of a common scenario in which you may wish to merge multiple buildinfo files together is when building a fresh snapshot image based on the master branch of the OpenWRT GIT. Your final .config file will vary heavily based on what your desired result from the build is and what you wish to use the build for. Here is an example .config which was based on both a [[https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/config.buildinfo|snapshot buildinfo]] and a [[https://downloads.openwrt.org/releases/22.03.0/targets/ramips/mt7621/config.buildinfo|v22.03.0 buildinfo]] specifically for the ramips MT7621 platform of devices:
 +
 +<code>
 +CONFIG_TARGET_ramips=y
 +CONFIG_TARGET_ramips_mt7621=y
 +CONFIG_TARGET_MULTI_PROFILE=y
 +CONFIG_ALL_KMODS=y
 +CONFIG_ALL_NONSHARED=y
 +CONFIG_DEVEL=y
 +CONFIG_TARGET_PER_DEVICE_ROOTFS=y
 +CONFIG_BPF_TOOLCHAIN_BUILD_LLVM=y
 +# CONFIG_BPF_TOOLCHAIN_NONE is not set
 +CONFIG_COLLECT_KERNEL_DEBUG=y
 +CONFIG_HAS_BPF_TOOLCHAIN=y
 +CONFIG_KERNEL_BUILD_DOMAIN="buildhost"
 +CONFIG_KERNEL_BUILD_USER="builder"
 +CONFIG_MAKE_TOOLCHAIN=y
 +CONFIG_REPRODUCIBLE_DEBUG_INFO=y
 +CONFIG_USE_LLVM_BUILD=y
 +CONFIG_PACKAGE_cgi-io=y
 +CONFIG_PACKAGE_libbpf=m
 +CONFIG_PACKAGE_libelf=m
 +CONFIG_PACKAGE_libiwinfo-lua=y
 +CONFIG_PACKAGE_liblua=y
 +CONFIG_PACKAGE_liblucihttp=y
 +CONFIG_PACKAGE_liblucihttp-lua=y
 +CONFIG_PACKAGE_libubus-lua=y
 +CONFIG_PACKAGE_lua=y
 +CONFIG_PACKAGE_luci=y
 +CONFIG_PACKAGE_luci-app-firewall=y
 +CONFIG_PACKAGE_luci-app-opkg=y
 +CONFIG_PACKAGE_luci-base=y
 +CONFIG_PACKAGE_luci-lib-base=y
 +CONFIG_PACKAGE_luci-lib-ip=y
 +CONFIG_PACKAGE_luci-lib-jsonc=y
 +CONFIG_PACKAGE_luci-lib-nixio=y
 +CONFIG_PACKAGE_luci-mod-admin-full=y
 +CONFIG_PACKAGE_luci-mod-network=y
 +CONFIG_PACKAGE_luci-mod-status=y
 +CONFIG_PACKAGE_luci-mod-system=y
 +CONFIG_PACKAGE_luci-proto-ipv6=y
 +CONFIG_PACKAGE_luci-proto-ppp=y
 +CONFIG_PACKAGE_luci-ssl=y
 +CONFIG_PACKAGE_luci-theme-bootstrap=y
 +CONFIG_PACKAGE_px5g-wolfssl=y
 +CONFIG_PACKAGE_qosify=m
 +CONFIG_PACKAGE_rpcd=y
 +CONFIG_PACKAGE_rpcd-mod-file=y
 +CONFIG_PACKAGE_rpcd-mod-iwinfo=y
 +CONFIG_PACKAGE_rpcd-mod-luci=y
 +CONFIG_PACKAGE_rpcd-mod-rrdns=y
 +CONFIG_PACKAGE_tc-full=m
 +CONFIG_PACKAGE_tc-mod-iptables=m
 +CONFIG_PACKAGE_uhttpd=y
 +CONFIG_PACKAGE_uhttpd-mod-ubus=y
 +CONFIG_PACKAGE_zlib=m
 +</code>
 +
 +  * The file was initially based on the snapshot buildinfo, will all of the ''CONFIG_TARGET_DEVICE_ramips_mt7621_*'', ''CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt7621_*'' and ''CONFIG_PACKAGE_*'' lines completely removed.
 +  * All lines starting with ''CONFIG_IB'', ''CONFIG_SDK'', ''CONFIG_AUTOREMOVE'' and ''CONFIG_BUILDBOT'' were also removed
 +  * All 'CONFIG_PACKAGE_*'' lines from the v22.03.0 buildinfo were then inserted so that the packageset from that release is included by default in output build images
  • Last modified: 2023/04/03 20:16
  • by ukleinek