mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-08 12:42:34 +08:00
Update README
This commit is contained in:
parent
688558c99a
commit
84fcc41a63
@ -1,8 +1,8 @@
|
||||
apps/system/zoninfo/README.txt
|
||||
Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user