Giter Site home page Giter Site logo

Comments (13)

maquefel avatar maquefel commented on June 14, 2024 1

Is that the proof?

Definitely.

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

Hello @sanderjo !

Indeed there was a problem if original riscv-gnu-toolchain wasn't pulled and built, now it should work correctly.

Yours,
Nikita Shubin

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

Fresh git clone (to be sure):

rm -rf licheerv-boot-build/
git clone https://github.com/maquefel/licheerv-boot-build.git
cd licheerv-boot-build/
git submodule update --init --recursive
make

gives the errors below

Do I have to use plain make, or the TARGET_CROSS_PREFIX=riscv64-unknown-linux-gnu make

rm -rf $backupdir; exit $rc
/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain/riscv-binutils/missing: 81: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[5]: *** [Makefile:543: bfd.info] Error 127
make[5]: Leaving directory '/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain/build-binutils-linux/bfd/doc'
make[4]: *** [Makefile:1643: info-recursive] Error 1
make[4]: Leaving directory '/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain/build-binutils-linux/bfd'
make[3]: *** [Makefile:2817: all-bfd] Error 2
make[3]: Leaving directory '/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain/build-binutils-linux'
make[2]: *** [Makefile:903: all] Error 2
make[2]: Leaving directory '/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain/build-binutils-linux'
make[1]: *** [Makefile:259: stamps/build-binutils-linux] Error 2
make[1]: Leaving directory '/home/sander/git/licheerv-boot-build/riscv-gnu-toolchain'
make: *** [Makefile:64: /home/sander/git/licheerv-boot-build/toolchain/riscv64-unknown-linux-gnu/bin/riscv64-unknown-linux-gnu-gcc] Error 2

After installing makeinfo, I got further

  ./scripts/check-config.sh u-boot.cfg ./scripts/config_whitelist.txt .
  cc -Wp,-MD,scripts/dtc/.data.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -std=gnu11    -Iscripts/dtc/libfdt  -c -o scripts/dtc/data.o scripts/dtc/data.c
  cc -Wp,-MD,scripts/dtc/.livetree.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -std=gnu11    -Iscripts/dtc/libfdt  -c -o scripts/dtc/livetree.o scripts/dtc/livetree.c
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
make[3]: *** [scripts/dtc/pylibfdt/Makefile:30: rebuild] Error 1
make[2]: *** [scripts/Makefile.build:394: scripts/dtc/pylibfdt] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1981: scripts_dtc] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/sander/git/licheerv-boot-build/u-boot'
make: *** [Makefile:96: u-boot/u-boot-nodtb.bin] Error 2

OK ... swig problem? Now to install swig, and run make again ... BRB

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

No - don't install anything that's not the cause.

Do you have riscv64-unknown-linux-gnu installed in your system, which is not part of this build ?

Like:

$ which riscv64-unknown-linux-gnu-gcc
/usr/bin/riscv64-unknown-linux-gnu-gc

?

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

If you are installing on a fresh system and want to build bundled toolchain please refer to:

https://github.com/riscv-collab/riscv-gnu-toolchain/tree/f640044a947afb39c78b96fa1ba1db8aa31b1d89#prerequisites

Toolchain guide.

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

After sudo apt-get install texinfo the make seems to go OK:

./sbin/arp
./sbin/fdisk
./sbin/devmem
./sbin/modprobe
./sbin/mkswap
./sbin/blockdev
./sbin/fstrim
./sbin/tunctl
./root
3383 blocks
u-boot/tools/mkimage -A riscv -O linux -T ramdisk -C gzip -d initramfs.cpio initramfs.img.gz
Image Name:
Created:      Thu Jan 20 11:26:10 2022
Image Type:   RISC-V Linux RAMDisk Image (gzip compressed)
Data Size:    1732096 Bytes = 1691.50 KiB = 1.65 MiB
Load Address: 00000000
Entry Point:  00000000
sander@brixit:~/git/licheerv-boot-build$
sander@brixit:~/git/licheerv-boot-build$

... let's check needed files are there:

sander@brixit:~/git/licheerv-boot-build$ ll sun20i_d1_spl/nboot/boot0_sdcard_sun20iw1p1.bin
ls: cannot access 'sun20i_d1_spl/nboot/boot0_sdcard_sun20iw1p1.bin': No such file or directory

sander@brixit:~/git/licheerv-boot-build$ ll u-boot.toc1
-rw-rw-r-- 1 sander sander 996352 jan 20 11:08 u-boot.toc1

