Commit Graph

44338 Commits

Author SHA1 Message Date
Michael Mogenson
f5e431483e imxrt: fix userled config in appinit
The imxrt1064, imxrt1064, and teensy-4.x board configs would fail to
build when CONFIG_USERLED_LOWER was enabled, due to a missing header in
imxrt_appinit.c and an unset local define.

Verified a build succeds for the specified boards with the following
defconfig modifications:

    # CONFIG_ARCH_LEDS is not set
    CONFIG_USERLED=y
    CONFIG_USERLED_LOWER=y

Tested the "leds" Led driver example on a Teensy 4.1.
2022-03-03 02:06:12 +08:00
Gustavo Henrique Nihei
3b7a6ae311 xtensa/esp32s3: Add support for Tickless kernel using Systimer
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-02 18:08:44 +01:00
Alin Jerpelea
d61476f467 LICENSE: document licenses for include files
document licenses for headers found in the include folder

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 21:53:05 +08:00
Alin Jerpelea
44f9a89504 include: dac.h: update licenses to Apache
change in sync with drivers: dac:

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 21:53:05 +08:00
Alin Jerpelea
48f6149959 LICENSE: add include/lzf
document license for include/lzf

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 21:53:05 +08:00
Huang Qi
31da1faa99 boards: Remove -nostartfiles -nodefaultlibs from phy62xx
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-02 21:49:52 +08:00
ligd
fe6aa4a874 sim: add loop thread to handle dev loops
For some dev loops will call sem_wait/sem_trywait

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-02 20:29:52 +09:00
Xiang Xiao
eb1cc02d09 sched/group: Move files_initlist/lib_stream_initialize to group_alloc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 20:29:52 +09:00
Huang Qi
8caa496947 ekk-lm3s9b96: Remove unused mmcsd option
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-02 18:27:02 +08:00
Alin Jerpelea
6a6b0aa6f4 LICENSE: add license for libs/libc/wctype
document the license for libs/libc/wctype

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
7449ee532f LICENSE: add license for libs/libc/wchar
document the license for libs/libc/wchar

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
cdd65a9656 LICENSE: add license for libs/libc/unistd
document the license for libs/libc/unistd

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
98c8a443aa LICENSE: add license for libs/libc/time
document the license for libs/libc/time

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
001ea4b1e4 LICENSE: add license for libs/libc/string
document the license for libs/libc/string

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
2b730313e1 LICENSE: add license for libs/libc/stdio
document the license for libs/libc/stdio

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
0e9af43940 LICENSE: add license for libs/libc/pthread
document the license for libs/libc/pthread

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
53842c3897 LICENSE: add license for libs/libc/net
document the license for libs/libc/net

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
cc24a85794 LICENSE: add license for libs/libc/machine/sim
document the license for libs/libc/machine/sim

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
5aae6fc393 LICENSE: add license for libs/libc/machine/armv7
document the license for libs/libc/machine/armv7

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
d318a28394 LICENSE: add license for libs/libc/lzf
document the license for libs/libc/lzf

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Alin Jerpelea
c58ac94450 libs: libc: lib_ubsqrt: migrate license to Apache
Haltian has submitted the SGA as a result can migrate the licenses
to Apache

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 18:14:36 +08:00
Michael Jung
9114f849ae Include nuttx/compiler.h from string.h
NuttX' string.h is using the FAR preprocessor definition, which is
defined in nuttx/compiler.h.  Thus, it should include it.

Signed-off-by: Michael Jung <mijung@gmx.net>
2022-03-02 18:14:12 +08:00
Xiang Xiao
4deaa6d29d syscal: Remove .context form .gitignore
since it is already added in the top level of .gitignore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 10:42:05 +01:00
Xiang Xiao
0dd844d89b assert.h: Don't use UNUSED macro since it's very easy happen conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 09:01:36 +01:00
Xiang Xiao
4a16cf71f9 Fix -Werror=nonnull-compare and -Werror=format-truncation=
Error: module/mod_insmod.c:203:3: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
  203 |   strncpy(modp->modname, modname, MODLIB_NAMEMAX);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wqueue/kwork_thread.c: In function 'work_start_lowpri':
Error: wqueue/kwork_thread.c:212:22: error: '%lx' directive output may be truncated writing between 1 and 16 bytes into a region of size 14 [-Werror=format-truncation=]
  212 |   snprintf(args, 16, "0x%" PRIxPTR, (uintptr_t)wqueue);

local/local_sockif.c: In function 'local_getsockname':
Error: local/local_sockif.c:392:11: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  392 |           strncpy(unaddr->sun_path, conn->lc_path, namelen);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

chip/esp32_wifi_utils.c: In function 'esp_wifi_scan_event_parse':
Error: chip/esp32_wifi_utils.c:373:37: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
   memset(ap_list_buffer, 0x0, sizeof(ap_list_buffer));
                                     ^

stdio/lib_fputs.c: In function 'fputs':
Error: stdio/lib_fputs.c:99:9: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s == NULL || stream == NULL)
         ^
Error: stdio/lib_fputs.c:99:27: error: nonnull argument 'stream' compared to NULL [-Werror=nonnull-compare]
   if (s == NULL || stream == NULL)
                           ^

stdio/lib_vfprintf.c: In function 'vfprintf':
Error: stdio/lib_vfprintf.c:40:6: error: nonnull argument 'stream' compared to NULL [-Werror=nonnull-compare]
   if (stream)
      ^

string/lib_strdup.c: In function 'strdup':
Error: string/lib_strdup.c:39:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

string/lib_strndup.c: In function 'strndup':
Error: string/lib_strndup.c:56:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

