From ce4469b31b4197367649f770b36e35101071b0c1 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Fri, 3 Feb 2023 16:26:09 +0100 Subject: [PATCH] Add devicetree to PC-board transfer scripts --- user_space/populate_kernel_image_module_reboot.sh | 5 +++++ user_space/transfer_kernel_image_module_to_board.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/user_space/populate_kernel_image_module_reboot.sh b/user_space/populate_kernel_image_module_reboot.sh index 4ce7437..cf15a99 100755 --- a/user_space/populate_kernel_image_module_reboot.sh +++ b/user_space/populate_kernel_image_module_reboot.sh @@ -14,8 +14,10 @@ tar -zxvf kernel_modules.tar.gz if [ ${MACHINE_TYPE} == 'aarch64' ]; then IMAGE_FILENAME=Image + DTB_FILENAME="system.dtb" else IMAGE_FILENAME=uImage + DTB_FILENAME="devicetree.dtb" fi mv ./kernel_modules/ad9361_drv.ko ./openwifi/ -f || true @@ -37,6 +39,9 @@ fi if test -f "./kernel_modules/BOOT.BIN"; then cp ./kernel_modules/BOOT.BIN /mnt/ fi +if test -f "./kernel_modules/$DTB_FILENAME"; then + cp ./kernel_modules/$DTB_FILENAME /mnt/ +fi cd /mnt/ sync cd ~ diff --git a/user_space/transfer_kernel_image_module_to_board.sh b/user_space/transfer_kernel_image_module_to_board.sh index ac148cd..c0c0f18 100755 --- a/user_space/transfer_kernel_image_module_to_board.sh +++ b/user_space/transfer_kernel_image_module_to_board.sh @@ -31,8 +31,10 @@ fi if [ "$BOARD_NAME" == "zcu102_fmcs2" ] || [ "$BOARD_NAME" == "zcu102_9371" ]; then LINUX_KERNEL_IMAGE=$DIR_TO_ADI_LINUX_KERNEL/arch/arm64/boot/Image + DTB_FILENAME="system.dtb" else LINUX_KERNEL_IMAGE=$DIR_TO_ADI_LINUX_KERNEL/arch/arm/boot/uImage + DTB_FILENAME="devicetree.dtb" fi mkdir -p kernel_modules @@ -51,6 +53,9 @@ fi if test -f "../kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN"; then cp ../kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN ./kernel_modules/ fi +if test -f "../kernel_boot/boards/$BOARD_NAME/$DTB_FILENAME"; then + cp ../kernel_boot/boards/$BOARD_NAME/$DTB_FILENAME ./kernel_modules/ +fi tar -zcvf kernel_modules.tar.gz kernel_modules scp kernel_modules.tar.gz root@192.168.10.122: