Skip to content

Commit 0880961

Browse files
committed
script: Now, we can use build.sh rootfs bootfs to update boot partition in macOS.
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
1 parent 4b2ffaa commit 0880961

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ build_uboot_dtb()
145145
cd $SHELL_FOLDER/dts
146146
cpp -nostdinc -I include -undef -x assembler-with-cpp quard_star_uboot.dts > quard_star_uboot.dtb.dts.tmp
147147
dtc -I dts -O dtb -o $SHELL_FOLDER/output/uboot/quard_star_uboot.dtb quard_star_uboot.dtb.dts.tmp
148+
$SHELL_FOLDER/u-boot-2021.07/tools/mkimage -A riscv -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d $SHELL_FOLDER/dts/quard_star_uboot.cmd $SHELL_FOLDER/output/uboot/boot.scr
148149
}
149150

150151
build_firmware()
@@ -324,7 +325,7 @@ build_rootfs()
324325
fi
325326
cp $SHELL_FOLDER/output/linux_kernel/Image $TARGET_BOOTFS_DIR/Image
326327
cp $SHELL_FOLDER/output/uboot/quard_star_uboot.dtb $TARGET_BOOTFS_DIR/quard_star.dtb
327-
$SHELL_FOLDER/u-boot-2021.07/tools/mkimage -A riscv -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d $SHELL_FOLDER/dts/quard_star_uboot.cmd $TARGET_BOOTFS_DIR/boot.scr
328+
cp $SHELL_FOLDER/output/uboot/boot.scr $TARGET_BOOTFS_DIR/boot.scr
328329
$SHELL_FOLDER/build_rootfs/clean_gitkeep.sh $TARGET_BOOTFS_DIR
329330
$PERMISSION_TOOL $SHELL_FOLDER/build_rootfs/build_fs_only_bootfs.sh $MAKE_ROOTFS_DIR
330331
;;

build_rootfs/build_fs_only_bootfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ run_linux()
2323

2424
run_macos()
2525
{
26-
LOOPDEV="$(hdiutil attach -nomount $TARGET_DIR/rootfs.img | awk -F ' ' '{ print $1 }' | awk 'NR==1')"
26+
LOOPDEV="$(hdiutil attach -nomount $1/rootfs.img | awk -F ' ' '{ print $1 }' | awk 'NR==1')"
2727
if [ -d "$1/target" ]; then
2828
rm -rf $1/target
2929
fi

0 commit comments

Comments
 (0)