Commit Graph

39433 Commits

Author SHA1 Message Date
Xiang Xiao a2c724bd27 bluetooth: Remove the unnecessary forward reference
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:10:41 +08:00
Xiang Xiao 0567d9e812 bluetooth: Fix typos in comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:10:24 +08:00
Xiang Xiao 18badb068e fs: Make nx_vxxx and file_vxxx as internal functions
these functions are the implementation detail and then
don't need expose to external

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ief832391d5b42d1f1645907eb465631650490234
2021-01-13 14:02:24 +08:00
liuhaitao 8d8d823953 fs: correct typo error to fix build break
N/A

Change-Id: I5da870c0469c11d6f2dc68f87d65b7598f0827a7
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-01-12 11:47:52 +08:00
Xiang Xiao eba7216926 fs: Remove file_detach since it is unefficient to call open and file_detach
the kernel user should call file_open directly instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5bf7f661006f5d43739bc8618abfb4b983fde78d
2021-01-12 11:03:36 +08:00
Xiang Xiao ac99898bc7 fs: Reimplement file_open to not depend on nx_open
on the other hand, open/nx_open call file_open instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66990a77cdeb6ff18f7bf48a65bbc7b701dad552
2021-01-12 11:03:20 +08:00
ligd a5d6f1fc68 mqueue: add poll support
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-12 10:34:43 +08:00
chao.an 999768e6f3 libc/machine/arch: fix build break if enable armv8 ELF
Change-Id: Icc213b5b5986c83b5a38f0ffd2e451ffa29386a2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-12 00:10:33 +08:00
liuhaitao 35a24a7787 buildinfo.sh: use ro.build.version instead of ram.build.version
N/A

Change-Id: I88692b2069ef2d2482497a189a058be1bb67a0bd
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-01-11 19:27:58 +08:00
Jiuzhu Dong f0f09b913c vfork: support sim vfork
MIRTOS-130

Change-Id: I15920bcbacfc5ea519cfe12c39cb64dfe6365838
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-01-11 16:10:53 +08:00
ligd 5b8ca6569f fs/mount: fix mount cmd break out when meet stat error
Change-Id: I9307fe67837a6519fffa1844fcfd794f735d2fdd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-11 14:05:24 +08:00
chao.an 1c33ac85f0 wireless/bluetooth: fix nxstyle warning
Change-Id: Ie7e2b535297a3ad8696dc574b768471fc44bba9e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-11 13:53:11 +08:00
chao.an 60f03d2a92 wireless/bluetooth: add more hci event definitions
Change-Id: I35c034762335cf72f2d46ea383f0136361506e1e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-11 10:18:11 +08:00
chao.an 8b671fd79c wireless/bluetooth: remove the host dependency
Change-Id: I2f7073731fdf920ea69d79462275468f83f2cc4c
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-11 10:18:01 +08:00
chao.an d6faf5707d sim/hcitty: add multi-instance support
Change-Id: I911054f52d38438b3622d7cd0c65180246117e87
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-10 19:34:53 +08:00
Xiang Xiao 730d7b9a8a arch/sim: Simplify SYMBOL macro definition
Change-Id: I1772b65b9bbe29917885e432056f84921b562eb0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-10 00:14:06 -08:00
ligd 214ef6c8e7 fs/inode/fs_files.c: fix DEBUGASSERT in romfs
up_assert: Assertion failed at file:romfs/fs_romfs.c line: 643

newp->f_priv should be NULL.

Change-Id: I5f72b1329a8938ce39cf1ac5fbee561ca106f4f6
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-08 20:54:16 +08:00
ligd 15cb64d3c1 fs/mqueue: fix compile error
Change-Id: I2f36f576d76c9b65e88f51b21c66b3f9b77b20d1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-08 17:20:00 +08:00
ligd 87694f68a7 mqueue: add file_mq_xx for kernel use
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-08 14:31:37 +08:00
ligd dcf8dae046 mqueue: simplify the mqueue reailize
1. remove descript management in mqueue, save code size
2. use i_ops instead of i_mqueue to remove the dup logic

