blob: 449fb3de6581a6b18e8c5481429dd8d7316ca250 [file] [log] [blame]
developer782bc7f2024-08-23 15:39:22 +08001#!/bin/sh
2
3# Copyright (C) 2024 MediaTek Inc. All rights reserved.
4# Author: Weijie Gao <weijie.gao@mediatek.com>
5# Top rules
6
7# Declare substages of every stage
8sub_stage_prepare="mk_ab_tmp pre_prepare apply_feed_script_patch modify_feeds_conf update_feeds \
9 mtk_feed_prepare install_feeds autobuild_prepare post_prepare"
10sub_stage_build="pre_build do_build post_build"
11sub_stage_release="pre_release do_release post_release"
12sub_stage_sdk_release="pre_sdk_release do_sdk_release post_sdk_release"
13sub_stage_menuconfig="do_menuconfig_update"
14
15# Declare hooks of every substage
16hooks_pre_prepare=
17hooks_mtk_feed_prepare="remove_files_by_mtk_feed_list copy_mtk_feed_files apply_mtk_feed_base_patches \
18 apply_mtk_feed_feed_patches"
19hooks_autobuild_prepare="remove_files_by_global_list copy_global_files apply_global_patches \
20 remove_files_by_platform_list copy_platform_files apply_platform_patches \
21 remove_files_by_wifi_list copy_wifi_files apply_wifi_patches \
22 remove_files_by_sku_list copy_sku_files apply_sku_patches \
23 remove_files_by_variant_list copy_variant_files apply_variant_patches \
24 prepare_wifi_driver prepare_openwrt_config platform_change_openwrt_config \
25 wifi_change_openwrt_config sku_change_openwrt_config variant_change_openwrt_config \
26 enable_openwrt_collect_debug_symbols make_defconfig update_target_info \
27 platform_change_kernel_config wifi_change_kernel_config sku_change_kernel_config \
28 variant_change_kernel_config enable_kernel_proc_config_gz"
29hooks_post_prepare="prepare_stamp"
30
31hooks_pre_build=
32hooks_do_build="download_openwrt_packages build_openwrt"
33hooks_post_build=
34
35hooks_pre_release="update_target_info mk_ab_bin_release"
36hooks_do_release="collect_openwrt_images collect_openwrt_configs collect_kernel_debug_symbols \
37 collect_userspace_debug_symbols collect_feeds_buildinfo"
38hooks_post_release=
39
40hooks_pre_sdk_release=
41hooks_do_sdk_release="release_openwrt_sdk"
42hooks_post_sdk_release=
43
44# Global information
45build_time=
46internal_build=
47mtk_feed_path=
48kernel_ver=
49target_name=
50subtarget_name=
51
52openwrt_bin_dir=
53openwrt_config_file=
54kernel_config_file=
55
56# Generic function for modifying openwrt config, to be compliant with menuconfig
57# $1: Config name
58openwrt_config_disable() {
59 if test -z "${do_menuconfig}"; then
60 if kconfig_enabled "${openwrt_config_file}" "${1}"; then
61 kconfig_disable "${openwrt_config_file}" "${1}"
62 fi
63 fi
64}
65
66# $1: Config name
67# $2: Value to be set for config (y if not specified)
68openwrt_config_enable() {
69 if test -z "${do_menuconfig}"; then
70 if ! kconfig_enabled "${openwrt_config_file}" "${1}"; then
71 kconfig_enable "${openwrt_config_file}" "${1}" "${2}"
72 fi
73 fi
74}
75
76# $1: Config name
77openwrt_config_enabled() {
78 kconfig_enabled "${openwrt_config_file}" "${1}"
79}
80
81# Generic function for modifying target's kernel config
82# $1: Config name
83kernel_config_disable() {
84 if kconfig_enabled "${kernel_config_file}" "${1}"; then
85 kconfig_disable "${kernel_config_file}" "${1}"
86 fi
87}
88
89# $1: Config name
90# $2: Value to be set for config (y if not specified)
91kernel_config_enable() {
92 if ! kconfig_enabled "${kernel_config_file}" "${1}"; then
93 kconfig_enable "${kernel_config_file}" "${1}" "${2}"
94 fi
95}
96
97# $1: Config name
98kernel_config_enabled() {
99 kconfig_enabled "${kernel_config_file}" "${1}"
100}
101
102# Create the ${ab_tmp} directory
103mk_ab_tmp() {
104 exec_log "mkdir -p \"${ab_tmp}\""
105}
106
107# Modify scripts/feed to allow specify subdirectory for scanning
108apply_feed_script_patch() {
109 apply_patch "${ab_root}/scripts/${openwrt_branch}/scripts-feeds-support-subdir.patch"
110}
111
112modify_feeds_conf() {
113 local rev_file_list=
114 local feed_rev=
115 local feed_url="https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds"
116
117 # Backup original feeds
118 exec_log "cp -f \"${openwrt_root}/feeds.conf.default\" \"${ab_tmp}/\""
119
120 # Modify feeds
121 openwrt_feeds_replace_url packages https://gerrit.mediatek.inc/openwrt/feeds/packages
122 openwrt_feeds_replace_url luci https://gerrit.mediatek.inc/openwrt/feeds/luci
123 openwrt_feeds_replace_url routing https://gerrit.mediatek.inc/openwrt/feeds/routing
124 openwrt_feeds_disable telephony
125 openwrt_feeds_change_src_git_type packages 0
126 openwrt_feeds_change_src_git_type luci 0
127 openwrt_feeds_change_src_git_type routing 0
128
129 # Add mtk-openwrt-feeds
130 [ -n "${ab_variant_dir}" ] && list_append rev_file_list "${ab_variant_dir}/feed_revision"
131 [ -n "${ab_sku_dir}" ] && list_append rev_file_list "${ab_sku_dir}/feed_revision"
132 [ -n "${ab_wifi_dir}" ] && list_append rev_file_list "${ab_wifi_dir}/feed_revision"
133 [ -n "${ab_platform_dir}" ] && list_append rev_file_list "${ab_platform_dir}/feed_revision"
134 list_append rev_file_list "${ab_root}/feed_revision"
135
136 for rev_file in ${rev_file_list}; do
137 if test -f "${rev_file}"; then
138 feed_rev=$(cat "${rev_file}")
139 break;
140 fi
141 done
142
143 [ -n "${feed_rev}" ] && feed_rev="^${feed_rev}"
144
145 if test -d "${openwrt_root}/../mtk-openwrt-feeds"; then
146 feed_url="${openwrt_root}/../mtk-openwrt-feeds"
147 internal_build=1
148
149 log_dbg "Internal repo build mode"
150 fi
151
152 if test -n "${internal_build}" -a -z "${feed_rev}"; then
153 openwrt_feeds_add mtk_openwrt_feed src-link "${feed_url}" --subdir=feed
154 else
155 openwrt_feeds_add mtk_openwrt_feed src-git "${feed_url}${feed_rev}" --subdir=feed
156 fi
157}
158
159update_feeds() {
160 exec_log "${openwrt_root}/scripts/feeds update -a"
161
162 mtk_feed_path=${openwrt_root}/feeds/mtk_openwrt_feed
163}
164
165remove_files_by_mtk_feed_list() {
166 remove_files_from_list "${mtk_feed_path}/common/remove_list.txt"
167 remove_files_from_list "${mtk_feed_path}/${openwrt_branch}/remove_list.txt"
168}
169
170copy_mtk_feed_files() {
171 copy_files "${mtk_feed_path}/common/files"
172 copy_files "${mtk_feed_path}/tools" tools
173 copy_files "${mtk_feed_path}/${openwrt_branch}/files"
174}
175
176apply_mtk_feed_base_patches() {
177 apply_patches "${mtk_feed_path}/${openwrt_branch}/patches-base"
178}
179
180apply_mtk_feed_feed_patches() {
181 apply_patches "${mtk_feed_path}/${openwrt_branch}/patches-feeds"
182}
183
184install_feeds() {
185 exec_log "${openwrt_root}/scripts/feeds install -a"
186}
187
188remove_files_by_global_list() {
189 remove_files_from_list "${ab_global}/common/remove_list.txt"
190 remove_files_from_list "${ab_global}/${openwrt_branch}/remove_list.txt"
191}
192
193copy_global_files() {
194 copy_files "${ab_global}/common/files"
195 copy_files "${ab_global}/${openwrt_branch}/files"
196}
197
198apply_global_patches() {
199 apply_patches "${ab_global}/${openwrt_branch}/patches-base" || return 1
200 apply_patches "${ab_global}/${openwrt_branch}/patches-feeds" || return 1
201 apply_patches "${ab_global}/${openwrt_branch}/patches" || return 1
202}
203
204remove_files_by_platform_list() {
205 remove_files_from_list "${ab_platform_dir}/remove_list.txt"
206 remove_files_from_list "${ab_platform_dir}/${openwrt_branch}/remove_list.txt"
207}
208
209copy_platform_files() {
210 copy_files "${ab_platform_dir}/files"
211 copy_files "${ab_platform_dir}/${openwrt_branch}/files"
212}
213
214apply_platform_patches() {
215 apply_patches "${ab_platform_dir}/${openwrt_branch}/patches-base" || return 1
216 apply_patches "${ab_platform_dir}/${openwrt_branch}/patches-feeds" || return 1
217 apply_patches "${ab_platform_dir}/${openwrt_branch}/patches" || return 1
218}
219
220remove_files_by_wifi_list() {
221 if test -n "${ab_wifi_dir}"; then
222 remove_files_from_list "${ab_wifi_dir}/remove_list.txt"
223 remove_files_from_list "${ab_wifi_dir}/${openwrt_branch}/remove_list.txt"
224 fi
225}
226
227copy_wifi_files() {
228 if test -n "${ab_wifi_dir}"; then
229 copy_files "${ab_wifi_dir}/files"
230 copy_files "${ab_wifi_dir}/${openwrt_branch}/files"
231 fi
232}
233
234apply_wifi_patches() {
235 if test -n "${ab_wifi_dir}"; then
236 apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches-base" || return 1
237 apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches-feeds" || return 1
238 apply_patches "${ab_wifi_dir}/${openwrt_branch}/patches" || return 1
239 fi
240}
241
242remove_files_by_sku_list() {
243 if test -n "${ab_sku_dir}"; then
244 remove_files_from_list "${ab_sku_dir}/remove_list.txt"
245 remove_files_from_list "${ab_sku_dir}/${openwrt_branch}/remove_list.txt"
246 fi
247}
248
249copy_sku_files() {
250 if test -n "${ab_sku_dir}"; then
251 copy_files "${ab_sku_dir}/files"
252 copy_files "${ab_sku_dir}/${openwrt_branch}/files"
253 fi
254}
255
256apply_sku_patches() {
257 if test -n "${ab_sku_dir}"; then
258 apply_patches "${ab_sku_dir}/${openwrt_branch}/patches-base" || return 1
259 apply_patches "${ab_sku_dir}/${openwrt_branch}/patches-feeds" || return 1
260 apply_patches "${ab_sku_dir}/${openwrt_branch}/patches" || return 1
261 fi
262}
263
264remove_files_by_variant_list() {
265 if test -n "${ab_variant_dir}"; then
266 remove_files_from_list "${ab_sku_dir}/remove_list.txt"
267 remove_files_from_list "${ab_sku_dir}/${openwrt_branch}/remove_list.txt"
268 fi
269}
270
271copy_variant_files() {
272 if test -n "${ab_variant_dir}"; then
273 copy_files "${ab_variant_dir}/files"
274 copy_files "${ab_variant_dir}/${openwrt_branch}/files"
275 fi
276}
277
278apply_variant_patches() {
279 if test -n "${ab_variant_dir}"; then
280 apply_patches "${ab_variant_dir}/${openwrt_branch}/patches-base" || return 1
281 apply_patches "${ab_variant_dir}/${openwrt_branch}/patches-feeds" || return 1
282 apply_patches "${ab_variant_dir}/${openwrt_branch}/patches" || return 1
283 fi
284}
285
286# prepare_wifi_driver() { } Implemented by wifi inclusion
287
288prepare_openwrt_config() {
289 local kconfig_expr=
290 local kconfig_files="\"${ab_platform_dir}/${openwrt_branch}/defconfig\""
291
292 openwrt_config_file="${openwrt_root}/.config"
293
294 if test ${ab_branch_level} -ge 2; then
295 kconfig_expr="${kconfig_expr} +"
296 kconfig_files="${kconfig_files} \"${ab_wifi_dir}/${openwrt_branch}/defconfig\""
297
298 if test -f "${ab_wifi_dir}/${openwrt_branch}/defconfig_forced"; then
299 kconfig_expr="${kconfig_expr} +"
300 kconfig_files="${kconfig_files} \"${ab_wifi_dir}/${openwrt_branch}/defconfig_forced\""
301 fi
302 fi
303
304 if test ${ab_branch_level} -ge 3; then
305 kconfig_expr="${kconfig_expr} +"
306 kconfig_files="${kconfig_files} \"${ab_sku_dir}/${openwrt_branch}/defconfig\""
307
308 if test -f "${ab_sku_dir}/${openwrt_branch}/defconfig_forced"; then
309 kconfig_expr="${kconfig_expr} +"
310 kconfig_files="${kconfig_files} \"${ab_sku_dir}/${openwrt_branch}/defconfig_forced\""
311 fi
312 fi
313
314 if test ${ab_branch_level} -ge 4; then
315 kconfig_expr="${kconfig_expr} +"
316 kconfig_files="${kconfig_files} \"${ab_variant_dir}/${openwrt_branch}/defconfig\""
317
318 if test -f "${ab_variant_dir}/${openwrt_branch}/defconfig_forced"; then
319 kconfig_expr="${kconfig_expr} +"
320 kconfig_files="${kconfig_files} \"${ab_variant_dir}/${openwrt_branch}/defconfig_forced\""
321 fi
322 fi
323
324 if test -n "${kconfig_expr}" -a -n "${kconfig_files}"; then
325 exec_log "\"${openwrt_root}/scripts/kconfig.pl\" ${kconfig_expr} ${kconfig_files} > \"${ab_tmp}/.config\"" 1
326 else
327 exec_log "cp ${kconfig_files} \"${ab_tmp}/.config\""
328 fi
329
330 exec_log "rm -f \"${openwrt_root}/.config.old\""
331 exec_log "make -C \"${openwrt_root}\" -f \"${ab_root}/scripts/openwrt_kconfig.mk\" loaddefconfig CONFIG_FILE=\"${ab_tmp}/.config\""
332 exec_log "cp -f \"${openwrt_root}/.config\" \"${ab_tmp}/.config.prev\""
333}
334
335# {platform,wifi,sku,variant}_change_openwrt_config() { } Implemented by platform sub levels
336
337enable_openwrt_collect_debug_symbols() {
338 openwrt_config_enable CONFIG_COLLECT_KERNEL_DEBUG
339 openwrt_config_enable CONFIG_DEBUG
340 openwrt_config_disable CONFIG_KERNEL_DEBUG_INFO_REDUCED
341}
342
343make_defconfig() {
344 if test -f "${ab_tmp}/.config.prev" -a -f "${openwrt_root}/.config"; then
345 if ! cmp -s "${ab_tmp}/.config.prev" "${openwrt_root}/.config"; then
346 exec_log "make -C \"${openwrt_root}\" defconfig"
347 fi
348 fi
349}
350
351__target_info_updated=
352
353update_target_info() {
354 [ -n "${__target_info_updated}" ] && return 0
355
356 target_name=$(openwrt_get_target_name)
357 subtarget_name=$(openwrt_get_subtarget_name)
358
359 if test -z "${target_name}"; then
360 log_err "Failed to get OpenWrt's target name"
361 return 1
362 fi
363
364 log_info "Target name: ${target_name}"
365 [ -n "${subtarget_name}" ] && log_info "Subtarget name: ${subtarget_name}"
366
367 openwrt_bin_dir=$(openwrt_get_bin_dir)
368
369 if test -z "${openwrt_bin_dir}"; then
370 log_err "Failed to get OpenWrt's bin directory"
371 return 1
372 fi
373
374 log_dbg "Target bin dir: ${openwrt_bin_dir}"
375
376 kernel_ver=$(openwrt_get_target_kernel_version ${target_name})
377
378 if test -z "${kernel_ver}"; then
379 log_err "Failed to get OpenWrt's target kernel version"
380 return 1
381 else
382 log_info "Target kernel version: ${kernel_ver}"
383 fi
384
385 if test -n ${subtarget_name}; then
386 if test -f "${openwrt_root}/target/linux/${target_name}/${subtarget_name}/config-${kernel_ver}"; then
387 kernel_config_file="${openwrt_root}/target/linux/${target_name}/${subtarget_name}/config-${kernel_ver}"
388 fi
389 fi
390
391 if test -z ${kernel_config_file}; then
392 if test -f "${openwrt_root}/target/linux/${target_name}/config-${kernel_ver}"; then
393 kernel_config_file="${openwrt_root}/target/linux/${target_name}/config-${kernel_ver}"
394 fi
395 fi
396
397 if test -z ${kernel_config_file}; then
398 log_err "Unable to find target's kernel config file"
399 return 1
400 fi
401
402 log_dbg "Target kernel config file: ${kernel_config_file}"
403
404 __target_info_updated=1
405}
406
407# {platform,wifi,sku,variant}_change_kernel_config() { } Implemented by platform sub levels
408
409enable_kernel_proc_config_gz() {
410 kernel_config_enable CONFIG_IKCONFIG
411 kernel_config_enable CONFIG_IKCONFIG_PROC
412}
413
414prepare_stamp() {
415 if test -n "${do_menuconfig}"; then
416 touch "${ab_tmp}/.stamp.menuconfig"
417 else
418 rm -f "${ab_tmp}/.stamp.menuconfig"
419 fi
420
421 echo -n "${ab_branch}" > "${ab_tmp}/branch_name"
422 echo -n "${ab_cmdline}" > "${ab_tmp}/cmdline"
423}
424
425download_openwrt_packages() {
426 if test x"${internal_build}" = x"1"; then
427 if ! [ -d "${openwrt_root}/dl" -o -L "${openwrt_root}/dl" ]; then
428 exec_log "ln -sf ../dl \"${openwrt_root}/dl\""
429 fi
430 fi
431
432 exec_log "make -C \"${openwrt_root}\" V=1 -j\$((\$(nproc) + 1)) download"
433}
434
435build_openwrt() {
436 local ret=
437 local verbose=1
438
439 if test x"${debug_set}" = x"yes"; then
440 verbose=s
441 fi
442
443 build_time=$(date +%Y%m%d%H%M%S)
444
445 exec_log "make -C \"${openwrt_root}\" V=${verbose} -j\$((\$(nproc) + 1))"
446
447 ret=$?
448
449 if test ${ret} != 0; then
450 log_warn "Build failed with error code ${ret}."
451 log_warn "Restart single-threaded building for debugging purpose."
452
453 exec_log "make -C \"${openwrt_root}\" V=s -j1"
454
455 ret=$?
456
457 if test ${ret} != 0; then
458 log_err "Debug build failed with error code ${ret}."
459 return 1
460 fi
461 fi
462
463 log_info "OpenWrt built successfully"
464}
465
466# Create the ${ab_bin_release} directory
467mk_ab_bin_release() {
468 exec_log "mkdir -p \"${ab_bin_release}\""
469}
470
471collect_openwrt_images() {
472 local file_count=0
473 local files=
474
475 if [ -z "${build_time}" ]; then
476 build_time=$(date +%Y%m%d%H%M%S)
477 fi
478
479 files=$(find "${openwrt_bin_dir}" -maxdepth 1 -name '*.bin' -o -name "*.img" -o -name '*.itb' -o -name '*.gz')
480
481 for file in ${files}; do
482 local file_no_ext=${file%.*}
483 local file_name=${file_no_ext##*/}
484 local file_ext=${file##*.}
485
486 exec_log "cp -rf \"${file}\" \"${ab_bin_release}/${file_name}-${build_time}.${file_ext}\""
487 ((file_count++))
488 done
489
490 log_info "Total ${file_count} image files copied."
491}
492
493collect_openwrt_configs() {
494 local linux_dir=$(openwrt_get_target_kernel_linux_build_dir ${target_name})
495
496 exec_log "cp -f \"${openwrt_root}/.config\" \"${ab_bin_release}/openwrt.config\""
497
498 if test -z "${linux_dir}"; then
499 log_warn "Failed to get OpenWrt's linux kernel build directory"
500 else
501 local kernel_config_data="${linux_dir}/kernel/config_data"
502
503 if [ -f "${kernel_config_data}" ]; then
504 exec_log "cp -f \"${kernel_config_data}\" \"${ab_bin_release}/kernel.config\""
505 fi
506 fi
507}
508
509collect_kernel_debug_symbols() {
510 if [ -f "${openwrt_bin_dir}/kernel-debug.tar.zst" ]; then
511 exec_log "cp -f \"${openwrt_bin_dir}/kernel-debug.tar.zst\" \"${ab_bin_release}/\""
512 fi
513}
514
515collect_userspace_debug_symbols() {
516 local staging_dir_root=$(openwrt_get_staging_dir_root)
517
518 log_dbg "Staging dir root: ${staging_dir_root}"
519
520 if test -d "${staging_dir_root}"; then
521 staging_dir_root_prefix=$(dirname "${staging_dir_root}")
522 staging_dir_root_name=$(basename "${staging_dir_root}")
523
524 exec_log "tar -jcf \"${ab_bin_release}/rootfs-debug.tar.bz2\" -C \"${staging_dir_root_prefix}\" \"${staging_dir_root_name}\""
525 fi
526}
527
528collect_feeds_buildinfo() {
529 if [ -f "${openwrt_bin_dir}/feeds.buildinfo" ]; then
530 exec_log "cp -f \"${openwrt_bin_dir}/feeds.buildinfo\" \"${ab_bin_release}/\""
531 fi
532}
533
534do_menuconfig_update() {
535 local kconfig_expr=
536 local kconfig_files=
537 local final_file=
538
539 exec_log "make -C \"${openwrt_root}\" menuconfig"
540
541 if test ${ab_branch_level} -eq 1; then
542 exec_log "make -C ${openwrt_root} -f \"${ab_root}/scripts/openwrt_kconfig.mk\" savedefconfig CONFIG_FILE=\"${ab_tmp}/defconfig\""
543 exec_log "\"${openwrt_root}/scripts/kconfig.pl\" + \"${ab_tmp}/defconfig\" /dev/null > \"${ab_platform_dir}/${openwrt_branch}/defconfig\"" 1
544 return
545 fi
546
547 exec_log "make -C ${openwrt_root} -f \"${ab_root}/scripts/openwrt_kconfig.mk\" savedefconfig CONFIG_FILE=\"${ab_tmp}/defconfig\""
548
549 if test ${ab_branch_level} -ge 2; then
550 kconfig_files="\"${ab_platform_dir}/${openwrt_branch}/defconfig\""
551 final_file="${ab_wifi_dir}/${openwrt_branch}/defconfig"
552
553 if test -f "${ab_wifi_dir}/${openwrt_branch}/defconfig_forced"; then
554 kconfig_expr="${kconfig_expr} +"
555 kconfig_files="${kconfig_files} \"${ab_wifi_dir}/${openwrt_branch}/defconfig_forced\""
556 fi
557 fi
558
559 if test ${ab_branch_level} -ge 3; then
560 kconfig_expr="${kconfig_expr} +"
561 kconfig_files="${kconfig_files} \"${final_file}\""
562 final_file="${ab_sku_dir}/${openwrt_branch}/defconfig"
563
564 if test -f "${ab_sku_dir}/${openwrt_branch}/defconfig_forced"; then
565 kconfig_expr="${kconfig_expr} +"
566 kconfig_files="${kconfig_files} \"${ab_sku_dir}/${openwrt_branch}/defconfig_forced\""
567 fi
568 fi
569
570 if test ${ab_branch_level} -ge 4; then
571 kconfig_expr="${kconfig_expr} +"
572 kconfig_files="${kconfig_files} \"${final_file}\""
573 final_file="${ab_variant_dir}/${openwrt_branch}/defconfig"
574
575 if test -f "${ab_variant_dir}/${openwrt_branch}/defconfig_forced"; then
576 kconfig_expr="${kconfig_expr} +"
577 kconfig_files="${kconfig_files} \"${ab_variant_dir}/${openwrt_branch}/defconfig_forced\""
578 fi
579 fi
580
581 if test -n "${kconfig_expr}" -a -n "${kconfig_files}"; then
582 exec_log "\"${openwrt_root}/scripts/kconfig.pl\" ${kconfig_expr} ${kconfig_files} > \"${ab_tmp}/.config.base\"" 1
583 else
584 exec_log "cp ${kconfig_files} \"${ab_tmp}/.config.base\""
585 fi
586
587 exec_log "\"${openwrt_root}/scripts/kconfig.pl\" - \"${ab_tmp}/defconfig\" \"${ab_tmp}/.config.base\" > \"${final_file}\"" 1
588}