From b59f4bec4011f44f210ecc12eb179245fc69428b Mon Sep 17 00:00:00 2001 From: wchang kim Date: Thu, 31 Aug 2017 07:16:00 +0900 Subject: [PATCH] Applying Squashfs to iot-gps_tracker image. - Adding new partition. - Adding new script to make squashfs for /usr. - Appling them. Change-Id: I094f67906cdeff0f186cfcd85d924024cfc64974 --- common.yaml | 4 ++-- partitions/common-mbr-2parts-rpi3-ramdisk-squashfs | 5 +++++ patterns/iot-adaptation-rpi3-gps_tracker.yaml | 3 +++ scripts/common-apply-squashfs.post | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 partitions/common-mbr-2parts-rpi3-ramdisk-squashfs create mode 100644 scripts/common-apply-squashfs.post diff --git a/common.yaml b/common.yaml index a579e85..c6a66aa 100644 --- a/common.yaml +++ b/common.yaml @@ -253,7 +253,7 @@ RPi3: - buildname RPi3 GPS Tracker: - Part: common-mbr-2parts-rpi3-ramdisk + Part: common-mbr-2parts-rpi3-ramdisk-squashfs Groups: - Common Adaptation - IoT Adaptation RPi3 GPS Tracker @@ -271,12 +271,12 @@ RPi3 GPS Tracker: - generic-bluetooth - generic-multimedia - generic-desktop-applications - - common-desktop-applications - generic-crosswalk - common-crosswalk - common-license - generic-security - common-cleanup-rpi3 + - common-apply-squashfs Repos: [] NoChrootScripts: - buildname diff --git a/partitions/common-mbr-2parts-rpi3-ramdisk-squashfs b/partitions/common-mbr-2parts-rpi3-ramdisk-squashfs new file mode 100644 index 0000000..db5f5bd --- /dev/null +++ b/partitions/common-mbr-2parts-rpi3-ramdisk-squashfs @@ -0,0 +1,5 @@ +part / --size=10 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-b 1024" +part /usr --grow --fstype=ext4 --label=sqsh_usr --exclude-from-image +part /opt/ --size=70 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0 -b 1024" +part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024" + diff --git a/patterns/iot-adaptation-rpi3-gps_tracker.yaml b/patterns/iot-adaptation-rpi3-gps_tracker.yaml index b1eb5a4..3a4a792 100644 --- a/patterns/iot-adaptation-rpi3-gps_tracker.yaml +++ b/patterns/iot-adaptation-rpi3-gps_tracker.yaml @@ -101,3 +101,6 @@ Packages: #From TRE-1403 - pkgmgr-server - capi-appfw-package-manager +#SquashFS & TCT +- pkgmgr-tool +- squashfs diff --git a/scripts/common-apply-squashfs.post b/scripts/common-apply-squashfs.post new file mode 100644 index 0000000..155d83e --- /dev/null +++ b/scripts/common-apply-squashfs.post @@ -0,0 +1,16 @@ +#!/bin/sh +echo "############### common-apply-squashfs.post ################" + +# for connectivity firmware +mkdir -p /opt/etc/bluetooth +cp -rf /usr/etc/bluetooth/* /opt/etc/bluetooth +rm -rf /usr/etc/bluetooth +ln -s ../../opt/etc/bluetooth /usr/etc/bluetooth + +mkdir -p /opt/etc/firmware +cp -rf /usr/lib/firmware/* /opt/etc/firmware/ +rm -rf /usr/lib/firmware +ln -s ../../opt/etc/firmware /usr/lib/firmware + +mksquashfs /usr/* /opt/sqsh_usr.img +rm -rf /usr/* -- 2.7.4