Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building kernel on BBB Arch linux machine #1

Closed
bernid opened this issue Aug 24, 2019 · 1 comment
Closed

building kernel on BBB Arch linux machine #1

bernid opened this issue Aug 24, 2019 · 1 comment

Comments

@bernid
Copy link

bernid commented Aug 24, 2019

HI,
I'm trying to build patched botic kernel using newest Arch linux on my BBB.
Unfortunately I receive an error:

[alarm@alarm linux-am33xbot]$ CARCH=armv7h makepkg -AC
==> Making package: linux-am33xbot 5.1.15-1 (Sat Aug 17 20:53:29 2019)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found linux-5.1.tar.xz
  -> Found patch-5.1.15.xz
  -> Found patch-5.1.15-bone11.diff.gz
  -> Updating bb.org-overlays git repo...
Fetching origin
  -> Found 0001-add-lcd-cape-for-chiliboard.patch
  -> Found config
  -> Found linux.preset
  -> Found 99-linux.hook
  -> Found mcasp-dsd.patch
  -> Found mcasp-inactive-serializers.patch
  -> Found botic-card.patch
  -> Found botic-codec.patch
  -> Found sabre32-codec.patch
  -> Found es9018k2m-codec.patch
==> Validating source files with md5sums...
    linux-5.1.tar.xz ... Passed
    patch-5.1.15.xz ... Passed
    patch-5.1.15-bone11.diff.gz ... Passed
    bb.org-overlays ... Skipped
    0001-add-lcd-cape-for-chiliboard.patch ... Passed
    config ... Passed
    linux.preset ... Passed
    99-linux.hook ... Passed
    mcasp-dsd.patch ... Passed
    mcasp-inactive-serializers.patch ... Passed
    botic-card.patch ... Passed
    botic-codec.patch ... Passed
    sabre32-codec.patch ... Passed
    es9018k2m-codec.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting linux-5.1.tar.xz with bsdtar
  -> Extracting patch-5.1.15.xz with xz
  -> Extracting patch-5.1.15-bone11.diff.gz with gzip
  -> Creating working copy of bb.org-overlays git repo...
Cloning into 'bb.org-overlays'...
done.
==> Starting prepare()...
patching file sound/soc/ti/davinci-mcasp.c
Hunk #1 succeeded at 812 (offset 2 lines).
Hunk #2 succeeded at 924 (offset 2 lines).
Hunk #3 succeeded at 970 (offset 2 lines).
Hunk #4 succeeded at 995 (offset 2 lines).
Hunk #5 succeeded at 1158 (offset 2 lines).
Hunk #6 succeeded at 1204 (offset 2 lines).
Hunk #7 succeeded at 1212 (offset 2 lines).
Hunk #8 succeeded at 1243 (offset 2 lines).
Hunk #9 succeeded at 1295 (offset 2 lines).
Hunk #10 succeeded at 1528 (offset 2 lines).
Hunk #11 succeeded at 1539 (offset 2 lines).
patching file sound/soc/ti/davinci-mcasp.c
Hunk #1 succeeded at 847 (offset 2 lines).
patching file sound/soc/codecs/botic-codec.c
patching file sound/soc/codecs/Kconfig
patching file sound/soc/codecs/Makefile
patching file sound/soc/generic/botic-card.c
patching file sound/soc/generic/Kconfig
patching file sound/soc/generic/Makefile
patching file sound/soc/codecs/es9018k2m.c
patching file sound/soc/codecs/es9018k2m.h
patching file sound/soc/codecs/Kconfig
Hunk #1 succeeded at 85 (offset 3 lines).
Hunk #2 succeeded at 667 (offset 41 lines).
patching file sound/soc/codecs/Makefile
Hunk #1 succeeded at 81 (offset 3 lines).
Hunk #2 succeeded at 356 (offset 9 lines).
patching file sound/soc/codecs/Kconfig
patching file sound/soc/codecs/Makefile
patching file sound/soc/codecs/sabre32.c
==> Removing existing $pkgdir/ directory...
==> Starting build()...
make: arm-linux-gnueabihf-gcc: Command not found
/bin/sh: arm-linux-gnueabihf-gcc: command not found
  HOSTCC  scripts/basic/fixdep
