script: compatible android kernel build [2/2]
PD#SWPL-80766
Problem:
compatible android kernel build
Solution:
1. modify the Kconfig and Makefile of sound to avoid the "../" directory,
which leads to failure in building the ramdisk.
2. support build dtbo
3. support build system_dlkm and vendor_dlkm, and import rootfs's modules loading sequence
Verify:
s4d and a1
Change-Id: I98e6852e2603bb259839567316a0ba53a87f696e
Signed-off-by: wanwei.jiang <wanwei.jiang@amlogic.com>
diff --git a/amlogic_utils.sh b/amlogic_utils.sh
index 1821e5e..7a7039f 100644
--- a/amlogic_utils.sh
+++ b/amlogic_utils.sh
@@ -121,6 +121,30 @@
if [[ -d ${top_ext_drivers} ]]; then
rm -rf ${top_ext_drivers}
fi
+
+ for FILE in ${FILES}; do
+ if [[ "${FILE}" =~ \.dtbo ]] && \
+ [ -n "${DTS_EXT_DIR}" ] && [ -f "${OUT_DIR}/${DTS_EXT_DIR}/${FILE}" ] ; then
+ MKDTIMG_DTBOS="${MKDTIMG_DTBOS} ${DIST_DIR}/${FILE}"
+ fi
+ done
+ export MKDTIMG_DTBOS
+
+ modules_install
+
+ local src_dir=$(echo ${MODULES_STAGING_DIR}/lib/modules/*)
+ pushd ${src_dir}
+ : > modules.order
+ while read LINE
+ do
+ find -name ${LINE} >> modules.order
+ done < ${DIST_DIR}/modules/modules.order
+ sed -i 's/..//' modules.order
+ for EXT_MOD in ${EXT_MODULES}; do
+ ext_modules_order_file=$(ls extra/${EXT_MOD}/modules.order.*)
+ : > ${ext_modules_order_file}
+ done
+ popd
}
export -f extra_cmds
@@ -291,8 +315,10 @@
adjust_sequence_modules_loading "${arg1[*]}"
touch __install.sh
+ touch modules.order
for loop in `cat modules.dep | sed 's/:.*//'`; do
mod_probe $loop
+ echo $loop >> modules.order
echo insmod $loop >> __install.sh
done