facebook/openbmc

flashy: Golang status (Note to self)

lhl2617 opened this issue · 2 comments

This is a note to self--I'll gladly pick this up again when I join

  • The syscall package is deprecated and frozen, and while it is fine now, I expect some problems may arrive in the future
  • The x/sys package sufficiently replaces syscall, and it also has ioctl helper functions that will allow the removal of the currently vendored go-ioctl dependency.
    • I am currently looking into adding a special ioctl helper function to support setting watchdog timeout: golang/go#46060
    • Also looking into adding ioctl helper functions necessary for flashcp stuff: golang/go#46063
  • Newer go versions offer speed and binary size improvements. Notably for the latter, building on 1.16 yielded 2.4MB instead of 1.14's 2.8MB.
  • Vendoring is losing support--need to figure a better way to pull deps.
  • Investigate into building for ARMv6+ (currently flashy is built for ARMv5 (AST2400)). At some point Golang may drop ARMv5 support, but until then we are safe

Created https://github.com/lhl2617/go-mtd-abi which will be useful for flashcp and other MTD-related items.