From b9cb92777470e370f50f92d560b47dda55e7e8e2 Mon Sep 17 00:00:00 2001 From: svenate Date: Wed, 16 Mar 2022 16:10:17 +0530 Subject: [PATCH 01/18] Update clang library version Tracked-On: OAM-103426 Signed-off-by: svenate Signed-off-by: swaroopb --- core/definitions.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index 5a4a9f8..4636a83 100755 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -88,9 +88,9 @@ IAFW_CC := $(IAFW_TOOLS_CLANG_PREFIX)/clang IAFW_OBJCOPY := $(IAFW_TOOLS_GCC_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX) EFI_OBJCOPY := $(IAFW_OBJCOPY) ifeq ($(TARGET_IAFW_ARCH),x86_64) -IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/12.0.7/lib/linux/libclang_rt.builtins-x86_64-android.a +IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-x86_64-android.a else -IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/12.0.7/lib/linux/libclang_rt.builtins-i686-android.a +IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-i686-android.a endif # Transformation definitions, ala build system's definitions.mk From ff3151020e7485841c54299cd34195b6bc3d40c4 Mon Sep 17 00:00:00 2001 From: swaroopb Date: Thu, 21 Jul 2022 09:49:09 +0530 Subject: [PATCH 02/18] remove unwanted file from caas-use Tracked-On: OAM-103590 Signed-off-by: swaroopb --- tasks/flashfiles.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 2fcae35..2ab4c64 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -288,16 +288,16 @@ flashfiles: $(INTEL_FACTORY_FLASHFILES_TARGET) $(BUILT_RELEASE_FLASH_FILES_PACKA ifneq (,$(wildcard vendor/intel/utils_vertical)) ifneq (,$(wildcard vendor/intel/fw/keybox_provisioning)) @echo "vertical_keybox_provisioning included" - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip *provisioning + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip *provisioning else - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip endif else - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) - $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/*-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files + $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/$(TARGET_PRODUCT)-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @echo "Release files are published" ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @@ -334,16 +334,16 @@ flashfiles: $(INTEL_FACTORY_FLASHFILES_TARGET) publish_mkdir_dest publish_vertic ifneq (,$(wildcard vendor/intel/utils_vertical)) ifneq (,$(wildcard vendor/intel/fw/keybox_provisioning)) @echo "vertical_keybox_provisioning included" - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip *provisioning + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip *provisioning else - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip endif else - $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches *-flashfiles-*.zip + $(hide) tar --exclude=*.git -czf $(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz scripts *patches $(TARGET_PRODUCT)-flashfiles-*.zip endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) - $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/*-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files + $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/$(TARGET_PRODUCT)-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @echo "Release files are published" ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) From f0f8b7a5f1bc2f88af4f6d8a255873138e3a9873 Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Fri, 26 Aug 2022 09:23:16 +0800 Subject: [PATCH 03/18] Remove installer image support We will use ISO image to replace installer image. Tracked-On: OAM-103642 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 2ab4c64..7ed14a5 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -373,47 +373,3 @@ ifeq ($(USE_INTEL_FLASHFILES),false) publish_ifwi: @echo "Warning: Unable to fulfill publish_ifwi makefile request" endif - -.PHONY: usb_image - -USB_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-usb-install-$(TARGET_BUILD_VARIANT).img -USB_INSTALL_IMG_ZIP = $(USB_INSTALL_IMG).zip -BOOT_IMG = $(PRODUCT_OUT)/efi_tmp.img - -usb_image: flashfiles - @echo "Generating USB installer image $(USB_INSTALL_IMG) ..." - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ - @$(hide)unzip $(PRODUCT_OUT)/caas*-flashfiles-*.zip -d $(PRODUCT_OUT)/efi_images_tmp/ > /dev/null - - G_size=`echo "$$((1 << 32))"`;\ - for img in `ls $(PRODUCT_OUT)/efi_images_tmp/`;do \ - size=`stat -c %s $(PRODUCT_OUT)/efi_images_tmp/$${img}`; \ - if [[ $${size} -gt $${G_size} ]]; then \ - echo "Split $${img} due to its size bigger than 4G"; \ - split --bytes=`expr $${G_size} - 1` --numeric-suffixes $(PRODUCT_OUT)/efi_images_tmp/$${img} $(PRODUCT_OUT)/efi_images_tmp/$${img}.part; \ - rm $(PRODUCT_OUT)/efi_images_tmp/$${img}; \ - fi;\ - done; - - $(hide)rm -rf $(USB_INSTALL_IMG) $(BOOT_IMG) $(PRODUCT_OUT)/efi_images_tmp/system.img; \ - flashfile_size=`du -sh ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \ - flashfile_size=`echo $${flashfile_size} | cut -d '.' -f1`; \ - flashfile_size=`expr $${flashfile_size} + 1`; \ - total_count=`expr 16 \* $${flashfile_size} + 16`; \ - dd if=/dev/zero of=$(USB_INSTALL_IMG) bs=63M count=$${total_count}; \ - sgdisk --new EFI::+$${flashfile_size}G --typecode EFI:ef00 --change-name=EFI:'EFI System' $(USB_INSTALL_IMG) > /dev/null; \ - flashfile_count=$(shell expr $${flashfile_size} \* 1024 \* 1024 \* 1024 \/ 512); \ - dd if=/dev/zero of=$(BOOT_IMG) bs=512 count=$${flashfile_count}; - - $(hide)mkdosfs -F32 -n EFI $(BOOT_IMG); - $(hide)mmd -i $(BOOT_IMG) ::EFI; - $(hide)mmd -i $(BOOT_IMG) ::EFI/BOOT; - $(hide)mcopy -Q -i $(BOOT_IMG) $(PRODUCT_OUT)/efi_images_tmp/installer.efi ::EFI/BOOT/bootx64.efi; - $(hide)mcopy -Q -i $(BOOT_IMG) $(PRODUCT_OUT)/efi_images_tmp/* ::; - $(hide)dd if=$(BOOT_IMG) of=$(USB_INSTALL_IMG) bs=512 seek=2048 conv=notrunc; - @echo "Zipping USB installer image $(USB_INSTALL_IMG_ZIP) ..." - $(hide)zip -r $(USB_INSTALL_IMG_ZIP) $(USB_INSTALL_IMG) - - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(BOOT_IMG) - - @echo "make USB installer image done ---" From 34b379cfa13f97b77b4dcfbb1dbbf2d23872e00c Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Fri, 26 Aug 2022 09:30:10 +0800 Subject: [PATCH 04/18] Make celadon as ISO file format image Support build celadon images as ISO format. The image is ISO format bootable image which can be burned to a bootable CD/DVD or clone to USB pendrive. The image can be flashed to CIV and BM. It is independence on UEFI Shell. Tracked-On: OAM-103648 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 7ed14a5..285e949 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -373,3 +373,66 @@ ifeq ($(USE_INTEL_FLASHFILES),false) publish_ifwi: @echo "Warning: Unable to fulfill publish_ifwi makefile request" endif + +.PHONY: civ_iso + +ISO_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-flashfile-$(TARGET_BUILD_VARIANT).iso +ISO_INSTALL_IMG_ZIP = $(ISO_INSTALL_IMG).zip +ISO_RELEASE_TAR = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefile-$(TARGET_BUILD_VARIANT).iso.tar.gz +ISO_EFI = $(PRODUCT_OUT)/iso_tmp.efi + +civ_iso: flashfiles + @echo "Generating ISO image $(ISO_INSTALL_IMG) ..."; + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp; + $(hide)rm -rf $(ISO_INSTALL_IMG) $(ISO_INSTALL_IMG_ZIP) + $(hide)mkdir -p $(PRODUCT_OUT)/releasefile_tmp; + $(hide)mkdir -p $(PRODUCT_OUT)/efi_images_tmp; + + $(hide)tar -xvzf $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz -C $(PRODUCT_OUT)/releasefile_tmp >/dev/null; + $(hide)unzip $(PRODUCT_OUT)/releasefile_tmp/*-flashfiles-*.zip -d $(PRODUCT_OUT)/efi_images_tmp/ > /dev/null; + $(hide)rm $(PRODUCT_OUT)/releasefile_tmp/$(TARGET_PRODUCT)-flashfiles*; + + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/system.img; + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/vendor.img; + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/product.img; + + G_size=`echo "$$((1 << 32))"`; \ + for img in `ls $(PRODUCT_OUT)/efi_images_tmp/`;do \ + size=`stat -c %s $(PRODUCT_OUT)/efi_images_tmp/$${img}`; \ + if [[ $${size} -gt $${G_size} ]]; then \ + echo "Split $${img} due to its size bigger than 4G"; \ + split --bytes=`expr $${G_size} - 1` --numeric-suffixes $(PRODUCT_OUT)/efi_images_tmp/$${img} $(PRODUCT_OUT)/efi_images_tmp/$${img}.part; \ + rm $(PRODUCT_OUT)/efi_images_tmp/$${img}; \ + fi;\ + done; + + $(hide)rm -rf $(ISO_EFI); \ + flashfile_size=`du -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \ + flashfile_size=`expr $${flashfile_size} + 102400`; \ + dd if=/dev/zero of=$(ISO_EFI) bs=1024 count=$${flashfile_size}; + + $(hide)mkdosfs -F32 -n EFI $(ISO_EFI); + $(hide)mmd -i $(ISO_EFI) ::EFI; + $(hide)mmd -i $(ISO_EFI) ::EFI/BOOT; + $(hide)mcopy -Q -i $(ISO_EFI) $(PRODUCT_OUT)/efi_images_tmp/installer.efi ::EFI/BOOT/bootx64.efi; + $(hide)mcopy -Q -i $(ISO_EFI) $(PRODUCT_OUT)/efi_images_tmp/* ::; + + $(hide)rm -rf $(PRODUCT_OUT)/iso + $(hide)mkdir -p $(PRODUCT_OUT)/iso + $(hide)xorriso -as mkisofs -iso-level 3 -r -V "Civ ISO" -J -joliet-long -append_partition 2 0xef $(ISO_EFI) \ + -partition_cyl_align all -o $(ISO_INSTALL_IMG) $(PRODUCT_OUT)/iso/ + + @echo "Zipping ISO image $(ISO_INSTALL_IMG_ZIP) ..." + $(hide)zip -r -j $(ISO_INSTALL_IMG_ZIP) $(ISO_INSTALL_IMG) + + @echo "Zipping ISO release image $(ISO_RELEASE_TAR) ..." + $(hide)rm -rf $(ISO_RELEASE_TAR) + $(hide)cp $(ISO_INSTALL_IMG) $(PRODUCT_OUT)/releasefile_tmp + $(hide)tar --exclude=*.git -czf $(ISO_RELEASE_TAR) -C $(PRODUCT_OUT)/releasefile_tmp/ . + + @echo "make ISO image done ---" + $(hide) cp -r $(ISO_RELEASE_TAR) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) + + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp/ $(PRODUCT_OUT)/iso $(ISO_EFI) + + @echo "ISO Release files are published" From 90d31325b7bd6aa971a1f7378df12d99f3eab80b Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Tue, 30 Aug 2022 15:30:45 +0800 Subject: [PATCH 05/18] put flashfile iso zip file to public Also fix issue about Total number of sectors not a multiple of sectors per track (63) Tracked-On: OAM-103711 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 285e949..86f7c52 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -409,6 +409,8 @@ civ_iso: flashfiles $(hide)rm -rf $(ISO_EFI); \ flashfile_size=`du -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \ flashfile_size=`expr $${flashfile_size} + 102400`; \ + flashfile_size=`expr $${flashfile_size} / 63 + 1 `; \ + flashfile_size=`expr $${flashfile_size} \* 63 `; \ dd if=/dev/zero of=$(ISO_EFI) bs=1024 count=$${flashfile_size}; $(hide)mkdosfs -F32 -n EFI $(ISO_EFI); @@ -432,6 +434,7 @@ civ_iso: flashfiles @echo "make ISO image done ---" $(hide) cp -r $(ISO_RELEASE_TAR) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) + $(hide) cp -r $(ISO_INSTALL_IMG_ZIP) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp/ $(PRODUCT_OUT)/iso $(ISO_EFI) From f61dd8e26efd104b4471dcaebba8eea8b6be9250 Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Wed, 14 Sep 2022 14:09:39 +0800 Subject: [PATCH 06/18] Change ISO build target from civ_iso to iso civ is default name Tracked-On: OAM-103929 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 86f7c52..5728d4c 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -374,14 +374,14 @@ publish_ifwi: @echo "Warning: Unable to fulfill publish_ifwi makefile request" endif -.PHONY: civ_iso +.PHONY: iso ISO_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-flashfile-$(TARGET_BUILD_VARIANT).iso ISO_INSTALL_IMG_ZIP = $(ISO_INSTALL_IMG).zip ISO_RELEASE_TAR = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefile-$(TARGET_BUILD_VARIANT).iso.tar.gz ISO_EFI = $(PRODUCT_OUT)/iso_tmp.efi -civ_iso: flashfiles +iso: flashfiles @echo "Generating ISO image $(ISO_INSTALL_IMG) ..."; $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp; $(hide)rm -rf $(ISO_INSTALL_IMG) $(ISO_INSTALL_IMG_ZIP) From 6523a16844f55e9f790270cfd33485d7668c8258 Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Tue, 20 Sep 2022 21:32:01 +0800 Subject: [PATCH 07/18] Remove unnecessary images from flashfiles.zip system.img vendor.img and product.img are covered by super.img, remove them to reduce image size Tracked-On: OAM-104013 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 5728d4c..35886cd 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -40,6 +40,7 @@ tos_image := none endif $(gpt_name):$(BUILT_RELEASE_FLASH_FILES_PACKAGE) + rm -rf $(GPT_DIR) mkdir -p $(GPT_DIR) unzip $< -d $(GPT_DIR) $(SIMG2IMG) $(GPT_DIR)/super.img $(GPT_DIR)/super.img.raw @@ -65,6 +66,8 @@ $(gpt_name):$(BUILT_RELEASE_FLASH_FILES_PACKAGE) $(BUILT_RELEASE_FLASH_FILES_PACKAGE):$(BUILT_RELEASE_SUPER_IMAGE) $(fftf) $(UEFI_ADDITIONAL_TOOLS) $(hide) mkdir -p $(dir $@) $(fftf) $(FLASHFILES_ADD_ARGS) --mv_config_default=$(notdir $(mvcfg_default_arg)) --add_image=$(BUILT_RELEASE_SUPER_IMAGE) $(BUILT_RELEASE_TARGET_FILES_PACKAGE) $@ + #remove system.img vendor.img product.img from flashfiles.zip + $(hide)zip -d $@ "system.img" "product.img" "vendor.img"; else $(BUILT_RELEASE_FLASH_FILES_PACKAGE):$(BUILT_RELEASE_TARGET_FILES_PACKAGE) $(fftf) $(UEFI_ADDITIONAL_TOOLS) $(hide) mkdir -p $(dir $@) @@ -138,6 +141,8 @@ ifeq ($(SUPER_IMG_IN_FLASHZIP),true) $(INTEL_FACTORY_FLASHFILES_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(fftf) $(UEFI_ADDITIONAL_TOOLS) $(INTERNAL_SUPERIMAGE_DIST_TARGET) $(hide) mkdir -p $(dir $@) $(fftf) $(FLASHFILES_ADD_ARGS) --mv_config_default=$(notdir $(mvcfg_default_arg)) --add_image=$(INTERNAL_SUPERIMAGE_DIST_TARGET) $(BUILT_TARGET_FILES_PACKAGE) $@ + #remove system.img vendor.img product.img from flashfiles.zip + $(hide)zip -d $@ "system.img" "product.img" "vendor.img"; else $(INTEL_FACTORY_FLASHFILES_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(fftf) $(UEFI_ADDITIONAL_TOOLS) $(hide) mkdir -p $(dir $@) From 4cb6d61f5a19535152da6774b6f85a87526179aa Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Thu, 22 Sep 2022 10:24:54 +0800 Subject: [PATCH 08/18] generate iso format image in flashfiles build target iso images will be generate while executing "make flashfiles" Tracked-On: OAM-104007 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 52 +++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 35886cd..f455ead 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -276,6 +276,15 @@ publish_vertical: $(hide) rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files endif +ifeq ($(RELEASE_BUILD),true) +ISO_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-sign-flashfile-$(FILE_NAME_TAG).iso +else +ISO_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-flashfile-$(FILE_NAME_TAG).iso +endif +ISO_INSTALL_IMG_ZIP = $(ISO_INSTALL_IMG).zip +ISO_RELEASE_TAR = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefile-$(TARGET_BUILD_VARIANT).iso.tar.gz +ISO_EFI = $(PRODUCT_OUT)/iso_tmp.efi + LOCAL_TOOL:= \ PATH="/bin:$$PATH" @@ -283,7 +292,7 @@ LOCAL_TOOL:= \ ifeq ($(RELEASE_BUILD),true) flashfiles: $(INTEL_FACTORY_FLASHFILES_TARGET) $(BUILT_RELEASE_FLASH_FILES_PACKAGE) $(gpt_name) publish_mkdir_dest publish_vertical host-pkg @$(ACP) $(BUILT_RELEASE_FLASH_FILES_PACKAGE) $(publish_dest) - @echo "Publishing Release files started" + @echo "Publishing Release files started ..." $(hide) mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files $(hide) cp -r $(PRODUCT_OUT)/*-flashfiles-*.zip $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files $(hide) cp -r $(PRODUCT_OUT)/scripts $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @@ -302,7 +311,6 @@ else endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) - $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/$(TARGET_PRODUCT)-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @echo "Release files are published" ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @@ -348,7 +356,6 @@ else endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) - $(hide) rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/$(TARGET_PRODUCT)-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @echo "Release files are published" ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @@ -379,28 +386,17 @@ publish_ifwi: @echo "Warning: Unable to fulfill publish_ifwi makefile request" endif -.PHONY: iso - -ISO_INSTALL_IMG = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-flashfile-$(TARGET_BUILD_VARIANT).iso -ISO_INSTALL_IMG_ZIP = $(ISO_INSTALL_IMG).zip -ISO_RELEASE_TAR = $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefile-$(TARGET_BUILD_VARIANT).iso.tar.gz -ISO_EFI = $(PRODUCT_OUT)/iso_tmp.efi - -iso: flashfiles @echo "Generating ISO image $(ISO_INSTALL_IMG) ..."; - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp; + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/; $(hide)rm -rf $(ISO_INSTALL_IMG) $(ISO_INSTALL_IMG_ZIP) - $(hide)mkdir -p $(PRODUCT_OUT)/releasefile_tmp; $(hide)mkdir -p $(PRODUCT_OUT)/efi_images_tmp; - $(hide)tar -xvzf $(PRODUCT_OUT)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz -C $(PRODUCT_OUT)/releasefile_tmp >/dev/null; - $(hide)unzip $(PRODUCT_OUT)/releasefile_tmp/*-flashfiles-*.zip -d $(PRODUCT_OUT)/efi_images_tmp/ > /dev/null; - $(hide)rm $(PRODUCT_OUT)/releasefile_tmp/$(TARGET_PRODUCT)-flashfiles*; - - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/system.img; - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/vendor.img; - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/product.img; +ifeq ($(RELEASE_BUILD),true) + $(hide)unzip $(BUILT_RELEASE_FLASH_FILES_PACKAGE) -d $(PRODUCT_OUT)/efi_images_tmp/ > /dev/null; +else + $(hide)unzip $(INTEL_FACTORY_FLASHFILES_TARGET) -d $(PRODUCT_OUT)/efi_images_tmp/ > /dev/null; +endif G_size=`echo "$$((1 << 32))"`; \ for img in `ls $(PRODUCT_OUT)/efi_images_tmp/`;do \ size=`stat -c %s $(PRODUCT_OUT)/efi_images_tmp/$${img}`; \ @@ -434,13 +430,23 @@ iso: flashfiles @echo "Zipping ISO release image $(ISO_RELEASE_TAR) ..." $(hide)rm -rf $(ISO_RELEASE_TAR) - $(hide)cp $(ISO_INSTALL_IMG) $(PRODUCT_OUT)/releasefile_tmp - $(hide)tar --exclude=*.git -czf $(ISO_RELEASE_TAR) -C $(PRODUCT_OUT)/releasefile_tmp/ . + $(hide)cp $(ISO_INSTALL_IMG) $(TOP)/ +ifneq (,$(wildcard vendor/intel/utils_vertical)) +ifneq (,$(wildcard vendor/intel/fw/keybox_provisioning)) + @echo "vertical_keybox_provisioning included" + $(hide) tar --exclude=*.git -czf $(ISO_RELEASE_TAR) scripts *patches *-flashfile-*.iso *provisioning +else + $(hide) tar --exclude=*.git -czf $(ISO_RELEASE_TAR) scripts *patches *-flashfile-*.iso +endif +else + $(hide) tar --exclude=*.git -czf $(ISO_RELEASE_TAR) scripts *patches *-flashfile-*.iso +endif @echo "make ISO image done ---" $(hide) cp -r $(ISO_RELEASE_TAR) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(ISO_INSTALL_IMG_ZIP) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) - $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/releasefile_tmp/ $(PRODUCT_OUT)/iso $(ISO_EFI) + $(hide)rm -rf $(PRODUCT_OUT)/efi_images_tmp/ $(PRODUCT_OUT)/iso $(ISO_EFI) + $(hide)rm -rf $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz && rm -rf $(TOP)/Release_Files && rm -rf $(TOP)/$(TARGET_PRODUCT)-flashfiles-*.zip && rm -rf $(TOP)/scripts && rm -rf $(TOP)/*patches && rm -rf $(TOP)/*provisioning && rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files $(TOP)/*-flashfile-*.iso @echo "ISO Release files are published" From 677bf508ed4630270331426896d6e01dc81704a7 Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Mon, 26 Sep 2022 21:27:03 +0800 Subject: [PATCH 09/18] Gptimage will not be built by default Remove caas.img/caas.img.gz from the CIV build and create new make command for Users in need. Right now each and every build generates caas.img as part of build process and it is uploaded to artifactory, consuming space and processing time. Since not all users need it, we can allow it to be created only as part of additional make commands that user can pass while running an engineering build. This should improve build time in CI and friendly to developer. Developer can use "make publish_gptimage" to generate caas.img.gz Tracked-On: OAM-102849 Signed-off-by: Chen, Gang G --- tasks/flashfiles.mk | 11 ++++++++++- tasks/publish.mk | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index f455ead..4c80b78 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -39,6 +39,7 @@ ifeq ($(tos_bin),none) tos_image := none endif +ifeq ($(BUILD_GPTIMAGE), true) $(gpt_name):$(BUILT_RELEASE_FLASH_FILES_PACKAGE) rm -rf $(GPT_DIR) mkdir -p $(GPT_DIR) @@ -62,6 +63,10 @@ $(gpt_name):$(BUILT_RELEASE_FLASH_FILES_PACKAGE) $(hide) rm -f $@.gz $(hide) gzip -f $@ $(hide) rm -rf $(GPT_DIR) +else +$(gpt_name): + @echo "skip build gptimages" +endif $(BUILT_RELEASE_FLASH_FILES_PACKAGE):$(BUILT_RELEASE_SUPER_IMAGE) $(fftf) $(UEFI_ADDITIONAL_TOOLS) $(hide) mkdir -p $(dir $@) @@ -318,7 +323,9 @@ ifneq (,$(wildcard out/dist)) $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ $(hide)rm -rf $(PRODUCT_OUT)/RELEASE $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb +ifeq ($(BUILD_GPTIMAGE), true) $(hide)cp -r $(PRODUCT_OUT)/release_sign/caas*.img.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb +endif $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN $(hide)cp -r device/intel/mixins/groups/device-specific/caas_dev/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ $(hide)cp -r $(PRODUCT_OUT)/scripts $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb @@ -336,7 +343,7 @@ else $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release endif else -flashfiles: $(INTEL_FACTORY_FLASHFILES_TARGET) publish_mkdir_dest publish_vertical host-pkg +flashfiles: $(INTEL_FACTORY_FLASHFILES_TARGET) publish_gptimage_var publish_mkdir_dest publish_vertical host-pkg @echo "Publishing Release files started" $(hide) mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files $(hide) cp -r $(PRODUCT_OUT)/*-flashfiles-*.zip $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release_Files @@ -363,7 +370,9 @@ ifneq (,$(wildcard out/dist)) $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ $(hide)rm -rf $(PRODUCT_OUT)/RELEASE $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb +ifeq ($(BUILD_GPTIMAGE), true) $(hide)cp -r $(PRODUCT_OUT)/caas*.img.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb +endif $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN $(hide)cp -r device/intel/mixins/groups/device-specific/caas_dev/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ $(hide)cp -r $(PRODUCT_OUT)/scripts $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb diff --git a/tasks/publish.mk b/tasks/publish.mk index 080b73a..d4c981e 100644 --- a/tasks/publish.mk +++ b/tasks/publish.mk @@ -170,6 +170,15 @@ publish_gptimage: @echo "Warning: Unable to fulfill publish_gptimage makefile request" endif # GPTIMAGE_BIN +.PHONY: publish_gptimage_var +ifeq ($(BUILD_GPTIMAGE), true) +publish_gptimage_var: publish_gptimage + @echo "building gptimages ..." +else # GPTIMAGE_BIN is not defined +publish_gptimage_var: + @echo "skip build gptimage" +endif # GPTIMAGE_BIN + .PHONY: publish_androidia_image ifdef ANDROID_IA_IMAGE publish_androidia_image: publish_mkdir_dest $(ANDROID_IA_IMAGE) @@ -225,7 +234,7 @@ publish_windows_tools: $(PLATFORM_RMA_TOOLS_CROSS_ZIP) @$(hide) mkdir -p $(publish_tool_destw) @$(hide) $(ACP) $(PLATFORM_RMA_TOOLS_CROSS_ZIP) $(publish_tool_destw) else -publish_ci: publish_liveimage publish_ota_flashfile publish_gptimage publish_grubinstaller publish_ifwi publish_firmware_symbols $(PUB_OSAGNOSTIC_TAG) $(PUB_CMCC_ZIP) +publish_ci: publish_liveimage publish_ota_flashfile publish_gptimage_var publish_grubinstaller publish_ifwi publish_firmware_symbols $(PUB_OSAGNOSTIC_TAG) $(PUB_CMCC_ZIP) $(if $(wildcard $(publish_dest)), \ $(foreach f,$(PUBLISH_CI_FILES), \ $(if $(wildcard $(f)),$(ACP) $(f) $(publish_dest);,)),) @@ -277,6 +286,6 @@ publish: aic $(hide) mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp $(PRODUCT_OUT)/$(TARGET_AIC_FILE_NAME) $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) else # ANDROID_AS_GUEST -publish: publish_mkdir_dest $(PUBLISH_GOALS) publish_ifwi publish_gptimage publish_firmware_symbols $(PUB_OSAGNOSTIC_TAG) publish_kf4abl_symbols $(PUB_CMCC_ZIP) publish_androidia_image publish_grubinstaller +publish: publish_mkdir_dest $(PUBLISH_GOALS) publish_ifwi publish_gptimage_var publish_firmware_symbols $(PUB_OSAGNOSTIC_TAG) publish_kf4abl_symbols $(PUB_CMCC_ZIP) publish_androidia_image publish_grubinstaller @$(ACP) out/dist/* $(publish_dest) endif # ANDROID_AS_GUEST From 3173f1d3e0c2485eab4aa943b78bcbe18201f72d Mon Sep 17 00:00:00 2001 From: swaroopb Date: Thu, 3 Nov 2022 09:30:30 +0530 Subject: [PATCH 10/18] Update License file for device-intel-build Tracked-On: OAM-104468 Signed-off-by: swaroopb --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From f9c7a349d9e17cff6e076d23c0a98d4b7feab01b Mon Sep 17 00:00:00 2001 From: swaroopb Date: Tue, 8 Nov 2022 08:46:38 +0530 Subject: [PATCH 11/18] Release deb is added for caas for customer Tracked-On: OAM-104601 Signed-off-by: swaroopb --- tasks/flashfiles.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 4c80b78..acc6a9c 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -317,7 +317,7 @@ endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) @echo "Release files are published" -ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) +ifneq (,$(filter caas caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @echo "Publish the CaaS image as debian_package" $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ @@ -364,7 +364,7 @@ endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) @echo "Release files are published" -ifneq (,$(filter caas_dev caas_cfc,$(TARGET_PRODUCT))) +ifneq (,$(filter caas caas_dev caas_cfc,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @echo "Publish the CaaS image as debian package" $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ From 056dee2b901691c9b404853789e55b88e34023e3 Mon Sep 17 00:00:00 2001 From: swaroopb Date: Fri, 25 Nov 2022 08:56:59 +0530 Subject: [PATCH 12/18] Modifying the path since we removed caas_dev Tracked-On: OAM-104995 Signed-off-by: swaroopb --- tasks/flashfiles.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index acc6a9c..5c78b62 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -327,7 +327,7 @@ ifeq ($(BUILD_GPTIMAGE), true) $(hide)cp -r $(PRODUCT_OUT)/release_sign/caas*.img.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb endif $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN - $(hide)cp -r device/intel/mixins/groups/device-specific/caas_dev/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ + $(hide)cp -r device/intel/mixins/groups/device-specific/caas/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ $(hide)cp -r $(PRODUCT_OUT)/scripts $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb $(hide)cp -r $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ $(PRODUCT_OUT) $(hide)(cd $(PRODUCT_OUT) && $(LOCAL_TOOL) dpkg-deb --build Release/) @@ -374,7 +374,7 @@ ifeq ($(BUILD_GPTIMAGE), true) $(hide)cp -r $(PRODUCT_OUT)/caas*.img.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb endif $(hide)mkdir -p $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN - $(hide)cp -r device/intel/mixins/groups/device-specific/caas_dev/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ + $(hide)cp -r device/intel/mixins/groups/device-specific/caas/addon/debian/* $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/DEBIAN/ $(hide)cp -r $(PRODUCT_OUT)/scripts $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/Release_Deb $(hide)cp -r $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ $(PRODUCT_OUT) $(hide)(cd $(PRODUCT_OUT) && $(LOCAL_TOOL) dpkg-deb --build Release/) From 4e8e82799c197b31c37d0d0a51022785d1e69567 Mon Sep 17 00:00:00 2001 From: Jeevaka Prabu Badrappan Date: Sat, 26 Nov 2022 08:45:29 +0530 Subject: [PATCH 13/18] Update valid build targets Removed not supported caas_cfc and caas_dev targets. Tracked-On: OAM-105021 Signed-off-by: Jeevaka Prabu Badrappan --- tasks/flashfiles.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 5c78b62..785d429 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -317,7 +317,7 @@ endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) @echo "Release files are published" -ifneq (,$(filter caas caas_dev caas_cfc,$(TARGET_PRODUCT))) +ifneq (,$(filter caas,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @echo "Publish the CaaS image as debian_package" $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ @@ -364,7 +364,7 @@ endif $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT) $(hide) cp -r $(TOP)/$(TARGET_PRODUCT)-releasefiles-$(TARGET_BUILD_VARIANT).tar.gz $(PRODUCT_OUT) @echo "Release files are published" -ifneq (,$(filter caas caas_dev caas_cfc,$(TARGET_PRODUCT))) +ifneq (,$(filter caas,$(TARGET_PRODUCT))) ifneq (,$(wildcard out/dist)) @echo "Publish the CaaS image as debian package" $(hide)rm -rf $(TOP)/pub/$(TARGET_PRODUCT)/$(TARGET_BUILD_VARIANT)/Release/ From ff8fa2b30f363c4a1b1b1e74ed58ebdd3ce235ee Mon Sep 17 00:00:00 2001 From: iViggyPrabhu Date: Tue, 28 Feb 2023 17:52:52 +0530 Subject: [PATCH 14/18] Modify github workflow to support TriggerBuild Added support for TriggerBuild --- .github/workflows/Runchecks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Runchecks.yaml b/.github/workflows/Runchecks.yaml index 63e287c..f4f5124 100644 --- a/.github/workflows/Runchecks.yaml +++ b/.github/workflows/Runchecks.yaml @@ -10,8 +10,9 @@ on: branches: "**" jobs: TriggerWorkfows: - uses: projectceladon/celadonworkflows/.github/workflows/Triggerall.yml@main + uses: projectceladon/celadonworkflows/.github/workflows/Triggerall.yml@github-workflows-text with: PR_EVENT: ${{ github.event.action }} PR_URL: https://github.com/${{github.repository}}/pull/${{ github.event.pull_request.number }} PR_LABEL: ${{ github.event.label.name }} + EVENT: ${{ toJSON(github.event) }} From 096507fdbeb2dd558f66d87181ea71d54e5e1c2d Mon Sep 17 00:00:00 2001 From: "Mastan, ShaikX Shahbaz" Date: Mon, 10 Apr 2023 12:46:22 +0530 Subject: [PATCH 15/18] updated github workflows file --- .github/workflows/Runchecks.yaml | 18 ------------------ .github/workflows/run_ci_checks.yaml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/Runchecks.yaml create mode 100644 .github/workflows/run_ci_checks.yaml diff --git a/.github/workflows/Runchecks.yaml b/.github/workflows/Runchecks.yaml deleted file mode 100644 index f4f5124..0000000 --- a/.github/workflows/Runchecks.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Run CheckApproval CheckBug CheckLint tasks - -on: - pull_request: - types: [opened, synchronize, reopened, labeled] - branches: "**" - pull_request_review: - types: [submitted] - branches: "**" -jobs: - TriggerWorkfows: - uses: projectceladon/celadonworkflows/.github/workflows/Triggerall.yml@github-workflows-text - with: - PR_EVENT: ${{ github.event.action }} - PR_URL: https://github.com/${{github.repository}}/pull/${{ github.event.pull_request.number }} - PR_LABEL: ${{ github.event.label.name }} - EVENT: ${{ toJSON(github.event) }} diff --git a/.github/workflows/run_ci_checks.yaml b/.github/workflows/run_ci_checks.yaml new file mode 100644 index 0000000..5fe53af --- /dev/null +++ b/.github/workflows/run_ci_checks.yaml @@ -0,0 +1,15 @@ +--- +name: Run CI checks + +on: + pull_request: + types: [opened, synchronize, reopened, labeled] + branches: "**" + pull_request_review: + types: [submitted] + branches: "**" +jobs: + TriggerWorkfows: + uses: projectceladon/celadonworkflows/.github/workflows/trigger_ci.yml@v1.0 + with: + EVENT: ${{ toJSON(github.event) }} From c93517b58e81386518e7b7297b91532a069f3769 Mon Sep 17 00:00:00 2001 From: "Mastan, ShaikX Shahbaz" Date: Fri, 2 Jun 2023 15:50:32 +0530 Subject: [PATCH 16/18] Added Github Workflows --- .github/workflows/run_ci_checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_ci_checks.yaml b/.github/workflows/run_ci_checks.yaml index 5fe53af..38c3846 100644 --- a/.github/workflows/run_ci_checks.yaml +++ b/.github/workflows/run_ci_checks.yaml @@ -3,10 +3,10 @@ name: Run CI checks on: pull_request: - types: [opened, synchronize, reopened, labeled] + types: "**" branches: "**" pull_request_review: - types: [submitted] + types: "**" branches: "**" jobs: TriggerWorkfows: From 3161c57dd614e0de06d91dcc648e51a51ebb84f5 Mon Sep 17 00:00:00 2001 From: Tanuj Tekriwal Date: Tue, 21 Mar 2023 11:48:31 +0530 Subject: [PATCH 17/18] Updating the clang version to 17.0.2 Updating based on Android U Also changing path from lib64 to lib in latest Clang version Tracked-On: OAM-112683 Signed-off-by: Tanuj Tekriwal --- core/definitions.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index 4636a83..8d1d0f4 100755 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -88,9 +88,9 @@ IAFW_CC := $(IAFW_TOOLS_CLANG_PREFIX)/clang IAFW_OBJCOPY := $(IAFW_TOOLS_GCC_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX) EFI_OBJCOPY := $(IAFW_OBJCOPY) ifeq ($(TARGET_IAFW_ARCH),x86_64) -IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-x86_64-android.a +IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib/clang/17.0.2/lib/linux/libclang_rt.builtins-x86_64-android.a else -IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-i686-android.a +IAFW_LIBCLANG := $(IAFW_TOOLCHAIN_CLANG_ROOT)/../lib/clang/17.0.2/lib/linux/libclang_rt.builtins-i686-android.a endif # Transformation definitions, ala build system's definitions.mk From 7f31c9d9e2ccfb71d15b728a52430de03502540b Mon Sep 17 00:00:00 2001 From: Hao Yao Date: Sat, 25 Feb 2023 21:38:02 +0800 Subject: [PATCH 18/18] flashfiles.mk: Use `du -b` to get apparent size On disks using ZFS, `du` can't get correct size of efi_images_tmp, which caused "Disk full" error. Using apparent size can fix it. Tracked-On: OAM-106622 Signed-off-by: Hao Yao --- tasks/flashfiles.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tasks/flashfiles.mk b/tasks/flashfiles.mk index 785d429..cb32ab8 100755 --- a/tasks/flashfiles.mk +++ b/tasks/flashfiles.mk @@ -417,11 +417,9 @@ endif done; $(hide)rm -rf $(ISO_EFI); \ - flashfile_size=`du -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \ - flashfile_size=`expr $${flashfile_size} + 102400`; \ - flashfile_size=`expr $${flashfile_size} / 63 + 1 `; \ - flashfile_size=`expr $${flashfile_size} \* 63 `; \ - dd if=/dev/zero of=$(ISO_EFI) bs=1024 count=$${flashfile_size}; + flashfile_size=`du -b -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \ + flashfile_size=`expr $${flashfile_size} / 1048576 + 11`; \ + dd if=/dev/zero of=$(ISO_EFI) bs=1M count=$${flashfile_size}; $(hide)mkdosfs -F32 -n EFI $(ISO_EFI); $(hide)mmd -i $(ISO_EFI) ::EFI;