Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
antrouter committed Mar 30, 2021
2 parents 569298b + ee1c3ee commit fc39023
Show file tree
Hide file tree
Showing 43 changed files with 1,718 additions and 11,991 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ labels: help wanted
## Current Behavior
<!--- In English please. -->
<!--- Tell us what happens instead of the expected behavior -->
<!--- Did you checked log ? In Status->System log -->

## Specifications

Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ labels: bug
## Current Behavior
<!--- In English please. -->
<!--- Tell us what happens instead of the expected behavior -->
<!--- Did you checked log ? In Status->System log -->

## Possible Solution
<!--- In English please. -->
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ name: Create a question
about: Ask a question
labels: question
---
<!--- Use this template only for general question, not related to an OpenMPTCProuter install -->
116 changes: 106 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ CUSTOM_FEED_URL="${CUSTOM_FEED_URL}"

OMR_OPENWRT=${OMR_OPENWRT:-default}

OMR_FORCE_DSA=${OMR_FORCE_DSA:-0}

if [ ! -f "$OMR_TARGET_CONFIG" ]; then
echo "Target $OMR_TARGET not found !"
#exit 1
Expand All @@ -65,9 +67,11 @@ elif [ "$OMR_TARGET" = "4018" ]; then
elif [ "$OMR_TARGET" = "4019" ]; then
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
elif [ "$OMR_TARGET" = "wrt3200acm" ]; then
OMR_REAL_TARGET="arm_cortex-a9_vfpv3"
OMR_REAL_TARGET="arm_cortex-a9_vfpv3-d16"
elif [ "$OMR_TARGET" = "wrt32x" ]; then
OMR_REAL_TARGET="arm_cortex-a9_vfpv3"
OMR_REAL_TARGET="arm_cortex-a9_vfpv3-d16"
elif [ "$OMR_TARGET" = "bpi-r1" ]; then
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
elif [ "$OMR_TARGET" = "bpi-r2" ]; then
OMR_REAL_TARGET="arm_cortex-a7_neon-vfpv4"
elif [ "$OMR_TARGET" = "bpi-r64" ]; then
Expand All @@ -82,9 +86,9 @@ fi

#_get_repo source https://github.com/ysurac/openmptcprouter-source "master"
if [ "$OMR_OPENWRT" = "default" ]; then
_get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "cbccc2560c0240c2c9528e82d745b7f45ce88bbd"
_get_repo feeds/packages https://github.com/openwrt/packages "9ef2e619b9bba054d6848714f77b462f1f359c2c"
_get_repo feeds/luci https://github.com/openwrt/luci "2448834b9aa9f26055d8ad8b0fc3367888829abd"
_get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "b36068d35d9edbd8ed6aaeed6f4c863bfe4cfbee"
_get_repo feeds/packages https://github.com/openwrt/packages "1e3c22d81dec069893fec04784d4ce48a6b883cd"
_get_repo feeds/luci https://github.com/openwrt/luci "c615dd1387883faa76c0455c45db03438ea05e59"
elif [ "$OMR_OPENWRT" = "master" ]; then
_get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "master"
_get_repo feeds/packages https://github.com/openwrt/packages "master"
Expand Down Expand Up @@ -207,6 +211,98 @@ if [ "$OMR_PACKAGES" = "zuixiao" ]; then
echo "CONFIG_PACKAGE_${OMR_DIST}-zuixiao=y" >> "$OMR_TARGET/source/.config"
fi

if [ "$OMR_TARGET" = "bpi-r1" -a "$OMR_OPENWRT" = "master" ]; then
# We disable mc in master, because it leads to unknown compilation errors on bpi-r1 target
# No time to check this, now, cause i am focused on make this target work
# Maybe someone can do this later
echo -n "Disabling error causing midnight commander (mc) package..."
sed -i "s/CONFIG_PACKAGE_mc=y/# CONFIG_PACKAGE_mc is not set/" "$OMR_TARGET/source/.config"
sed -i "s/CONFIG_MC_EDITOR=y/# CONFIG_MC_EDITOR is not set/" "$OMR_TARGET/source/.config"
sed -i "s/CONFIG_MC_SUBSHELL=y/# CONFIG_MC_SUBSHELL is not set/" "$OMR_TARGET/source/.config"
sed -i "s/CONFIG_MC_CHARSET=y/# CONFIG_MC_CHARSET is not set/" "$OMR_TARGET/source/.config"
sed -i "s/CONFIG_MC_VFS=y/# CONFIG_MC_VFS is not set/" "$OMR_TARGET/source/.config"
echo "done"

# 2021-03-05 Oliver Welter <[email protected]>
fi

if [ "$OMR_TARGET" = "bpi-r1" ]; then
# Check kernel version
if [ "$OMR_KERNEL" != "5.4" ]; then
echo "Sorry, but for now kernel 5.4 is the only supported one."
exit 1
fi

