Skip to content

Commit

Permalink
oopsies and cosmetic changes...
Browse files Browse the repository at this point in the history
  • Loading branch information
Biktorgj committed Jul 13, 2022
1 parent 26465bc commit 2ee1610
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,33 @@ help:
@echo " "

sync:
@echo "Syncing repositories..."
@./init.sh
aboot:
@echo "Building aboot..."
@cp $(CURRENT_PATH)/tools/config/poky/rootfs.conf $(YOCTO_PATH)/build/conf/local.conf
@cd $(YOCTO_PATH) && source $(YOCTO_PATH)/oe-init-build-env && \
bitbake virtual/bootloader && \
@cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/appsboot.mbn $(CURRENT_PATH)/target || exit 1
cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/appsboot.mbn $(CURRENT_PATH)/target || exit 1

kernel:
@echo "Building the kernel..."
@cp $(CURRENT_PATH)/tools/config/poky/rootfs.conf $(YOCTO_PATH)/build/conf/local.conf
@cd $(YOCTO_PATH) && source $(YOCTO_PATH)/oe-init-build-env && \
bitbake virtual/kernel && \
cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/boot-mdm9607.img $(CURRENT_PATH)/target || exit 1

root_fs:
@echo "Building kernel + rootfs..."
@rm -rf $(YOCTO_PATH)/build/tmp
@cp $(CURRENT_PATH)/tools/config/poky/rootfs.conf $(YOCTO_PATH)/build/conf/local.conf && \
cp $(CURRENT_PATH)/tools/config/poky/rootfs.conf $(YOCTO_PATH)/build/conf/local.conf && \
cd $(YOCTO_PATH) && source $(YOCTO_PATH)/oe-init-build-env && \
bitbake core-image-minimal && \
@cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/core-image-minimal-mdm9607.ubi $(CURRENT_PATH)/target/rootfs-mdm9607.ubi && \
@cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/boot-mdm9607.img $(CURRENT_PATH)/target
cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/core-image-minimal-mdm9607.ubi $(CURRENT_PATH)/target/rootfs-mdm9607.ubi && \
cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/boot-mdm9607.img $(CURRENT_PATH)/target

recovery_fs:
@echo "Building kernel + recoveryfs..."
@rm -rf $(YOCTO_PATH)/build/tmp
@cp $(CURRENT_PATH)/tools/config/poky/recovery.conf $(YOCTO_PATH)/build/conf/local.conf
@cd $(YOCTO_PATH) && source $(YOCTO_PATH)/oe-init-build-env && \
Expand All @@ -85,7 +90,8 @@ recovery_fs:
cp $(YOCTO_PATH)/build/tmp/deploy/images/mdm9607/boot-mdm9607.img $(CURRENT_PATH)/target/recovery.img

rootfs_ramdisk:
${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/mkbootimg --kernel ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/zImage \
@echo "Building rootfs as a ramdisk only image..."
@${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/mkbootimg --kernel ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/zImage \
--ramdisk ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/core-image-minimal-mdm9607.cpio.gz \
--output ${CURRENT_PATH}/target/boot-rootfs.img \
--pagesize 2048 \
Expand All @@ -95,7 +101,8 @@ rootfs_ramdisk:
--cmdline $(KERNEL_COMMAND_LINE)

recovery_ramdisk:
${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/mkbootimg --kernel ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/zImage \
@echo "Building recoveryfs as a ramdisk only image..."
@${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/mkbootimg --kernel ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/zImage \
--ramdisk ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/core-image-minimal-mdm9607.cpio.gz \
--output ${CURRENT_PATH}/target/boot-recovery.img \
--pagesize 2048 \
Expand All @@ -104,13 +111,13 @@ recovery_ramdisk:
--dt ${YOCTO_PATH}/build/tmp/deploy/images/mdm9607/dtb.img \
--cmdline $(KERNEL_COMMAND_LINE)
sign_boot_ramdisk:
$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-rootfs.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size
@$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-rootfs.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size

sign_recovery_ramdisk:
$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-recovery.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size
@$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-recovery.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size

sign_boot:
$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-mdm9607.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size
@$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/boot-mdm9607.img --partition_name boot --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size

# These aren't working right now
sign_rootfs:
Expand All @@ -120,7 +127,8 @@ sign_recoveryfs:
$(CURRENT_PATH)/tools/avbtool/avbtool add_hash_footer --image target/recoveryfs.ubi --partition_name recoveryfs --key $(CURRENT_PATH)/keys/private.key --algorith SHA256_RSA4096 --dynamic_partition_size

package:
cp $(CURRENT_PATH)/tools/helpers/flashall $(CURRENT_PATH)/target && \
@echo "Packing the build..."
@cp $(CURRENT_PATH)/tools/helpers/flashall $(CURRENT_PATH)/target && \
cd $(CURRENT_PATH)/target && \
sha512sum appsboot.mbn > shasums.txt && \
sha512sum boot-mdm9607.img >> shasums.txt && \
Expand All @@ -134,11 +142,11 @@ package:
cp -rf $(CURRENT_PATH)/yocto/build/tmp/deploy/licenses $(CURRENT_PATH)/licenses/

meta_log:
nano $(CURRENT_PATH)/target/changelog.log
#$(CURRENT_PATH)/tools/fwupd/get_commit_history.sh
echo "Changelog for $(VERSION)" > $(CURRENT_PATH)/target/changelog.log
@nano $(CURRENT_PATH)/target/changelog.log

zip_file:
cp $(CURRENT_PATH)/tools/fwupd/partition_nand.xml $(CURRENT_PATH)/target && \
@cp $(CURRENT_PATH)/tools/fwupd/partition_nand.xml $(CURRENT_PATH)/target && \
cd $(CURRENT_PATH)/target && \
zip package_$(VERSION).zip appsboot.mbn boot-mdm9607.img recovery.img recoveryfs.ubi rootfs-mdm9607.ubi partition_nand.xml

Expand Down

0 comments on commit 2ee1610

Please sign in to comment.