Merge "build_system: remove the duplicate obj when collect input objs [1/1]" into projects/amlogic-dev
diff --git a/build_combination.in b/build_combination.in
index e8c13ce..1c2dfaa 100644
--- a/build_combination.in
+++ b/build_combination.in
@@ -17,6 +17,7 @@
 riscv s5 ax208_s928x aocpu
 riscv s5 ax209_s928x aocpu
 xtensa a1 ad401_a113l_hifi4a hifi_dsp
+xtensa a1 ad401_a113l_hifi4a_linux hifi_dsp
 xtensa a1 ad401_a113l_hifi4a_lowpower hifi_dsp
 xtensa a1 ad403_a113l_hifi4a hifi_dsp
 xtensa a5 av400_a113x2_hifi5a hifi_dsp
diff --git a/cmake/extensions.cmake b/cmake/extensions.cmake
index 1af1b34..dfef5d3 100755
--- a/cmake/extensions.cmake
+++ b/cmake/extensions.cmake
@@ -793,3 +793,8 @@
   add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJDUMP_COMPILER} ARGS ${LST_OPTION} $<TARGET_FILE:${TARGET}> > $<TARGET_FILE_DIR:${TARGET}>/$ENV{KERNEL}.lst)
 endfunction()
 
+function(generate_module_info_output TARGET)
+  set(map_file_path ${PROJECT_SOURCE_DIR}/output/$ENV{ARCH}-$ENV{BOARD}-$ENV{PRODUCT}/$ENV{KERNEL}/${TARGET_NAME}.map)
+  add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND python ${PROJECT_SOURCE_DIR}/scripts/map_analyzer.py --combine ${map_file_path} > $<TARGET_FILE_DIR:${TARGET}>/$ENV{KERNEL}_module_info.txt)
+endfunction()
+
diff --git a/cmake/root.cmake b/cmake/root.cmake
index 027cd63..bf5ee35 100755
--- a/cmake/root.cmake
+++ b/cmake/root.cmake
@@ -129,4 +129,7 @@
 compiler_generate_lst_output(${TARGET_NAME} -D)
 else()
 compiler_generate_lst_output(${TARGET_NAME} -S)
+
+#Generate module memory size information
+generate_module_info_output(${TARGET_NAME})
 endif()