Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinygo support progress overview #2979

Open
leongross opened this issue Apr 30, 2024 · 2 comments
Open

tinygo support progress overview #2979

leongross opened this issue Apr 30, 2024 · 2 comments
Labels
Feature Request Feature Request

Comments

@leongross
Copy link
Contributor

leongross commented Apr 30, 2024

Is your feature request related to a problem? Please describe.
Currently, many of the busybox commands fail to build using tinygo.
This issue should cover the current process of enabling all subcommands to be built using tinygo.

Describe the solution you'd like
While enabling more and more commands the list of working commands in this issue will be updated. Maybe it is also a good idea to track the PRs and issues for tinygo that cover current / past changes.

Additional context

building

Since atm the tinygo support is lacking, many commands got the !tinygo build tag.
This prohibits building, so anyone recreating the build steps should be aware that this has to be removed for each command.

Further, this u-root features a tool named tinygobb which should build all the subcommands using tinygo. I had some issues with that so I built a python script that builds each command for a subfolder (here run separately in core and exp). For completeness' sake, I will add it here as well.
It also outputs build errors in csv so it can be imported to shared spreadsheet software.
Build tinygo from my fork on branch picked to get all changes (also yet unreviewd).

issues

A list of the more prevalent issues that occur during the build process that are either WIP or haven't been handled yet (not exhaustive). The majority of the work to solve this issues needs to be done in the tinygo codebase. For more details on those, see here.

  • ld.lld: error: undefined symbol: golang.org/x/sys/unix.Syscall6

  • ld.lld: error: undefined symbol: golang.org/x/sys/unix.Syscall

  • ld.lld: error: undefined symbol: golang.org/x/sys/unix.RawSyscallNoError

  • ld.lld: error: undefined symbol: golang.org/x/sys/cpu.cpuid

  • lld: error: undefined symbol: github.com/klauspost/compress

  • net.{UnixConn,UnixListener,ListenUnix,DialUnix,UnixAddr,UDPConn,ListenUDP,ResolveUDPAddr}

command list

core

41 tinygo build errors found.

  • bind
  • df
  • dhclient
  • dmesg
  • elvish
  • fusermount
  • gosh
  • gpgv
  • gzip
  • hostname
  • hwclock
  • init
  • insmod
  • ip
  • kexec
  • lockmsrs
  • losetup
  • mkfifo
  • mknod
  • mount
  • msr
  • netcat
  • ntpdate
  • ping
  • poweroff
  • rmmod
  • shutdown
  • sluinit
  • sshd
  • strace
  • stty
  • switch_root
  • tee
  • truncate
  • umount
  • uname
  • watchdog
  • watchdogd
  • wget
  • which
  • nohup

64 cmds build successful

  • backoff
  • base64
  • basename
  • blkid
  • cat
  • chmod
  • chroot
  • cmp
  • comm
  • cp
  • cpio
  • date
  • dd
  • dirname
  • echo
  • false
  • find
  • free
  • gpt
  • grep
  • hexdump
  • id
  • io
  • kill
  • lddfiles
  • ln
  • ls
  • lsdrivers
  • lsmod
  • man
  • md5sum
  • mkdir
  • mktemp
  • more
  • mv
  • pci
  • printenv
  • ps
  • pwd
  • readlink
  • rm
  • rsdp
  • scp
  • seq
  • shasum
  • sleep
  • sort
  • strings
  • sync
  • tail
  • tar
  • time
  • timeout
  • touch
  • tr
  • true
  • ts
  • uniq
  • unmount
  • unshare
  • uptime
  • wc
  • xargs
  • yes

exp

30 tinygo build errors found.

  • bootvars
  • bzimage
  • console
  • disk_unlock
  • efivarfs
  • esxiboot
  • getty
  • hdparm
  • ipmidump
  • kconf
  • modprobe
  • netbootxyz
  • newsshd
  • nvme_unlock
  • page
  • partprobe
  • pflask
  • pox
  • pxeserver
  • run
  • smbios_transfer
  • ssh
  • syscallfilter
  • uefiboot
  • vboot
  • vmboot
  • dumpmemmap
  • fbnetboot
  • localboot
  • systemboot

27 cmds build successful

  • acpicat
  • acpigrep
  • ansi
  • cbmem
  • crc
  • dmidecode
  • dumpebda
  • ectool
  • ed
  • fbsplash
  • fdtdump
  • field
  • fixrsdp
  • forth
  • freq
  • lsfabric
  • madeye
  • readelf
  • readpe
  • rush
  • smn
  • srvfiles
  • tac
  • tcz
  • watch
  • zbi
  • zimage
@leongross leongross added the Feature Request Feature Request label Apr 30, 2024
@jensdrenhaus jensdrenhaus changed the title tinygo support tinygo support progress overview May 1, 2024
@10000TB
Copy link
Member

10000TB commented May 16, 2024

would be good to put this evaluation into a markdown file into u-root !

leongross added a commit to leongross/u-root that referenced this issue May 21, 2024
Signed-off-by: leongross <leon.gross@9elements.com>
@leongross
Copy link
Contributor Author

@10000TB #2987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants