• 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    install_images = [ "eng_system" ]
505    install_enable = true
506  }
507
508  ohos_executable("toybox") {
509    sources = [
510      "lib/args.c",
511      "lib/commas.c",
512      "lib/deflate.c",
513      "lib/dirtree.c",
514      "lib/env.c",
515      "lib/help.c",
516      "lib/lib.c",
517      "lib/linestack.c",
518      "lib/llist.c",
519      "lib/net.c",
520      "lib/password.c",
521      "lib/portability.c",
522      "lib/tty.c",
523      "lib/xwrap.c",
524      "main.c",
525      "toys/android/sendevent.c",
526      "toys/lsb/dmesg.c",
527      "toys/lsb/gzip.c",
528      "toys/lsb/hostname.c",
529      "toys/lsb/killall.c",
530      "toys/lsb/md5sum.c",
531      "toys/lsb/mknod.c",
532      "toys/lsb/mktemp.c",
533      "toys/lsb/mount.c",
534      "toys/lsb/passwd.c",
535      "toys/lsb/pidof.c",
536      "toys/lsb/seq.c",
537      "toys/lsb/sync.c",
538      "toys/lsb/umount.c",
539      "toys/net/ftpget.c",
540      "toys/net/ifconfig.c",
541      "toys/net/microcom.c",
542      "toys/net/netcat.c",
543      "toys/net/netstat.c",
544      "toys/net/ping.c",
545      "toys/net/rfkill.c",
546      "toys/net/sntp.c",
547      "toys/net/tunctl.c",
548      "toys/other/acpi.c",
549      "toys/other/ascii.c",
550      "toys/other/base64.c",
551      "toys/other/blkid.c",
552      "toys/other/blockdev.c",
553      "toys/other/bzcat.c",
554      "toys/other/chroot.c",
555      "toys/other/chrt.c",
556      "toys/other/chvt.c",
557      "toys/other/clear.c",
558      "toys/other/count.c",
559      "toys/other/devmem.c",
560      "toys/other/dos2unix.c",
561      "toys/other/eject.c",
562      "toys/other/factor.c",
563      "toys/other/fallocate.c",
564      "toys/other/flock.c",
565      "toys/other/fmt.c",
566      "toys/other/free.c",
567      "toys/other/freeramdisk.c",
568      "toys/other/fsfreeze.c",
569      "toys/other/fsync.c",
570      "toys/other/help.c",
571      "toys/other/hexedit.c",
572      "toys/other/hwclock.c",
573      "toys/other/i2ctools.c",
574      "toys/other/inotifyd.c",
575      "toys/other/insmod.c",
576      "toys/other/ionice.c",
577      "toys/other/login.c",
578      "toys/other/losetup.c",
579      "toys/other/lsattr.c",
580      "toys/other/lsmod.c",
581      "toys/other/lspci.c",
582      "toys/other/lsusb.c",
583      "toys/other/makedevs.c",
584      "toys/other/mcookie.c",
585      "toys/other/mix.c",
586      "toys/other/mkpasswd.c",
587      "toys/other/mkswap.c",
588      "toys/other/modinfo.c",
589      "toys/other/mountpoint.c",
590      "toys/other/nbd_client.c",
591      "toys/other/nsenter.c",
592      "toys/other/oneit.c",
593      "toys/other/partprobe.c",
594      "toys/other/pivot_root.c",
595      "toys/other/pmap.c",
596      "toys/other/printenv.c",
597      "toys/other/pwdx.c",
598      "toys/other/readahead.c",
599      "toys/other/readlink.c",
600      "toys/other/realpath.c",
601      "toys/other/reboot.c",
602      "toys/other/reset.c",
603      "toys/other/rev.c",
604      "toys/other/rmmod.c",
605      "toys/other/setfattr.c",
606      "toys/other/setsid.c",
607      "toys/other/shred.c",
608      "toys/other/stat.c",
609      "toys/other/swapoff.c",
610      "toys/other/swapon.c",
611      "toys/other/switch_root.c",
612      "toys/other/sysctl.c",
613      "toys/other/tac.c",
614      "toys/other/taskset.c",
615      "toys/other/timeout.c",
616      "toys/other/truncate.c",
617      "toys/other/uptime.c",
618      "toys/other/usleep.c",
619      "toys/other/uuidgen.c",
620      "toys/other/vconfig.c",
621      "toys/other/vmstat.c",
622      "toys/other/w.c",
623      "toys/other/watch.c",
624      "toys/other/which.c",
625      "toys/other/xxd.c",
626      "toys/other/yes.c",
627      "toys/pending/bootchartd.c",
628      "toys/pending/dd.c",
629      "toys/pending/diff.c",
630      "toys/pending/getty.c",
631      "toys/pending/lsof.c",
632      "toys/pending/mdev.c",
633      "toys/pending/more.c",
634      "toys/pending/route.c",
635      "toys/pending/telnetd.c",
636      "toys/posix/basename.c",
637      "toys/posix/cal.c",
638      "toys/posix/cat.c",
639      "toys/posix/chgrp.c",
640      "toys/posix/chmod.c",
641      "toys/posix/cksum.c",
642      "toys/posix/cmp.c",
643      "toys/posix/comm.c",
644      "toys/posix/cp.c",
645      "toys/posix/cpio.c",
646      "toys/posix/cut.c",
647      "toys/posix/date.c",
648      "toys/posix/df.c",
649      "toys/posix/dirname.c",
650      "toys/posix/du.c",
651      "toys/posix/echo.c",
652      "toys/posix/env.c",
653      "toys/posix/expand.c",
654      "toys/posix/false.c",
655      "toys/posix/file.c",
656      "toys/posix/find.c",
657      "toys/posix/getconf.c",
658      "toys/posix/grep.c",
659      "toys/posix/head.c",
660      "toys/posix/iconv.c",
661      "toys/posix/id.c",
662      "toys/posix/kill.c",
663      "toys/posix/link.c",
664      "toys/posix/ln.c",
665      "toys/posix/logger.c",
666      "toys/posix/ls.c",
667      "toys/posix/mkdir.c",
668      "toys/posix/mkfifo.c",
669      "toys/posix/nice.c",
670      "toys/posix/nl.c",
671      "toys/posix/nohup.c",
672      "toys/posix/od.c",
673      "toys/posix/paste.c",
674      "toys/posix/patch.c",
675      "toys/posix/printf.c",
676      "toys/posix/ps.c",
677      "toys/posix/pwd.c",
678      "toys/posix/renice.c",
679      "toys/posix/rm.c",
680      "toys/posix/rmdir.c",
681      "toys/posix/sed.c",
682      "toys/posix/sleep.c",
683      "toys/posix/sort.c",
684      "toys/posix/split.c",
685      "toys/posix/strings.c",
686      "toys/posix/tail.c",
687      "toys/posix/tar.c",
688      "toys/posix/tee.c",
689      "toys/posix/test.c",
690      "toys/posix/time.c",
691      "toys/posix/touch.c",
692      "toys/posix/true.c",
693      "toys/posix/tty.c",
694      "toys/posix/ulimit.c",
695      "toys/posix/uname.c",
696      "toys/posix/uniq.c",
697      "toys/posix/unlink.c",
698      "toys/posix/uudecode.c",
699      "toys/posix/uuencode.c",
700      "toys/posix/wc.c",
701      "toys/posix/who.c",
702      "toys/posix/xargs.c",
703    ]
704
705    include_dirs = [ "./" ]
706
707    deps = []
708
709    if (build_selinux) {
710      sources += [ "toys/other/chcon.c" ]
711      include_dirs += [ "//third_party/selinux/libselinux/include" ]
712      deps += [ "//third_party/selinux:libselinux" ]
713    }
714
715    defines = [ "_DEFAULT_SOURCE" ]
716
717    cflags_c = [
718      "-std=gnu11",
719      "-Wall",
720      "-Wundef",
721      "-Wno-char-subscripts",
722      "-Wno-implicit-function-declaration",
723      "-Wno-unused-variable",
724      "-Wno-unused-value",
725      "-Wno-incompatible-pointer-types",
726      "-Wno-int-conversion",
727      "-Wno-sign-compare",
728      "-Wno-format",
729      "-Wno-unused-result",
730      "-Os",
731      "-ffunction-sections",
732      "-fdata-sections",
733      "-fno-asynchronous-unwind-tables",
734      "-fPIE",
735      "-funsigned-char",
736      "-Wno-string-plus-int",
737      "-Wno-tautological-constant-compare",
738      "-Wno-string-conversion",
739      "-Wno-unused-but-set-variable",
740    ]
741
742    ldflags = [
743      "-pie",
744      "-Wl,-z,relro",
745      "-Wl,-z,now",
746      "-Wl,-z,noexecstack",
747      "-lm",
748      "-lcrypt",
749    ]
750
751    if (build_selinux) {
752      cflags_c += [
753        "-D_GUN_SOURCE",
754        "-DUSE_PCRE2",
755        "-w",
756        "-DWITH_SELINUX",
757        "-DCUSTOM_GET_CONTEXT",
758      ]
759    }
760
761    symlink_target_name = [
762      "base64",
763      "basename",
764      "blockdev",
765      "cal",
766      "cat",
767      "chgrp",
768      "chmod",
769      "chown",
770      "chroot",
771      "chrt",
772      "chvt",
773      "cksum",
774      "clear",
775      "cmp",
776      "comm",
777      "count",
778      "cp",
779      "cpio",
780      "crc32",
781      "cut",
782      "date",
783      "dd",
784      "devmem",
785      "df",
786      "diff",
787      "dirname",
788      "dmesg",
789      "dnsdomainname",
790      "dos2unix",
791      "du",
792      "echo",
793      "egrep",
794      "eject",
795      "env",
796      "expand",
797      "expr",
798      "factor",
799      "fallocate",
800      "false",
801      "fgrep",
802      "file",
803      "find",
804      "flock",
805      "fmt",
806      "free",
807      "freeramdisk",
808      "fsfreeze",
809      "fstype",
810      "fsync",
811      "ftpget",
812      "ftpput",
813      "getconf",
814      "grep",
815      "groups",
816      "gunzip",
817      "gzip",
818      "halt",
819      "head",
820      "help",
821      "hexedit",
822      "hostname",
823      "hwclock",
824      "i2cdetect",
825      "i2cdump",
826      "i2cget",
827      "i2cset",
828      "iconv",
829      "id",
830      "ifconfig",
831      "inotifyd",
832      "insmod",
833      "install",
834      "ionice",
835      "iorenice",
836      "iotop",
837      "kill",
838      "killall",
839      "killall5",
840      "link",
841      "ln",
842      "logger",
843      "login",
844      "logname",
845      "losetup",
846      "ls",
847      "lsattr",
848      "lsmod",
849      "lsof",
850      "lspci",
851      "lsusb",
852      "makedevs",
853      "mcookie",
854      "md5sum",
855      "mdev",
856      "microcom",
857      "mix",
858      "mkdir",
859      "mkfifo",
860      "mknod",
861      "mkpasswd",
862      "mkswap",
863      "mktemp",
864      "modinfo",
865      "more",
866      "mount",
867      "mountpoint",
868      "mv",
869      "nbd-client",
870      "netcat",
871      "netstat",
872      "nice",
873      "nl",
874      "nohup",
875      "nproc",
876      "nsenter",
877      "od",
878      "oneit",
879      "partprobe",
880      "passwd",
881      "paste",
882      "patch",
883      "pgrep",
884      "pidof",
885      "ping",
886      "ping6",
887      "pivot_root",
888      "pkill",
889      "pmap",
890      "poweroff",
891      "printenv",
892      "printf",
893      "prlimit",
894      "ps",
895      "pwd",
896      "pwdx",
897      "readahead",
898      "readlink",
899      "realpath",
900      "renice",
901      "reset",
902      "restorecon",
903      "rev",
904      "rfkill",
905      "rm",
906      "rmdir",
907      "rmmod",
908      "route",
909      "runcon",
910      "sed",
911      "sendevent",
912      "seq",
913      "setfattr",
914      "setsid",
915      "sha1sum",
916      "sha224sum",
917      "sha256sum",
918      "sha384sum",
919      "sha512sum",
920      "shalsum",
921      "shred",
922      "sleep",
923      "sntp",
924      "sort",
925      "split",
926      "stat",
927      "strings",
928      "swapoff",
929      "swapon",
930      "switch_root",
931      "sync",
932      "sysctl",
933      "sysctrl",
934      "tac",
935      "tail",
936      "tar",
937      "taskset",
938      "tee",
939      "test",
940      "time",
941      "timeout",
942      "top",
943      "touch",
944      "tr",
945      "true",
946      "truncate",
947      "tty",
948      "tunctl",
949      "ulimit",
950      "umount",
951      "uname",
952      "uniq",
953      "unix2dos",
954      "unlink",
955      "unshare",
956      "uptime",
957      "usleep",
958      "uudecode",
959      "uuencode",
960      "uuidgen",
961      "vconfig",
962      "vmstat",
963      "w",
964      "watch",
965      "wc",
966      "which",
967      "who",
968      "whoami",
969      "xargs",
970      "xxd",
971      "yes",
972      "zcat",
973    ]
974    if (build_selinux) {
975      symlink_target_name -= [ "restorecon" ]
976    }
977    part_name = "toybox"
978    install_images = [
979      "system",
980      "ramdisk",
981      "updater",
982    ]
983    install_enable = true
984  }
985}
986