diff options
| -rw-r--r-- | meta/classes/sanity.bbclass | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 9b97b462e4..9e87101738 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
| @@ -511,14 +511,20 @@ def check_make_version(sanity_data): | |||
| 511 | return None | 511 | return None |
| 512 | 512 | ||
| 513 | 513 | ||
| 514 | # Check if we're running on WSL (Windows Subsystem for Linux). Its known not to | 514 | # Check if we're running on WSL (Windows Subsystem for Linux). |
| 515 | # work but we should tell the user that upfront. | 515 | # WSLv1 is known not to work but WSLv2 should work properly as |
| 516 | # long as the VHDX file is optimized often, let the user know | ||
| 517 | # upfront. | ||
| 518 | # More information on installing WSLv2 at: | ||
| 519 | # https://docs.microsoft.com/en-us/windows/wsl/wsl2-install | ||
| 516 | def check_wsl(d): | 520 | def check_wsl(d): |
| 517 | with open("/proc/version", "r") as f: | 521 | with open("/proc/version", "r") as f: |
| 518 | verdata = f.readlines() | 522 | verdata = f.readlines() |
| 519 | for l in verdata: | 523 | for l in verdata: |
| 520 | if "Microsoft" in l: | 524 | if "Microsoft" in l: |
| 521 | return "OpenEmbedded doesn't work under WSL at this time, sorry" | 525 | return "OpenEmbedded doesn't work under WSLv1, please upgrade to WSLv2 if you want to run builds on Windows" |
| 526 | elif "microsoft" in l: | ||
| 527 | bb.warn("You are running bitbake under WSLv2, this works properly but you should optimize your VHDX file eventually to avoid running out of storage space") | ||
| 522 | return None | 528 | return None |
| 523 | 529 | ||
| 524 | # Require at least gcc version 5.0. | 530 | # Require at least gcc version 5.0. |
