Skip to content

Enable booting MIPS and PowerPC kernels#73

Merged
nathanchance merged 17 commits into
ClangBuiltLinux:mainfrom
nathanchance:image-targets
Feb 5, 2021
Merged

Enable booting MIPS and PowerPC kernels#73
nathanchance merged 17 commits into
ClangBuiltLinux:mainfrom
nathanchance:image-targets

Conversation

@nathanchance

Copy link
Copy Markdown
Member

I will rebase this on #71 after it is merged but I wanted to get ahead of this for review.

TuxSuite has merged support for kernel_image so we can add that to generator.yml for architectures that need it.

Closes: #1
Closes: #27

@nathanchance

Copy link
Copy Markdown
Member Author

I do have RISC-V working already (#72), which I can combine into this pull if it is desirable. Alternatively, we merge this and enable RISC-V in a separate pull.

@nickdesaulniers nickdesaulniers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the riscv changes distinct for now.

Comment thread generator.yml
- {<< : *ppc32, << : *mainline, << : *llvm, boot: true, llvm_version: *llvm_tot}
- {<< : *ppc64, << : *mainline, << : *ppc64_llvm, boot: true, llvm_version: *llvm_tot}
- {<< : *ppc64le, << : *mainline, << : *llvm, boot: true, llvm_version: *llvm_tot}
- {<< : *riscv, << : *mainline, << : *riscv_llvm_full, boot: true, llvm_version: *llvm_tot}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this depend on the riscv qemu changes?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(looks like yes)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. See my other comment for why it might be advantageous to just enable booting RISC-V with this pull.

Comment thread generator.yml Outdated
- &ppc64le {config: powernv_defconfig, kernel_image: zImage.epapr, << : *powerpc64le-triple, << : *kernel_modules}
# https://github.com/ClangBuiltLinux/linux/issues/1143
- &riscv {config: [defconfig, CONFIG_EFI=n], << : *riscv-triple, << : *kernel_modules}
- &riscv {config: [defconfig, CONFIG_EFI=n], kernel_image: Image, << : *riscv-triple, << : *kernel_modules}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does specifying a kernel_image to tuxsuite prevent the kernel modules from being built? (We don't want that; we want to build the kernel modules). cc @danrue @terceiro

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The modules are a separate target and we always build those.

Comment thread generator.yml Outdated
- {<< : *ppc64le, << : *next, << : *llvm, boot: true, llvm_version: *llvm_latest}
- {<< : *riscv, << : *next, << : *riscv_llvm_full, boot: true, llvm_version: *llvm_latest}
# riscv: Boot disabled (https://github.com/ClangBuiltLinux/continuous-integration2/issues/72)
- {<< : *riscv, << : *next, << : *riscv_llvm_full, boot: false, llvm_version: *llvm_latest}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe fold this commit into the one that enabled it? (Should be straightforward via interactive rebase)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I did a separate commit was so that it was easy to revert when we wanted to re-enable RISC-V. Now that qemu-binaries and boot-utils have had their pulls merged, I could just update check_logs.py to have --use-cbl-qemu like I suggested in #72 and avoid disabling the builds altogether.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, so one more commit on top then?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, basically :P

Please see https://github.com/nathanchance/continuous-integration2/commits/image-targets-with-riscv for what it would look like. If you think that is okay, I will push it under this branch so that the pull updates.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread install_deps.py Outdated
"x86_64": ["qemu-system-x86"],
"s390": [],
"riscv": ["qemu-system-riscv64"],
"riscv": ["opensbi", "qemu-system-riscv64"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should wait until we enable riscv, separately.

@nickdesaulniers

Copy link
Copy Markdown
Member

I found it much easier to review multiple smaller commits in github's UI; thank for you for breaking up commits into smaller concerns.

@nathanchance

Copy link
Copy Markdown
Member Author

I found it much easier to review multiple smaller commits in github's UI; thank for you for breaking up commits into smaller concerns.

Good! I will continue to do this in the future.

malta_kvm_guest_defconfig is a little endian configuration. If we want
it to be big endian, we need to pass CONFIG_CPU_BIG_ENDIAN, which we can
then use to set the right CBL architecture.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
…name

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
We are not using Ubuntu's QEMU right now so there is not much point to
installing it.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
i386 is still broken with clang-12 and newer.

Certain powerpc builds are still broken with tuxmake and older versions
of clang.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Certain powerpc builds are still broken with tuxmake and older versions
of clang.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
i386 is still broken with clang-12 and newer.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance nathanchance deleted the image-targets branch February 5, 2021 02:33
@nathanchance nathanchance restored the image-targets branch February 5, 2021 02:35
@nathanchance nathanchance reopened this Feb 5, 2021
@nathanchance

Copy link
Copy Markdown
Member Author

Sigh that is not what I meant to do...

@nickdesaulniers nickdesaulniers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this gets us back to parity with all arches now, right? 🧇 🍟

@nathanchance

Copy link
Copy Markdown
Member Author

Yes, all of the architectures should boot if they can build :)

@nathanchance

Copy link
Copy Markdown
Member Author

Thanks for the review!

@nathanchance nathanchance merged commit f17b058 into ClangBuiltLinux:main Feb 5, 2021
@nathanchance nathanchance deleted the image-targets branch February 5, 2021 03:12
@nathanchance nathanchance linked an issue Feb 5, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RISC-V needs a newer version of QEMU Enable MIPS and PowerPC booting Enable MIPS builds

2 participants