arm-openbmc-linux-gnueabi-gcc: Command not found - linux

I got a BMC project which need to use AST2600. I just start to handle u-boot.
When I enter blow instruction. I got a error when make.
export ARCH=arm
export CROSS_COMPILE=arm-openbmc-linux-gnueabi-
make ast2600_openbmc_defconfig
make
Result:
make: arm-openbmc-linux-gnueabi-gcc: Command not found
/bin/sh: 1: arm-openbmc-linux-gnueabi-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf --syncconfig Kconfig
CHK include/config.h
CFG u-boot.cfg
/bin/sh: 1: arm-openbmc-linux-gnueabi-gcc: not found
make[1]: *** [scripts/Makefile.autoconf:77: u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
The project from https://github.com/AspeedTech-BMC/u-boot
It seems like I miss a toolchain for arm-openbmc-linux-gnueabi-gcc. Does anyone have idea?

From an openbmc perspectives, I almost never build the uboots independently of from the bitbake/yocto project, (and when I do, I build projects in x86) Manually building should work, but openbmc (using bitbake/yocto) already has an automated process for building this project with the gcc tool chain that works for the AST2600 here and here
If you are planning on using openbmc I would recomened starting with these instructions.
In step 3 make sure to specify an platform with ast2600 (such as the
evb-ast2600)
Then in step 4 make you can just built uboot rather then a whole image. Something like bitbake u-boot-aspeed-sdk_2019.04, or you can build the whole image, and it take longer but you will have a copy of uboot.
If you have any more question feel free to reach out us in the open bmc email list https://lists.ozlabs.org/listinfo/openbmc, or to our discord https://discord.gg/69Km47zH98.

Related

How do I find the actual GCC error in compiler output?

I'm trying to compile some old software from source on debian-based linux.
The build failed:
make[2]: Leaving directory '/home/owner/kallistios/utils/dc-chain/build-gcc-sh-elf-4.7.3'
Makefile:871: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/owner/kallistios/utils/dc-chain/build-gcc-sh-elf-4.7.3'
Makefile:201: recipe for target 'build-sh4-gcc-pass2' failed
make: *** [build-sh4-gcc-pass2] Error 1
owner#ubuntu:~/kallistios/utils/dc-chain$
But it doesn't say what the actual error is or how I can find it in the output.
If I don't know what the problem is obviously I can't fix it.
This is the full output:
http://pasted.co/cff68fa2
The first thing to do if you're having problems deciphering error output is to NOT run the build in parallel (don't use the -j flag). Also you should NOT use the keep-going (-k) flag. If you don't use -j or -k then make will run one recipe at a time and fail as soon as a recipe fails. So, whenever you get an error the last command that was printed is the one that failed.
Also if you want to use -j and you're using a new-enough version of GNU make (4.0 or above) you can add the -Otarget option which will collect all the output from a given target and print it atomically at the end of the recipe, rather than interweaving output from different recipes together.
In your situation it appears as though one of the configure operations failed. It's not easy to tell exactly why because of the parallel build output. This may or may not be related:
kos is an unknown thread package
...
Makefile:3810: recipe for target 'configure-gcc' failed
make[2]: *** [configure-gcc] Error 1
You are trying to compile the Sega Dreamcast toolchain which I know very well, using the dc-chain utility inside KallistiOS (often shortened to KOS).
The key error message here is kos is an unknown thread package. It means that you don't have applied the KOS patches before compiling your sh-elf cross-compiler.
To solve this issue, you just have to enter the make patch command before running everything else. Please note, if you just enter the make command, it will already apply the patches.
To finish this answer, you may check the KallistiOS Nitro repository, as this repo is handling the official KOS plus a lot of community patches, including some very interesting things about the dc-chain utility, like complete documentation.

Linux kernel 'make rpm-pkg' throws error

