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

Creating buildroot toolchain #95

Open
noamc opened this issue Jun 15, 2017 · 0 comments
Open

Creating buildroot toolchain #95

noamc opened this issue Jun 15, 2017 · 0 comments

Comments

@noamc
Copy link

noamc commented Jun 15, 2017

I am trying to create riscv64 toolchain using buildroot.
I used sifive-next branch as a base to my work.
I used binutils-2.28, gcc-7, glibc-riscv-next, Linux-riscv-next (for Linux headers).

I managed to create working toolchain for riscv64 with this commit
However I found 3 issues I worked around and needed to get fixed.

  1. GCC fails to build GLIBC without warning (I add to --disable-werror to configure)
    I think that GCC fails to see that size of -1L is same as a pointer.
    log is:
    ../sysdeps/unix/sysv/linux/mmap64.c: In function ‘__mmap64’:
    ../sysdeps/unix/sysv/linux/mmap64.c:45:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);

  2. Faild to build stage 1 compiler (aka inital gcc) due to misssing file
    log is:
    make[3]: *** No rule to make target '../../gcc/testsuite/selftests', needed by 's-selftest'. Stop.
    make[3]: *** Waiting for unfinished jobs....

  3. missing kernel file needed by linux headers, add an empty one arch/riscv/include/uapi/asm/setup.h
    log is:
    scripts/Makefile.headersinst:72: *** Some mandatory headers (setup.h) are missing in arch/riscv/include/uapi/asm. Stop.
    scripts/Makefile.headersinst:26: recipe for target 'asm' failed

Note:
Still with this kernel spike is not booting, need to go back to master (4.6.y)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant