@@ -37,6 +37,7 @@ make_image() {
3737 dd if=/dev/zero of=${IMG_FILENAME} bs=1M count=${IMG_SIZE} conv=fsync > /dev/null 2>&1
3838 sync
3939
40+ print_msg " [1/5] Setup IMG File"
4041 parted -s ${IMG_FILENAME} mklabel msdos 2> /dev/null
4142 parted -s ${IMG_FILENAME} mkpart primary fat32 $(( SKIP_SIZE)) MiB $(( SKIP_SIZE + BOOT_SIZE - 1 )) MiB 2> /dev/null
4243 parted -s ${IMG_FILENAME} mkpart primary ${ROOTFS_TYPE} $(( SKIP_SIZE + BOOT_SIZE)) MiB 100% 2> /dev/null
@@ -57,6 +58,7 @@ make_image() {
5758
5859 mkdir -p mnt && sync
5960
61+ print_msg " [2/5] Mounting IMG File"
6062 if ! mount ${LOOP_DEV} p2 mnt; then
6163 # fdisk -l
6264 print_err " mount ${LOOP_DEV} p2 failed!"
@@ -69,6 +71,7 @@ make_image() {
6971 print_err " mount ${LOOP_DEV} p1 failed!"
7072 fi
7173
74+ print_msg " [3/5] Copying files"
7275 cp -af ${BOOT_FILES} /* mnt/boot
7376 bsdtar -xpf ${ARCHLINUXARM_TARBALL_FILE} -C mnt
7477 cp -af ${PATCH_FILES} /* mnt/
@@ -81,18 +84,19 @@ make_image() {
8184 rm mnt/boot/{Image.gz,initramfs-linux-fallback.img}
8285 find ./mnt/boot/dtbs -mindepth 1 ! -regex ' ^./mnt/boot/dtbs/amlogic\(/.*\)?' -delete
8386
84- mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " S905 autoscript" -d mnt/boot/s905_autoscript.cmd mnt/boot/s905_autoscript
85- mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " eMMC autoscript" -d mnt/boot/emmc_autoscript.cmd mnt/boot/emmc_autoscript
86- mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " AML autoscript" -d mnt/boot/aml_autoscript.txt mnt/boot/aml_autoscript
87- mkimage -n " uInitrd Image" -A arm64 -O linux -T ramdisk -C none -d mnt/boot/initramfs-linux.img mnt/boot/uInitrd
88- mkimage -n " uImage" -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -d mnt/boot/Image mnt/boot/uImage
87+ print_msg " [4/5] Setup Boot Files"
88+ mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " S905 autoscript" -d mnt/boot/s905_autoscript.cmd mnt/boot/s905_autoscript 2> /dev/null
89+ mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " eMMC autoscript" -d mnt/boot/emmc_autoscript.cmd mnt/boot/emmc_autoscript 2> /dev/null
90+ mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n " AML autoscript" -d mnt/boot/aml_autoscript.txt mnt/boot/aml_autoscript 2> /dev/null
91+ mkimage -n " uInitrd Image" -A arm64 -O linux -T ramdisk -C none -d mnt/boot/initramfs-linux.img mnt/boot/uInitrd 2> /dev/null
92+ mkimage -n " uImage" -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -d mnt/boot/Image mnt/boot/uImage 2> /dev/null
8993 sync
9094
9195 umount -R -f mnt 2> /dev/null
9296 losetup -d ${LOOP_DEV} 2> /dev/null
9397
94- # Compress build IMG and move the file
95- xz -9 ${IMG_FILENAME} > " ${OUT_DIR} / ${ IMG_FILENAME} .xz"
98+ print_msg " [5/5] Compress IMG File "
99+ xz -9 ${IMG_FILENAME} && mv " ${IMG_FILENAME} .xz" ${OUT_DIR}
96100}
97101
98102cd ${WORKING_DIR}
0 commit comments