Skip to content
Snippets Groups Projects
Select Git revision
  • 2fdd3af1cc497be7e28c40cf6465fdac804e46c5
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-06-22
  • experimental-2025-06-22-base
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
  • experimental-2025-05-15-base
  • experimental-2025-05-13
  • experimental-2025-05-13-base
  • experimental-2025-05-08
  • experimental-2025-05-08-base
  • experimental-2025-05-05
  • experimental-2025-05-05-base
  • experimental-2025-05-02
41 results

modules

Blame
  • target_config.sh 1.20 KiB
    #!/usr/bin/env bash
    
    set -e
    
    [ "$LEDE_TARGET" ] || exit 1
    
    
    output=
    profile=
    default_packages=
    profile_packages=
    
    
    LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}"
    
    
    emit() {
    	[ "${output}" ] || return 0
    	want_device "${output}" || return 0
    
    	profile_packages="${profile_packages} $(site_packages "$output")"
    
    	for package in $profile_packages; do
    		[ "${package:0:1}" = '-' ] || echo "CONFIG_PACKAGE_${package}=m"
    	done
    
    	echo "CONFIG_TARGET_DEVICE_${LEDE_CONFIG_TARGET}_DEVICE_${profile}=y"
    	echo "CONFIG_TARGET_DEVICE_PACKAGES_${LEDE_CONFIG_TARGET}_DEVICE_${profile}=\"${profile_packages}\""
    }
    
    
    . scripts/target_config.inc.sh
    
    config() {
    	echo "$1"
    }
    
    device() {
    	emit
    
    	output="$1"
    	profile="$3"
    	if [ -z "$profile" ]; then
    		profile="$2"
    	fi
    
    	profile_packages="${default_packages}"
    }
    
    packages() {
    	if [ "${output}" ]; then
    		profile_packages="${profile_packages} $@"
    	else
    		default_packages="${default_packages} $@"
    
    		for package in "$@"; do
    			if [ "${package:0:1}" = '-' ]; then
    				echo "CONFIG_PACKAGE_${package:1}=m"
    			else
    				echo "CONFIG_PACKAGE_${package}=y"
    			fi
    		done
    	fi
    }
    
    
    # The sort will not only remove duplicate entries,
    # but also magically make =y entries override =m ones
    (. targets/"$1"; emit) | sort -u