From de239f1fef2cfbde85791452f95b3372cc1afe1e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 15 Apr 2015 11:31:13 -0600 Subject: Update README --- apps/system/zoneinfo/README.txt | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/apps/system/zoneinfo/README.txt b/apps/system/zoneinfo/README.txt index a4cd25aa0..497a02f29 100644 --- a/apps/system/zoneinfo/README.txt +++ b/apps/system/zoneinfo/README.txt @@ -1,8 +1,8 @@ apps/system/zoninfo/README.txt Author: Gregory Nutt -Contents -======= +Directory Contents +================== This directory contains logic to create a version of the TZ/Olson database. This database is required if localtime() support is selected via @@ -18,17 +18,17 @@ Creating and Mounting a ROMFS TZ Database ========================================= The ROMFS filesystem image can that be mounted during the boot-up sequence -so that it is available for the localtime logic. There are two steps to +so that it is available for the localtime() logic. There are two steps to doing this: - First, a ROM disk device must be created. This is done by calling the function romdisk_register() as described in nuttx/include/nuttx/fs/ramdisk.h. This is an OS level operation - and must be done in the board-level logic before your appliction + and must be done in the board-level logic before your application starts. romdisk_register() will create a block driver at /dev/ramN where N - is the device minor number that was provdied to romdisk_regsiter. + is the device minor number that was provided to romdisk_regsiter. - The second step is to mount the file system. This step can be performed either in your board configuration logic or by your @@ -57,8 +57,24 @@ modifications to the configuration that I used for testing: CONFIG_SYSTEM_ZONEINFO=y CONFIG_SYSTEM_ZONEINFO_ROMFS=y -Here is a sample run. I have not seen any errors but neither am I -certain that everything is working properly: +NOTE: The full TZ database is quite large. To create a reasonable sized +ROMFS image, I had to trim some of the files like this: + + make context + cd ../apps/system/zoneinfo/tzbin/etc/zoneinfo + +Remove as many timezone files as you can. Do not remove the GMT, localtime, +or posixrules files. Those might be needed in any event. Then you can +force rebuilding of the ROMFS filesystem be removing some files: + + cd ../../.. + rm romfs_zoneinfo.* + rm *.o + cd ../../nuttx + make + +Here is a sample run. I have not seen any errors in single stepping through +the logic but neither am I certain that everything is working properly: NuttShell (NSH) nsh> date -- cgit v1.2.3