Stefan,
I did installed with ARCH=openrisc make INSTALL_HDR_PATH=${SYSROOT}/usr
headers_install
and have $SYSROOT set to /opt/or1k-toolchain/or1k-linux-uclibc/sys-root as
suggested by the instruction.
And I did installed the headers from git://
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
I double checked everything again, and rebuild after make distclean, sill
getting the same error. Is it possible that the upstream linux version is
not compatible with the upstream uclibc version ? Or is there anything else
I can check to know if I did anything wrong ?
Thanks
Patrick
2015-01-20 10:42 GMT-05:00 Stefan Kristiansson <
[email protected]>:
> On Tue, Jan 20, 2015 at 4:59 PM, Ziqiang Patrick Huang <
> [email protected]> wrote:
>
>> Stefan,
>>
>> I'm not sure where went wrong, I just tried again, start from beginning,
>> following the exact instruction from the website, still ends up in the same
>> place.
>>
>> Here is the libc/sysdeps/linux/common/posix_fadvise.c where it failed,
>>
>> #ifdef __NR_arm_fadvise64_64
>> /* We handle the 64bit alignment issue which is why the arm guys renamed
>> their
>>
>>
>> * syscall in the first place. So rename it back.
>>
>>
>>
>> */
>> # define __NR_fadvise64_64 __NR_arm_fadvise64_64
>> #endif
>>
>> #if defined(__NR_fadvise64) || defined(__NR_fadvise64_64)
>> # include <fcntl.h>
>> # include <endian.h>
>> # include <bits/wordsize.h>
>>
>> # ifdef __NR_fadvise64_64
>> int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
>> # endif
>>
>> int posix_fadvise(int fd, off_t offset, off_t len, int advice)
>> {
>> # ifdef __NR_fadvise64_64
>> return posix_fadvise64(fd, offset, len, advice);
>> # else
>> int ret;
>> INTERNAL_SYSCALL_DECL(err);
>> # if __WORDSIZE == 64
>> ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len,
>> advice);
>> # else
>> # if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
>> ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
>> # else
>> ret = INTERNAL_SYSCALL(fadvise64, err, 5, fd,
>> # endif
>> OFF_HI_LO (offset), len, advice);
>> # endif
>> if (INTERNAL_SYSCALL_ERROR_P (ret, err))
>> return INTERNAL_SYSCALL_ERRNO (ret, err);
>> return 0;
>> # endif
>> }
>> # if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 ||
>> __WORDSIZE == 64)
>> strong_alias(posix_fadvise,posix_fadvise64)
>> # endif
>> #endif
>>
>>
>>
> I don't know where it goes wrong for you, but you definitely end up with
> the wrong kernel headers.
> The code path with the 'strong_alias(posix_fadvise,posix_fadvise64)'
> shouldn't be reached with the upstrean openrisc ones,
> since we do define __NR_fadvise64_64 (and __WORDSIZE should not be 64).
>
> Some sanity checks, you are installing the headers with:
> ARCH=openrisc make INSTALL_HDR_PATH=${SYSROOT}/usr headers_install
> right?
> And you do have $SYSROOT set to something?
>
> After you've made sure of that, try doing a 'make distclean' and then try
> to build again.
>
> Stefan
>
--
*Ziqiang Huang*
*Electrical and Computer Engineering*
*Hudson 213c, Duke University*
*Tel: 919-491-3677*
*Email: [email protected] <[email protected]>*
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc