From a7ed6819eb5405ede668c301af43284150ca0385 Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Wed, 24 Apr 2024 21:08:23 +0900 Subject: [PATCH] Add scripts and package for delta generation To generate delta image during the image building, scripts are added to the 'post --nochroot' section and 'runscript' section. Also, to use delta generating tool, a package 'upgrade-tools-generic' is added to the required packages. Changes above are applied to the armv7l/aarch64, boot/headed rpi4 images. Change-Id: Id96ade9d0a58ac2a078fdacacf29c95251870545 Signed-off-by: SangYoun Kwak --- ks/tizen-boot-arm64-rpi4.yaml | 5 +++++ ks/tizen-boot-armv7l-rpi4.yaml | 5 +++++ ks/tizen-headed-aarch64.yaml | 4 ++++ ks/tizen-headed-armv7l.yaml | 4 ++++ patterns/iot-delta-generation-boot-rpi4.yaml | 5 +++++ patterns/iot-delta-generation-platform.yaml | 5 +++++ scripts/delta-generation-boot-arm64-rpi4.run | 10 ++++++++++ scripts/delta-generation-boot-armv7l-rpi4.run | 10 ++++++++++ scripts/delta-generation-headed-aarch64.run | 10 ++++++++++ scripts/delta-generation-headed-armv7l.run | 10 ++++++++++ scripts/delta-generation-prepare-boot-rpi4.nochroot | 10 ++++++++++ scripts/delta-generation-prepare-platform.nochroot | 10 ++++++++++ 12 files changed, 88 insertions(+) create mode 100644 patterns/iot-delta-generation-boot-rpi4.yaml create mode 100644 patterns/iot-delta-generation-platform.yaml create mode 100644 scripts/delta-generation-boot-arm64-rpi4.run create mode 100644 scripts/delta-generation-boot-armv7l-rpi4.run create mode 100644 scripts/delta-generation-headed-aarch64.run create mode 100644 scripts/delta-generation-headed-armv7l.run create mode 100644 scripts/delta-generation-prepare-boot-rpi4.nochroot create mode 100644 scripts/delta-generation-prepare-platform.nochroot diff --git a/ks/tizen-boot-arm64-rpi4.yaml b/ks/tizen-boot-arm64-rpi4.yaml index 42c0b40..329b161 100644 --- a/ks/tizen-boot-arm64-rpi4.yaml +++ b/ks/tizen-boot-arm64-rpi4.yaml @@ -10,6 +10,11 @@ Groups: - IoT Boot RPi4 - IoT Hal Base - IoT Hal Backend RPI4 +- IoT Delta Generation RPI4 Boot Repos: - unified-standard - base-standard +NoChrootScripts: +- delta-generation-prepare-boot-rpi4 +RunScripts: +- delta-generation-boot-arm64-rpi4 diff --git a/ks/tizen-boot-armv7l-rpi4.yaml b/ks/tizen-boot-armv7l-rpi4.yaml index 6ace942..ecf77da 100644 --- a/ks/tizen-boot-armv7l-rpi4.yaml +++ b/ks/tizen-boot-armv7l-rpi4.yaml @@ -10,6 +10,11 @@ Groups: - IoT Boot RPi4 32Bit - IoT Hal Base - IoT Hal Backend RPI4 +- IoT Delta Generation RPI4 Boot Repos: - unified-standard - base-standard +NoChrootScripts: +- delta-generation-prepare-boot-rpi4 +RunScripts: +- delta-generation-boot-armv7l-rpi4 diff --git a/ks/tizen-headed-aarch64.yaml b/ks/tizen-headed-aarch64.yaml index e2c6faf..fac8d2e 100644 --- a/ks/tizen-headed-aarch64.yaml +++ b/ks/tizen-headed-aarch64.yaml @@ -12,5 +12,9 @@ Repos: Groups: - IoT Headed Base - IoT Adaptation COMMON + - IoT Delta Generation Platform NoChrootScripts: - backup-data + - delta-generation-prepare-platform +RunScripts: + - delta-generation-headed-aarch64 diff --git a/ks/tizen-headed-armv7l.yaml b/ks/tizen-headed-armv7l.yaml index f7e8449..9f1e80e 100644 --- a/ks/tizen-headed-armv7l.yaml +++ b/ks/tizen-headed-armv7l.yaml @@ -12,5 +12,9 @@ Repos: Groups: - IoT Headed Base - IoT Adaptation COMMON + - IoT Delta Generation Platform NoChrootScripts: - backup-data + - delta-generation-prepare-platform +RunScripts: + - delta-generation-headed-armv7l diff --git a/patterns/iot-delta-generation-boot-rpi4.yaml b/patterns/iot-delta-generation-boot-rpi4.yaml new file mode 100644 index 0000000..938311e --- /dev/null +++ b/patterns/iot-delta-generation-boot-rpi4.yaml @@ -0,0 +1,5 @@ +Summary: IoT Delta Generation RPI4 Boot +Description: IoT Delta Generation RPI4 Boot +Name: iot-delta-generation-boot-rpi4 +Packages: +- upgrade-tools-generic-boot-rpi4 diff --git a/patterns/iot-delta-generation-platform.yaml b/patterns/iot-delta-generation-platform.yaml new file mode 100644 index 0000000..a1bb35f --- /dev/null +++ b/patterns/iot-delta-generation-platform.yaml @@ -0,0 +1,5 @@ +Summary: IoT Delta Generation Platform +Description: IoT Delta Generation Platform +Name: iot-delta-generation-platform +Packages: +- upgrade-tools-generic-platform diff --git a/scripts/delta-generation-boot-arm64-rpi4.run b/scripts/delta-generation-boot-arm64-rpi4.run new file mode 100644 index 0000000..056509b --- /dev/null +++ b/scripts/delta-generation-boot-arm64-rpi4.run @@ -0,0 +1,10 @@ +echo "############### delta-generation.run ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation.run runscript script - start' + +if [ -d /upgrade-tools ]; then + cd /upgrade-tools + ./scripts/delta-generation-runscript-kickstart.sh "rpi4" "tizen-boot-arm64-rpi4" "Tizen-8.0" +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation.run runscript script - end' diff --git a/scripts/delta-generation-boot-armv7l-rpi4.run b/scripts/delta-generation-boot-armv7l-rpi4.run new file mode 100644 index 0000000..5d9c779 --- /dev/null +++ b/scripts/delta-generation-boot-armv7l-rpi4.run @@ -0,0 +1,10 @@ +echo "############### delta-generation.run ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation.run runscript script - start' + +if [ -d /upgrade-tools ]; then + cd /upgrade-tools + ./scripts/delta-generation-runscript-kickstart.sh "rpi4" "tizen-boot-armv7l-rpi4" "Tizen-8.0" +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation.run runscript script - end' diff --git a/scripts/delta-generation-headed-aarch64.run b/scripts/delta-generation-headed-aarch64.run new file mode 100644 index 0000000..c7603a2 --- /dev/null +++ b/scripts/delta-generation-headed-aarch64.run @@ -0,0 +1,10 @@ +echo "############### delta-generation-headed-aarch64.run ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation-headed-aarch64.run runscript script - start' + +if [ -d /upgrade-tools ]; then + cd /upgrade-tools + ./scripts/delta-generation-runscript-kickstart.sh "platform" "tizen-headed-aarch64" "Tizen-8.0" +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation-headed-aarch64.run runscript script - end' diff --git a/scripts/delta-generation-headed-armv7l.run b/scripts/delta-generation-headed-armv7l.run new file mode 100644 index 0000000..f853ad4 --- /dev/null +++ b/scripts/delta-generation-headed-armv7l.run @@ -0,0 +1,10 @@ +echo "############### delta-generation-headed-armv7l.run ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation-headed-armv7l.run runscript script - start' + +if [ -d /upgrade-tools ]; then + cd /upgrade-tools + ./scripts/delta-generation-runscript-kickstart.sh "platform" "tizen-headed-armv7l" "Tizen-8.0" +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation-headed-armv7l.run runscript script - end' diff --git a/scripts/delta-generation-prepare-boot-rpi4.nochroot b/scripts/delta-generation-prepare-boot-rpi4.nochroot new file mode 100644 index 0000000..22b1472 --- /dev/null +++ b/scripts/delta-generation-prepare-boot-rpi4.nochroot @@ -0,0 +1,10 @@ +echo "############### delta-generation-prepare-boot-rpi4.nochroot ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation-prepare-boot-rpi4.nochroot nochroot post script - start' + +if [ -d ${INSTALL_ROOT}/upgrade-tools-generic-boot-rpi4 -a -d /upgrade-tools ]; then + cp -r ${INSTALL_ROOT}/upgrade-tools-generic-boot-rpi4/* /upgrade-tools/ + rm -rf ${INSTALL_ROOT}/upgrade-tools-generic-boot-rpi4 +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation-prepare-boot-rpi4.nochroot nochroot post script - end' diff --git a/scripts/delta-generation-prepare-platform.nochroot b/scripts/delta-generation-prepare-platform.nochroot new file mode 100644 index 0000000..663ae75 --- /dev/null +++ b/scripts/delta-generation-prepare-platform.nochroot @@ -0,0 +1,10 @@ +echo "############### delta-generation-prepare-platform.nochroot ################" + +date +'[%m/%d %H:%M:%S %Z] delta-generation-prepare-platform.nochroot nochroot post script - start' + +if [ -d ${INSTALL_ROOT}/upgrade-tools-generic-platform -a -d /upgrade-tools ]; then + cp -r ${INSTALL_ROOT}/upgrade-tools-generic-platform/* /upgrade-tools/ + rm -rf ${INSTALL_ROOT}/upgrade-tools-generic-platform +fi + +date +'[%m/%d %H:%M:%S %Z] delta-generation-prepare-platform.nochroot nochroot post script - end' -- 2.7.4