From a7d801861671347a847c2c7cab143fd309e6daa6 Mon Sep 17 00:00:00 2001 From: sunghan Date: Thu, 20 Jul 2017 20:17:27 +0900 Subject: [PATCH] Add/modify README to show how to make and download ROMFS image --- build/configs/artik053/README.md | 38 ++++++++++++++++++++++++++++++++++++ build/configs/sidk_s5jt200/README.md | 27 +++++++++++++++++++++++++ docs/HowToUseROMFS.md | 19 ++++++++++++++++++ external/contents/README.md | 22 +++++++++++++++++++++ external/contents/README.txt | 15 -------------- 5 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 docs/HowToUseROMFS.md create mode 100644 external/contents/README.md delete mode 100644 external/contents/README.txt diff --git a/build/configs/artik053/README.md b/build/configs/artik053/README.md index fe176b9..a65f42c 100644 --- a/build/configs/artik053/README.md +++ b/build/configs/artik053/README.md @@ -7,6 +7,7 @@ The ARTIK 053 is a SOC for Wi-Fi™ IoT solutions. The ARTIK 053 has a Wi-Fi sub > [Information](#information) > [Environment Set-up](#environment-set-up) > [How to program a binary](#how-to-program-a-binary) +> [ROMFS](#romfs) > [Configuration Sets](#configuration-sets) ## Information @@ -74,6 +75,43 @@ openocd -f artik053.cfg -c ' \ flash_write os ../build/output/bin/tinyara_head.bin; exit' ``` +## ROMFS + +Before executing below steps, execute [generic steps](../../../external/contents/README.md), step 1 and step 2. + +3. Modify partition configs. + Below steps creates ROMFS partition with size 400KB at next of user partition. + 1. Split user partition size from (1400) to (1000, 400) in ARTIK053_FLASH_PART_LIST + ```bash + Board Selection -> change values at Flash partition size list (in KBytes) + ``` + 2. Append "romfs" at next of *smartfs* to ARTIK053_FLASH_PART_TYPE + ```bash + Board Selection -> append string at Flash partition type list + ``` + 3. Append "rom" at next of *user* to ARTIK053_FLASH_PART_NAME + ```bash + Board Selection -> append string at FLash partition name list + ``` +4. Build Tizen RT +5. Prepare ROM image + ```bash + sh $TIZENRT_BASEDIR/../apps/tools/mkromfsimg.sh + ``` +6. Modify partition map to *$TIZENRT_BASEDIR/../build/configs/artik053/tools/openocd/partition_map.cfg* + ```bash + user { "USER R/W" 0x04620000 0x000FA000 0 } + rom { "ROM FS" 0x0471A000 0x00064000 0 } + ``` +7. Program a ROM image + ```bash + flash_write rom ../bin/rom.img; \ + ``` +8. Mount on device + ```bash + mount -t romfs /dev/smart4rom9 /rom + ``` + ## Configuration Sets will be updated diff --git a/build/configs/sidk_s5jt200/README.md b/build/configs/sidk_s5jt200/README.md index 55dff5b..4a90483 100644 --- a/build/configs/sidk_s5jt200/README.md +++ b/build/configs/sidk_s5jt200/README.md @@ -7,6 +7,7 @@ Samsung IoT Development Kit for S5JT200 chipset. > [Information](#information) > [Environment Set-up](#environment-set-up) > [How to program a binary](#how-to-program-a-binary) +> [ROMFS](#romfs) > [Configuration Sets](#configuration-sets) > [Board Configuration](#board-configuration) @@ -94,6 +95,32 @@ TIZENRT_BASEDIR was set at [[Getting the sources]](../../../README.md#getting-th make download ALL ``` +## ROMFS + +Before executing below steps, execute [generic steps](../../../external/contents/README.md), step 1 and step 2. + +3. Modify partition configs. + Below steps creates ROMFS partition with size 256KB at the end, + where romfs device is a smart device and romfs filesystem will be mounted on smartdevice "/dev/smart0p15" + 1. Split last partition size to (256, 256) in SIDK_S5JT200_FLASH_PART_LIST + ```bash + Board Selection -> change values at Flash partition size list (in KBytes) + ``` + 2. Append "smartfs" at end to SIDK_S5JT200_FLASH_PART_TYPE + ```bash + Board Selection -> append string at Flash partition type list + ``` + 3. Append "romfs" at end to SIDK_S5JT200_FLASH_PART_NAME + ```bash + Board Selection -> append string at FLash partition name list + ``` +4. Enable auto-mount config. + ```bash + Board Selection -> Automount partitions -> Automount ROM read only partition to y + ``` + +After above two steps, build Tizen RT and program a Tizen RT binary through above [method](#how-to-program-a-binary). + ## Configuration Sets There are three configuration sets for sidk_s5jt200, including 'hello_with_tash', 'kernel_sample', and 'tc'. diff --git a/docs/HowToUseROMFS.md b/docs/HowToUseROMFS.md new file mode 100644 index 0000000..e628ac6 --- /dev/null +++ b/docs/HowToUseROMFS.md @@ -0,0 +1,19 @@ +# How to use ROMFS + +There are two parts to use ROMFS, generic and board specific. + +## 1. Generic + +This part supports making ROMFS image. +Please find it at [README](../external/contents/README.md) + +## 2. Board Specific + +This part supports making partition for ROMFS and programming a ROMFS image. +Please find it at each README. + + +ARTIK053 [[Details]](../build/configs/artik053/README.md#romfs) + +SIDK_S5JT200 [[Details]](../build/configs/sidk_s5jt200/README.md#romfs) + diff --git a/external/contents/README.md b/external/contents/README.md new file mode 100644 index 0000000..854a38e --- /dev/null +++ b/external/contents/README.md @@ -0,0 +1,22 @@ + +# Contents for ROMFS + +1. Enable ROMFS config through menuconfig at *os* folder. +```bash +cd $TIZENRT_BASEDIR +make menuconfig +``` + +Select menu. +```bash +File Systems -> ROMFS to y +``` + +2. Put your contents at *external/contents* folder. + +After these two steps, board specific steps should be executed. + +ARTIK053 [[Details]](../../build/configs/artik053/README.md#romfs) + +SIDK_S5JT200 [[Details]](../../build/configs/sidk_s5jt200/README.md#romfs) + diff --git a/external/contents/README.txt b/external/contents/README.txt deleted file mode 100644 index b001b8b..0000000 --- a/external/contents/README.txt +++ /dev/null @@ -1,15 +0,0 @@ - -FILE : README.txt - -INTRODUCTION -------------------------------------------------------------------------- -You can link board-specific folder on this folder -For example, Wi-Fi firmware and so on -It can used to mount the folder on filesystem - -HOW TO USE --------------------------------------------------------------------------- -Link board-specific folder saving files or folders on this directory -ln -sf external/contents/ -- original folder : /bcm/external/contents/artik050 -- linked results : external/contents/artik050 -> ../../bcm/external/contents/artik050 -- 2.7.4