Zephyr: Windows: Remove all dependencies on MSYS2

Created on 2 Nov 2017  路  11Comments  路  Source: zephyrproject-rtos/zephyr

Definition Of Done: Windows users must be able to use all officially supported build system features without having a dependency on any form of unix emulation layer; MinGW/MSYS2/Cygwin/WSL.

Informally; Windows users should not need to install unix tools, the Zephyr host-side infrastructure should purely have portable dependencies such as python.

Blockers

  • [x] Kconfig

    • [x] merge_config.sh (?) (There is a minor bug in merge_config.py) #5374, replaced by kconfig.py

    • [x] #5419: conf

    • [x] mconf

  • [x] VM-VM networking

    • [x] named fifos

  • [x] flashing and debugging bash scripts
  • [x] dtc (see #4728)
  • [x] #5418: gperf
Feature Build System high

Most helpful comment

Flashing and debugging bash scripts are done

All 11 comments

Flashing and debugging bash scripts are done

gperf might be a really tough one, it is used to generate perfect hash tables of kernel object pointers which are needed by memory protection features, if you don't want to use it we would have to re-implement it in Python.
@lpereira you were looking at this at one point?

@andrewboie I was. I might return to it sometime if there's a real need.

I'm working on dtc right now.

A dtc implemented in Python is here: https://github.com/zephyrproject-rtos/zephyr/pull/4728

Some error checking should be introduced, but overall, this should work fine. Review appreciated.

I'll look into gperf next week. The prototype I have isn't working well in some cases; I might implement the same algorithm that gperf uses instead.

gperf might be a really tough one, it is used to generate perfect hash tables of kernel object pointers which are needed by memory protection features, if you don't want to use it we would have to re-implement it in Python.

The perfect hash table algorithm itself is not that complicated. What is the concern here that makes it a "really tough one"?

Example, not vetted extensively: https://github.com/eddieantonio/perfection

There are many perfect hashes out there; we just need to find one that lets us build a hash function that do not require the use of a modulus operator (as integer division is quite costly). Making the table size a power of two will help, but it's not always easy to do depending on the perfect hashing algorithm. gperf isn't a perfect minimal hash table because of this.

But, yeah, I'm sure that if we shop around we'll find a suitable library.

merge_config.sh (?) (There is a minor bug in merge_config.py)

what is the bug? Can we open a new issue with more details, seems like a low hanging fruit :)

Will do.

Closing this since Kconfig is now Python, gperf is a native Windows executable and we have an MSYS2-wrapped version of dtc that works reliably.

Was this page helpful?
0 / 5 - 0 ratings