diff --git a/Makefile b/Makefile index 48319058..20153947 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,6 @@ openwrt-clean: stamp-clean-openwrt-cleaned .stamp-openwrt-cleaned openwrt-clean-bin: rm -rf $(OPENWRT_DIR)/bin - rm -rf $(TOP_DIR)/firmware/* # update openwrt and checkout specified commit openwrt-update: .stamp-openwrt-updated .stamp-unpatched @@ -81,6 +80,13 @@ feeds-update: stamp-clean-feeds-updated .stamp-feeds-updated .stamp-feeds-updated: $(OPENWRT_DIR)/feeds.conf cd $(OPENWRT_DIR); ./scripts/feeds uninstall -a cd $(OPENWRT_DIR); ./scripts/feeds update -a + cd $(OPENWRT_DIR); ./scripts/feeds install liblzma + cd $(OPENWRT_DIR); ./scripts/feeds install libssh2 + cd $(OPENWRT_DIR); ./scripts/feeds install libidn + cd $(OPENWRT_DIR); ./scripts/feeds install libopenldap + cd $(OPENWRT_DIR); ./scripts/feeds install libgnutls + cd $(OPENWRT_DIR); ./scripts/feeds install libpam + cd $(OPENWRT_DIR); ./scripts/feeds install libnetsnmp cd $(OPENWRT_DIR); ./scripts/feeds install -p arednpackages olsrd cd $(OPENWRT_DIR); ./scripts/feeds install perl cd $(OPENWRT_DIR); ./scripts/feeds install -p arednpackages vtun @@ -138,8 +144,7 @@ compile: stamp-clean-compiled .stamp-compiled $(TOP_DIR)/scripts/tests-prebuild.sh $(UMASK); \ $(MAKE) -C $(OPENWRT_DIR) $(MAKE_ARGS) - rm -f $(TOP_DIR)/firmware/AREDN* - for FILE in $(TOP_DIR)/firmware/openwrt*; do \ + for FILE in `find $(TOP_DIR)/firmware/targets/ -name "*.bin"`; do \ [ -e "$$FILE" ] || continue; \ NEWNAME="$${FILE/openwrt-/AREDN-}"; \ NEWNAME="$${NEWNAME/ar71xx-generic-/}"; \ @@ -149,7 +154,7 @@ compile: stamp-clean-compiled .stamp-compiled $(TOP_DIR)/scripts/tests-postbuild.sh $(TOP_DIR)/firmware: - ln -sf $(OPENWRT_DIR)/bin/ar71xx $(TOP_DIR)/firmware + ln -sf $(OPENWRT_DIR)/bin/ $(TOP_DIR)/firmware stamp-clean-%: rm -f .stamp-$* diff --git a/README.md b/README.md index 51c19269..84610ec8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ http://www.aredn.org ## Build Information -The AREDN firmware is based on OpenWrt/LEDE with additional packages and patches. +The AREDN firmware is based on OpenWrt with additional packages and patches. A Makefile automates the entire process to create firmware images. ### Build Prerequisites @@ -39,14 +39,14 @@ make ``` Building the images may take minutes or hours depending on the machine. -For more details see [build options](http://wiki.openwrt.org/doc/howto/build#make_options). +For more details see [build options](https://openwrt.org/docs/guide-developer/build-system/use-buildsystem). Review the build options in config.mk: `-j `. `V=s` will give more verbose error messages. An internet connection is required during the build process. A good internet connection can improve the build time. -You need approximately 12GB of space for the build. +You need approximately 10GB of space for the build. ### Directory Layout @@ -70,12 +70,12 @@ results/ <- code checks and other test results in jUnit xml format ### Patches with quilt -The patches directory contains quilt patches that are applied on top of the +The patches directory contains quilt patches applied on top of the openwrt git repo defined in config.mk. If a patch is not yet included upstream, it can be placed in the `patches` directory with the `quilt` tool. Please configure `quilt` as described in -[OpenWrt Quilt](https://openwrt.org/docs/guide-developer/use-patches-with-buildsystem?s[]=quilt). +[OpenWrt Quilt](https://openwrt.org/docs/guide-developer/build-system/use-patches-with-buildsystem). #### Add, modify or delete a patch diff --git a/configs/ar71xx-generic.config b/configs/ar71xx-generic.config index 804c8ad6..73713ca9 100644 --- a/configs/ar71xx-generic.config +++ b/configs/ar71xx-generic.config @@ -1,3 +1,22 @@ CONFIG_TARGET_ar71xx=y -CONFIG_TARGET_ar71xx_Default=y -CONFIG_ARCH=mips +CONFIG_TARGET_ar71xx_generic=y +CONFIG_TARGET_MULTI_PROFILE=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe210-220-v1=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe510-520-v1=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-airrouter=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-bullet-m=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-loco-m-xw=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-nano-m-xw=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-nano-m=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-rocket-m-ti=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-rocket-m-xw=y +CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-rocket-m=y +CONFIG_HAS_SUBTARGETS=y +CONFIG_HAS_DEVICES=y +CONFIG_TARGET_BOARD="ar71xx" +CONFIG_TARGET_SUBTARGET="generic" +CONFIG_TARGET_ARCH_PACKAGES="mips_24kc" +CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc" +CONFIG_CPU_TYPE="24kc" +CONFIG_LINUX_4_9=y + diff --git a/configs/common.config b/configs/common.config index bd69732a..3b5976d6 100644 --- a/configs/common.config +++ b/configs/common.config @@ -1,7 +1,7 @@ CONFIG_ATH_USER_REGD=y -CONFIG_ALL=y CONFIG_PACKAGE_bridge=y CONFIG_PACKAGE_busybox=y +CONFIG_BUSYBOX_CONFIG_TELNETD=y CONFIG_PACKAGE_dnsmasq=y CONFIG_PACKAGE_dropbear=y CONFIG_PACKAGE_iptables=y diff --git a/openwrt.mk b/openwrt.mk index 6fa1771f..c0f227af 100644 --- a/openwrt.mk +++ b/openwrt.mk @@ -1,6 +1,6 @@ # what openwrt git repo will be used? -OPENWRT_SRC=https://github.com/aredn/arednbase +OPENWRT_SRC=https://github.com/openwrt/openwrt.git # what branch, tag or commit in this repo? -OPENWRT_COMMIT=develop +OPENWRT_COMMIT=master diff --git a/scripts/tests/postbuild/700-imagename.sh b/scripts/tests/postbuild/700-imagename.sh index 5a9a5ecc..b37758b4 100755 --- a/scripts/tests/postbuild/700-imagename.sh +++ b/scripts/tests/postbuild/700-imagename.sh @@ -38,10 +38,10 @@ LICENSE ## Values for count of final images ### This value should be updated as we add/remove device image types -NUMBEROFIMAGESCOUNT=8 +NUMBEROFIMAGESCOUNT=11 ### Static Files, only when buildroot changes adjust output files types. ### These are files such as vmlinux, uimage, etc. -STATICFILESCOUNT=9 +STATICFILESCOUNT=0 # END Variables that may need adjusting @@ -52,7 +52,7 @@ STATICFILESCOUNT=9 # Make sure no files named openwrt* in output directory # Could mean an image rename problem or that the buildroot # was not clean before making images -if [ "$(find ./openwrt/bin/* -maxdepth 2 -regex '\./openwrt/bin.*[Oo][Pp][Ee][Nn][Ww][Rr][Tt].*' | wc -l)" -eq "0" ] +if [ "$(find ./openwrt/bin/* -maxdepth 4 -regex '\./openwrt/bin.*openwrt.*\.bin' | wc -l)" -eq "0" ] then juLog -name="no_firmware_images_named_openwrt" true else @@ -67,7 +67,7 @@ fi ## STATICFILESCOUNT + NUMBEROFIMAGESCOUNT * 2 for sysupgrade and factory files EXPECTEDFILESCOUNT=$(( STATICFILESCOUNT + NUMBEROFIMAGESCOUNT * 2 )) -if [ "$(find ./openwrt/bin/* -maxdepth 2 -regex ".*AREDN-.*" | wc -l)" -eq "$EXPECTEDFILESCOUNT" ] +if [ "$(find ./openwrt/bin/* -maxdepth 4 -regex ".*AREDN-.*\.bin" | wc -l)" -eq "$EXPECTEDFILESCOUNT" ] then juLog -name="AREDN_image_files_exist" true else