#!/bin/sh

# Copyright (C) 2024 MediaTek Inc. All rights reserved.
# Author: Weijie Gao <weijie.gao@mediatek.com>
# Top rules

# Declare substages of every stage
sub_stage_prepare="update_ab_info mk_ab_tmp pre_prepare apply_autobuild_script_patch modify_feeds_conf update_feeds \
		   mtk_feed_prepare install_feeds autobuild_prepare post_prepare"
sub_stage_build="update_ab_info pre_build do_build post_build"
sub_stage_release="pre_release do_release post_release"
sub_stage_sdk_release="pre_sdk_release do_sdk_release post_sdk_release"
sub_stage_menuconfig="do_menuconfig_update"

# Declare hooks of every substage
hooks_pre_prepare=
hooks_mtk_feed_prepare="remove_files_by_mtk_feed_list copy_mtk_feed_files apply_mtk_feed_base_patches \
			apply_mtk_feed_feed_patches"
hooks_autobuild_prepare="remove_files_by_global_list copy_global_files apply_global_patches \
			 remove_files_by_platform_list copy_platform_files apply_platform_patches \
			 remove_files_by_wifi_list copy_wifi_files apply_wifi_patches \
			 remove_files_by_sku_list copy_sku_files apply_sku_patches \
			 remove_files_by_variant_list copy_variant_files apply_variant_patches \
			 prepare_wifi_driver prepare_openwrt_config platform_change_openwrt_config \
			 wifi_change_openwrt_config sku_change_openwrt_config variant_change_openwrt_config \
			 enable_openwrt_collect_debug_symbols make_defconfig update_target_info \
			 platform_change_kernel_config wifi_change_kernel_config sku_change_kernel_config \
			 variant_change_kernel_config enable_kernel_proc_config_gz"
hooks_post_prepare="prepare_stamp"

hooks_pre_build=
hooks_do_build="download_openwrt_packages build_openwrt"
hooks_post_build=

hooks_pre_release="update_target_info mk_ab_bin_release"
hooks_do_release="collect_openwrt_images collect_openwrt_configs collect_kernel_debug_symbols \
		      collect_userspace_debug_symbols collect_feeds_buildinfo"
hooks_post_release=

hooks_pre_sdk_release=
hooks_do_sdk_release="release_openwrt_sdk"
hooks_post_sdk_release=

# Global information
build_time=
internal_build=
mtk_feed_path=
kernel_ver=
target_name=
subtarget_name=

openwrt_bin_dir=
openwrt_config_file=
kernel_config_file=

# Generic function for modifying openwrt config, to be compliant with menuconfig
# $1:	Config name
openwrt_config_disable() {
	if test -z "${do_menuconfig}"; then
		if kconfig_enabled "${openwrt_config_file}" "${1}"; then
			kconfig_disable "${openwrt_config_file}" "${1}"
		fi
	fi
}

# $1:	Config name
# $2:	Value to be set for config (y if not specified)
openwrt_config_enable() {
	if test -z "${do_menuconfig}"; then
		if ! kconfig_enabled "${openwrt_config_file}" "${1}"; then
			kconfig_enable "${openwrt_config_file}" "${1}" "${2}"
		fi
	fi
}

# $1:	Config name
openwrt_config_enabled() {
	kconfig_enabled "${openwrt_config_file}" "${1}"
}

# Generic function for modifying target's kernel config
# $1:	Config name
kernel_config_disable() {
	if kconfig_enabled "${kernel_config_file}" "${1}"; then
		kconfig_disable "${kernel_config_file}" "${1}"
	fi
}

# $1:	Config name
# $2:	Value to be set for config (y if not specified)
kernel_config_enable() {
	if ! kconfig_enabled "${kernel_config_file}" "${1}"; then
		kconfig_enable "${kernel_config_file}" "${1}" "${2}"
	fi
}

# $1:	Config name
kernel_config_enabled() {
	kconfig_enabled "${kernel_config_file}" "${1}"
}

# Whether this is for internal build
update_ab_info() {
	if test -z "${internal_build}"; then
		if test -d "${openwrt_root}/../mtk-openwrt-feeds"; then
			log_dbg "Internal repo build mode"
			internal_build=1
		fi
	fi
}

# Create the ${ab_tmp} directory
mk_ab_tmp() {
	exec_log "mkdir -p \"${ab_tmp}\""
}