I am trying to create a custom kernel rpm. So I made use of "make rpm-pkg".
Everything was going fine until it hit this error.
..
..
INSTALL sound/usb/line6/snd-usb-toneport.ko
INSTALL sound/usb/line6/snd-usb-variax.ko
INSTALL sound/usb/misc/snd-ua101.ko
INSTALL sound/usb/snd-usb-audio.ko
INSTALL sound/usb/snd-usbmidi-lib.ko
scripts/Makefile.fwinst:43: *** mixed implicit and static pattern rules. Stop.
make[2]: *** [_modinst_post] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.jJi4sq (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.p88MqU (%install)
make[1]: *** [rpm-pkg] Error 1
make: *** [rpm-pkg] Error 2
I understand there is something wrong with Makefile declarations, but also wondering if anyone has hit this issue.
If you are using make version 3.81 or 3.82 then this is likely the known make "bug" discussed here.
Specifically a change to what make believes is a meaningful set of targets to specify in a single list changed in an incompatible way and the kernel had been using a set of targets that became invalid.
The fix, after some back and forth between the GNU Make maintainer and some concerned other developers, was to convert the fatal error into a warning (at least temporarily).
I was able to fix this. Apparently its an issue with the UTS_MACHINE not being right for arm64. It should be aarch64 so that the packaging scripts use it right. there's also small tweak in the script that generates the rpm spec file.
So 'make' is not an issue in this case.

LFS 7.2: Hundreds of errors in glibc make check

I am on Section 6.9 of the LFS book. Everything before this section seemed fine.
When I ran make check I got a huge number of errors. A longer transcript of my make check run can be found here on Pastebin.
Summary of test results:
865 FAIL
1308 PASS
202 XFAIL
Makefile:321: recipe for target 'tests' failed
make[1]: *** [tests] Error 1
make[1]: Leaving directory '/sources/glibc-2.21'
Makefile:9: recipe for target 'check' failed
make: *** [check] Error 2
I'm wondering, if looking at the transcript anyone can infer something obvious that I did incorrectly. I think I followed the book word for word, but I may have missed something along the way.
It's likely that GLIBC make check expects some basic command to be present, but that command is missing from your LFS system.
I just checked my GLIBC build, and all the conform tests use /usr/bin/perl.
Look for errors in conform/XPG4/locale.h/linknamespace.out. The problem will likely be obvious.
/bin/sh: line 2: no: command not found
So it's likely that configure looked for perl, didn't find it, and set PERL in config.make to no.
To fix this, you need to install perl before you can run make check.

`missing-syscalls' error during kernel compilation

These are the steps I am doing to compile the linux source on my machine :
1. Copy the config file from /boot to /usr/src/kernels/2.6.29.4-167.fc11.i586/ directory
2. make oldconfig
3. make
Step 3 fails with the following error :
make[1]: *** No rule to make target `missing-syscalls'. Stop.
Compiling on a x86 box.
Any suggestions ?
Please feel free to close this question if it does not belong here.
As archaic as it may sound it appears that currently in order to get kernel source on a system you have to manually select the source you want. One supposes that people don't build kernels as often as they used to and of course you may want to develop a kernel that does not match the version that you are running..
So for example I wanted to install VBox on my CentOS 6.2 box and while most kernel modules can be compiled without complete sources this update failed.
So I found this wiki page:
http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
It doesn't list 6.2 and the naming conventions have changed on the final directory name so to get the 6.2 kernel source you go to http://vault.centos.org/6.2/updates/Source/ and select the version you want. If you want source for a different version go to http://vault.centos.org/ and navigate from there.
The docs recommend against doing an rpm-build on the kernel sources.
Make a new config file. Maybe the old one isn't working?
I have not been able to answer why this error happens :
Step 3 fails with the following error : make[1]: *** No rule to make target `missing-syscalls'. Stop.
But I was able to compile the vanilla version fine, without the above error.
I asked the same question on serverfault as well, which has a more detailed explanation of the steps taken : https://serverfault.com/questions/61354/missing-syscalls-error-during-kernel-compilation
since kernel 3.x.x this message appears if trying to build external modules having only single Makefile prepared.
Instead, according to this manual,
splitting into Kbuild (where all the source files are listed, example):
obj-m := module_source.c
and simple Makefile (having only default make directive, example):
default:
$(MAKE) -C $(KDIR) M=$$PWD
will solve the problem.
just in case, external module build directive would be following:
make -C <kernel source path> -M=<module source folder>
example: make -C . -M=extra/

UML Linux - vmlinux.o Error 1 - final close failed: Input/output error

I'm trying to install UML linux. Kernel is 2.6.28.
I link to Linux files so that I have a read-only copy that I can revert back to.
I then run the commands:
make defconfig ARCH=um # works
make ARCH=um # errors out at the very end:
final close failed: Input/output error
make: *** [vmlinux.o] Error 1
Because of this error, my binary vmlinux never gets created so I can't run my own UML Linux. Any ideas?
Does this fix the problem?
Otherwise, more information is needed. Host's architecture, distribution, and versions of tools (GCC, binutils, Make, shell, ...).

Resources