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

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, ...).

Related

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

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.

RISC-V Linux running on Qemu

I am trying to run RISC-V linux on Qemu, following the instruction: Running 64- and 32-bit RISC-V Linux on QEMU
I have downloaded and installed the RISC-V GNU compiller Toolchain
./configure --prefix=/opt/riscv
make linux
and when I execute the command:
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- defconfig
I got the following error:
:~/Documents/riscv64-linux/linux$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
scripts/Kconfig.include:39: compiler 'riscv64-unknown-linux-gnu-gcc' not found
make[1]: *** [scripts/kconfig/Makefile:73: defconfig] Error 1
make: *** [Makefile:602: defconfig] Error 2
Kindly, advice how can I fix this problem.
This is standart problem, try to type whereis riscv64-unknown-linux-gnu-gcc if it get nothing, try to type riscv64- and press tab, you should see necessary prefix you need paste after CROSS_COMPILE=. Also maybe you also need add PATH variable with path to riscv-toolchain's bin in ~/.bashrc or/and in ~/.profile.
Build own linux is a big task, maybe you should learn some manuals about toolchain and building linux.
riscv toolchain link

Arch Linux: make - no such file or directory

I have a problem by compiling a driver (WLAN-dongle Edimax ac600).
I´m using an Archlinux on my raspberry-pi and want to install my dongle for 5Ghz. During comiling the driver I get this message. I tried to install the linux-headers without success. (in other threads it will be a solution)
Here is my output of make:
[root#raspberry_pi_1 rtl8812AU]# make make ARCH=arm CROSS_COMPILE= -C
/lib/modules/4.9.43-1-ARCH/build M=/root/rtl8812AU modules make[1]:
*** /lib/modules/4.9.43-1-ARCH/build: No such file or directory. Stop. make: *** [Makefile:1576: modules] Error 2
I found out that my pi has a two-arch...-directories:
4.9.43-1-ARCH/
4.9.51-1-ARCH/
Only the second one has the build directory...
How can I fix the problem?!
thanks a lot,
a Linux noob...
[Reputation is too low to post comment]
Use uname -r to make sure which version of the kernel you use.
If it's 4.9.43 : you have newer version of the kernel and this confuse your installer. You should reboot on the 51 one
If it's 4.9.51 : You messed up your installation step and are trying to compile for an old target. You should review the compilation process and change every mention of the 4.9.43 to 4.9.51 since it's the version you use.
If you upgrade your kernel, you may have to rebuild the thing again (You may like to have script in the future ;) ) with the new kernel version.

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.

Resources