# Modify scripts for specific features:
# 1. allow specify feed subdirectory for scanning
# 2. allow config merging and diff
apply_autobuild_script_patch() {
	copy_files "${ab_root}/scripts/${openwrt_branch}/files"
	apply_patches "${ab_root}/scripts/${openwrt_branch}/patches"
}

modify_feeds_conf() {
	local rev_file_list=
	local feed_rev=
	local feed_url="https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds"

	# Backup original feeds
	exec_log "cp -f \"${openwrt_root}/feeds.conf.default\" \"${ab_tmp}/\""

	# Modify feeds
	openwrt_feeds_replace_url packages https://gerrit.mediatek.inc/openwrt/feeds/packages
	openwrt_feeds_replace_url luci https://gerrit.mediatek.inc/openwrt/feeds/luci
	openwrt_feeds_replace_url routing https://gerrit.mediatek.inc/openwrt/feeds/routing
	openwrt_feeds_disable telephony
	openwrt_feeds_change_src_git_type packages 0
	openwrt_feeds_change_src_git_type luci 0
	openwrt_feeds_change_src_git_type routing 0

	# Add mtk-openwrt-feeds
	[ -n "${ab_variant_dir}" ] && list_append rev_file_list "${ab_variant_dir}/feed_revision"
	[ -n "${ab_sku_dir}" ] && list_append rev_file_list "${ab_sku_dir}/feed_revision"
	[ -n "${ab_wifi_dir}" ] && list_append rev_file_list "${ab_wifi_dir}/feed_revision"
	[ -n "${ab_platform_dir}" ] && list_append rev_file_list "${ab_platform_dir}/feed_revision"
	list_append rev_file_list "${ab_root}/feed_revision"

	for rev_file in ${rev_file_list}; do
		if test -f "${rev_file}"; then
			feed_rev=$(cat "${rev_file}")
			break;
		fi
	done

	[ -n "${feed_rev}" ] && feed_rev="^${feed_rev}"

	if test -n "${internal_build}"; then
		feed_url="${openwrt_root}/../mtk-openwrt-feeds"
	fi

	if test -n "${internal_build}" -a -z "${feed_rev}"; then
		openwrt_feeds_add mtk_openwrt_feed src-link "${feed_url}" --subdir=feed
	else
		openwrt_feeds_add mtk_openwrt_feed src-git "${feed_url}${feed_rev}" --subdir=feed
	fi
}

update_feeds() {
	exec_log "${openwrt_root}/scripts/feeds update -a -r -s"

	mtk_feed_path=${openwrt_root}/feeds/mtk_openwrt_feed
}

remove_files_by_mtk_feed_list() {
	remove_files_from_list "${mtk_feed_path}/common/remove_list.txt"
	remove_files_from_list "${mtk_feed_path}/${openwrt_branch}/remove_list.txt"
}

copy_mtk_feed_files() {
	copy_files "${mtk_feed_path}/common/files"
	copy_files "${mtk_feed_path}/tools" tools
	copy_files "${mtk_feed_path}/${openwrt_branch}/files"
}

apply_mtk_feed_base_patches() {
	apply_patches "${mtk_feed_path}/${openwrt_branch}/patches-base"
}

apply_mtk_feed_feed_patches() {
	apply_patches "${mtk_feed_path}/${openwrt_branch}/patches-feeds"
}

install_feeds() {
	exec_log "${openwrt_root}/scripts/feeds install -a"
}

remove_files_by_global_list() {
	remove_files_from_list "${ab_global}/common/remove_list.txt"
	remove_files_from_list "${ab_global}/${openwrt_branch}/remove_list.txt"
}

copy_global_files() {
	copy_files "${ab_global}/common/files"
	copy_files "${ab_global}/${openwrt_branch}/files"
}

apply_global_patches() {
	apply_patches "${ab_global}/${openwrt_branch}/patches-base" || return 1
	apply_patches "${ab_global}/${openwrt_branch}/patches-feeds" || return 1
	apply_patches "${ab_global}/${openwrt_branch}/patches" || return 1
}

remove_files_by_platform_list() {
	remove_files_from_list "${ab_platform_dir}/remove_list.txt"
	remove_files_from_list "${ab_platform_dir}/${openwrt_branch}/remove_list.txt"
}

copy_platform_files() {
	copy_files "${ab_platform_dir}/files"
	copy_files "${ab_platform_dir}/${openwrt_branch}/files"
}

