-
Notifications
You must be signed in to change notification settings - Fork 717
Expand file tree
/
Copy pathKconfig
More file actions
1287 lines (1033 loc) · 34.9 KB
/
Kconfig
File metadata and controls
1287 lines (1033 loc) · 34.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "NSH Library"
config NSH_LIBRARY
bool "NSH Library"
default n
select NETUTILS_NETLIB if NET
select BOARDCTL if (!NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT)
select BOARDCTL_MKRD if !NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT
---help---
Build the NSH support library. This is used, for example, by
system/nsh in order to implement the full NuttShell (NSH).
if NSH_LIBRARY
menuconfig NSH_MOTD
bool "Message of the Day (MOTD)"
default n
---help---
Support a user-provided Message of the Day (MOTD) that will be
presented each time new NSH session is opened.
if NSH_MOTD
config NSH_PLATFORM_MOTD
bool "Platform MOTD"
default n
---help---
If this option is selected, the NSH will call into platform-specific
logic in order to get the MOTD. The function prototype for this
call is:
void platform_motd(FAR char *buffer, size_t buflen);
Where buffer is the location to return the MOTD and buflen is the
length of that buffer. The maximum size of the buffer is determined
by NSH_FILEIOSIZE. An appropriate location for the
implementation of platform_motd would be within apps/platform/<board>.
One newline will be inserted after the platform-supplied message.
platform_motd() is prototyped and described in apps/include/nshlib/nshlib.h
which may be included like:
#include "nshlib/nshlib.h"
config NSH_MOTD_STRING
string "MOTD String"
default "No MOTD string provided"
depends on !NSH_PLATFORM_MOTD
---help---
If NSH_MOTD is selected, but NSH_PLATFORM_MOTD is not, then a fixed
MOTD string will be used. That string is provided by this selection.
One newline will be inserted after supplied MOTD message.
endif # NSH_MOTD
menu "Command Line Configuration"
config NSH_PROMPT_STRING
string "Prompt String"
default "nsh> "
---help---
Provide the shell prompt string with size limit NSH_PROMPT_MAX.
default is "nsh> ".
config NSH_PROMPT_MAX
int "Maximum Size of Prompt String"
default NAME_MAX
---help---
The maximum size of shell prompt string, including ending null.
config NSH_PROMPT_ENV
string "Prompt String Environment Variable"
default "PS1"
depends on !DISABLE_ENVIRON
---help---
The environment variable name containing prompt string.
Only used when NSH_PROMPT_STRING is empty.
config NSH_PROMPT_SUFFIX
string "Suffix used to derive fallback prompt string"
default "> "
---help---
When NSH_PROMPT_STRING is empty, the environment variable defined
by NSH_PROMPT_ENV or hostname will be used to derive the prompt
at runtime. This suffix is a part of the final prompt that serves
to clearly separate prompt from user inputs.
config NSH_DISABLE_ECHOBACK
bool "Disable echoback"
default n
---help---
If this option is selected, the NSH disables echoback.
choice
prompt "Command Line Editor"
default NSH_READLINE if DEFAULT_SMALL
default NSH_CLE if !DEFAULT_SMALL
config NSH_READLINE
bool "Minimal readline()"
select SYSTEM_READLINE
select READLINE_HAVE_EXTMATCH
---help---
Selects the minimal implementation of readline(). This minimal
implementation provides on backspace for command line editing.
config NSH_CLE
bool "Command Line Editor"
select SYSTEM_CLE
---help---
Selects the more extensive, EMACS-like command line editor.
Select this option only if (1) you don't mind a modest increase
in the FLASH footprint, and (2) you work with a terminal that
supports extensive VT100 editing commands.
Selecting this option will add probably 1.5-2KB to the FLASH
footprint.
endchoice
config NSH_DISABLE_SEMICOLON
bool "Disable multiple commands per line"
default DEFAULT_SMALL
---help---
By default, you can enter multiple NSH commands on a line with each
command separated by a semicolon. You can disable this feature to
save a little memory on FLASH challenged platforms.
config NSH_QUOTE
bool "Enable back-slash quoting of characters"
default !DEFAULT_SMALL && NSH_ARGCAT
---help---
Force special characters like back-quotes, quotation marks, and the
back-slash character itself to be treat like normal text.
This feature is only implemented properly for the case where
CONFIG_NSH_ARGCAT is also selected.
config NSH_CMDPARMS
bool "Enable commands as parameters"
default !DEFAULT_SMALL && NSH_QUOTE
depends on !DISABLE_MOUNTPOINT
depends on FS_TMPFS
---help---
If selected, then the output from commands, from file applications, and
from NSH built-in commands can be used as arguments to other
commands. The entity to be executed is identified by enclosing the
command line in back quotes. For example,
set FOO `myprogram $BAR`
Will execute the program named myprogram passing it the value of the
environment variable BAR. The value of the environment variable FOO
is then set output of myprogram on stdout.
Because this feature commits significant resources, it is disabled by
default.
This features requires TMPFS mounted at /tmp and NSH_QUOTE enabled.
config NSH_MAXARGUMENTS
int "Maximum number of command arguments"
default 7
---help---
The maximum number of NSH command arguments.
Default: 7
config NSH_ARGCAT
bool "Concatenation of argument strings"
default !DEFAULT_SMALL
---help---
Support concatenation of strings with environment variables or command
output. For example:
set FOO XYZ
set BAR 123
set FOOBAR ABC_${FOO}_${BAR}
would set the environment variable FOO to XYZ, BAR to 123 and FOOBAR
to ABC_XYZ_123. If NSH_ARGCAT is not selected, then a slightly small
FLASH footprint results but then also only simple environment
variables like $FOO can be used on the command line.
config NSH_NESTDEPTH
int "Maximum command nesting"
default 3
---help---
The maximum number of nested if-then[-else]-fi sequences that
are permissible. Default: 3
config NSH_DISABLEBG
bool "Disable background commands"
default DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for background
commands. This setting disables the 'nice' command prefix and
the '&' command suffix. This would only be set on systems
where a minimal footprint is a necessity and background command
execution is not.
config NSH_ALIAS
bool "Enable alias support"
default !DEFAULT_SMALL
---help---
Enable alias support for nsh. This enables command substitution from
a table of alias strings for individual commands. The maximum amount
of alias strings is configurable with NSH_ALIAS_MAX_AMOUNT.
if NSH_ALIAS
config NSH_ALIAS_MAX_AMOUNT
int "Maximum amount of aliases"
default 1
---help---
Set the maximum amount of alias entries.
endif # NSH_ALIAS
config NSH_PIPELINE
bool "Enable pipeline support"
default !DEFAULT_SMALL
depends on PIPES
---help---
Enable pipeline support for nsh.
endmenu # Command Line Configuration
config NSH_BUILTIN_APPS
bool "Enable built-in applications"
default n
depends on BUILTIN
---help---
Support external registered, "built-in" applications that can be
executed from the NSH command line (see apps/README.txt for
more information). This options requires support for builtin
applications (BUILTIN).
config NSH_BUILTIN_AS_COMMAND
bool "Run builtin apps as command"
default n
depends on BUILTIN
---help---
Enable to run builtin application directly without creating
a separate thread.
config NSH_FILE_APPS
bool "Enable execution of program files"
default n
depends on LIBC_EXECFUNCS
---help---
Support execution of program files residing within a file
system. This options requires support for the posix_spawn()
interface (LIBC_EXECFUNCS).
config NSH_SYMTAB
bool "Register symbol table"
default n
depends on LIBC_EXECFUNCS && BOARDCTL && !EXECFUNCS_HAVE_SYMTAB
select BOARDCTL_APP_SYMTAB
---help---
Enable logic to automatically register an application symbol table
as part of NSH initialization. If enabled, then application logic
must provide the following:
const struct symtab_s g_exports[];
const int g_nexports;
Where g_exports is the name of the exported application symbol table
and g_nexports holds the number of entries in the application symbol
table.
This is done very early in the NSH initialization sequence.
Why might you want to do this? There is really only one reason: You
would like to have the symbol tables in place early so that programs
started by NSH, perhaps via an initialization script, will have all
of the necessary symbols in place. Otherwise, you probably do *not*
want this option!
if NSH_SYMTAB
config NSH_SYMTAB_ARRAYNAME
string "Symbol table used by exec[l|v]"
default "g_exports"
---help---
The exec[l|v] and posix_spawn() functions needs to have (1) a
symbol table that provides the list of symbols exported by the base
code, and (2) the number of symbols in that table. This selection
provides the name of that symbol table.
config NSH_SYMTAB_COUNTNAME
string "Variable holding the number of symbols"
default "g_nexports"
---help---
The exec[l|v] and posix_spawn() functions needs to have (1) a
symbol table that provides the list of symbols exported by the base
code, and (2) the number of symbols in that table. This selection
provides the name of 'int' variable that holds the number of symbol
in the table.
endif # NSH_SYMTAB
menu "Disable Individual commands"
config NSH_DISABLE_ADDROUTE
bool "Disable addroute"
default DEFAULT_SMALL
depends on NET_ROUTE
config NSH_DISABLE_ARP
bool "Disable arp"
default DEFAULT_SMALL
depends on NET_ARP
config NSH_DISABLE_BASE64DEC
bool "Disable base64dec"
default DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_BASE64
config NSH_DISABLE_BASE64ENC
bool "Disable base64enc"
default DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_BASE64
config NSH_DISABLE_BASENAME
bool "Disable basename"
default DEFAULT_SMALL || NSH_DISABLESCRIPT
config NSH_DISABLE_CAT
bool "Disable cat"
default DEFAULT_SMALL
config NSH_DISABLE_CD
bool "Disable cd"
default DEFAULT_SMALL
config NSH_DISABLE_CP
bool "Disable cp"
default DEFAULT_SMALL
config NSH_DISABLE_CMP
bool "Disable cmp"
default DEFAULT_SMALL
config NSH_DISABLE_DATE
bool "Disable date"
default DEFAULT_SMALL || !RTC
config NSH_DISABLE_DF
bool "Disable df"
default DEFAULT_SMALL
config NSH_DISABLE_DELROUTE
bool "Disable delroute"
default DEFAULT_SMALL
depends on NET_ROUTE
config NSH_DISABLE_DIRNAME
bool "Disable dirname"
default DEFAULT_SMALL || NSH_DISABLESCRIPT
config NSH_DISABLE_DMESG
bool "Disable dmesg"
default DEFAULT_SMALL
config NSH_DISABLE_ECHO
bool "Disable echo"
default DEFAULT_SMALL
config NSH_DISABLE_ENV
bool "Disable env"
default DEFAULT_SMALL
config NSH_DISABLE_EXEC
bool "Disable exec"
default DEFAULT_SMALL
config NSH_DISABLE_EXIT
bool "Disable exit"
default DEFAULT_SMALL && !NSH_TELNET
config NSH_DISABLE_EXPR
bool "Disable expr"
default DEFAULT_SMALL
config NSH_DISABLE_EXPORT
bool "Disable export"
default DEFAULT_SMALL
config NSH_DISABLE_FDINFO
bool "Disable fdinfo"
default DEFAULT_SMALL
depends on FS_PROCFS
config NSH_DISABLE_FREE
bool "Disable free"
default DEFAULT_SMALL
config NSH_DISABLE_GET
bool "Disable get"
default DEFAULT_SMALL
config NSH_DISABLE_HELP
bool "Disable help"
default n
config NSH_DISABLE_ERROR_PRINT
bool "Disable NSH Error Printing"
default DEFAULT_SMALL
config NSH_DISABLE_HEXDUMP
bool "Disable hexdump"
default DEFAULT_SMALL
config NSH_DISABLE_IFCONFIG
bool "Disable ifconfig"
default DEFAULT_SMALL || !FS_PROCFS || FS_PROCFS_EXCLUDE_NET
config NSH_DISABLE_VCONFIG
bool "Disable vconfig"
default DEFAULT_SMALL || !FS_PROCFS || FS_PROCFS_EXCLUDE_NET
config NSH_DISABLE_IFUPDOWN
bool "Disable ifup/down"
default DEFAULT_SMALL || !FS_PROCFS || FS_PROCFS_EXCLUDE_NET
config NSH_DISABLE_KILL
bool "Disable kill"
default DEFAULT_SMALL
config NSH_DISABLE_PKILL
bool "Disable pkill"
default DEFAULT_SMALL
depends on FS_PROCFS
config NSH_DISABLE_LOSETUP
bool "Disable losetup"
default DEFAULT_SMALL
config NSH_DISABLE_LOSMART
bool "Disable losmart"
default DEFAULT_SMALL || !MTD_SMART
config NSH_DISABLE_LOMTD
bool "Disable lomtd"
default DEFAULT_SMALL || !MTD_LOOP
config NSH_DISABLE_LN
bool "Disable ln"
default DEFAULT_SMALL
depends on PSEUDOFS_SOFTLINKS
config NSH_DISABLE_LS
bool "Disable ls"
default DEFAULT_SMALL
config NSH_DISABLE_MB
bool "Disable mb"
default y
config NSH_DISABLE_MD5
bool "Disable md5"
default DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_HASH_MD5
config NSH_DISABLE_MKDIR
bool "Disable mkdir"
default DEFAULT_SMALL
config NSH_DISABLE_MKFATFS
bool "Disable mkfatfs"
default DEFAULT_SMALL
depends on FSUTILS_MKFATFS
config NSH_DISABLE_MKFIFO
bool "Disable mkfifo"
default DEFAULT_SMALL
depends on PIPES
config NSH_DISABLE_MKRD
bool "Disable mkrd"
default DEFAULT_SMALL
config NSH_DISABLE_MKSMARTFS
bool "Disable mksmartfs"
default DEFAULT_SMALL
depends on FS_SMARTFS && FSUTILS_MKSMARTFS
config NSH_DISABLE_MH
bool "Disable mh"
default y
config NSH_DISABLE_MODCMDS
bool "Disable modules commands (insmod, rmmod, lsmod)"
default DEFAULT_SMALL
depends on MODULE
config NSH_DISABLE_MOUNT
bool "Disable mount"
default DEFAULT_SMALL
config NSH_DISABLE_MV
bool "Disable mv"
default DEFAULT_SMALL
config NSH_DISABLE_MW
bool "Disable mw"
default y
config NSH_DISABLE_NFSMOUNT
bool "Disable nfsmount"
default DEFAULT_SMALL
depends on NFS
config NSH_DISABLE_NSLOOKUP
bool "Disable nslookup"
default DEFAULT_SMALL
depends on LIBC_NETDB
config NSH_DISABLE_PASSWD
bool "Disable passwd"
default DEFAULT_SMALL
depends on NSH_LOGIN_PASSWD && !FSUTILS_PASSWD_READONLY
config NSH_DISABLE_PIDOF
bool "Disable pidof"
default DEFAULT_SMALL
depends on FS_PROCFS
config NSH_DISABLE_PMCONFIG
bool "Disable pmconfig"
default DEFAULT_SMALL
depends on PM
config NSH_DISABLE_POWEROFF
bool "Disable poweroff"
default DEFAULT_SMALL
depends on BOARDCTL_POWEROFF
config NSH_DISABLE_PRINTF
bool "Disable printf"
default DEFAULT_SMALL
config NSH_DISABLE_PS
bool "Disable ps"
default DEFAULT_SMALL || !FS_PROCFS || FS_PROCFS_EXCLUDE_PROCESS
config NSH_DISABLE_PSHEAPUSAGE
bool "Disable ps heap usage"
depends on DEBUG_MM && !NSH_DISABLE_PS
default DEFAULT_SMALL
config NSH_DISABLE_PSSTACKUSAGE
bool "Disable ps stack usage"
depends on STACK_COLORATION && !NSH_DISABLE_PS
default DEFAULT_SMALL
---help---
Disable to save space and not pull in floating point routines
config NSH_DISABLE_PSSIGMASK
bool "Disable ps sigmask"
depends on !NSH_DISABLE_PS
default DEFAULT_SMALL
---help---
Disable sigmask print from ps
config NSH_DISABLE_PUT
bool "Disable put"
default DEFAULT_SMALL
config NSH_DISABLE_PWD
bool "Disable pwd"
default DEFAULT_SMALL
config NSH_DISABLE_READLINK
bool "Disable readlink"
default DEFAULT_SMALL
depends on PSEUDOFS_SOFTLINKS
config NSH_DISABLE_SWITCHBOOT
bool "Switch boot partition"
default DEFAULT_SMALL
depends on BOARDCTL_SWITCH_BOOT
config NSH_DISABLE_BOOT
bool "Disable boot"
default DEFAULT_SMALL
depends on BOARDCTL_BOOT_IMAGE
config NSH_DISABLE_REBOOT
bool "Disable reboot"
default DEFAULT_SMALL
depends on BOARDCTL_RESET
config NSH_DISABLE_RM
bool "Disable rm"
default DEFAULT_SMALL
config NSH_DISABLE_RMDIR
bool "Disable rmdir"
default DEFAULT_SMALL
config NSH_DISABLE_ROUTE
bool "Disable delroute"
depends on FS_PROCFS && NET_ROUTE && !FS_PROCFS_EXCLUDE_NET && !FS_PROCFS_EXCLUDE_ROUTE
default DEFAULT_SMALL
config NSH_DISABLE_RPMSG
bool "Disable rpmsg"
default DEFAULT_SMALL
depends on RPMSG
config NSH_DISABLE_RPTUN
bool "Disable rptun"
default DEFAULT_SMALL
depends on RPTUN && !NSH_DISABLE_RPMSG
config NSH_DISABLE_SET
bool "Disable set"
default DEFAULT_SMALL
config NSH_DISABLE_SOURCE
bool "Disable source"
default DEFAULT_SMALL
config NSH_DISABLE_SHUTDOWN
bool "Disable shutdown"
default DEFAULT_SMALL || !BOARD_POWEROFF || !BOARD_RESET
depends on BOARDCTL_POWEROFF || BOARDCTL_RESET
config NSH_DISABLE_SLEEP
bool "Disable sleep"
default DEFAULT_SMALL
config NSH_DISABLE_TIME
bool "Disable time"
default DEFAULT_SMALL
config NSH_DISABLE_TIMEDATECTL
bool "Disable timedatectl"
default DEFAULT_SMALL || !LIBC_LOCALTIME || !RTC
config NSH_DISABLE_TEST
bool "Disable test"
default DEFAULT_SMALL
config NSH_DISABLE_TOP
bool "Disable top"
default DEFAULT_SMALL
depends on !NSH_DISABLE_PS
config NSH_DISABLE_TRUNCATE
bool "Disable truncate"
default DEFAULT_SMALL
config NSH_DISABLE_UMOUNT
bool "Disable umount"
default DEFAULT_SMALL
config NSH_DISABLE_UNAME
bool "Disable uname"
default DEFAULT_SMALL
config NSH_DISABLE_UNSET
bool "Disable unset"
default DEFAULT_SMALL
config NSH_DISABLE_UPTIME
bool "Disable uptime"
default DEFAULT_SMALL
config NSH_DISABLE_URLDECODE
bool "Disable urldecode"
default DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_URLCODE
config NSH_DISABLE_URLENCODE
bool "Disable urlencode"
default DEFAULT_SMALL
depends on NETUTILS_CODECS && CODECS_URLCODE
config NSH_DISABLE_USERADD
bool "Disable useradd"
default DEFAULT_SMALL
depends on NSH_LOGIN_PASSWD && !FSUTILS_PASSWD_READONLY
config NSH_DISABLE_USERDEL
bool "Disable userdel"
default DEFAULT_SMALL
depends on NSH_LOGIN_PASSWD && !FSUTILS_PASSWD_READONLY
config NSH_DISABLE_USLEEP
bool "Disable usleep"
default DEFAULT_SMALL
config NSH_DISABLE_WGET
bool "Disable wget"
default DEFAULT_SMALL
config NSH_DISABLE_XD
bool "Disable xd"
default DEFAULT_SMALL
config NSH_DISABLE_RESET_CAUSE
bool "Disable reset cause"
default DEFAULT_SMALL
depends on BOARDCTL_RESET_CAUSE
config NSH_DISABLE_IRQ_AFFINITY
bool "Disable command of irq affinity"
default DEFAULT_SMALL
depends on BOARDCTL_IRQ_AFFINITY
config NSH_DISABLE_WAIT
bool "Disable wait"
default DEFAULT_SMALL
depends on SCHED_WAITPID
depends on FS_PROCFS && !FS_PROCFS_EXCLUDE_PROCESS
config NSH_DISABLE_WATCH
bool "Disable watch"
default DEFAULT_SMALL
endmenu
if MMCSD
config NSH_MMCSDMINOR
int "MMC/SD minor device number"
default 0
---help---
If the architecture supports an MMC/SD slot and if the NSH
architecture specific logic is present, this option will provide
the MMC/SD minor number, i.e., the MMC/SD block driver will
be registered as /dev/mmcsdN where N is the minor number.
Default is zero.
config NSH_MMCSDSLOTNO
int "MMC/SD slot number"
default 0
---help---
If board-specific NSH start-up supports more than one MMC/SD slot, then this setting
should be provided to indicate which slot should be used. Default: 0.
config NSH_MMCSDSPIPORTNO
int "MMC/SD SPI device number"
default 0
depends on MMCSD_SPI
---help---
If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this
setting may be needed to tell the board logic which SPI bus to use. Default: 0
(meaning is board-specific).
endif # MMCSD
menu "Configure Command Options"
config NSH_VARS
bool "NSH variables"
default n
---help---
By default, there are no internal NSH variables. NSH will use OS
environment variables for all variable storage. If this option, NSH
will also support local NSH variables. These variables are, for the
most part, transparent and work just like the OS environment
variables. The difference is that when you create new tasks, all of
environment variables are inherited by the created tasks. NSH local
variables are not.
If this option is enabled (and CONFIG_DISABLE_ENVIRON is not), then a
new command called 'export' is enabled. The export command works very
must like the set command except that is operates on environment
variables. When CONFIG_NSH_VARS is enabled, there are changes in the
behavior of certains commands
============== =========================== ===========================
CMD w/o CONFIG_NSH_VARS w/CONFIG_NSH_VARS
============== =========================== ===========================
set <a> <b> Set environment var a to b Set NSH var a to b
unset <a> Unsets environment var a Unsets both environment var
and NSH var a
export <a> <b> Causes an error Unsets NSH var a. Sets
environment var a to b.
export <a> Causes an error Sets environment var a to
NSH var b (or ""). Unsets
local var a.
env Lists all environment Lists all environment
variables variables
============== =========================== ===========================
config NSH_CODECS_BUFSIZE
int "File buffer size used by CODEC commands"
default 128
config NSH_CMDOPT_HEXDUMP
bool "hexdump: Enable 'skip' and 'count' parameters"
default !DEFAULT_SMALL
depends on !NSH_DISABLE_HEXDUMP
config NSH_PROC_MOUNTPOINT
string "procfs mountpoint"
default "/proc"
depends on FS_PROCFS
endmenu
config NSH_FILEIOSIZE
int "NSH I/O buffer size"
default 512 if DEFAULT_SMALL
default 1024 if !DEFAULT_SMALL
---help---
Size of a static I/O buffer used for file access (ignored if
there is no filesystem). Default is 512/1024.
config NSH_STRERROR
bool "Use strerror()"
default n
depends on LIBC_STRERROR
---help---
strerror(errno) makes more readable output but strerror() is
very large and will not be used unless this setting is 'y'
This setting depends upon the strerror() having been enabled
with LIBC_STRERROR.
menu "Scripting Support"
config NSH_DISABLESCRIPT
bool "Disable script support"
default DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for scripting. This
setting disables the 'sh', 'test', and '[' commands and the
if-then[-else]-fi construct. This would only be set on systems
where a minimal footprint is a necessity and scripting is not.
if !NSH_DISABLESCRIPT
config NSH_DISABLE_ITEF
bool "Disable if-then-else-fi"
default DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for if-then-else-fi
sequences in scripts. This would only be set on systems where
some minimal scripting is required but if-then-else-fi is not.
config NSH_DISABLE_LOOPS
bool "Disable loops"
default DEFAULT_SMALL
---help---
This can be set to 'y' to suppress support for while-do-done and
until-do-done sequences in scripts. This would only be set on
systems where some minimal scripting is required but looping
is not.
config NSH_ROMFSRC
bool "Support ROMFS login script"
default n
---help---
The ROMFS start-up script will be executed exactly once. For
simple, persistence consoles (like a serial console). But with
other other kinds of consoles, there may be multiple, transient
sessions (such as Telnet and USB consoles). In these cases, you
may need another script that is executed at the beginning of each
session. Selecting this option enables support for such a login
script
config NSH_SYSINITSCRIPT
string "Relative path to sysinit script"
default "init.d/rc.sysinit"
---help---
This is the relative path to the sysinit script within the mountpoint.
The default is init.d/rc.sysinit. This is a relative path and must not
start with '/'.
config NSH_INITSCRIPT
string "Relative path to startup script"
default "init.d/rcS"
---help---
This is the relative path to the startup script within the mountpoint.
The default is init.d/rcS. This is a relative path and must not
start with '/'.
config NSH_RCSCRIPT
string "Relative path to login script"
default ".nshrc"
depends on NSH_ROMFSRC
---help---
This is the relative path to the login script within the mountpoint.
The default is .nshrc. This is a relative path and must not
start with '/'.
config NSH_SCRIPT_REDIRECT_PATH
string "rcS redirect output"
default ""
---help---
This option can redirect rcS output.such as /dev/log or other.
endif # !NSH_DISABLESCRIPT
endmenu # Scripting Support
menu "Console Configuration"
config NSH_CONSOLE
bool "Use console"
default y
---help---
If NSH_CONSOLE is set to 'y', then a character driver
console front-end is selected (/dev/console).
Normally, the serial console device is a UART and RS-232
interface. However, if USBDEV is defined, then a USB
serial device may, instead, be used if the one of
the following are defined:
PL2303 and PL2303_CONSOLE - Set up the Prolifics PL2303
emulation as a console device at /dev/console.
CDCACM and CDCACM_CONSOLE - Set up the CDC/ACM serial
device as a console device at dev/console.
NSH_USBCONSOLE and NSH_USBCONDEV - Sets up some other USB
serial device as the NSH console (not necessarily dev/console).
config NSH_USBCONSOLE
bool "Use a USB serial console"
default n
depends on BOARDCTL && NSH_CONSOLE && USBDEV && (CDCACM || PL2303)
select BOARDCTL_USBDEVCTRL
---help---
If defined, then the an arbitrary USB serial device may be used
to as the NSH console. In this case, NSH_USBCONDEV must be defined
to indicate which USB serial device to use as the console.
if NSH_USBCONSOLE
config NSH_USBCONDEV
string "USB serial console device"
default "/dev/ttyACM0" if CDCACM
default "/dev/ttyUSB0" if !CDCACM
---help---
If NSH_USBCONSOLE is set to 'y', then NSH_USBCONDEV must
also be set to select the USB device used to support the
NSH console. This should be set to the quoted name of a
read-/write-able USB driver. Default: "/dev/ttyACM0".
config USBDEV_MINOR
int "USB serial console device minor number"
default 0
---help---
If there are more than one USB devices, then a USB device
minor number may also need to be provided. Default: 0
endif # NSH_USBCONSOLE
config NSH_ALTCONDEV
bool "Alternative console device"
default n
depends on NSH_CONSOLE && !NSH_USBCONSOLE && !NSH_TELNET
---help---
If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
also be selected to enable use of an alternate character device
to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
then NSH_ALTSTDIN, NSH_ALTSTDOUT and NSH_ALTSTDERR must be set
to select the serial devices used to support the NSH console.
This may be useful, for example, to separate the NSH command
line from the system console when the system console is used to
provide debug output.
Default: stdin, stderr and stdout (probably "/dev/console")
NOTE 1: When any other device other than /dev/console is used
for a user interface, (1) linefeeds (\n) will not be expanded to
carriage return / linefeeds (\r\n). You will need to set
your terminal program to account for this. And (2) input is
not automatically echoed so you will have to turn local echo on.
NOTE 2: This option forces the console of all sessions to use
NSH_ALTSTD(IN/OUT/ERR). Hence, this option only makes sense for
a system that supports only a single session. This option is,
in particular, incompatible with Telnet sessions because each
Telnet session must use a different console device.
if NSH_ALTCONDEV
config NSH_ALTSTDIN
string "Alternative console \"stdin\" device name"
default "/dev/console"
---help---
If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
also be selected to enable use of an alternate character device
to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
then NSH_ALTSTDIN must be set to select the "stdin" device to