sander@brixit:~/git/licheerv-boot-build$ ll u-boot/arch/riscv/dts/sun20i-d1-nezha-lichee.dtb
-rw-rw-r-- 1 sander sander 29366 jan 20 11:08 u-boot/arch/riscv/dts/sun20i-d1-nezha-lichee.dtb

sander@brixit:~/git/licheerv-boot-build$ ll build-linux/arch/riscv/boot/Image.gz
-rw-rw-r-- 1 sander sander 7546432 jan 20 11:24 build-linux/arch/riscv/boot/Image.gz

sander@brixit:~/git/licheerv-boot-build$ ll initramfs.img.gz
-rw-rw-r-- 1 sander sander 1732160 jan 20 11:26 initramfs.img.gz

So only sun20i_d1_spl/nboot/boot0_sdcard_sun20iw1p1.bin is missing? Let's see what's inside that dir:

sander@brixit:~/git/licheerv-boot-build$ ll sun20i_d1_spl/nboot/
total 28
drwxrwxr-x  6 sander sander 4096 jan 20 09:43 ./
drwxrwxr-x 11 sander sander 4096 jan 20 09:43 ../
drwxrwxr-x  2 sander sander 4096 jan 20 09:43 load_image_mmc/
drwxrwxr-x  2 sander sander 4096 jan 20 09:43 load_image_nand/
drwxrwxr-x  2 sander sander 4096 jan 20 09:43 load_image_spinor/
drwxrwxr-x  2 sander sander 4096 jan 20 09:43 main/
-rw-rw-r--  1 sander sander 3515 jan 20 09:43 Makefile

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

What if I go into sun20i_d1_sp directory, and I try a make from there:

sander@brixit:~/git/licheerv-boot-build$ cd sun20i_d1_spl/
sander@brixit:~/git/licheerv-boot-build/sun20i_d1_spl$ make
Makefile:49: /home/sander/git/licheerv-boot-build/sun20i_d1_spl/board//common.mk: No such file or directory
make: *** No rule to make target '/home/sander/git/licheerv-boot-build/sun20i_d1_spl/board//common.mk'.  Stop.

sander@brixit:~/git/licheerv-boot-build/sun20i_d1_spl$ cd nboot/
sander@brixit:~/git/licheerv-boot-build/sun20i_d1_spl/nboot$ make
Makefile:118: /mk/rules.mk: No such file or directory
make: *** No rule to make target '/mk/rules.mk'.  Stop.

sander@brixit:~/git/licheerv-boot-build/sun20i_d1_spl/nboot$

... is that how it should be?

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

The sun20i_d1_spl/nboot/boot0_sdcard_sun20iw1p1.bin issue is simply a bug, it's not builded by make, fixed.

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

Cool ... now all files are there:

sander@brixit:~/git/licheerv-boot-build$ cat README.md | grep -A10 Quick | grep "-" | awk '{ print "ls -al "  $NF }'   | /bin/sh

-rw-rw-r-- 1 sander sander 49152 jan 20 12:44 sun20i_d1_spl/nboot/boot0_sdcard_sun20iw1p1.bin
-rw-rw-r-- 1 sander sander 996352 jan 20 12:44 u-boot.toc1
-rw-rw-r-- 1 sander sander 29366 jan 20 11:08 u-boot/arch/riscv/dts/sun20i-d1-nezha-lichee.dtb
-rw-rw-r-- 1 sander sander 7546432 jan 20 11:24 build-linux/arch/riscv/boot/Image.gz
-rw-rw-r-- 1 sander sander 1732160 jan 20 12:44 initramfs.img.gz

Hooray!

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

Thank you for testing!

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

Thank you for testing!

Thank you for your help, Nikita.

So, I had to install these tools to get the make running:

bison
flex
gawk
makeinfo
swig

Maybe put that into the README?

from licheerv-boot-build.

maquefel avatar maquefel commented on June 14, 2024

Yes - thank you, i've added a link to https://github.com/riscv-collab/riscv-gnu-toolchain/tree/f640044a947afb39c78b96fa1ba1db8aa31b1d89#prerequisites,
the have depencies for Ubuntu/Fedora/Arch.

from licheerv-boot-build.

sanderjo avatar sanderjo commented on June 14, 2024

How can I now check that binaries are built for riscv64 (and not x86_64)?

sander@brixit:~/git/licheerv-boot-build$ file build-image/rootfs/bin/busybox
build-image/rootfs/bin/busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, for GNU/Linux 4.15.0, stripped

Is that the proof?

from licheerv-boot-build.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.