apply_platform_patches() {
	apply_patches "${ab_platform_dir}/${openwrt_branch}/patches-base" || return 1
	apply_patches "${ab_platform_dir}/${openwrt_branch}/patches-feeds" || return 1
	apply_patches "${ab_platform_dir}/${openwrt_branch}/patches" || return 1
}

remove_files_by_wifi_list() {
	if test -n "${ab_wifi_dir}"; then
		remove_files_from_list "${ab_wifi_dir}/remove_list.txt"
		remove_files_from_list "${ab_wifi_dir}/${openwrt_branch}/remove_list.txt"
	fi
}

copy_wifi_files() {
	if test -n "${ab_wifi_dir}"; then
		copy_files "${ab_wifi_dir}/files"
		copy_files "${ab_wifi_dir}/${openwrt_branch}/files"
	fi
}

apply_wifi_patches() {
	if test -n "${ab_wifi_dir}"; then
		apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches-base" || return 1
		apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches-feeds" || return 1
		apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches" || return 1
	fi
}

remove_files_by_sku_list() {
	if test -n "${ab_sku_dir}"; then
		remove_files_from_list "${ab_sku_dir}/remove_list.txt"
		remove_files_from_list "${ab_sku_dir}/${openwrt_branch}/remove_list.txt"
	fi
}

copy_sku_files() {
	if test -n "${ab_sku_dir}"; then
		copy_files "${ab_sku_dir}/files"
		copy_files "${ab_sku_dir}/${openwrt_branch}/files"
	fi
}

apply_sku_patches() {
	if test -n "${ab_sku_dir}"; then
		apply_patches "${ab_sku_dir}/${openwrt_branch}/patches-base" || return 1
		apply_patches "${ab_sku_dir}/${openwrt_branch}/patches-feeds" || return 1
		apply_patches "${ab_sku_dir}/${openwrt_branch}/patches" || return 1
	fi
}

remove_files_by_variant_list() {
	if test -n "${ab_variant_dir}"; then
		remove_files_from_list "${ab_sku_dir}/remove_list.txt"
		remove_files_from_list "${ab_sku_dir}/${openwrt_branch}/remove_list.txt"
	fi
}

copy_variant_files() {
	if test -n "${ab_variant_dir}"; then
		copy_files "${ab_variant_dir}/files"
		copy_files "${ab_variant_dir}/${openwrt_branch}/files"
	fi
}

apply_variant_patches() {
	if test -n "${ab_variant_dir}"; then
		apply_patches "${ab_variant_dir}/${openwrt_branch}/patches-base" || return 1
		apply_patches "${ab_variant_dir}/${openwrt_branch}/patches-feeds" || return 1
		apply_patches "${ab_variant_dir}/${openwrt_branch}/patches" || return 1
	fi
}

# prepare_wifi_driver() { } Implemented by wifi inclusion

prepare_openwrt_config() {
	local kconfig_files=

	exec_log "make -C \"${openwrt_root}\" prereq scripts/config/aconf"

	openwrt_config_file="${openwrt_root}/.config"

	kconfig_files="\"${ab_platform_dir}/${openwrt_branch}/defconfig\""

	if test ${ab_branch_level} -ge 2; then
		kconfig_files="${kconfig_files} \"${ab_wifi_dir}/${openwrt_branch}/defconfig\""
	fi

	if test ${ab_branch_level} -ge 3; then
		kconfig_files="${kconfig_files} \"${ab_sku_dir}/${openwrt_branch}/defconfig\""
	fi

	if test ${ab_branch_level} -ge 4; then
		kconfig_files="${kconfig_files} \"${ab_variant_dir}/${openwrt_branch}/defconfig\""
	fi

	exec_log "rm -f \"${openwrt_config_file}.old\""
	exec_log "STAGING_DIR_HOST=\"${openwrt_root}/staging_dir/host\" \"${openwrt_root}/scripts/config/aconf\" -m -o \"${openwrt_config_file}\" -k \"${openwrt_root}/Config.in\" ${kconfig_files}"

	# for debug purpose
	exec_log "cp -f \"${openwrt_config_file}\" \"${ab_tmp}/${ab_branch}.config\""
	exec_log "STAGING_DIR_HOST=\"${openwrt_root}/staging_dir/host\" \"${openwrt_root}/scripts/config/aconf\" -m -M -o \"${ab_tmp}/${ab_branch}_defconfig\" -k \"${openwrt_root}/Config.in\" ${kconfig_files}"
}

# {platform,wifi,sku,variant}_change_openwrt_config() { } Implemented by platform sub levels