/bin/sh: arm-linux-gnueabihf-gcc: command not found
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.h
  HOSTCC  scripts/kconfig/lexer.lex.o
  YACC    scripts/kconfig/parser.tab.c
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
./scripts/gcc-version.sh: line 17: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 18: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 19: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 17: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 18: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 19: arm-linux-gnueabihf-gcc: command not found
./scripts/clang-version.sh: line 11: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-plugin.sh: line 11: arm-linux-gnueabihf-gcc: command not found
init/Kconfig:16:warning: 'GCC_VERSION': number is invalid
/bin/sh: arm-linux-gnueabihf-gcc: command not found
make: arm-linux-gnueabihf-gcc: Command not found
  SYSHDR  arch/arm/include/generated/uapi/asm/unistd-common.h
  SYSHDR  arch/arm/include/generated/uapi/asm/unistd-oabi.h
  SYSHDR  arch/arm/include/generated/uapi/asm/unistd-eabi.h
  UPD     include/config/kernel.release
  WRAP    arch/arm/include/generated/uapi/asm/kvm_para.h
  WRAP    arch/arm/include/generated/uapi/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/arm/include/generated/uapi/asm/errno.h
  WRAP    arch/arm/include/generated/uapi/asm/ioctl.h
  WRAP    arch/arm/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/msgbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/param.h
  WRAP    arch/arm/include/generated/uapi/asm/poll.h
  WRAP    arch/arm/include/generated/uapi/asm/resource.h
  WRAP    arch/arm/include/generated/uapi/asm/sembuf.h
  WRAP    arch/arm/include/generated/uapi/asm/shmbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/siginfo.h
  WRAP    arch/arm/include/generated/uapi/asm/socket.h
  WRAP    arch/arm/include/generated/uapi/asm/sockios.h
  WRAP    arch/arm/include/generated/uapi/asm/termbits.h
  WRAP    arch/arm/include/generated/uapi/asm/termios.h
  WRAP    arch/arm/include/generated/asm/compat.h
  WRAP    arch/arm/include/generated/asm/current.h
  WRAP    arch/arm/include/generated/asm/early_ioremap.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/exec.h
  WRAP    arch/arm/include/generated/asm/extable.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm/include/generated/asm/msi.h
  WRAP    arch/arm/include/generated/asm/parport.h
  WRAP    arch/arm/include/generated/asm/preempt.h
  WRAP    arch/arm/include/generated/asm/rwsem.h
  WRAP    arch/arm/include/generated/asm/seccomp.h
  WRAP    arch/arm/include/generated/asm/segment.h
  WRAP    arch/arm/include/generated/asm/serial.h
  WRAP    arch/arm/include/generated/asm/simd.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  WRAP    arch/arm/include/generated/asm/trace_clock.h
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.h
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  YACC    scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/extract-cert
  SYSNR   arch/arm/include/generated/asm/unistd-nr.h
  GEN     arch/arm/include/generated/asm/mach-types.h
  SYSTBL  arch/arm/include/generated/calls-oabi.S
  SYSTBL  arch/arm/include/generated/calls-eabi.S
  CC      scripts/mod/empty.o
/bin/sh: arm-linux-gnueabihf-gcc: command not found
make[1]: *** [scripts/Makefile.build:276: scripts/mod/empty.o] Error 127
make: *** [Makefile:1095: prepare0] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
[alarm@alarm linux-am33xbot]$ 

Do I really need arm-linux-gnueabihf-gcc on armv7h machine (eg BBB)?
Or maybe I need udjust build command?
Regrds,

@coroner21
Copy link
Owner

Hi @bernid,

If you really want to build on the BBB directly you need to indeed adjust the build commands and edit the PKGBUILD file. Look for the "make" commands there and adjust them accordingly (removing the ARCH and CROSS_COMPILE flags). You can check on the original Arch Linux ARM PKGBUILD for the linux-am335x package.

I would however recommend to rather cross-compile on an x86_64 machine with Arch linux installed as described in the README. Building on BBB takes way to long (and might even fail due to the limited amount of memory available).

Regards!

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

No branches or pull requests

2 participants