Jiuzhu Dong
36ac863777
endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
...
Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 17:58:17 +08:00
Jiuzhu Dong
10f091fdbb
byteswap.h: add byteswap.h header file
...
Change-Id: I2b00618f608efbb8834328823b5e0eaa66f42aba
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 16:49:39 +08:00
Xiang Xiao
d27a86486f
fs/hostfs: Support fchstat and chstat callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:33:14 +08:00
Xiang Xiao
7afb3354cc
fs: Add utimens and lutimens
...
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:09:35 +08:00
Xiang Xiao
ad827673b2
Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
...
since boardctl isn't a libc feature
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If32db0451e10fb02e0c12ed48f2b7120859b8ae3
2021-08-09 21:03:17 +08:00
Xiang Xiao
4bffde887d
Rename LIB_ to LIBC_ for all libc Kconfig
...
follow other libc component naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66cf8f3201560ce71576279640e94ae3147ad0a2
2021-08-09 21:03:17 +08:00
liuhaitao
6442b8ea2d
Revert "libc: Implement fesetround & fegetround for arm"
...
The updated GNU Arm Embedded Toolchain Version 10.3-2021.07 has implemented
fesetround & fegetround.
This reverts commit 5c0a079aea .
Change-Id: I6418c1f47a6c1a319a2973f01340480d50f54e8e
2021-08-09 20:02:47 +08:00
xiatian6
ca095b2d90
Feature: Sensor: Add ct7117 temperature sensor driver.
...
N/A
Add ct7117 temperature sensor driver for nuttx.
Change-Id: Ibc21e732c418ab2d61cc40a806c82cc76ad400bd
2021-08-09 18:30:04 +08:00
yangjiukui
fe98e909d2
L61: Sensor: Add sensor driver for LSM6DSO.
...
N/A
Add driver for the STMicro LSM6DSO.
Change-Id: I462a2912cf8c7f141f285e482c8222bdb854b5ee
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-08-09 11:39:42 +08:00
Xiang Xiao
6c9ea8d293
fs: Change off_t and related types to int64_t if long long is supported
...
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 14:06:26 +08:00
Xiang Xiao
b2b4ad864b
libc: Implement gettext function
...
https://www.man7.org/linux/man-pages/man3/dcgettext.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5817bb8114a1bb05c4dfa133baa084d1cd5f1b06
2021-08-04 14:02:16 +08:00
Xiang Xiao
b7ca3dbbc8
fs: Save umask to tls_task_s for non kernel mode only
...
since the kernel mode has the dedicated userspace
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:43:34 +08:00
Xiang Xiao
af26bc798d
libc: Remove include/nuttx/lib/regex.h and libs/libc/misc/lib_match.c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:39:11 +08:00
Xiang Xiao
31f761cd48
libc: Support message catalog function
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 19:47:20 +08:00
Xiang Xiao
400db72d79
libc: Rename match to fnmatch
...
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 12:02:39 +08:00
Xiang Xiao
14c6bd1a5d
libc: Add the empty nl_langinfo implementation
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 09:49:11 +08:00
Xiang Xiao
ac89e5cddc
libc: Reorder LC_XXX as Linux
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 09:49:05 +08:00
Xiang Xiao
8f24fb9706
libc: Implement local_t related functions
...
since local_t isn't really implemented on NuttX,
we can simply redirect to the non-locale version.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 09:48:47 +08:00
Xiang Xiao
74fe533bb1
locale: Add LC_GLOBAL_LOCALE which is specified by the standard
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 09:48:36 +08:00
yangjiukui
309b215cda
L61: Sensor: Add driver for OPT3007 light sensor.
...
N/A
Add light sensor.
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
Change-Id: I91654ffff94a7faff17b765524b595cd92049b33
2021-08-02 09:12:18 +08:00
Xiang Xiao
cf41dee0f6
fs: Don't define UTIME_OMIT if __cplusplus is defined
...
to avoid libcxx misdetect NuttX support utimensat(_LIBCPP_USE_UTIMENSAT).
This patch need be reverted after utimensat is supported in NuttX.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 10:52:58 +08:00
Xiang Xiao
4574d83d0c
fs: Add fchstat and chstat callback into mountpt_operations
...
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
2021-07-29 10:52:58 +08:00
Jiuzhu Dong
e09737b061
wqueue: optimize work_s structure
...
Change-Id: I908ac2fcead3a6fed3078b2339392ed93d2e4809
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-27 15:53:52 +08:00
Xiang Xiao
ba9396d827
arch/sim: Copy include/nuttx/config.h to the local folder
...
so the source code compiled by host environment can include config.h
directly and then avoid pass Kconfig option through Makefile manually
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic9fe6f846082cef2d0808dc717df8ae6ed929edf
2021-07-27 11:08:58 +08:00
Xiang Xiao
ccb8538b6d
sim: Correct the typedef in nuttx/hostfs.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5fbfd519417c5686325822549c068b1d42f83946
2021-07-27 11:08:47 +08:00
liuhaitao
14cc2d09d2
board/ctrl: add BOARDCTL_SWITCH_BOOT switch boot system support
...
BOARDIOC_SWITCH_BOOT is required to communicate the boot partition from
userspace (OTA subsystem) to board. It can be used to change the system
boot behavior. So it's useful for A/B boot or even single boot case.
For the board support A/B boot case:
1. Download the new image from the sever
2. Write the new image to the alternative partition
3. Call BOARDCTL_SWITCH_BOOT to the alternative system
For single boot partition case:
1. Download the new image from the sever
2. Call BOARDCTL_SWITCH_BOOT and reboot to a small system
3. Write the new image to the main partition in the small system
4. Call BOARDCTL_SWITCH_BOOT again to the main system
Change-Id: Ifebb495784ecf06842946a249bec64f75dce894f
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-26 22:46:18 +08:00
Jiuzhu Dong
c4e5410fa5
usrwqueue: implement order work queue
...
N/A
Change-Id: I9b6a76dec96f669c0b55bef39a9e5a2a71dde50b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 00:12:40 +08:00
xiatian6
941aa03401
Feature: Seneor: Add sx9373 capacitive sensor driver.
...
N/A
Add sx9373 capacitive sensor driver for nuttx.
Change-Id: I7179633ac0ea5c9f073ddc13b50b442997e4a2c2
Signed-off-by: xiatian6 <xiatian6@xiaomi.com>
2021-07-23 18:36:13 +08:00
xiatian6
f8ef15915a
Fix: Sensor: Fix the problem of uneven sampling.
...
N/A
Simply using workqueue will result in uneven sampling, so
the timer is used here to ensure the uniformity of the sampling
rate.
Change-Id: If49f4782bfe7d6c4d8335141bda6d3209d6241ae
Signed-off-by: xiatian6 <xiatian6@xiaomi.com>
2021-07-23 18:36:01 +08:00
ligd
5988732436
arm: add up_secure_irq support
...
Change-Id: Ibc9402dcef4045ca122da400940d57de6b508308
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-22 12:02:06 +08:00
Xiang Xiao
cfee19f9a6
libc: Implement times function
...
https://pubs.opengroup.org/onlinepubs/009604599/functions/times.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If2cccfedd532a77f86035d16d36d94ae38d8f09c
2021-07-21 19:50:54 +08:00
chao.an
f246c7e6ad
net/socket: add SO_SNDBUF support
...
Change-Id: Ie7f82afd3a4c053112d15424499797eb046ed413
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-21 11:43:00 +08:00
liuhaitao
332f2835a2
board/ctrl: correct BOARDIOC_USER command value
...
Change-Id: I3a8eb8c6c39516bbf24b1aee73312767c37158cd
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-20 22:26:17 +08:00
Huang Qi
6cd0fad4ae
sched: Move tls_ndxset_t & tls_dtor_t to tls.h
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 13:55:30 +08:00
Huang Qi
09630961b3
sched: Remove unused TLS member from task_group_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 09:53:09 +08:00
Xiang Xiao
e5c60da2f5
fs: Simplify sendfile implementation
...
and avoid call nx_ file API in the kernel space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
2021-07-17 04:58:40 -07:00
Xiang Xiao
be0b910f86
net: Add file_socket function
...
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10341538488ba3a8444df8e73fb5257b2a1f512
2021-07-17 04:58:40 -07:00
Xiang Xiao
3f86e553f9
fs: Move umask to task_info_s
...
and implement the related semantic correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0587341e2c505e41b5e24e55dba039ed200d65f2
2021-07-16 11:16:10 +08:00
anjiahao
8c057b46ab
mq_open: add long file name check and parameter check
...
N/A
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: Ie777cd38af86c3f25e818a1477996a5f0c1cc195
2021-07-15 14:29:47 +08:00
Jiuzhu Dong
aba6f93b31
rptun: fix compile break when disable openamp
...
Change-Id: Ia7c96d10dc16c69ba973135080c71ab7b5f94395
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-15 13:43:13 +08:00
Xiang Xiao
b7b96941b3
fs: Support the root file system attributes(mode, uid, gid and time)
...
Note: all attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664d60382e356068fd920f08aca5b4a49d8d92a9
2021-07-14 23:33:43 +08:00
Xiang Xiao
c8f1eeed57
Merge commit ' 2e43815c92' into dev
...
Change-Id: Idcbac12fec435abff01cfb4efd5a26a02eb08f93
2021-07-13 03:14:34 +08:00
yangjiukui
eafc254e14
Fix: Sensor: Fix the use of ioexpander and delete redundant member of opt3006.
...
N/A
Add pull up when using SETDIRECTION; Using transformation replace pinset;
Delete i2c point in opt3006 device struct.
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
Change-Id: I7e46d0cde878fbca325f89be47c57ff9b9456ff0
2021-07-12 15:30:37 +08:00
mage1
fc3920904e
mm: Add dmalloc wrapper layer and enable dmalloc module.
...
Change-Id: I83fe5e275215946d5962379fc7aad882724741f2
2021-07-10 05:04:56 -07:00
Xiang Xiao
49a4cfd8aa
fs: Remove the inernal st_count field from struct stat
...
it's more simple to reuse the resolve argument as the recursive count
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
2021-07-10 04:37:16 -07:00
Xiang Xiao
b47cdeb910
libc: Implement utime on top of utimes
...
https://man7.org/linux/man-pages/man2/utime.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10574fdd0d07eabbc93aceeea5a0b953e30339a
2021-07-10 19:32:48 +08:00
Xiang Xiao
a7c2343c32
libc: Move the declaration of futimens from sys/time.h to sys/stat.h
...
to follow the spec here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id8e418794bd43827c01af772ce704a8d3e7681c5
2021-07-10 19:22:58 +08:00
Xiang Xiao
2fa1e55628
libc: Implement ttyname and ttyname_r
...
Note: this patch can get file path from root pseudo file handle,
but a general infrastructure is setup for other file system too.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86cd79ebb741f2f43fdd398bb7498c40687d949b
2021-07-09 18:23:34 -03:00
zhouliang3
b7653e2fae
fs: Add parent node of inode
...
N/A
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I006c6172ced8edd47b9d4661880e04d3a4274854
2021-07-09 18:23:34 -03:00
Xiang Xiao
ee767021b3
fs: Remove the inernal st_count field from struct stat
...
it's more simple to reuse the resolve argument as the recursive count
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
2021-07-09 16:38:51 -03:00