How to put files into riscv linux? - linux

ri
1.We tried to install the rocket chip with risc-v linux on Zedboard, and we had successfully entered riscv linux. However, we couldn't put the files compiled by assembler(using the instruction : riscv64-unknown-linux-gnu-g++) into riscv linux. Would someone please tell me how to put it in? (p.s we tried to mount the files into the file called root.bin,but it seems that risc-v linux doesn't use this file to boot.)
2. If we use the linux instrustion [make CONFIG=RoccExampleConfig] on our workshop, would it be RoCC there? If not, how to enable RoCC?

The file boot.bin is read by the firmware executed by the Zynq ARM CPU on boot. It contains the boot loader and instructions to boot Linux on that CPU. It may also contain a bitstream for the programmable logic.
According to https://github.com/ucb-bar/fpga-zynq/issues/22 you need to put your files into the RISC-V initramfs file until tether is working.

Related

Linux run fail with Image in stead of zImage in Buildroot-Qemu-Arm environment

I am learning building Linux system with buildroot. The configure for qemu+arm is very convenient for me to have a environment to boot Linux system. I can get whole system from the script bellow. And it works fine, Linux system run.
git clone https://git.buildroot.net/buildroot
cd buildroot
git checkout 014ec19dfe
make qemu_arm_versatile_defconfig
make
cd output/images/
./start-qemu.sh
I find there is an zImage for linux kernel. As I know zImage is composed by decompress boot code and compressed linux binary. And I think Image at ../build/linux-5.15.18/arch/arm/boot/Image is the original linux binary. So I try to use Image to replace zImage(I copy the Image to the same folder. Then I change the zImage in start-qemu.sh to Image). But I failed, I run it and only see
VNC server running on ::1:5900
And there are no other log. I try other system like riscv, there is only Image, but it can be run. Is there something I misunderstand for arm linux Image? (By the way, I am curious about why only arm32 has compress code to build zImage, but aarch64 or riscv do not support this function.)

Booting a Graphical MIPS QEMU Machine

I would like to boot a QEMU MIPS architecture machine running some distribution of Linux. I have been looking through this documentation (https://www.linux-mips.org/wiki/QEMU), but I am getting stuck at this part
[ralf#box qemu]$ qemu-system-mips -kernel /tftboot/192.168.0.1/vmlinux.bin -m 16 -nographic
(qemu) mips_r4k_init: start
mips_r4k_init: load BIOS '/usr/local/share/qemu/mips_bios.bin' size 131072
qemu: could not load MIPS bios '/usr/local/share/qemu/mips_bios.bin'
[ralf#box qemu]$
There currently is no MIPS BIOS file for QEMU (see firmware). However if passed a
-kernel argument qemu will not call the firmware at all, so this does no harm at all. Therefore, a command such as
dd if=/dev/zero of=/usr/local/share/qemu/mips_bios.bin bs=1024 count=128
will generate a firmware file that will do the job for now.
I am confused what arguement I am supposed to pass for kernel? Is that /usr/local/share/qemu/mips_bios.bin argument a compiled Linux image?
If possible, I would like the emulator to have a GUI. I am not sure how this is accomplished either.
Thanks.
You no longer need to create a mips_bios.bin file. If you have a file by that name in the same folder when you run qemu-system-mips it will pick it up. I'd remove it if you do. Here's the wiki link for a little history about it:
https://www.linux-mips.org/wiki/QEMU
For a nice example of a mips specific kernel working with graphics and qemu please check this link out:
http://shadow-file.blogspot.com/2013/05/running-debian-mips-linux-in-qemu.html

embedded linux, initramfs with buildroot

in my embedded system I'd like to use initramfs to perform some special operation.
Someone managed to make initramfs work?
I'm using buildroot 2016.2, the kernel is from my provider and we are at 3.0.x. I've enabled initramfs, so I just have to pass the path to my cpio.
At the moment getty is not working.
can't opegetty: can't opegetty: can't opegetty:
and hang forever.
Any idea?could be a toolchain problem?
I have used the tag initrd because there is not "initramfs"

Where is kernel configuration stored on Linux target?

I'm working on an embedded ARM Debian Linux system. The system ships with a default image on the SD card. What I'd like to do is try and determine which kernel settings where used in building the kernel that's running on that card.
Is there any way to do that?
Assuming no copy can be found under /boot then:
If CONFIG_IKCONFIG_PROC is set then a compressed copy of the configuration will be found at /proc/config.gz
If CONFIG_IKCONFIG is set but not CONFIG_IKCONFIG_PROC the extract-ikconfig script can be used to extract the .config file from a kernel image file (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/extract-ikconfig?id=HEAD)

Build a minimum system with Qt embedded and run on Qemu for x86

My aim: Trying to
Build a minimal Qt based GUI system with a single window and sensor connected on USB
demonstrate this using Qemu and later on embedded board with atom
to build it from scratch
Use buildroot to build the rootfilesystem
My experience Have experience in Linux kernel development for device drivers, qemu, Buildroot, USB but has no experience on GUI and framebuffers.
My attempts:Build kernel and rootfile system
with buildroot using the command make qemu_x86_defconfig
Framebuffer support on Linux kernel is enabled along with the following CONFIG_FB, CONFIG_FRAMEBUFFER_CONSOLE, and CONFIG_LOGO (all the options below this are also enabled)
As the first milestone I expected to see the TUX logo when I run the image with the command
qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2 -append root=/dev/sda -vga std but i donot.
Am I making a mistake at the Qemu command or the framebuffer is not enabled?
P.S. A similar question Qt application GUI -- automatic start -- linux. But i am not planning to use the X window as suggested by most users.
I missed the cirrus graphics board driver. Qemu emulates Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA extensions (hardware level, including all non standard modes for i386.
So the steps are:
Download buildroot
make clean
make qemu_x86_defconfig
make linux-menuconfig to configure kernel and in Device drivers->Graphics support->Support for frame buffer devices enable Cirrus Logic support
Save the configuration and run make
Once make is complete run the command in board/qemu/x86/readme.txt
Where did you see that Buildroot has a i386_defconfig? You seem to be confusing kernel defconfigs and Buildroot defconfigs. I would recommend you to start with:
make clean
make qemu_x86_defconfig
make
and then read board/qemu/x86/readme.txt to see how to run the generated system.

Resources