Embedded Linux Buildroot A20 - linux

I am currently trying to build an embedded Linux System with Buildroot.
It works so far, I get a bootable SD Card for my A20 based board.
I included all CAN Drivers & protocols I could find (can can_raw and vcan)
My problem is :
after booting and loggin in as root
I type:
ip link add dev vcan0 type vcan ---- THAT WORKS
but
ip link add dev can0 type can
produces:
RTNETLIINK answers: Operation not supported
What is wrong ??
Thanks in advance for any ideas.

Related

Vfio 0000:41:00.0: failed to open /dev/vfio/32: No such file or directory - QEMU

I have a NVME M.2 SSD that I would like to pass-through to my Virtual Machine as a boot, My SSD works fine with the Virtual Machine Manager, but when I attempt to the Qemu:Console, I get the following message Saying it is not a existing file?!
checked if it the pass-through worked!
This is the Qemu Console command I am using
-device vfio-pci,host=41:00.0
Reading on I found it was a QEMU Console Permission error. I can't find a way to set the vfio permission for manjaro, I heard something of setting a udev perms up, PCI Passthrough is working for other devices, Like my GT710 is working fine.
I then noticed that it was attached to the host and I could not find anyway to remove it, as seen here.
Please Help me!
You need bind your PCI device to the vfio-pci driver.
Unbind pci device from its previous driver
echo "0000:00:14.0" > /sys/devices/pci0000:00/0000:00:14.0/driver/unbind
Bind to vfio-pci driver
echo 8086 a36d > /sys/bus/pci/drivers/vfio-pci/new_id
Where 8086 is the vendor id of the PCI device, and a36d is device id of the PCI device
Check and vfio group should be present, and Qemu can run.
ls -l /dev/vfio/

BBB - WLAN USB Adapter configuration problems

yesterday i baught a new WLAN Nano USB Adapter (LogiLink/WL0084E/Should be supported by Linux). Now i have tried to get it running with my BBB which is running on Debian Wheezy.
First i pluged the WLAN USB Adapter in and i got following Result using lsusb:
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp.
I have googled for the ID 0bda:8179 and found following Website: https://wiki.debian.org/rtl819x wich told me to install firmware-realtek by using sudo apt-get install firmware-realtek. After that i should restart by System shutdown -h now and power on again (I know a reboot will do the same).
But the WLAN Adapter was not recoginzed as wlan0 - if i type in ip a i got following result:
1: lo: ...
2: eth0: ...
3: usb0: ...
The Website mentioned above told me that i need the module r8188eu - But on lsmod i got following output:
Module Size Used by
g_multi 50407 2
libcomposite 15028 1 g_multi
omap_rng 4062 0
mt7601Usta 458758 0
So i tought mt7601Usta can may be the right one and i typed in modinfo mt7601Usta
filename: /lib/modules/3.8.13-bone79/kernel/drivers/net/wireless/mt7601Usta.ko
version: 3.0.0.3
description: RT2870 Wireless Lan Linux Driver
But may this driver doesnt Support the WL0084E (Supported by Linux!).
What should i do?
Why do i not have the wlan0 interface?
How can i fix this Problem?
If you need more information, told me commands to execute ;)
Thank you!
Download the latest 8188 driver from realteks website, extract and run install.sh
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true
If that doesn't work either just give up with trying to get Wheezy to support it and just hope it works automatically in a newer distro/kernel

Enabling virtio_blk_device for qemu