Change-Id: Ie88960e50ddcae9c87977c9ad65a45297c663291
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-08 14:31:37 +08:00
Xiang Xiao 0af4d1e617 fs: Remove the special hack for pty in nx_vopen
let's replace the content of file in place instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I538910d55815c7aec656c05dba4eab2fa1d6d964
2021-01-08 11:17:57 +08:00
Xiang Xiao 028c6aa6e6 fs: Add file_pipe function
so pty don't need call nx_pipe and then file_detach

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibb8d108abd76bafe53897e5fca35babcf3e1bae9
2021-01-08 11:16:15 +08:00
Xiang Xiao 085543a156 Move the declaration of nx_mkfifo/nx_pipe to nuttx/fs/fs.h
the new location is better than nuttx/drivers/drivers.h
since they are part of the file system api.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-08 11:16:03 +08:00
Xiang Xiao 3eb62b010b fs: Fix the race condition in file_dup
NULL inode passed to files_allocate doesn't mark file struct in the
allocated state, so other threads which invovle in file allocation
(e.g. open or dup) may allocate the same file struct again.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I53ff876eae3c7a1e311e7f671686b73a4b4ef891
2021-01-08 11:15:49 +08:00
Xiang Xiao 0112909453 fs: file_dup2 shouldn't destroy filep2 before the duplication of filep1 succeed
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I10956f5e32cc0add414076465c06a24a858e52bc
2021-01-08 11:14:51 +08:00
chao.an d3ffbe5367 netpacket/if_addr: add interface address header
Change-Id: I1aab82fea6916e187d19a66e4d0817119a98c3ea
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-08 10:25:19 +08:00
ligd 365df8d188 net/rpmsg/rpmsg_sockif.c: fix compile error in socketrpmsg
Change-Id: Ibbc62826317e204c49c744d1fb125da7b54eb7a3
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-07 14:17:03 +08:00
ligd 91de680de8 net/rpmsg/rpmsg_sockif.c: fix temporary sendsize is 0 bug
Change-Id: I4348fab159eda7e015340ea8067ff7866105bdd5
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-07 11:09:51 +08:00
liuhaitao 04c78a5d42 Add buildinfo.sh used to generate build info
MIRTOS-327

buildinfo.sh could be called to auto-generate necessary build
info including version and release etc information into ram.prop
loaded by kvdb service.

Change-Id: Iaec687639bc3e5e8b227762513382bab5c611eb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-01-06 15:50:50 +08:00
Xu Xingliang b49648663a Added miwear defconfig
N/A

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: Iaa61b28116db9898f5ba3d027553d4e4786b3516
2021-01-06 10:44:31 +08:00
liuhaitao bbf409cc76 configure.sh: fix '/configure.sh -e board:config menuconfig' build break
MIRTOS-307

If boardconfig changed, '/configure.sh -e board:config menuconfig'
would finally call 'make distclean menuconfig' which results in
build break. It also applies to nconfig and qconfig.

Change-Id: I44c06718cbda948932c667b9f2d1339913c9ba37
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-01-05 11:00:10 +08:00
chao.an cf988ebad3 ctype/iscntrl: correct the control character function
all the characters placed before the space on the ASCII table
and the 0x7F character (DEL) are control characters.

Change-Id: Id187b39ce50b80e9ebee85a7242716eb017575d7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-04 17:17:15 +08:00
chao.an 37b90df314 sim/hcitty: fix compile warning
Change-Id: I74f89e179daacaa01ba95cc211574c1bbadd2f9e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-04 17:08:25 +08:00
danguanghua b71d5f0e84 bs/libc/net: implement socketpair (3)
N/A

Reference here:
https://www.freebsd.org/cgi/man.cgi?apropos=0&sektion=2&query=socketpair&manpath=FreeBSD+7.0-current&format=html

