[meta-intel] [PATCH 2/2] quark: Support direct-boot image for USB storage media

Jianxun Zhang jianxun.zhang at linux.intel.com
Tue Jul 26 15:26:17 PDT 2016


Add a new wks file for quark based on the existing
mkgalileodisk.wks with necessary changes.

() specify sda for partitions and rootwait for USB in new wks.
() Rename the original wks file and amend its description
() Update README accordingly

Signed-off-by: Jianxun Zhang <jianxun.zhang at linux.intel.com>
---
 README                                             | 22 +++++++++++++---------
 .../{mkgalileodisk.wks => galileodisk-sd.wks}      |  4 ++--
 scripts/lib/wic/canned-wks/galileodisk-usb.wks     |  9 +++++++++
 3 files changed, 24 insertions(+), 11 deletions(-)
 rename scripts/lib/wic/canned-wks/{mkgalileodisk.wks => galileodisk-sd.wks} (78%)
 create mode 100644 scripts/lib/wic/canned-wks/galileodisk-usb.wks

diff --git a/README b/README
index d2098a9..9aafe49 100644
--- a/README
+++ b/README
@@ -211,9 +211,9 @@ the downloaded BSP layer or from the meta-intel git repository, you'll
 find the bootable image in the build/tmp/deploy/images/xxx directory,
 where again 'xxx' refers to the machine name used in the build.
 
-The Galileo board boots off of an SD card that has a special disk
-layout.  The 'wic' tool can be used to create an SD card adhering to
-that format via the following steps.
+The Galileo board boots off of a SD card that has a special disk layout
+or a USB storage media.  The 'wic' tool can be used to create directly
+bootable image for either of the two formats with the following steps.
 
 If you haven't already, you need to build parted-native. (You will get
 an error message when running the wic script if you haven't.)
@@ -223,25 +223,29 @@ an error message when running the wic script if you haven't.)
 Use the wic script to create an SD card image:
 
     $ wic list images
-       mkgalileodisk                         Create an Galileo Gen 1/2 disk image
-       mkgummidisk                           Create an EFI disk image
+       galileodisk-sd                                Create an Galileo Gen 1/2 disk image (SD card)
+       galileodisk-usb                               Create an Galileo Gen 1/2 disk image (USB Storage)
+       mkgummidisk                                   Create an EFI disk image
 
-Assuming you want to boot the 'core-image-minimal' image:
+Assuming you want to boot the 'core-image-minimal' image for SD card media:
 
-     $ wic create mkgalileodisk -e core-image-minimal
+     $ wic create galileodisk-sd -e core-image-minimal
 
 If successful, the wic script generates the image and prints its location:
 
        Info: The new image(s) can be found here:
-         /var/tmp/wic/build/mkgalileodisk-201604211444-mmcblk0.direct
+         /var/tmp/wic/build/galileodisk-sd-201604211444-mmcblk0.direct
        ...
 
 Write the output image to an SD Card
 
-     $ sudo dd if=/path/to/image/mkgalileodisk-*-mmcblk0.direct of=/dev/your_sd_dev
+     $ sudo dd if=/path/to/image/galileodisk-sd-*-mmcblk0.direct of=/dev/your_sd_dev
  
 Insert the SD Card into the reference platform and power on.
 
+To create a direct-boot image for USB storage media, simply specify galileodisk-usb
+instead of galileodisk-sd in "wic create ..." command, then write the output image
+to a USB storage media and boot it.
 
 III. Technical Miscellany
 =========================
diff --git a/scripts/lib/wic/canned-wks/mkgalileodisk.wks b/scripts/lib/wic/canned-wks/galileodisk-sd.wks
similarity index 78%
rename from scripts/lib/wic/canned-wks/mkgalileodisk.wks
rename to scripts/lib/wic/canned-wks/galileodisk-sd.wks
index c9835a6..4d1a511 100644
--- a/scripts/lib/wic/canned-wks/mkgalileodisk.wks
+++ b/scripts/lib/wic/canned-wks/galileodisk-sd.wks
@@ -1,6 +1,6 @@
-# short-description: Create an Galileo Gen 1/2 disk image
+# short-description: Create an Galileo Gen 1/2 disk image (SD card)
 # long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2,
-# that the user can directly dd to boot media.
+# that the user can directly dd to a SD card then boot it.
 
 part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk mmcblk0 --label msdos --active --align 1024
 
diff --git a/scripts/lib/wic/canned-wks/galileodisk-usb.wks b/scripts/lib/wic/canned-wks/galileodisk-usb.wks
new file mode 100644
index 0000000..f9f27c5
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/galileodisk-usb.wks
@@ -0,0 +1,9 @@
+# short-description: Create an Galileo Gen 1/2 disk image (USB Storage)
+# long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2,
+# that the user can directly dd USB storage media then boot it.
+
+part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024
+
+part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
+
+bootloader  --timeout=0  --append="rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5"
-- 
2.7.4



More information about the meta-intel mailing list