# Remove the 310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th patch
echo -n "Removing unwanted patches from kernel $OMR_KERNEL..."
rm -f "$OMR_TARGET/source/target/linux/sunxi/patches-$OMR_KERNEL/310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch" >/dev/null 2>&1
echo "done"

if [ "$OMR_FORCE_DSA" = "1" ]; then
# Remove support for swconfig
echo -n "Removing swconfig support from openwrt config..."
for i in DEFAULT_swconfig PACKAGE_swconfig PACKAGE_kmod-swconfig; do
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/.config"
done
echo "done"
echo -n "Removing B53 swconfig support from kernel $OMR_KERNEL..."
for i in SWCONFIG_B53 SWCONFIG_B53_PHY_DRIVER SWCONFIG_LEDS LED_TRIGGER_PHY SWCONFIG_B53_PHY_FIXUP SWCONFIG_B53_SPI_DRIVER SWCONFIG_B53_MMAP_DRIVER SWCONFIG_B53_SRAB_DRIVER; do
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/target/linux/sunxi/config-$OMR_KERNEL"
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL"
done
echo "done"

# Add support for distributed switch architecture
echo -n "Adding B53 DSA support to kernel $OMR_KERNEL..."
for i in B53 B53_MDIO_DRIVER BRIDGE_VLAN_FILTERING MDIO_BUS_MUX_MULTIPLEXER NET_DSA NET_DSA_TAG_8021Q NET_DSA_TAG_BRCM NET_DSA_TAG_BRCM_PREPEND; do
check_sunxi_config=`grep "CONFIG_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/config-$OMR_KERNEL" || true`
check_cortexa7_config=`grep "CONFIG_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL" || true`

[ "$check_sunxi_config" = "" -a "$check_cortexa7_config" = "" ] && echo "CONFIG_${i}=y" >> "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL"
done
echo "done"

# Create DSA port map file (will be filled on first boot, by uci-defaults and tells the system, that it is in DSA mode)
touch "$OMR_TARGET/source/target/linux/sunxi/base-files/etc/dsa.map"

# Remove the b53 hack in preinit
rm -f "$OMR_TARGET/source/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh"
else
# Remove ip-bridge
echo -n "Removing ip-bridge support from openwrt config..."
for i in PACKAGE_ip-bridge; do
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/.config"
done
echo "done"

# Remove swconfig parts
echo -n "Removing unneeded B53 swconfig parts from kernel $OMR_KERNEL..."
for i in SWCONFIG_B53_PHY_FIXUP SWCONFIG_B53_SPI_DRIVER SWCONFIG_B53_MMAP_DRIVER SWCONFIG_B53_SRAB_DRIVER; do
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/target/linux/sunxi/config-$OMR_KERNEL"
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL"
done
echo "done"
fi

# Add led support
echo -n "Adding LED TRIGGER support to kernel $OMR_KERNEL..."
if [ "$OMR_FORCE_DSA" != "1" ]; then
for i in SWCONFIG_LEDS LED_TRIGGER_PHY; do
check_sunxi_config=`grep "CONFIG_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/config-$OMR_KERNEL" || true`
check_cortexa7_config=`grep "CONFIG_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL" || true`

[ "$check_sunxi_config" = "" -a "$check_cortexa7_config" = "" ] && echo "CONFIG_${i}=y" >> "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL"
done
fi
for i in TIMER ONESHOT DISK MTD HEARTBEAT BACKLIGHT CPU ACTIVITY GPIO DEFAULT_ON TRANSIENT CAMERA PANIC NETDEV PATTERN AUDIO; do
check_sunxi_config=`grep "CONFIG_LEDS_TRIGGER_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/config-$OMR_KERNEL" || true`
check_cortexa7_config=`grep "CONFIG_LEDS_TRIGGER_${i}=y" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL" || true`

[ "$check_sunxi_config" = "" -a "$check_cortexa7_config" = "" ] && echo "CONFIG_LEDS_TRIGGER_${i}=y" >> "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-$OMR_KERNEL"
done
echo "done"
fi

cd "$OMR_TARGET/source"

#if [ "$OMR_UEFI" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then
Expand Down Expand Up @@ -287,11 +383,11 @@ if ! patch -Rf -N -p1 -s --dry-run < ../../patches/download-ipv4.patch; then
fi
echo "Done"

echo "Remove check rsync"
if [ "$(grep rsync include/prereq-build.mk)" != "" ]; then
patch -N -p1 -s < ../../patches/check-rsync.patch
fi
echo "Done"
#echo "Remove check rsync"
#if [ "$(grep rsync include/prereq-build.mk)" != "" ]; then
# patch -N -p1 -s < ../../patches/check-rsync.patch
#fi
#echo "Done"

