-
Notifications
You must be signed in to change notification settings - Fork 920
ci: Add microblaze, nios2 compilers, use JSON for job summaries #3068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Perhaps |
| source ./ci/build.sh | ||
| compile_devicetree | ||
| - name: Get compile auxiliar files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: auxiliar
Perhaps rename to Download FPGA soft-core root filesystems and create empty devicetrees
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will go with Prepare kernel auxiliary files
it makes more sense to look into the build.sh for what it is doing, the yaml is a "shim layer" as much as possible
| printf "/dts-v1/;\n\n/ { };\n" > arch/$ARCH/boot/dts/generic.dts | ||
| elif [[ "$ARCH" == "nios2" ]]; then | ||
| wget https://swdownloads.analog.com/cse/nios2/rootfs/rootfs.cpio.gz -O arch/nios2/boot/rootfs.cpio.gz | ||
| printf "/dts-v1/;\n\n/ { };\n" > arch/$ARCH/boot/dts/devicetree.dts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these empty devicetrees for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because you need to provide it to build a microblaze simpleImage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I don't want to upload n_devicestrees * n_defconfig anymore, where n_devicetress is 75 and n_defconfig is 1 (adi_mb_defconfig).
the devicetree is always from (and to) the same byte address and we can assert the magic hex string 0xd00dfeed.
The dtb does not depend on architecture.
The idea is a single dtb archive with all devicetres (3.2MB) and the defconfig archives (10 to 40MB)
then consumers (kuiper) expand, as in the provided script in the pr body.
A time cs_batch_by_version e8367b3a3994 takes 12 seconds, and we reduce the upload time for microblaze by 75 :)
About the other comments: I will rewrite the history to separate the changes better
| gcc_nios2) | ||
| export CROSS_COMPILE=nios2-linux- | ||
| export ARCH=nios2 | ||
| ;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally this and the above change on line 1094 should be in the previous commit
| warn: # DEPRECATED | ||
| value: ${{ jobs.checks.outputs.warn }} | ||
| summary: | ||
| value: ${{ jobs.build.outputs.summary }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the ADSP branches need to get updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not breaking change since the old pipe has been kept, but ideally yes so we can clean-up sooner than later.
pamolloy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😵
nunojsa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments from me which might overlap a bit with what @pamolloy already pointed...
| echo "CROSS_COMPILE=nios2-linux-" >> $GITHUB_ENV | ||
| elif [[ "${{ inputs.arch }}" == "arm64" ]]; then | ||
| echo "CROSS_COMPILE=aarch64-suse-linux-" >> $GITHUB_ENV | ||
| echo "CROSS_COMPILE=aarch64-linux-" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit unrelated? Same for arm
Also given that I cannot comment on the commit message I'll say it here. You have a typo in "requiser"
| printf "/dts-v1/;\n\n/ { };\n" > arch/$ARCH/boot/dts/generic.dts | ||
| elif [[ "$ARCH" == "nios2" ]]; then | ||
| wget https://swdownloads.analog.com/cse/nios2/rootfs/rootfs.cpio.gz -O arch/nios2/boot/rootfs.cpio.gz | ||
| printf "/dts-v1/;\n\n/ { };\n" > arch/$ARCH/boot/dts/devicetree.dts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because you need to provide it to build a microblaze simpleImage.
| local fail=0 | ||
| local warn=0 | ||
| local msg= | ||
| local make_flags=$(_get_make_kernel_flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This could be a precursor patch to add the helper
| case $1 in | ||
| gcc_arm) | ||
| export CROSS_COMPILE=arm-suse-linux-gnueabi- | ||
| export CROSS_COMPILE=arm-linux- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also does not feel it belongs in this patch
| (cd /opt/gcc/$arch/bin && for f in *-13.3.0; do ln -s "/opt/gcc/$arch/bin/$f" "${f/13.3.0/13}"; done) | ||
| ln -s /opt/gcc/$arch/bin/$arch_alt-* /usr/local/bin/ | ||
| rm gcc.tar.xz | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand what you're doing but the proper way, IMO would be to move arm and aarch64 to bootlin in a different patch and then adding microblaze and nios would really be just about adding those archs
The bootlin contain glibc allowing to also be used for package builds, allowing to re-use the container down the pipeline. Also normalize with other architectures not available in the package manager. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
They have no use but need to exist before modules_install, therefore, clean-up before archiving. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Using the architecture and defconfig, infer the kernel flags and kernel image name (uImage, zImage). Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Use bootlin's microblazeel and nios2 to compile microblaze and nios2. Compile microblaze's simpleImage by fetching rootfs.tar.gz and using an empty devicetree. Applying a devicetree occurs at a later stage, by `dd if=$dtb of=$image seek=$((16#84e5c8)) conv=notrunc`. Nios2 devicetree patch is similar but require uncompressing first. Add _get_make_kernel_flags to infer the Image type and kernel flags. The Image type is exported to KERNEL env variable, then used for copying to the dist. Delete /usr from dist, since it is not necessary. Drop EXTRA_FLAGS from compile_kernel_*. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Use compgen to provide bash auto-completion for set_arch, useful for interactive sessions. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Adds export_job_summary assert_job_summary macros to replace export_labels and assert_labels. Uses a single json-formatted variable to store job/steps results. The old methods are kept, but considered deprecated. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Allow users to check per-file for a commit range, but create a temporary branch squashing all commits, to not check the whole file content. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
At the CI/CD, the cited commit may no be on history, so ignore the warning. It was already suppressed, just use the checkpatch proper flag. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Due to microblaze and nios2 compiler. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
PR Description
use bootlin compilers for cross-compile.
The microblaze and nios2 generate an image with and "empty" devicetree, to be patched, for example, with:
PR Type
PR Checklist