enable_openwrt_collect_debug_symbols() {
	openwrt_config_enable CONFIG_COLLECT_KERNEL_DEBUG
	openwrt_config_enable CONFIG_DEBUG
	openwrt_config_disable CONFIG_KERNEL_DEBUG_INFO_REDUCED
}

make_defconfig() {
	if test -f "${ab_tmp}/.config.prev" -a -f "${openwrt_root}/.config"; then
		if ! cmp -s "${ab_tmp}/.config.prev" "${openwrt_root}/.config"; then
			exec_log "make -C \"${openwrt_root}\" defconfig"
		fi
	fi
}

__target_info_updated=

update_target_info() {
	[ -n "${__target_info_updated}" ] && return 0

	target_name=$(openwrt_get_target_name)
	subtarget_name=$(openwrt_get_subtarget_name)

	if test -z "${target_name}"; then
		log_err "Failed to get OpenWrt's target name"
		return 1
	fi

	log_info "Target name: ${target_name}"
	[ -n "${subtarget_name}" ] && log_info "Subtarget name: ${subtarget_name}"

	openwrt_bin_dir=$(openwrt_get_bin_dir)

	if test -z "${openwrt_bin_dir}"; then
		log_err "Failed to get OpenWrt's bin directory"
		return 1
	fi

	log_dbg "Target bin dir: ${openwrt_bin_dir}"

	kernel_ver=$(openwrt_get_target_kernel_version ${target_name})

	if test -z "${kernel_ver}"; then
		log_err "Failed to get OpenWrt's target kernel version"
		return 1
	else
		log_info "Target kernel version: ${kernel_ver}"
	fi

	if test -n ${subtarget_name}; then
		if test -f "${openwrt_root}/target/linux/${target_name}/${subtarget_name}/config-${kernel_ver}"; then
			kernel_config_file="${openwrt_root}/target/linux/${target_name}/${subtarget_name}/config-${kernel_ver}"
		fi
	fi

	if test -z ${kernel_config_file}; then
		if test -f "${openwrt_root}/target/linux/${target_name}/config-${kernel_ver}"; then
			kernel_config_file="${openwrt_root}/target/linux/${target_name}/config-${kernel_ver}"
		fi
	fi

	if test -z ${kernel_config_file}; then
		log_err "Unable to find target's kernel config file"
		return 1
	fi

	log_dbg "Target kernel config file: ${kernel_config_file}"

	__target_info_updated=1
}

# {platform,wifi,sku,variant}_change_kernel_config() { } Implemented by platform sub levels

enable_kernel_proc_config_gz() {
	kernel_config_enable CONFIG_IKCONFIG
	kernel_config_enable CONFIG_IKCONFIG_PROC
}

prepare_stamp() {
	if test -n "${do_menuconfig}"; then
		touch "${ab_tmp}/.stamp.menuconfig"
	else
		rm -f "${ab_tmp}/.stamp.menuconfig"
	fi

	echo -n "${ab_branch}" > "${ab_tmp}/branch_name"
	echo -n "${ab_cmdline}" > "${ab_tmp}/cmdline"
}

download_openwrt_packages() {
	if test x"${internal_build}" = x"1"; then
		if test -d "${openwrt_root}/../dl"; then
			if ! test -d "${openwrt_root}/dl" -o -L "${openwrt_root}/dl"; then
				exec_log "ln -sf ../dl \"${openwrt_root}/dl\""
			fi
		fi
	fi

	exec_log "make -C \"${openwrt_root}\" V=1 -j\$((\$(nproc) + 1)) download"
}

build_openwrt() {
	local ret=
	local verbose=1

	if test x"${debug_set}" = x"yes"; then
		verbose=s
	fi

	build_time=$(date +%Y%m%d%H%M%S)

	exec_log "make -C \"${openwrt_root}\" V=${verbose} -j\$((\$(nproc) + 1))"

	ret=$?

	if test ${ret} != 0; then
		log_warn "Build failed with error code ${ret}."
		log_warn "Restart single-threaded building for debugging purpose."

		exec_log "make -C \"${openwrt_root}\" V=s -j1"

		ret=$?

		if test ${ret} != 0; then
			log_err "Debug build failed with error code ${ret}."
			return 1
		fi
	fi

	log_info "OpenWrt built successfully"
}

# Create the ${ab_bin_release} directory
mk_ab_bin_release() {
	exec_log "mkdir -p \"${ab_bin_release}\""
}

