Skip to content
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

The toolchain only support 4.9 version? how to make the new commit of kernel #14

Open
Vidos opened this issue Apr 26, 2019 · 6 comments

Comments

@Vidos
Copy link

Vidos commented Apr 26, 2019

The commit message said:The release is for toolchain v3.8.x/3.10.x with linux-4.9.56 headers. (Ubuntu-16.04-64bit).
Then how to build the new version?

@Vidos
Copy link
Author

Vidos commented Apr 26, 2019

And I follow the guide of https://c-sky.gitlab.io/-/buildroot/-/jobs/197227857/artifacts/output/images/readme.txt.
I clone kernel code and reset v4.9 --hard.
Then make it with:
cfan@inn:~/cross-gcc/linus$ BR_BINARIES_DIR=.. make ARCH=csky CROSS_COMPILE=../csky/host/bin/csky-linux- vmlinux -j32

And get fail:
LD vmlinux.o ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_muldi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_muldi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_lshrdi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_lshrdi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashldi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashldi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashrdi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashrdi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ucmpdi2.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ucmpdi2.o) Makefile:969: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1

@Vidos
Copy link
Author

Vidos commented Apr 26, 2019

If my understanding is wrong, please let me know

@guoren83
Copy link
Member

The commit message said:The release is for toolchain v3.8.x/3.10.x with linux-4.9.56 headers. (Ubuntu-16.04-64bit).
Then how to build the new version?

This is for some people have exteranl toolchain with linux-4.9.56, don't care about this.

The toolchain is built from buildroot

See https://gitlab.com/c-sky/buildroot/pipelines/56964790, there are 4.9 4.14 4.19 5.x linux version.

@guoren83
Copy link
Member

And I follow the guide of https://c-sky.gitlab.io/-/buildroot/-/jobs/197227857/artifacts/output/images/readme.txt.
I clone kernel code and reset v4.9 --hard.
Then make it with:
cfan@inn:~/cross-gcc/linus$ BR_BINARIES_DIR=.. make ARCH=csky CROSS_COMPILE=../csky/host/bin/csky-linux- vmlinux -j32

And get fail:
LD vmlinux.o ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_muldi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_muldi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_lshrdi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_lshrdi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashldi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashldi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashrdi3.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ashrdi3.o) ../csky/host/bin/csky-linux-ld: /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ucmpdi2.o): machine flag conflict with target ../csky/host/bin/csky-linux-ld: failed to merge target specific data of file /home/cfan/cross-gcc/csky/host/bin/../lib/gcc/csky-buildroot-linux-gnuabiv2/6.3.0/libgcc.a(_ucmpdi2.o) Makefile:969: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1

Please follow "Quick Start for qemu run" & "Build linux kernel" :

wget https://gitlab.com/c-sky/buildroot/-/jobs/197227857/artifacts/raw/output/images/csky_toolchain_csky_810f_qemu_4.9_glibc_br_defconfig_56683a5a67ecf1dd0e67b05b9541de74530d0047.tar.xz;
mkdir host;
tar -Jxf csky_toolchain_csky_810f_qemu_4.9_glibc_br_defconfig_56683a5a67ecf1dd0e67b05b9541de74530d0047.tar.xz -C host;
echo "Download kernel source, csky patch and rootfs";
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.56.tar.xz;
wget https://gitlab.com/c-sky/buildroot/-/jobs/197227857/artifacts/raw/output/images/linux-4.9.56.patch.xz;
wget https://gitlab.com/c-sky/buildroot/-/jobs/197227857/artifacts/raw/output/images/rootfs.cpio.xz;

echo "Now extra kernel source, patch it and compile";
tar -Jxf linux-4.9.56.tar.xz;
xz -d rootfs.cpio.xz;
xz -d linux-4.9.56.patch.xz;
cd linux-4.9.56;
patch -p1 < ../linux-4.9.56.patch;
BR_BINARIES_DIR=.. make ARCH=csky CROSS_COMPILE=../host/bin/csky-linux- vmlinux;

@guoren83
Copy link
Member

guoren83 commented May 16, 2019

It has been tested on gitlab cloud runner with ubuntu 64-bits 16.04 docker image

@Vidos
Copy link
Author

Vidos commented May 21, 2019

The commit message said:The release is for toolchain v3.8.x/3.10.x with linux-4.9.56 headers. (Ubuntu-16.04-64bit).
Then how to build the new version?

This is for some people have exteranl toolchain with linux-4.9.56, don't care about this.

The toolchain is built from buildroot

See https://gitlab.com/c-sky/buildroot/pipelines/56964790, there are 4.9 4.14 4.19 5.x linux version.

Thanks so much for your reply. I will try as you suggested. But I am puzzled, c-sky has been merged into mainline, but the new version can't build.
Anyway, thanks so much for your help, I will read the doc again

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

No branches or pull requests

2 participants