if [ -f target/linux/mediatek/patches-5.4/0999-hnat.patch ]; then
rm -f target/linux/mediatek/patches-5.4/0999-hnat.patch
Expand Down
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ CONFIG_PACKAGE_kmod-via-rhine=y
CONFIG_PACKAGE_kmod-via-velocity=y
CONFIG_PACKAGE_kmod-vmxnet3=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-macremapper=m
CONFIG_TARGET_IMAGES_PAD=y
CONFIG_TARGET_ROOTFS_EXT4=y
CONFIG_KERNEL_TCP_CONG_CDG=y
Expand Down
63 changes: 6 additions & 57 deletions config-cm520-79f
Original file line number Diff line number Diff line change
@@ -1,67 +1,16 @@
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_ipq40xx=y
CONFIG_TARGET_ipq40xx_generic=y
CONFIG_TARGET_ipq40xx_generic_DEVICE_mobipromo_cm520-79f=y
CONFIG_HAS_SUBTARGETS=y
CONFIG_HAS_DEVICES=y
CONFIG_TARGET_BOARD="ipq40xx"
CONFIG_TARGET_SUBTARGET="generic"
CONFIG_TARGET_PROFILE="DEVICE_mobipromo_cm520-79f"
CONFIG_TARGET_ARCH_PACKAGES="arm_cortex-a7_neon-vfpv4"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe"
CONFIG_CPU_TYPE="cortex-a7+neon-vfpv4"
CONFIG_LINUX_5_4=y
CONFIG_DEFAULT_ath10k-firmware-qca4019-ct=y
CONFIG_DEFAULT_base-files=y
CONFIG_DEFAULT_busybox=y
CONFIG_DEFAULT_ca-bundle=y
CONFIG_DEFAULT_dnsmasq=y
CONFIG_DEFAULT_dropbear=y
CONFIG_DEFAULT_firewall=y
CONFIG_DEFAULT_fstools=y
CONFIG_DEFAULT_ip6tables=y
CONFIG_DEFAULT_ipq-wifi-mobipromo_cm520-79f=y
CONFIG_DEFAULT_iptables=y
CONFIG_DEFAULT_iwinfo=y
CONFIG_DEFAULT_kmod-ath10k-ct=y
CONFIG_DEFAULT_kmod-gpio-button-hotplug=y
CONFIG_DEFAULT_kmod-ipt-offload=y
CONFIG_DEFAULT_kmod-leds-gpio=y
CONFIG_DEFAULT_kmod-usb-dwc3=y
CONFIG_DEFAULT_kmod-usb-dwc3-qcom=y
CONFIG_DEFAULT_kmod-usb-ledtrig-usbport=y
CONFIG_DEFAULT_kmod-usb3=y
CONFIG_DEFAULT_libc=y
CONFIG_DEFAULT_libgcc=y
CONFIG_DEFAULT_libustream-wolfssl=y
CONFIG_DEFAULT_logd=y
CONFIG_DEFAULT_mtd=y
CONFIG_DEFAULT_netifd=y
CONFIG_DEFAULT_odhcp6c=y
CONFIG_DEFAULT_odhcpd-ipv6only=y
CONFIG_DEFAULT_opkg=y
CONFIG_DEFAULT_ppp=y
CONFIG_DEFAULT_ppp-mod-pppoe=y
CONFIG_DEFAULT_procd=y
CONFIG_DEFAULT_swconfig=y
CONFIG_DEFAULT_uci=y
CONFIG_DEFAULT_uclient-fetch=y
CONFIG_DEFAULT_urandom-seed=y
CONFIG_DEFAULT_urngd=y
CONFIG_DEFAULT_wpad-basic-wolfssl=y
CONFIG_HAS_FPU=y
CONFIG_AUDIO_SUPPORT=y
CONFIG_GPIO_SUPPORT=y
CONFIG_PCI_SUPPORT=y
CONFIG_PCIE_SUPPORT=y
CONFIG_USB_SUPPORT=y
CONFIG_RTC_SUPPORT=y
CONFIG_USES_DEVICETREE=y
CONFIG_USES_INITRAMFS=y
CONFIG_USES_SQUASHFS=y
CONFIG_NAND_SUPPORT=y
CONFIG_arm=y
CONFIG_arm_v7=y
CONFIG_ARCH="arm"987
CONFIG_KERNEL_ARM_MODULE_PLTS=y
CONFIG_PACKAGE_ath10k-board-qca4019=y
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct=y
CONFIG_PACKAGE_kmod-ath10k-ct=y
CONFIG_ATH10K-CT_LEDS=y
CONFIG_KERNEL_ARM_MODULE_PLTS=y
CONFIG_KERNEL_TCP_CONG_BBR2=y
13 changes: 0 additions & 13 deletions config-p2w_r619ac

This file was deleted.

7 changes: 7 additions & 0 deletions config-ubnt-erx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ramips_mt7621_DEVICE_ubnt_edgerouter-x=y
CONFIG_PACKAGE_kmod-6lowpan=y
# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KERNEL_GPIO_SYSFS=y
Loading

0 comments on commit fc39023

Please sign in to comment.