I am using qemu 2.2.0 to emulate x86 Linux guest on x86 Linux host.
I want to use the existing dataplane mechanism in QEMU (implemented using virtqueue & IOThreads )for achieving parallel R/W operations in my device.
It requires enabling virtio-blk-device & verifying concurrency in existing framework before implementing the same for my device.
I use the following commnand to enable virtio block device & boot qemu:
./qemu-system-x86_64_exe -m 2048 -usbdevice mouse -usbdevice keyboard -usbdevice tablet -enable-kvm -drive if=none,id=drive1,file=debian_wheezy_i386_desktop.raw -object iothread,id=iothread2 -device virtio-blk-device,id=drv0,drive=drive1,iothread=iothread2 -smp 8
This command executes with error:
No 'virtio-bus' found for device 'virtio-blk-device' .
However, querying this device using " ./qemu-system-x86_64_exe -device help" displays following info for virtio-blk-device:
name virtio-blk-device, bus virtio-bus.
Is there something amiss in my Command line options ?
I hit the same problem and couldn't find informations for virtio-blk-device.
I swichted to virtio-blk-pci instead.
virtio-blk-device is a VirtIO device that relies solely on memory-mapped IO (MMIO) and not on the PCI-bus. This does not work with Qemu's default machine type pc-i440fx-X.Y, or at least not out of the box.
You can use the machine type microvm (https://qemu.readthedocs.io/en/latest/system/i386/microvm.html), a minimalistic machine type without PCI and ACPI. To do so you would add -machine microvm to your Qemu commandline. Then virtio-blk-device and also virtio-net-device should work out of the box. You won't be able to use any devices that rely on PCI however.
As already suggested switching to the PCI-variants is probably the best option in most usecases. As for the error message that no PCI bus is found, maybe your Qemu build defaults to some very weird machine type. Try setting it specifically to -machine pc.

Linux vanilla kernel on QEMU and networking with eth0

I have downloaded and compiled vanilla linux kernel (3.7.1)
I used busybox for ramdisk then I booted it using QEMU.
This is my QEMU command line
qemu-system-i386 -kernel bzImage -initrd ramdisk.img -append "root=/dev/ram rw console=ttyS0 rdinit=/bin/ash" -nographic -net nic -net user
everything goes well.
However, I can't use networking on vanilla kernel with busybox.
'ifup eth0' tells me
/ # ifup eth0
ip: SIOCGIFFLAGS: No such device
I googled the Internet but can' get any clue...
some advice would be nice
thank you in advance.
Most probably there is no driver (in your example is should be e1000) loaded or the device has another name.
In /sys/class/net/ you should find a listing of all available net-devices.
If there is none (besides lo) the driver is not loaded.
In qemu monitor type "info pci" and it will show you the PCI-address of your ethernet card. It should look like this:
...
Bus 0, device 3, function 0:
Ethernet controller: PCI device 8086:100e
...
This device corresponds to /sys/devices/pci0000:00/0000:00:03.0/.
The files "vendor" and "device" must contain "0x8086" and "0x100e" which is the PCI-id from above and by which the kernel determines the driver to load.
Try to load it manually with "modprobe e1000" or insmod. If loaded there must be a symlink named "driver". If not "dmesg" should give you the reason why not.

Linux - Kickstart stops with dialog about which networking device - how to avoid

Using a kickstart file that stops with a dialog "You have multiple
network devices on this system. Which one do you want to install through?"
The machine being configured with PXEboot has two Ethernet interfaces. What's
missing from the network entries below? I'd like this install to proceed
without asking which Ethernet interface.
PXE begins the install with DHCP, so Kickstart should already know which of
eth0, eth1, etc. to use.
Here is the Ethernet line in the ks.cfg file:
network --onboot yes --device eth0 --bootproto dhcp --noipv6
Any ideas appreciated.
NOTE: I have already tried the below option and it didn't work:
In pxelinux config file:
add ksdevice=bootif
also add "IPAPPEND 2" to the end of the file
In kickstart file, don't specify a device:
"network --bootproto dhcp"
How to force an kickstart installation to take place over a specific Ethernet device?
Maybe your network devices' names had been renamed, for example, em1, em2 ... in Dell servers.
In that case you can add biosdevname=0 to the kernel boot arguments, that will prevent biosdevname from being invoked.

Resources