From 313865c3f8bedffaede569ec5ed0d864404c4ed9 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Mon, 26 Mar 2018 12:35:11 +0900 Subject: scripts: build-rpi3-arm64.sh, mkbootimg_rpi3.sh: Add modules Add modules support on build scrip and image script. Change-Id: I007d7ca940152506c856523e35adf4519248d2b5 Signed-off-by: Seung-Woo Kim --- build-rpi3-arm64.sh | 3 +++ scripts/mkbootimg_rpi3.sh | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/build-rpi3-arm64.sh b/build-rpi3-arm64.sh index 4655746b601b..15b93917a6cc 100755 --- a/build-rpi3-arm64.sh +++ b/build-rpi3-arm64.sh @@ -24,3 +24,6 @@ if [ ! -f "./arch/arm64/boot/Image" ]; then echo "Build fail" exit 1 fi + +make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_prepare -j8 +make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules -j8 diff --git a/scripts/mkbootimg_rpi3.sh b/scripts/mkbootimg_rpi3.sh index a8c34a780e30..3f365f483a06 100755 --- a/scripts/mkbootimg_rpi3.sh +++ b/scripts/mkbootimg_rpi3.sh @@ -7,6 +7,8 @@ GROUP_ID=`id -g` rm -f boot.img rm -rf tmp mkdir tmp + +# Create boot.img mkfs.vfat -F 16 -C boot.img 65536 sudo mount -o loop,uid=$USER_ID,gid=$GROUP_ID,showexec boot.img ./tmp cp -a $BOOT_PATH/config_64bit.txt ./tmp/config.txt @@ -39,4 +41,18 @@ rm -rf ${TMP_UBOOT_PATH} sync sudo umount tmp + +rm -f modules.img +mkdir -p tmp/lib/modules + +# Create modules.img +dd if=/dev/zero of=modules.img bs=1024 count=20480 +mkfs.ext4 -q -F -t ext4 -b 1024 -L modules modules.img +sudo mount -o loop modules.img ./tmp/lib/modules +make modules_install ARCH=arm64 INSTALL_MOD_PATH=./tmp INSTALL_MOD_STRIP=1 CROSS_COMPILE=aarch64-linux-gnu- +sudo -n chown root:root ./tmp/lib/modules -R + +sync +sudo umount tmp/lib/modules + rm -rf tmp -- cgit v1.2.3