Commit Graph

7317 Commits

Author SHA1 Message Date
TaiJuWu
9f2f86441d Fix sigprocmask
1. SIGSTOP and SIGKILL should not be used as test. In g_some_signals,
SIGKILL is used.

2. The SIGSTOP and SIGKILL flags of current task are set so we need to
delete them.
2023-09-16 00:08:34 +03:00
wangyingdong
2e5139eba4 dhcpd:Optimize the data area memory and reduce it by about 1k bytes
If a daemon app(e.ot_client) starts dhcpd by calling dhcpd_start and needs to shut it down after use,
then the global static variables ds_inpacket and ds_outpacket will always occupy the data area,
causing unnecessary waste.

Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-09-13 21:49:49 +08:00
Xiang Xiao
8f58d34e06 system/adb: Download the latest package
to fix error: microADB/hal/hal_uv.c:32:38: error:
a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-13 21:08:23 +08:00
chao an
1f96e32fcd makefile/archive: fix build break if object target is split to multi-part
Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-13 17:15:05 +08:00
Xuxingliang
facc9ddc63 testing/mm: use unified name for macros
All macros in mm.h start with MM_

Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-09-12 22:09:43 +08:00
chao an
52353a7eb2 apps/build: Restore ARLOCK to improve compile speed in incremental case
To solve the issue of carrying object files from previous builds,
Matias changed the archiving process to re-archive libapps.a on every compilation,
if libapps.a carries more object files, incremental compilation will waste too
many time in re-archiving, compared with the previous implement, this is a degradation
of the build system.  Referring to mature engineering projects such as cmake, if there
is configuration or source file changed, the best solution should be to reconfigure
the environment.

Revert this PR to ensure the compilation speed during incremental compilation.

|  commit 18137c0fec3cea30871f29238e11ea0f4e8523da
|  Author: Matias N <matias@protobits.dev>
|  Date:   Sat Sep 12 00:36:23 2020 -0300
|
|      Fix: ensure archive files do not carry object files from prior builds
|
|      This is the corresponding change to the one on main NuttX repo. In this
|      case this involves splitting the build of libapps.a into: a) building
|      all applications (which is safely parallelizable), b) adding each
|      application's object files to the archive in turns (serial by nature).
|
|      This removes the need for the flock used to protect the parallel build.

Testing:

sim:nsh
-------------------------------
|   Patched    |  Current
-------------------------------
|$ time make   |  $ time make
|real 0m1.270s |  real 0m1.728s
|user 0m0.971s |  user 0m1.276s
|sys  0m0.363s |  sys  0m0.530s
-------------------------------

Private project (20+ 3rd library needs archive to libapps.a)
-------------------------------
|   Patched     |  Current
-------------------------------
|$ time make    |  $ time make
|real 0m21.181s |  real 0m39.721s
|user 0m14.638s |  user 0m24.837s
|sys  0m6.919s  |  sys  0m14.394s
-------------------------------

Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-12 21:55:39 +08:00
wangjianyu3
bf4d873985 system/fastboot: Fix command comparation
e.g. The command is "reboot-bootloader", but will match and break when
     compared  with "reboot"

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-09-12 16:26:09 +08:00
Xiang Xiao
2bfb9760ad Fix Error: configdata_main.c:402:14: error: variable 'iteration' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-12 10:10:16 +08:00
yangsen5
d2fd626780 nxcamera: Fix compilation warnings caused by format issues
nxcamera_main.c:160:26: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'uint32_t *' {aka 'long unsigned int *'} [-Wformat=]
  160 |   sscanf(parg, "%hd %hd %d %4s", &width, &height, &framerate, cc);
      |                         ~^                        ~~~~~~~~~~
      |                          |                        |
      |                          int *                    uint32_t * {aka long unsigned int *}
      |                         %ld

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-09-12 10:08:58 +08:00
zhangchao53
791d1fc08d add superpi fold and nist-sts fold to gitignore 2023-09-12 10:08:35 +08:00
makejian
71276b6181 mbedtls-alt/md5: add md5 alternative implementation
add md5 alternative implementation via /dev/crypto
Signed-off-by: makejian <makejian@xiaomi.com>
2023-09-12 10:01:16 +08:00
xuxin19
0ddcedcf6e ignore specific waring on MacOS for CI break
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 20:40:22 +08:00
xuxin19
258d637df3 Makefile:resolve Mac make error block
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 20:40:22 +08:00
Xiang Xiao
fc5351b4b9 Fix coremark/core_util.c:210:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-11 16:40:53 +08:00
xuxin19
c230321cae fix progname do not match issue
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 16:37:05 +08:00
xuxin19
55647b8458 Application.mk:upgrade warning to error
for the case where MAINSRC and PROGNAME do not match

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 16:37:05 +08:00
chao an
7dda7f1dee crypto/mbedtls: fix build break on sha256.c
Build break on Assemble compiler if -fno-omit-frame-pointer and -O3 enabled at same time