string/lib_strpbrk.c: In function 'strpbrk':
Error: string/lib_strpbrk.c:39:7: error: nonnull argument 'str' compared to NULL [-Werror=nonnull-compare]
   if (!str || !charset)
       ^~~~
Error: string/lib_strpbrk.c:39:15: error: nonnull argument 'charset' compared to NULL [-Werror=nonnull-compare]
   if (!str || !charset)
               ^~~~~~~~

string/lib_strrchr.c: In function 'strrchr':
Error: string/lib_strrchr.c:40:6: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
   if (s)
      ^

Error: time/lib_asctimer.c:73:50: error: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 12 [-Werror=format-truncation=]
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
                                                  ^~
time/lib_asctimer.c:73:21: note: directive argument in the range [-2147481748, 2147483647]
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
time/lib_asctimer.c:73:3: note: 'snprintf' output between 17 and 68 bytes into a destination of size 26
   snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            g_wday_name[tp->tm_wday], g_mon_name[tp->tm_mon],
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            1900 + tp->tm_year);
            ~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 15:55:38 +08:00
Huang Qi
572f961136 ci: Update gcc-arm-none-eabi to 10.3-2021.10
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-02 15:41:56 +08:00
Petro Karashchenko
9c7eea7949 drivers/ioexpander: Fix invert option value usage
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-02 01:54:31 +08:00
Alin Jerpelea
5ed0e95b16 LICENSE: cleanup
cleanup the license file:
- remove Authors
- add missing delimiters
- add missing spaces

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-02 01:54:21 +08:00
Alin Jerpelea
dc99ce5867 boards: s32k1xx: revert to the original license
The configuration is taken from NXP sample code and should preserve
the original license

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
b975fa6edc boards: olimex-lpc2378: Makefile: change license to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
b110dd808a LICENSE: document licenses for boards: or1k
add licenses for boards: or1k

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
a8387e7d40 LICENSE: document licenses for boards: lpc17xx_40xx
add licenses for boards: lpc17xx_40xx

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
b76139ba83 LICENSE: document licenses for boards: lpc2378
add licenses for boards: lpc2378

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
18eddabcc8 LICENSE: document licenses for boards: stm32xxxxx
add licenses for boards: stm32xxxxx

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Alin Jerpelea
63f2fbf0fa LICENSE: document licenses for boards: s32k1xx
add licenses for boards: s32k1xx

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-01 23:09:49 +08:00
Jiuzhu Dong
2197fb2b51 fs/romfs: fix read file mismatch when the length of file name is 16
romfs: file name must end with '\0'

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 11:44:27 -03:00
Masayuki Ishikawa
224241bd0a boards: esp32-devkitc: Increase INIT_STACKSIZE to 3072 in smp/defconfig
Summary:
- I noticed that automatic tests sometimes fail
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-03-01 22:07:07 +08:00
Masayuki Ishikawa
955153aac4 boards: sabre-6quad: Add knsh
Summary:

- Add sabre-6quad:knsh to test BUILD_KERNEL with qemu
- Update README.txt to run the nuttx with qemu

Impact:
- None

Testing:
- Tested with QEMU
- NOTE: getprime crashes with undefined instruction when
  compiled with gcc 10.3.x (please use 9.3.1)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-03-01 09:57:57 -03:00
zhuyanlin
a4e93be0fb arch:xtensa: fix sp duplicate reduce in handler enter
In xtensa/include/irq.h the XCPTCONTEXT_SIZE is
`#define XCPTCONTEXT_SIZE    ((4 * XCPTCONTEXT_REGS) + 0x20)`

XCPTCONTEXT_SIZE is already byte size of xcpcontext

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-03-01 13:46:31 +01:00
Xiang Xiao
a8ab090764 sim: Simplify boards and arch's Makefile
1.Remove the unused LIBPATHS and HOSTLDFLAGS
2.Move HOSTCFLAGS to arch/Makefile

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 12:33:56 +01:00
Xiang Xiao
ddde41018a Revert "sched: Don't duplicate caller file handler when creating kernel thread"
since the temporary kernel spawn proxy need duplicate file handler
from caller, please reference the follow source code for more info:
sched/task/task_posixspawn.c
sched/task/task_spawn.c

This reverts commit 5c5f1dec08.
2022-03-01 12:26:49 +01:00
Xiang Xiao
7b366114c9 boards/sparc: Remove HOSTCC related flags from Make.defs
since these variables are defined in Config.mk now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 10:21:57 +01:00
Jiuzhu Dong
f677a0d316 romfs: cache romfs entry to improve access file speed
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Jiuzhu Dong
bc43206920 fs/romfs: always save linkoffset in romfs_nodeinfo_s
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Jiuzhu Dong
07bfa32e87 fs/romfs: get file path by ioctl with FION_FILEPATH
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Jiuzhu Dong
4f79a1e22c procfs/group/fd: add path for every file descriptor
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Jiuzhu Dong
120fa93d7f fs: add "/" suffix for mountpoint node when using inode_getpath
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-01 12:25:19 +08:00
Masayuki Ishikawa
2a434fe1fa arch: imx6: Add the pgheap for imx6
Summary:
- This commit adds the pgheap for imx6

Impact:
- None

Testing:
- Tested with sabre-6quad:netknsh (not merged yet)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-03-01 12:18:47 +08:00
Xiang Xiao
da954956e7 Simplify DEFAULT_SMALL usage in Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 03:15:01 +08:00
Xiang Xiao
36909f5f6c input/buttons: Remove the unused bu_enabled from btn_upperhalf_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00