Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

ARM-CI: Convert Linux ARM emulator CI check to cross build #5680

Merged
merged 1 commit into from
Jun 11, 2016
Merged

ARM-CI: Convert Linux ARM emulator CI check to cross build #5680

merged 1 commit into from
Jun 11, 2016

Conversation

prajwal-aithal
Copy link

  • Previously used emulated build took a lot of time leading to timeout errors
  • Changing this CI check to build using cross build

Signed-off-by: Prajwal A N an.prajwal@samsung.com

@prajwal-aithal
Copy link
Author

Previous PR #4141 used chroot jail to build coreclr for Linux ARM emulator rootfs. This took a lot of time and lead to timeout errors in the CI system.

This PR aims to the change the build process of the Linux ARM emulator CI to cross build. The summary of changes are:

  • Emulator path and the rootfs mount path have been reorganized into variables (for easy code management)
  • The include paths needed for the cross build is different from the default path. This path is set in the LINUX_ARM_INCPATH environment variable using the setenv_incpath.sh script present in the emulator
  • The library search paths needed for the cross build vary as well. This needs a change in the coreclr/cross/arm-softfp/toolchain.cmake file. This is done by applying the coreclr_cross.patch (again present in the emulator).
  • Finally using the value of the LINUX_ARM_INCPATH variable as the CPLUS_INCLUDE_PATH, and the emulator rootfs mount path as the ROOTFS_DIR value, cross build is done.
  • At the end the coreclr code is reset to the master code (removing the changes made by the cross build patch)

@prajwal-aithal
Copy link
Author

@jashook @leemgs

Please review this PR. I am yet to make the needed changes to the rootfs in the CI system. I will notify you as soon as I am done with that. We can then merge this PR.

@prajwal-aithal
Copy link
Author

Verified on local system. The time taken for the whole process (mounting rootfs, setting env variables and the cross build itself) is

real 12m53.790s
user 37m25.024s
sys  2m0.012s

sudo chroot /opt/linux-arm-emulator-root/ /bin/bash -x <<EOF
source /dotnet/setenv/setenv_coreclr.sh
cd home/coreclr
./build.sh arm clean verbose skipmscorlib
Copy link

Choose a reason for hiding this comment

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

Do we still have to use "skipmscorlib" flag?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, we need it. This flag has been included in cross builds in the CI system.

Copy link
Member

Choose a reason for hiding this comment

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

@prajwal-aithal have you confirmed that this PR does what you expect it to? This line is causing "dotnet-bot test CI please' to fail every time, as you don't escape the '$' before armrootfs_mountpath, so the groovy compiler thinks you're trying to use a local variable named armrootfs_mountpath, when no such variable exists in netci.groovy. I suspect this won't work as you want it to anyways, since I believe each command is executed in a new shell in the CI, so any variable you initialize in a shell in one command (i.e. armrootfs_mountpath) won't be available when the next command executes. I could be wrong about this, however - if everything is working how you expect after this PR went in, then we need to find some other solution to the 'dotnet-bot test CI please' problem - we can't afford to have that job fail every time, otherwise there's no way to know if a change to netci.groovy is going to break our CI.

Copy link

Choose a reason for hiding this comment

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

You are correct, this change breaks the generator. It has been reverted with #5766. @prajwal-aithal please re-issue this PR with fixes.

@leemgs
Copy link

leemgs commented Jun 11, 2016

Please review this PR. I am yet to make the needed changes to the rootfs in the CI system.

@prajwal-aithal , I have reviewed the PR. Please, check it.

he time taken for the whole process (mounting rootfs, setting env variables and the
cross build itself) is
real 12m53.790s

It's reasonable time. Acked-by: Geunsik Lim geunsik.lim@samsung.com

FYI, \CC: @myungjoo , @parjong , @lemmaa

echo \"Applying cross build patch to suit Linux ARM emulator rootfs\"
git am < $armrootfs_mountpath/dotnet/setenv/coreclr_cross.patch

ROOTFS_DIR=$armrootfs_mountpath CPLUS_INCLUDE_PATH=$LINUX_ARM_INCPATH ./build.sh arm-softfp clean cross verbose skipmscorlib
Copy link

Choose a reason for hiding this comment

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

Please, don't forget that we have to append release build as well as debug (by default).

* Previously used emulated build took a lot of time leading to timeout errors
* Changing this CI check to build using cross build

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
@prajwal-aithal
Copy link
Author

@jashook I have verified that the latest version of this PR works on the CI machines. I think we can merge this PR and check it using the dotnet bot.

CC: @leemgs

@jashook
Copy link

jashook commented Jun 11, 2016

lgtm

@jashook jashook merged commit 0c7ac3b into dotnet:master Jun 11, 2016
jashook pushed a commit to jashook/coreclr that referenced this pull request Jun 13, 2016
Note this is based upon Prajwal's original PR dotnet#5680
jashook pushed a commit to jashook/coreclr that referenced this pull request Jun 13, 2016
Note this is based upon Prajwal's original PR dotnet#5680
@prajwal-aithal prajwal-aithal deleted the devel/arm-ci-cross-build branch June 15, 2016 06:14
jashook pushed a commit that referenced this pull request Jun 15, 2016
…-fix

ARM-CI: Convert Linux ARM emulator CI check to cross build (fixes PR #5680)
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…ci-cross-build

ARM-CI: Convert Linux ARM emulator CI check to cross build

Commit migrated from dotnet/coreclr@0c7ac3b
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…otnet/coreclr#5680)

* Previously used emulated build took a lot of time leading to timeout errors
* Changing this CI check to build using cross build
* Resolves CI issues caused by previous identical PR dotnet/coreclr#5680

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>


Commit migrated from dotnet/coreclr@c74d309
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…ci-cross-build-fix

ARM-CI: Convert Linux ARM emulator CI check to cross build (fixes PR dotnet/coreclr#5680)

Commit migrated from dotnet/coreclr@ab4cc73
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants