rockchip-linux / u-boot

U-Boot tree for pending commits
126 stars 86 forks source link

building for RV1126 fails with some missing dependencies #70

Open thepian opened 3 years ago

thepian commented 3 years ago

I tried building for RV1126 on an Ubuntu 20 ARM platform and got the following result

root@5b1591152540:/workspace/u-boot# make clean
  CLEAN   dts/../arch/arm/dts
  CLEAN   dts
  CLEAN   examples/standalone
  CLEAN   tools
  CLEAN   tools/lib tools/common
  CLEAN   spl/arch spl/board spl/cmd spl/common spl/drivers spl/dts spl/env spl/fs spl/lib spl/u-boot-spl spl/u-boot-spl-dtb.bin spl/u-boot-spl-nodtb.bin spl/u-boot-spl.bin spl/u-boot-spl.dtb spl/u-boot-spl.lds spl/u-boot-spl.map spl/u-boot-spl.sym spl/u-boot.cfg tpl/arch tpl/board tpl/cmd tpl/common tpl/drivers tpl/dts tpl/env tpl/fs tpl/lib tpl/u-boot-spl.lds tpl/u-boot-tpl tpl/u-boot-tpl-dtb.bin tpl/u-boot-tpl-nodtb.bin tpl/u-boot-tpl.bin tpl/u-boot-tpl.dtb tpl/u-boot-tpl.map tpl/u-boot-tpl.sym tpl/u-boot.cfg
  CLEAN   u-boot-dtb.bin u-boot.lds u-boot.cfg.configs u-boot.map u-boot.srec u-boot.cfg u-boot.bin u-boot-nodtb.bin u-boot u-boot.dtb u-boot.img u-boot.sym u-boot-dtb.img System.map u-boot-dtb.bin u-boot.bin u-boot-nodtb.bin u-boot.img idbloader.img u-boot-dtb.img
root@5b1591152540:/workspace/u-boot# make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- rv1126_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:771:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:771:19: note: assuming directive output of 7 bytes
scripts/kconfig/confdata.c:771:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:774:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                    ^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:774:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
root@5b1591152540:/workspace/u-boot# make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
aarch64-linux-gnu-gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
aarch64-linux-gnu-gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
make[1]: *** [scripts/Makefile.autoconf:79: u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

I have installed the following dependencies

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    bc \
    binfmt-support \
    cmake \
    bison \
    build-essential \
    curl \
    debootstrap \
    dosfstools \
    gcc-arm* \
    gzip \
    kpartx \
    flex gperf tar libc6-dev libreadline-dev tofrodos python-markdown libxml2-utils xsltproc  libssl-dev \
    lzop libncurses5-dev \
    libyaml-dev pkg-config \
    libusb-dev \
    bc \
    gdisk \
    git gnupg \
    qemu \
    qemu-user-static \
    parted \
    ncurses-base ncurses-bin libncurses5-dev dialog \
    squashfs-tools \
    swig python3 python3-dev python python3-distutils python3-pip \
    u-boot-tools \
    unzip \
    xxd \
    wget \
    zip