{standard input}: Assembler messages:
{standard input}:2560: Error: branch out of range
make[2]: *** [apps/Application.mk:170: mbedtls/library/sha256.o] Error 1

Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-11 16:33:05 +08:00
zhangchao53
28d4c58448 run testsuites where name match pattern value of --suite 2023-09-08 16:01:06 +03:00
wangmingrong
5e59b0b384 nshlib: Fix static scanning errors
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2023-09-08 18:49:31 +08:00
guoshichao
b7e08d4fba ltp/makefile: rm the ltp.zip file after unzipped
the ltp.zip file is not tracked in git record, so after download and
unzip finished, we do not need to keep this ltp.zip file.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-08 17:24:34 +08:00
wangmingrong
a9f0fc55d1 codecs: add md5_file API
Add the API for 'md5_file' to directly obtain the digest value by passing in the file path

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2023-09-08 02:11:23 +08:00
xucheng5
723b91851f app/ltp : enable can_filter/can_rcv_own_msgs
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-09-07 11:24:47 +03:00
SPRESENSE
0f9605e143 lte/alt1250: Fix usrsock_bind error by uninitialized value
Fix usrsock_bind error by an undefined events variable which is caused
by NuttX usrsock update.
2023-09-07 14:07:43 +08:00
SPRESENSE
9a11ede5ff lte/alt1250: Fix issue that ifconfig does not work
Add SIOCGIFFLAGS support for ifconfig command.
2023-09-07 14:07:43 +08:00
guohao15
a8598aa8d2 app:ramspeed the result of repeat_cnt * step has been truncated
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2023-09-07 13:52:09 +08:00
chenrun1
2639f044cc drivertest_block:Fix insufficient number of erasures for mtd devices
when operating multiple rwblocks.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-09-07 13:51:29 +08:00
makejian
16a1655bba testing/crypto: fix aescbc crash when update iv
iv content always should be updated when performing encryption operation, so need update testing case
Signed-off-by: makejian <makejian@xiaomi.com>
2023-09-07 13:15:35 +08:00
fengxuesong
ee0bc579c1 solve CI compilation error problem
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-09-06 19:21:19 +03:00
Xiang Xiao
a5ef6d57c1 system/cu: Remove the dependence on stdio FILE * function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-06 14:29:34 +02:00
Xiang Xiao
5f9d9bb1c2 system/cu: Support the custom escape char
note: -f could be achieved with -E '' like https://linux.die.net/man/1/cu

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-06 14:29:34 +02:00
Xiang Xiao
b60cdf4927 system/cu: Skip the terminal related stuff if dev isn't a tty
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-06 14:29:34 +02:00
Xiang Xiao
3ff51d108b system/cu: Merge infd and outfd into devfd
to avoid opening the same device twice since
some special device can't work in this case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-06 14:29:34 +02:00
dinglongfei
5cced37a1b system: support system fastbootd
Add the fastbootd program to support the flash, getvar, and reboot commands.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 17:27:26 +08:00
yangguangcai
de82824fbf add test atomic
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-09-05 22:10:48 +08:00
dependabot[bot]
14d06ea011 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 22:09:33 +08:00
Tomáš Pilný
ecded726ce WS2812ESP32 example name is configurable and default name shortened 2023-09-05 12:37:07 +08:00
wangyingdong
21e7a9dc9e Fixed the error that when the driver scan result is empty, iwe_stream->len is a random number because the user data buf is not initialized.
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-09-05 12:34:13 +08:00
xuxin19
2432a62ab6 fix cmake code smell issues
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-04 23:19:26 +08:00
guoshichao
c57794fe1f ltp/makefile: apply that patch that to fix the build warning in ltp
the origin ltp testcases has many build warnings which consider error in
Nuttx, thus to apply the patches to fix these build warnings

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-03 22:12:57 +08:00
Xiang Xiao
6aa05b5855 Replace strlen with sizeof for kconfig string
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-02 16:26:51 +03:00
zhanghongyu
956b935511 mqttc: add mbedtls MQTTC support
The mqttc demo under example path can not support mbedtls api.
Because of the MQTT-C source code already contains many types of
link examples, so we added the corresponding makefile to
support mbedtls mqttc connections publisher and posix mqttc
connections publisher and subscriber.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-01 23:21:34 +08:00
Tiago Medicci Serrano
9a68248f29 system/nxlooper: Initialize audio_caps_s to 0
This avoids unspecified values to be passed to the lower interfaces
of the audio subsystem.
2023-09-01 23:20:51 +08:00
simbit18
17a497492a Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Add comments
2023-09-01 01:21:54 +08:00
xuxin19
a2e6e6c243 Application.mk:execute archive in batches
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-31 11:41:04 +08:00
jianglianfang
201a57440c system/nxcamera: add pan_display when it is not single buffer.
After optimizing the vync mechanism, it is necessary to use ioctl (display) to refresh the display in dual buffer mode.

run nxcamera.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-08-30 20:51:58 +03:00
renzhiyuan1
fece67ee4b Fix wrong parameter size
Type int expects 4 bytes for function write(). Type char expects 1 byte which matches the real usage of function write().

Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2023-08-30 19:42:57 +03:00
makejian
53878a53db mbedtls: set most of the functions of mbedtls to be configurable
(1)reduce size and improve compilation efficiency
(2)provide more options for greater flexibility
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-30 20:40:11 +08:00
wurui3
4981dbe32b apps/examples/pipe:can't print info to screen after calling redirect_test func.
reason:stdin/stdout was redirected and closed in redirect_test.c.
measures:change all printf() to fprint(stderr,...) in pipe_main.c,
and modify fflush(stdout) to fflush(stderr) in line 231.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
2023-08-30 13:56:33 +08:00
anjiahao
8d7497f7fb memdump:fix bug with space does not parse correctly
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-29 23:14:06 +08:00
xuxin19
9f7784ea4d cmake:migrate apps CMakeLists for fsutils
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-29 18:20:37 +08:00