• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2020-2022. All rights reserved.
2# Must do steps below manually after getting the sources code
3# from official website:
4# 1. make defconfig or make menuconfig
5#   ==> To generate .config file.
6# 2. NOBUILD=1 scripts/make.sh
7#   ==> To generate neccesary files like heades in generated
8# direcotory.
9
10# To add a toy:
11# 1. Edit .config to enable the toy you want to add.
12# 2. Edit toybox'sources below if neccesary.
13# e. Add th toy to the symlinks.
14if (defined(ohos_lite)) {
15  executable("toybox") {
16    # from middleware file build.sh
17    sources = [
18      "lib/args.c",
19      "lib/commas.c",
20      "lib/deflate.c",
21      "lib/dirtree.c",
22      "lib/env.c",
23      "lib/help.c",
24      "lib/lib.c",
25      "lib/linestack.c",
26      "lib/llist.c",
27      "lib/net.c",
28      "lib/password.c",
29      "lib/portability.c",
30      "lib/tty.c",
31      "lib/xwrap.c",
32      "main.c",
33      "toys/android/sendevent.c",
34      "toys/lsb/dmesg.c",
35      "toys/lsb/gzip.c",
36      "toys/lsb/hostname.c",
37      "toys/lsb/killall.c",
38      "toys/lsb/md5sum.c",
39      "toys/lsb/mknod.c",
40      "toys/lsb/mktemp.c",
41      "toys/lsb/mount.c",
42      "toys/lsb/passwd.c",
43      "toys/lsb/pidof.c",
44      "toys/lsb/seq.c",
45      "toys/lsb/su.c",
46      "toys/lsb/sync.c",
47      "toys/lsb/umount.c",
48      "toys/net/ftpget.c",
49      "toys/net/ifconfig.c",
50      "toys/net/microcom.c",
51      "toys/net/netcat.c",
52      "toys/net/netstat.c",
53      "toys/net/ping.c",
54      "toys/net/rfkill.c",
55      "toys/net/sntp.c",
56      "toys/net/tunctl.c",
57      "toys/other/acpi.c",
58      "toys/other/ascii.c",
59      "toys/other/base64.c",
60      "toys/other/blkid.c",
61      "toys/other/blockdev.c",
62      "toys/other/bzcat.c",
63      "toys/other/chroot.c",
64      "toys/other/chrt.c",
65      "toys/other/chvt.c",
66      "toys/other/clear.c",
67      "toys/other/count.c",
68      "toys/other/devmem.c",
69      "toys/other/dos2unix.c",
70      "toys/other/eject.c",
71      "toys/other/factor.c",
72      "toys/other/fallocate.c",
73      "toys/other/flock.c",
74      "toys/other/fmt.c",
75      "toys/other/free.c",
76      "toys/other/freeramdisk.c",
77      "toys/other/fsfreeze.c",
78      "toys/other/fsync.c",
79      "toys/other/help.c",
80      "toys/other/hexedit.c",
81      "toys/other/hwclock.c",
82      "toys/other/i2ctools.c",
83      "toys/other/inotifyd.c",
84      "toys/other/insmod.c",
85      "toys/other/ionice.c",
86      "toys/other/login.c",
87      "toys/other/losetup.c",
88      "toys/other/lsattr.c",
89      "toys/other/lsmod.c",
90      "toys/other/lspci.c",
91      "toys/other/lsusb.c",
92      "toys/other/makedevs.c",
93      "toys/other/mcookie.c",
94      "toys/other/mix.c",
95      "toys/other/mkpasswd.c",
96      "toys/other/mkswap.c",
97      "toys/other/modinfo.c",
98      "toys/other/mountpoint.c",
99      "toys/other/nbd_client.c",
100      "toys/other/nsenter.c",
101      "toys/other/oneit.c",
102      "toys/other/partprobe.c",
103      "toys/other/pivot_root.c",
104      "toys/other/pmap.c",
105      "toys/other/printenv.c",
106      "toys/other/pwdx.c",
107      "toys/other/readahead.c",
108      "toys/other/readlink.c",
109      "toys/other/realpath.c",
110      "toys/other/reboot.c",
111      "toys/other/reset.c",
112      "toys/other/rev.c",
113      "toys/other/rmmod.c",
114      "toys/other/setfattr.c",
115      "toys/other/setsid.c",
116      "toys/other/shred.c",
117      "toys/other/stat.c",
118      "toys/other/swapoff.c",
119      "toys/other/swapon.c",
120      "toys/other/switch_root.c",
121      "toys/other/sysctl.c",
122      "toys/other/tac.c",
123      "toys/other/taskset.c",
124      "toys/other/timeout.c",
125      "toys/other/truncate.c",
126      "toys/other/uptime.c",
127      "toys/other/usleep.c",
128      "toys/other/uuidgen.c",
129      "toys/other/vconfig.c",
130      "toys/other/vmstat.c",
131      "toys/other/w.c",
132      "toys/other/watch.c",
133      "toys/other/which.c",
134      "toys/other/xxd.c",
135      "toys/other/yes.c",
136      "toys/pending/bootchartd.c",
137      "toys/pending/dd.c",
138      "toys/pending/diff.c",
139      "toys/pending/getty.c",
140      "toys/pending/lsof.c",
141      "toys/pending/mdev.c",
142      "toys/pending/more.c",
143      "toys/pending/route.c",
144      "toys/pending/telnetd.c",
145      "toys/posix/basename.c",
146      "toys/posix/cal.c",
147      "toys/posix/cat.c",
148      "toys/posix/chgrp.c",
149      "toys/posix/chmod.c",
150      "toys/posix/cksum.c",
151      "toys/posix/cmp.c",
152      "toys/posix/comm.c",
153      "toys/posix/cp.c",
154      "toys/posix/cpio.c",
155      "toys/posix/cut.c",
156      "toys/posix/date.c",
157      "toys/posix/df.c",
158      "toys/posix/dirname.c",
159      "toys/posix/du.c",
160      "toys/posix/echo.c",
161      "toys/posix/env.c",
162      "toys/posix/expand.c",
163      "toys/posix/false.c",
164      "toys/posix/file.c",
165      "toys/posix/find.c",
166      "toys/posix/getconf.c",
167      "toys/posix/grep.c",
168      "toys/posix/head.c",
169      "toys/posix/iconv.c",
170      "toys/posix/id.c",
171      "toys/posix/kill.c",
172      "toys/posix/link.c",
173      "toys/posix/ln.c",
174      "toys/posix/logger.c",
175      "toys/posix/ls.c",
176      "toys/posix/mkdir.c",
177      "toys/posix/mkfifo.c",
178      "toys/posix/nice.c",
179      "toys/posix/nl.c",
180      "toys/posix/nohup.c",
181      "toys/posix/od.c",
182      "toys/posix/paste.c",
183      "toys/posix/patch.c",
184      "toys/posix/printf.c",
185      "toys/posix/ps.c",
186      "toys/posix/pwd.c",
187      "toys/posix/renice.c",
188      "toys/posix/rm.c",
189      "toys/posix/rmdir.c",
190      "toys/posix/sed.c",
191      "toys/posix/sleep.c",
192      "toys/posix/sort.c",
193      "toys/posix/split.c",
194      "toys/posix/strings.c",
195      "toys/posix/tail.c",
196      "toys/posix/tar.c",
197      "toys/posix/tee.c",
198      "toys/posix/test.c",
199      "toys/posix/time.c",
200      "toys/posix/touch.c",
201      "toys/posix/true.c",
202      "toys/posix/tty.c",
203      "toys/posix/ulimit.c",
204      "toys/posix/uname.c",
205      "toys/posix/uniq.c",
206      "toys/posix/unlink.c",
207      "toys/posix/uudecode.c",
208      "toys/posix/uuencode.c",
209      "toys/posix/wc.c",
210      "toys/posix/who.c",
211      "toys/posix/xargs.c",
212    ]
213
214    include_dirs = [ "./" ]
215
216    defines = [
217      "_DEFAULT_SOURCE",
218      "OHOS_LITE",
219    ]
220
221    configs -= [ "//build/lite/config:language_c" ]
222    cflags_c = [
223      "-std=gnu11",
224      "-Wall",
225      "-Wundef",
226      "-Wno-char-subscripts",
227      "-Wno-implicit-function-declaration",
228      "-Wno-unused-variable",
229      "-Wno-unused-value",
230      "-Wno-incompatible-pointer-types",
231      "-Wno-int-conversion",
232      "-Wno-sign-compare",
233      "-Wno-format",
234      "-Wno-unused-result",
235      "-Os",
236      "-ffunction-sections",
237      "-fdata-sections",
238      "-fno-asynchronous-unwind-tables",
239      "-fPIE",
240      "-funsigned-char",
241    ]
242
243    ldflags = [
244      "-pie",
245      "-Wl,-z,relro",
246      "-Wl,-z,now",
247      "-Wl,-z,noexecstack",
248      "-lm",
249      "-lcrypt",
250    ]
251  }
252
253  cmd_long_path = [
254    "bin/chmod",
255    "bin/chown",
256    "bin/chroot",
257    "bin/chrt",
258    "bin/chvt",
259    "bin/cksum",
260    "bin/clear",
261    "bin/cmp",
262    "bin/comm",
263    "bin/count",
264    "bin/cp",
265    "bin/cpio",
266    "bin/crc32",
267    "bin/cut",
268    "bin/date",
269    "bin/devmem",
270    "bin/df",
271    "bin/diff",
272    "bin/dirname",
273    "bin/dmesg",
274    "bin/dnsdomainname",
275    "bin/dos2unix",
276    "bin/du",
277    "bin/echo",
278    "bin/egrep",
279    "bin/eject",
280    "bin/env",
281    "bin/expand",
282    "bin/factor",
283    "bin/fallocate",
284    "bin/false",
285    "bin/fgrep",
286    "bin/file",
287    "bin/find",
288    "bin/flock",
289    "bin/fmt",
290    "bin/free",
291    "bin/freeramdisk",
292    "bin/fsfreeze",
293    "bin/fstype",
294    "bin/fsync",
295    "bin/ftpget",
296    "bin/ftpput",
297    "bin/getconf",
298    "sbin/getty",
299    "bin/grep",
300    "bin/groups",
301    "bin/gunzip",
302    "bin/halt",
303    "bin/head",
304    "bin/help",
305    "bin/hexedit",
306    "bin/hostname",
307    "bin/hwclock",
308    "bin/i2cdetect",
309    "bin/i2cdump",
310    "bin/i2cget",
311    "bin/i2cset",
312    "bin/iconv",
313    "bin/id",
314    "bin/ifconfig",
315    "bin/inotifyd",
316    "bin/insmod",
317    "bin/install",
318    "bin/ionice",
319    "bin/iorenice",
320    "bin/iotop",
321    "bin/kill",
322    "bin/killall",
323    "bin/killall5",
324    "bin/link",
325    "bin/ln",
326    "bin/logger",
327    "bin/login",
328    "bin/logname",
329    "bin/losetup",
330    "bin/ls",
331    "bin/lsattr",
332    "bin/lsmod",
333    "bin/lsof",
334    "bin/lspci",
335    "bin/lsusb",
336    "bin/makedevs",
337    "bin/mcookie",
338    "bin/md5sum",
339    "bin/microcom",
340    "bin/mix",
341    "bin/mkdir",
342    "bin/mkfifo",
343    "bin/mknod",
344    "bin/mkpasswd",
345    "bin/mkswap",
346    "bin/mktemp",
347    "bin/modinfo",
348    "bin/more",
349    "bin/mount",
350    "bin/mountpoint",
351    "bin/mv",
352    "bin/nbd-client",
353    "bin/nc",
354    "bin/netcat",
355    "bin/netstat",
356    "bin/nice",
357    "bin/nl",
358    "bin/nohup",
359    "bin/nproc",
360    "bin/nsenter",
361    "bin/od",
362    "bin/oneit",
363    "bin/partprobe",
364    "bin/passwd",
365    "bin/paste",
366    "bin/patch",
367    "bin/pgrep",
368    "bin/pidof",
369    "bin/ping",
370    "bin/ping6",
371    "bin/pivot_root",
372    "bin/pkill",
373    "bin/pmap",
374    "bin/poweroff",
375    "bin/printenv",
376    "bin/printf",
377    "bin/prlimit",
378    "bin/ps",
379    "bin/pwd",
380    "bin/pwdx",
381    "bin/readahead",
382    "bin/readlink",
383    "bin/realpath",
384    "bin/reboot",
385    "bin/renice",
386    "bin/reset",
387    "bin/rev",
388    "bin/rfkill",
389    "bin/rm",
390    "bin/rmdir",
391    "bin/rmmod",
392    "bin/sed",
393    "bin/seq",
394    "bin/setfattr",
395    "bin/setsid",
396    "bin/shalsum",
397    "bin/shred",
398    "bin/sleep",
399    "bin/sntp",
400    "bin/sort",
401    "bin/split",
402    "bin/stat",
403    "bin/strings",
404    "bin/su",
405    "bin/swapoff",
406    "bin/swapon",
407    "bin/switch_root",
408    "bin/sync",
409    "bin/sysctrl",
410    "bin/tac",
411    "bin/tail",
412    "bin/tar",
413    "bin/taskset",
414    "bin/tee",
415    "bin/test",
416    "bin/time",
417    "bin/timeout",
418    "bin/top",
419    "bin/touch",
420    "bin/true",
421    "bin/truncate",
422    "bin/tty",
423    "bin/tunctl",
424    "bin/ulimit",
425    "bin/umount",
426    "bin/uname",
427    "bin/uniq",
428    "bin/unix2dos",
429    "bin/unlink",
430    "bin/unshare",
431    "bin/uptime",
432    "bin/usleep",
433    "bin/uudecode",
434    "bin/uuencode",
435    "bin/uuidgen",
436    "bin/vconfig",
437    "bin/vmstat",
438    "bin/w",
439    "bin/watch",
440    "bin/wc",
441    "bin/which",
442    "bin/who",
443    "bin/whoami",
444    "bin/xargs",
445    "bin/xxd",
446    "bin/yes",
447    "bin/zcat",
448    "bin/mdev",
449    "bin/telnetd",
450    "bin/route",
451  ]
452
453  foreach(path, cmd_long_path) {
454    exec_script("install.py",
455                [
456                  "--long_path",
457                  path,
458                  "--out_dir",
459                  rebase_path("$root_out_dir"),
460                ])
461  }
462} else {
463  import("//build/ohos.gni")
464  ohos_executable("su") {
465    sources = [ "openharmony/su.c" ]
466
467    include_dirs = [ "./openharmony" ]
468
469    cflags_c = [
470      "-std=gnu11",
471      "-Wall",
472      "-Wundef",
473      "-Wno-char-subscripts",
474      "-Wno-implicit-function-declaration",
475      "-Wno-unused-variable",
476      "-Wno-unused-value",
477      "-Wno-incompatible-pointer-types",
478      "-Wno-int-conversion",
479      "-Wno-sign-compare",
480      "-Wno-format",
481      "-Wno-unused-result",
482      "-Os",
483      "-ffunction-sections",
484      "-fdata-sections",
485      "-fno-asynchronous-unwind-tables",
486      "-fPIE",
487      "-funsigned-char",
488      "-Wno-string-plus-int",
489      "-Wno-tautological-constant-compare",
490      "-Wno-string-conversion",
491      "-Wno-unused-but-set-variable",
492    ]
493
494    ldflags = [
495      "-pie",
496      "-Wl,-z,relro",
497      "-Wl,-z,now",
498      "-Wl,-z,noexecstack",
499      "-lm",
500      "-lcrypt",
501    ]
502
503    part_name = "toybox"
504    subsystem_name = "thirdparty"
505    install_images = [ "eng_system" ]
506    install_enable = true
507  }
508
509  ohos_executable("toybox") {
510    sources = [
511      "lib/args.c",
512      "lib/commas.c",
513      "lib/deflate.c",
514      "lib/dirtree.c",
515      "lib/env.c",
516      "lib/help.c",
517      "lib/lib.c",
518      "lib/linestack.c",
519      "lib/llist.c",
520      "lib/net.c",
521      "lib/password.c",
522      "lib/portability.c",
523      "lib/tty.c",
524      "lib/xwrap.c",
525      "main.c",
526      "toys/android/sendevent.c",
527      "toys/lsb/dmesg.c",
528      "toys/lsb/gzip.c",
529      "toys/lsb/hostname.c",
530      "toys/lsb/killall.c",
531      "toys/lsb/md5sum.c",
532      "toys/lsb/mknod.c",
533      "toys/lsb/mktemp.c",
534      "toys/lsb/mount.c",
535      "toys/lsb/passwd.c",
536      "toys/lsb/pidof.c",
537      "toys/lsb/seq.c",
538      "toys/lsb/sync.c",
539      "toys/lsb/umount.c",
540      "toys/net/ftpget.c",
541      "toys/net/ifconfig.c",
542      "toys/net/microcom.c",
543      "toys/net/netcat.c",
544      "toys/net/netstat.c",
545      "toys/net/ping.c",
546      "toys/net/rfkill.c",
547      "toys/net/sntp.c",
548      "toys/net/tunctl.c",
549      "toys/other/acpi.c",
550      "toys/other/ascii.c",
551      "toys/other/base64.c",
552      "toys/other/blkid.c",
553      "toys/other/blockdev.c",
554      "toys/other/bzcat.c",
555      "toys/other/chroot.c",
556      "toys/other/chrt.c",
557      "toys/other/chvt.c",
558      "toys/other/clear.c",
559      "toys/other/count.c",
560      "toys/other/devmem.c",
561      "toys/other/dos2unix.c",
562      "toys/other/eject.c",
563      "toys/other/factor.c",
564      "toys/other/fallocate.c",
565      "toys/other/flock.c",
566      "toys/other/fmt.c",
567      "toys/other/free.c",
568      "toys/other/freeramdisk.c",
569      "toys/other/fsfreeze.c",
570      "toys/other/fsync.c",
571      "toys/other/help.c",
572      "toys/other/hexedit.c",
573      "toys/other/hwclock.c",
574      "toys/other/i2ctools.c",
575      "toys/other/inotifyd.c",
576      "toys/other/insmod.c",
577      "toys/other/ionice.c",
578      "toys/other/login.c",
579      "toys/other/losetup.c",
580      "toys/other/lsattr.c",
581      "toys/other/lsmod.c",
582      "toys/other/lspci.c",
583      "toys/other/lsusb.c",
584      "toys/other/makedevs.c",
585      "toys/other/mcookie.c",
586      "toys/other/mix.c",
587      "toys/other/mkpasswd.c",
588      "toys/other/mkswap.c",
589      "toys/other/modinfo.c",
590      "toys/other/mountpoint.c",
591      "toys/other/nbd_client.c",
592      "toys/other/nsenter.c",
593      "toys/other/oneit.c",
594      "toys/other/partprobe.c",
595      "toys/other/pivot_root.c",
596      "toys/other/pmap.c",
597      "toys/other/printenv.c",
598      "toys/other/pwdx.c",
599      "toys/other/readahead.c",
600      "toys/other/readlink.c",
601      "toys/other/realpath.c",
602      "toys/other/reboot.c",
603      "toys/other/reset.c",
604      "toys/other/rev.c",
605      "toys/other/rmmod.c",
606      "toys/other/setfattr.c",
607      "toys/other/setsid.c",
608      "toys/other/shred.c",
609      "toys/other/stat.c",
610      "toys/other/swapoff.c",
611      "toys/other/swapon.c",
612      "toys/other/switch_root.c",
613      "toys/other/sysctl.c",
614      "toys/other/tac.c",
615      "toys/other/taskset.c",
616      "toys/other/timeout.c",
617      "toys/other/truncate.c",
618      "toys/other/uptime.c",
619      "toys/other/usleep.c",
620      "toys/other/uuidgen.c",
621      "toys/other/vconfig.c",
622      "toys/other/vmstat.c",
623      "toys/other/w.c",
624      "toys/other/watch.c",
625      "toys/other/which.c",
626      "toys/other/xxd.c",
627      "toys/other/yes.c",
628      "toys/pending/bootchartd.c",
629      "toys/pending/dd.c",
630      "toys/pending/diff.c",
631      "toys/pending/getty.c",
632      "toys/pending/lsof.c",
633      "toys/pending/mdev.c",
634      "toys/pending/more.c",
635      "toys/pending/route.c",
636      "toys/pending/telnetd.c",
637      "toys/posix/basename.c",
638      "toys/posix/cal.c",
639      "toys/posix/cat.c",
640      "toys/posix/chgrp.c",
641      "toys/posix/chmod.c",
642      "toys/posix/cksum.c",
643      "toys/posix/cmp.c",
644      "toys/posix/comm.c",
645      "toys/posix/cp.c",
646      "toys/posix/cpio.c",
647      "toys/posix/cut.c",
648      "toys/posix/date.c",
649      "toys/posix/df.c",
650      "toys/posix/dirname.c",
651      "toys/posix/du.c",
652      "toys/posix/echo.c",
653      "toys/posix/env.c",
654      "toys/posix/expand.c",
655      "toys/posix/false.c",
656      "toys/posix/file.c",
657      "toys/posix/find.c",
658      "toys/posix/getconf.c",
659      "toys/posix/grep.c",
660      "toys/posix/head.c",
661      "toys/posix/iconv.c",
662      "toys/posix/id.c",
663      "toys/posix/kill.c",
664      "toys/posix/link.c",
665      "toys/posix/ln.c",
666      "toys/posix/logger.c",
667      "toys/posix/ls.c",
668      "toys/posix/mkdir.c",
669      "toys/posix/mkfifo.c",
670      "toys/posix/nice.c",
671      "toys/posix/nl.c",
672      "toys/posix/nohup.c",
673      "toys/posix/od.c",
674      "toys/posix/paste.c",
675      "toys/posix/patch.c",
676      "toys/posix/printf.c",
677      "toys/posix/ps.c",
678      "toys/posix/pwd.c",
679      "toys/posix/renice.c",
680      "toys/posix/rm.c",
681      "toys/posix/rmdir.c",
682      "toys/posix/sed.c",
683      "toys/posix/sleep.c",
684      "toys/posix/sort.c",
685      "toys/posix/split.c",
686      "toys/posix/strings.c",
687      "toys/posix/tail.c",
688      "toys/posix/tar.c",
689      "toys/posix/tee.c",
690      "toys/posix/test.c",
691      "toys/posix/time.c",
692      "toys/posix/touch.c",
693      "toys/posix/true.c",
694      "toys/posix/tty.c",
695      "toys/posix/ulimit.c",
696      "toys/posix/uname.c",
697      "toys/posix/uniq.c",
698      "toys/posix/unlink.c",
699      "toys/posix/uudecode.c",
700      "toys/posix/uuencode.c",
701      "toys/posix/wc.c",
702      "toys/posix/who.c",
703      "toys/posix/xargs.c",
704    ]
705
706    include_dirs = [ "./" ]
707
708    deps = []
709    defines = [ "_DEFAULT_SOURCE" ]
710
711    if (build_selinux) {
712      sources += [
713        "toys/other/chcon.c",
714        "toys/pending/traceroute.c",
715      ]
716      external_deps = [
717        "openssl:libcrypto_shared",
718        "selinux:libselinux",
719      ]
720      defines += [ "TOYBOX_EXTRA_CMD" ]
721    }
722
723    cflags_c = [
724      "-std=gnu11",
725      "-Wall",
726      "-Wundef",
727      "-Wno-char-subscripts",
728      "-Wno-implicit-function-declaration",
729      "-Wno-unused-variable",
730      "-Wno-unused-value",
731      "-Wno-incompatible-pointer-types",
732      "-Wno-int-conversion",
733      "-Wno-sign-compare",
734      "-Wno-format",
735      "-Wno-unused-result",
736      "-Os",
737      "-ffunction-sections",
738      "-fdata-sections",
739      "-fno-asynchronous-unwind-tables",
740      "-fPIE",
741      "-funsigned-char",
742      "-Wno-string-plus-int",
743      "-Wno-tautological-constant-compare",
744      "-Wno-string-conversion",
745      "-Wno-unused-but-set-variable",
746    ]
747
748    ldflags = [
749      "-pie",
750      "-Wl,-z,relro",
751      "-Wl,-z,now",
752      "-Wl,-z,noexecstack",
753      "-lm",
754      "-lcrypt",
755    ]
756
757    if (build_selinux) {
758      cflags_c += [
759        "-D_GUN_SOURCE",
760        "-DUSE_PCRE2",
761        "-w",
762        "-DWITH_SELINUX",
763        "-DCUSTOM_GET_CONTEXT",
764      ]
765    }
766
767    symlink_target_name = [
768      "base64",
769      "basename",
770      "blockdev",
771      "cal",
772      "cat",
773      "chgrp",
774      "chmod",
775      "chown",
776      "chroot",
777      "chrt",
778      "chvt",
779      "cksum",
780      "clear",
781      "cmp",
782      "comm",
783      "count",
784      "cp",
785      "cpio",
786      "crc32",
787      "cut",
788      "date",
789      "dd",
790      "devmem",
791      "df",
792      "diff",
793      "dirname",
794      "dmesg",
795      "dnsdomainname",
796      "dos2unix",
797      "du",
798      "echo",
799      "egrep",
800      "eject",
801      "env",
802      "expand",
803      "expr",
804      "factor",
805      "fallocate",
806      "false",
807      "fgrep",
808      "file",
809      "find",
810      "flock",
811      "fmt",
812      "free",
813      "freeramdisk",
814      "fsfreeze",
815      "fstype",
816      "fsync",
817      "ftpget",
818      "ftpput",
819      "getconf",
820      "grep",
821      "groups",
822      "gunzip",
823      "gzip",
824      "halt",
825      "head",
826      "help",
827      "hexedit",
828      "hostname",
829      "hwclock",
830      "i2cdetect",
831      "i2cdump",
832      "i2cget",
833      "i2cset",
834      "iconv",
835      "id",
836      "ifconfig",
837      "inotifyd",
838      "insmod",
839      "install",
840      "ionice",
841      "iorenice",
842      "iotop",
843      "kill",
844      "killall",
845      "killall5",
846      "link",
847      "ln",
848      "logger",
849      "login",
850      "logname",
851      "losetup",
852      "ls",
853      "lsattr",
854      "lsmod",
855      "lsof",
856      "lspci",
857      "lsusb",
858      "makedevs",
859      "mcookie",
860      "md5sum",
861      "mdev",
862      "microcom",
863      "mix",
864      "mkdir",
865      "mkfifo",
866      "mknod",
867      "mkpasswd",
868      "mkswap",
869      "mktemp",
870      "modinfo",
871      "more",
872      "mount",
873      "mountpoint",
874      "mv",
875      "nbd-client",
876      "netcat",
877      "netstat",
878      "nice",
879      "nl",
880      "nohup",
881      "nproc",
882      "nsenter",
883      "od",
884      "oneit",
885      "partprobe",
886      "passwd",
887      "paste",
888      "patch",
889      "pgrep",
890      "pidof",
891      "ping",
892      "ping6",
893      "pivot_root",
894      "pkill",
895      "pmap",
896      "poweroff",
897      "printenv",
898      "printf",
899      "prlimit",
900      "ps",
901      "pwd",
902      "pwdx",
903      "readahead",
904      "readlink",
905      "realpath",
906      "renice",
907      "reset",
908      "restorecon",
909      "rev",
910      "rfkill",
911      "rm",
912      "rmdir",
913      "rmmod",
914      "runcon",
915      "sed",
916      "sendevent",
917      "seq",
918      "setfattr",
919      "setsid",
920      "sha1sum",
921      "sha224sum",
922      "sha256sum",
923      "sha384sum",
924      "sha512sum",
925      "shalsum",
926      "shred",
927      "sleep",
928      "sntp",
929      "sort",
930      "split",
931      "stat",
932      "strings",
933      "swapoff",
934      "swapon",
935      "switch_root",
936      "sync",
937      "sysctl",
938      "sysctrl",
939      "tac",
940      "tail",
941      "tar",
942      "taskset",
943      "tee",
944      "test",
945      "time",
946      "timeout",
947      "top",
948      "touch",
949      "tr",
950      "traceroute",
951      "true",
952      "truncate",
953      "tty",
954      "tunctl",
955      "ulimit",
956      "umount",
957      "uname",
958      "uniq",
959      "unix2dos",
960      "unlink",
961      "unshare",
962      "uptime",
963      "usleep",
964      "uudecode",
965      "uuencode",
966      "uuidgen",
967      "vconfig",
968      "vmstat",
969      "w",
970      "watch",
971      "wc",
972      "which",
973      "who",
974      "whoami",
975      "xargs",
976      "xxd",
977      "yes",
978      "zcat",
979    ]
980    if (build_selinux) {
981      symlink_target_name -= [ "restorecon" ]
982    }
983    part_name = "toybox"
984    subsystem_name = "thirdparty"
985    install_images = [
986      "system",
987      "ramdisk",
988      "updater",
989    ]
990    install_enable = true
991  }
992}
993