Change-Id: I2d09f5148b2a720d1e7f380503deb8910c951599
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2021-01-04 10:55:16 +08:00
Xiang Xiao 22b67c8cd4 fs: Move file_close from fs/inode/fs_fileclose.c to fs/vfs/fs_close.c
just like other vfs public functions

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id833da690f88013095fbbe1ea425227f808a5608
2021-01-04 10:50:01 +08:00
Xiang Xiao 0523f75202 fs: Remove _files_close and reuse file_close
to save the code space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I08455010ba121a61b0e29334b580aa83e69a9418
2021-01-04 10:50:01 +08:00
Xiang Xiao 3a0a438d29 fs: Let files_allocate return -EMFILE instead ERROR
since the internal function normally return the error code directly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ifccbcfb07d2f8f7d5fef1b2a867538f51b73655c
2021-01-04 10:50:00 +08:00
Xiang Xiao 79bd6b4c3f fs: Ensure fs_dupfd2 always return fd2 in the sucessful path
it's wrong to return file_dup2 directly since file_dup2 never return file handle

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I943537849c75d83b3d646a6a22f035187d9fd521
2021-01-04 10:50:00 +08:00
Xiang Xiao 351bbad39a fs: Remove inode null check from file_dup and fs_dupfd2
since the same check already done in file_dup2

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7ba1309c55be1ac564f798df02fc6725c4a0d469
2021-01-04 10:50:00 +08:00
ligd 6cc8b30aaf serial: fix build break caused by previous patch
serial/serial_dma.c: In function 'uart_check_signo':
serial/serial_dma.c:82:18: error: 'SIGINT' undeclared (first use in this function)
   82 |           return SIGINT;
      |                  ^~~~~~

This is canused by:
remove #include <nuttx/mqueue.h> from include/nuttx/fs/fs.h in:
d1ede9ac904d331ee6b22343f5d7f0ead7a113a6

Change-Id: I20260ad3bcceb30207c9c12041dd95de41e13777
2021-01-02 21:14:21 +08:00
Brennan Ashton ca0fb5694f vfs: Fix unsed label warning
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2021-01-02 21:14:21 +08:00
ligd 0a7d86f587 fs: remove INODE_IS_SPECIAL() use others instead
Change-Id: I949f1ad012836e6cb233d5362fe2542732b5ecf4
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-02 21:14:21 +08:00
ligd f58ef1476c fs/vfs: add nx_unlink support
Change-Id: If9009cb7301bb4e49bdce3aea2d56c243256f5a2
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-02 21:14:21 +08:00
danguanghua 0c0e24992d libs/libc/net: implement socketpair (2)
N/A

Reference here:
https://www.freebsd.org/cgi/man.cgi?apropos=0&sektion=2&query=socketpair&manpath=FreeBSD+7.0-current&format=html

Change-Id: I784615bcf6d19c0deb4dbe2b81067ec9f59314a1
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-31 18:31:40 +08:00
danguanghua a418dc5dc3 arch/sim: enable nxlooper
N/A

Change-Id: Ib8b98e90fa05b035e88dea000818f0f745af6b10
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-31 16:47:09 +08:00
chao.an 330253101c sim/hcitty: add hcitty adapter
Change-Id: I5abacce7aced5f394f8b1efe83190840bed0b03e
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-30 19:53:35 +08:00
danguanghua d226e8fb49 libs/libc/net: implement socketpair
N/A

Reference here:
https://www.freebsd.org/cgi/man.cgi?apropos=0&sektion=2&query=socketpair&manpath=FreeBSD+7.0-current&format=html

Change-Id: I959b4d661cd436f5d5050baf9e821db84139d482
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-30 18:26:50 +08:00
chao.an 688911373d arch/spinlock: implement the default test-and-set semantics
use the default testset implement on single core platform
that does not support test-and-set, more flexibility for
SMP drivers(using spinlock) if configured in a single-core
configuration.

Change-Id: I954899f71bc6e903dce48c6e27719cb99f13e4b6
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-30 15:20:33 +08:00
chao.an b19dfdb69c arch/sim/hci: reuse the reserved fields of hci buffer
Reuse the reserved fields of hci buffer to avoid redundant packet type splitting

Change-Id: I79d70ae939111bb909a6e0981c50e401734590f2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-29 22:01:30 +08:00
Brennan Ashton 40392bd437 Bluetooth: Fix bt_buff lifecycle
Change-Id: I529aedae2507a9297c1d2d793451e4373c98092b
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-29 21:39:30 +08:00