grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build RISC-V 32-bit UEFI target fails with kernel.org riscv64 toolch


From: Bin Meng
Subject: Re: Build RISC-V 32-bit UEFI target fails with kernel.org riscv64 toolchain
Date: Mon, 30 Mar 2020 09:53:09 +0800

On Sat, Mar 28, 2020 at 11:54 PM Mike Gilbert <address@hidden> wrote:
>
> On Fri, Mar 27, 2020 at 7:45 PM Bin Meng <address@hidden> wrote:
> >
> > On Fri, Mar 27, 2020 at 10:51 PM Daniel Kiper <address@hidden> wrote:
> > >
> > > Adding Alex...
> > >
> > > On Fri, Mar 27, 2020 at 03:01:15PM +0800, Bin Meng wrote:
> > > > Hi,
> > > >
> > > > I tried to build RISC-V 32-bit UEFI target using kernel.org riscv64 
> > > > toolchain:
> > > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/x86_64-gcc-7.3.0-nolibc_riscv64-linux.tar.xz
> > > >
> > > > $ ./configure --target=riscv32 --with-platform=efi CC=gcc
> > > > TARGET_CC=/share/toolchains/gcc-7.3.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc
> > > > TARGET_OBJCOPY=/share/toolchains/gcc-7.3.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy
> > > > TARGET_STRIP=/share/toolchains/gcc-7.3.0-nolibc/riscv64-linux/bin/riscv64-linux-strip
> > > > TARGET_NM=/share/toolchains/gcc-7.3.0-nolibc/riscv64-linux/bin/riscv64-linux-nm
> > > > TARGET_RANLIB=/share/toolchains/gcc-7.3.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib;make
> > > >
> > > > It failed with the following message:
> > > >
> > > > cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm
> > > > -f moddep.lst; exit 1)
> > > > __ashldi3 in affs is not defined
> > > > __ashldi3 in afs is not defined
> > > > __lshrdi3 in afs is not defined
> > > > __ashldi3 in bfs is not defined
> > > > __lshrdi3 in bfs is not defined
> > > > __ucmpdi2 in btrfs is not defined
> > > > __ashldi3 in crc64 is not defined
> > > > __ashldi3 in cryptodisk is not defined
> > > > __lshrdi3 in cryptodisk is not defined
> > > > __ashldi3 in ctz_test is not defined
> > > > __ctzsi2 in ctz_test is not defined
> > > > __ashldi3 in disk is not defined
> > > > __lshrdi3 in disk is not defined
> > > > grub_divmod64s in div_test is not defined
> > > > __ashldi3 in exfat is not defined
> > > > __lshrdi3 in exfat is not defined
> > > > __ashldi3 in ext2 is not defined
> > > > __lshrdi3 in ext2 is not defined
> > > > __ashldi3 in fat is not defined
> > > > __lshrdi3 in fat is not defined
> > > > __ashldi3 in fshelp is not defined
> > > > __lshrdi3 in fshelp is not defined
> > > > __ashldi3 in jfs is not defined
> > > > __lshrdi3 in jfs is not defined
> > > > __ashldi3 in minix is not defined
> > > > __ashldi3 in minix2 is not defined
> > > > __ashldi3 in minix2_be is not defined
> > > > __ashldi3 in minix3 is not defined
> > > > __ashldi3 in minix3_be is not defined
> > > > __ashldi3 in minix_be is not defined
> > > > __ashldi3 in mmap is not defined
> > > > __lshrdi3 in mmap is not defined
> > > > __ashldi3 in mul_test is not defined
> > > > __ashldi3 in net is not defined
> > > > __lshrdi3 in net is not defined
> > > > __lshrdi3 in nilfs2 is not defined
> > > > __ashldi3 in ntfs is not defined
> > > > __lshrdi3 in ntfs is not defined
> > > > __ashldi3 in ntfscomp is not defined
> > > > __lshrdi3 in ntfscomp is not defined
> > > > __ashldi3 in part_gpt is not defined
> > > > __ashldi3 in part_msdos is not defined
> > > > __ashldi3 in sfs is not defined
> > > > __ashldi3 in shift_test is not defined
> > > > __ashrdi3 in shift_test is not defined
> > > > __lshrdi3 in shift_test is not defined
> > > > __lshrdi3 in squash4 is not defined
> > > > __ashldi3 in udf is not defined
> > > > __lshrdi3 in udf is not defined
> > > > __ashldi3 in ufs1 is not defined
> > > > __lshrdi3 in ufs1 is not defined
> > > > __ashldi3 in ufs1_be is not defined
> > > > __lshrdi3 in ufs1_be is not defined
> > > > __ashldi3 in ufs2 is not defined
> > > > __lshrdi3 in ufs2 is not defined
> > > > __ashldi3 in xfs is not defined
> > > > __ashrdi3 in xfs is not defined
> > > > __lshrdi3 in xfs is not defined
> > > > __ashldi3 in xzio is not defined
> > > > __lshrdi3 in xzio is not defined
> > > > __ashldi3 in zfs is not defined
> > > > __lshrdi3 in zfs is not defined
> > > > __lshrdi3 in zfscrypt is not defined
> > > > __ashldi3 in zstd is not defined
> > > > Makefile:47234: recipe for target 'moddep.lst' failed
> > > >
> > > > If I switched to kernel.org riscv32 toolchain, the problem went away.
> > > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/x86_64-gcc-7.3.0-nolibc_riscv32-linux.tar.xz
> > > >
> > > > $ ./configure --target=riscv32 --with-platform=efi CC=gcc
> > > > TARGET_CC=/share/toolchains/gcc-7.3.0-nolibc/riscv32-linux/bin/riscv32-linux-gcc
> > > > TARGET_OBJCOPY=/share/toolchains/gcc-7.3.0-nolibc/riscv32-linux/bin/riscv32-linux-objcopy
> > > > TARGET_STRIP=/share/toolchains/gcc-7.3.0-nolibc/riscv32-linux/bin/riscv32-linux-strip
> > > > TARGET_NM=/share/toolchains/gcc-7.3.0-nolibc/riscv32-linux/bin/riscv32-linux-nm
> > > > TARGET_RANLIB=/share/toolchains/gcc-7.3.0-nolibc/riscv32-linux/bin/riscv32-linux-ranlib;make
> > >
> > > Are you sure that above mentioned riscv64 compiler supports riscv32 
> > > targets?
> > >
> >
> > I think so. It looks the missing symbols are from libgcc, but I see
> > both riscv64 and riscv32 toolchains ship 32-bit and 64-bit libgcc
> > libraries. Not sure why grub build complains. The same 64-bit
> > toolchain can be used to cross-compile 32-bit U-Boot and Linux.
>
> Perhaps you need to pass some option (like -m32) to gcc to make it use
> the correct libgcc?

There is no -m32 for RISC-V GCC. The compiler flags to build RISC-V
32-bit GRUB look correct to me.

Regards,
Bin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]