collect_openwrt_images() {
	local file_count=0
	local files=

	if [ -z "${build_time}" ]; then
		build_time=$(date +%Y%m%d%H%M%S)
	fi

	files=$(find "${openwrt_bin_dir}" -maxdepth 1 -name '*.bin' -o -name "*.img" -o -name '*.itb' -o -name '*.gz')

	for file in ${files}; do
		local file_no_ext=${file%.*}
		local file_name=${file_no_ext##*/}
		local file_ext=${file##*.}

		exec_log "cp -rf \"${file}\" \"${ab_bin_release}/${file_name}-${build_time}.${file_ext}\""
		((file_count++))
	done

	log_info "Total ${file_count} image files copied."
}

collect_openwrt_configs() {
	local linux_dir=$(openwrt_get_target_kernel_linux_build_dir ${target_name})

	exec_log "cp -f \"${openwrt_root}/.config\" \"${ab_bin_release}/openwrt.config\""

	if test -z "${linux_dir}"; then
		log_warn "Failed to get OpenWrt's linux kernel build directory"
	else
		local kernel_config_data="${linux_dir}/kernel/config_data"

		if [ -f "${kernel_config_data}" ]; then
			exec_log "cp -f \"${kernel_config_data}\" \"${ab_bin_release}/kernel.config\""
		fi
	fi
}

collect_kernel_debug_symbols() {
	if [ -f "${openwrt_bin_dir}/kernel-debug.tar.zst" ]; then
		exec_log "cp -f \"${openwrt_bin_dir}/kernel-debug.tar.zst\" \"${ab_bin_release}/\""
	fi
}

collect_userspace_debug_symbols() {
	local staging_dir_root=$(openwrt_get_staging_dir_root)

	log_dbg "Staging dir root: ${staging_dir_root}"

	if test -d "${staging_dir_root}"; then
		staging_dir_root_prefix=$(dirname "${staging_dir_root}")
		staging_dir_root_name=$(basename "${staging_dir_root}")

		if test -x "${openwrt_root}/staging_dir/host/bin/zstd"; then
			exec_log "tar -c -C \"${staging_dir_root_prefix}\" \"${staging_dir_root_name}\" | \"${openwrt_root}/staging_dir/host/bin/zstd\" -T0 -f -o \"${ab_bin_release}/rootfs-debug.tar.zst\""
		else
			exec_log "tar -jcf \"${ab_bin_release}/rootfs-debug.tar.bz2\" -C \"${staging_dir_root_prefix}\" \"${staging_dir_root_name}\""
		fi
	fi
}

collect_feeds_buildinfo() {
	if [ -f "${openwrt_bin_dir}/feeds.buildinfo" ]; then
		exec_log "cp -f \"${openwrt_bin_dir}/feeds.buildinfo\" \"${ab_bin_release}/\""
	fi
}

do_menuconfig_update() {
	local kconfig_files=
	local final_file=

	openwrt_config_file="${openwrt_root}/.config"

	exec_log "make -C \"${openwrt_root}\" menuconfig scripts/config/aconf"

	if test ${ab_branch_level} -eq 1; then
		exec_log "STAGING_DIR_HOST=\"${openwrt_root}/staging_dir/host\" \"${openwrt_root}/scripts/config/aconf\" -m -M -o \"${ab_platform_dir}/${openwrt_branch}/defconfig\" -k \"${openwrt_root}/Config.in\" \"${openwrt_config_file}\""
		return
	fi

	if test ${ab_branch_level} -ge 2; then
		kconfig_files="\"${ab_platform_dir}/${openwrt_branch}/defconfig\""
		final_file="${ab_wifi_dir}/${openwrt_branch}/defconfig"
	fi

	if test ${ab_branch_level} -ge 3; then
		kconfig_files="${kconfig_files} \"${final_file}\""
		final_file="${ab_sku_dir}/${openwrt_branch}/defconfig"
	fi

	if test ${ab_branch_level} -ge 4; then
		kconfig_files="${kconfig_files} \"${final_file}\""
		final_file="${ab_variant_dir}/${openwrt_branch}/defconfig"
	fi

	exec_log "STAGING_DIR_HOST=\"${openwrt_root}/staging_dir/host\" \"${openwrt_root}/scripts/config/aconf\" -d -o \"${final_file}\" -k \"${openwrt_root}/Config.in\" -n \"${openwrt_config_file}\" ${kconfig_files}"
}
