Applying Squashfs to iot-gps_tracker image. 31/146831/2
authorwchang kim <wchang.kim@samsung.com>
Wed, 30 Aug 2017 22:16:00 +0000 (07:16 +0900)
committerwchang kim <wchang.kim@samsung.com>
Wed, 30 Aug 2017 22:56:51 +0000 (07:56 +0900)
- Adding new partition.
- Adding new script to make squashfs for /usr.
- Appling them.

Change-Id: I094f67906cdeff0f186cfcd85d924024cfc64974

common.yaml
partitions/common-mbr-2parts-rpi3-ramdisk-squashfs [new file with mode: 0644]
patterns/iot-adaptation-rpi3-gps_tracker.yaml
scripts/common-apply-squashfs.post [new file with mode: 0644]

index 78ce390..a5ba387 100644 (file)
@@ -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 (file)
index 0000000..db5f5bd
--- /dev/null
@@ -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"
+
index b1eb5a4..3a4a792 100644 (file)
@@ -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 (file)
index 0000000..155d83e
--- /dev/null
@@ -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/*