Closed mehranmd closed 3 years ago
Hi again, today i had some progress and managed to enable USB devices like keyboard and mouse. but the flash disk won't go into the /dev/sdX . I believe I need to enable uDev and euDev in advance to make the flash disk work properly but in the 'menuconfig' the udev and eudev are disabled with the error
*** eudev needs eudev /dev management ***
any idea what is wrong in the process, do I need to enable something else in order to install uDev?
ps: I will post my configurations after I'm done.
Hey! I'm busy in these days so couldn't check your work. Could you solve the issue ?
Hi, Thanks for your consideration. I managed to enable the network and DHCP with 4sec boot time. but the network won't work as expected. literally no packet goes through. Today I'm going to work on that issue and then I go after the sound card. Again I will share my config for every module I enable hopefully it will be useful to someone else.
Nice work! Happy to see your progress.
If your boot process is blocked by a network connection establishment process (DHCP etc.), you can do it after your fastboot required process is run. Userspace initialization is handled by Busybox so you can either replace Busybox with your program (just put your program to /sbin/init) and do the required initializations yourself or you can control Busybox's init processes from /etc/init.d.
True indeed. dhcp is really time consuming. right now I don't use that for setting up the network. just getting things done manually:
ifconfig eth0 up
ifconfig eth0 IPADRESS
add route default gw DEFAULTGW
I'm facing a problem with sound card functionality which I need help with.
I installed snd_bcm2835 drivers successfully and installed all of the alsa utility packages + gstreamer1 + pulse audio.
Now I use
modprobe snd_bcm2835
to probe the rpi3 b+ sound card and it will list in lsmod afterward but it will not list in /dev/snd which will lead to alsamixer not detecting the sound card at all.
Any idea or suggestions would be welcome.
reffrence i found for the matter:
Link1 conclusion: add 'dtparam=audio=on' to /boot/config.txt but it wont help in my case.
Link2 conclusion: what is lsmod and probmode command and how you can prob a driver.
I believe my sound problem is coming from kernel not receiving my 'dtparam=audio=on' in boot config. how can I ensure that this parameter is passed?
@mehranmd You can check the beginning of "dmesg" output to see kernel parameters. The line should include something like "root=".
How do you test the sound ? I suggest you to use Alsa and test the sound with an .ogg file and play it by "aplay". Please check this to see how I enabled sound for TK1. By this config, sound is usable by QtMultimedia.
Thnx for the share, ill check it out as soon as I can. Right now I made really good progress with the mix of your excellent article and the newest BuildRoot (2012.02). Ethernet is OK. USB Storage support is OK. Sound card is OK. Wlan is NOT OK. the boot time is 4.4 sec right now which for my case is acceptable.
Hi again. I need to build qt5.12.9 from scratch for use in the build root. I used the script in the repository and changed it a bit(not much, just skiped few things) to include what I want. Unfortunately QPA backend for raspberry pi (EGLFS Raspberry pi) is not detected but EGLFS is found:
EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ yes OpenGL ES 3.1 ........................ yes OpenGL ES 3.2 ........................ yes Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. yes xkbcommon .............................. yes X11 specific: XLib ................................. no XCB Xlib ............................. no EGL on X11 ........................... no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... no EGLFS GBM ............................ no EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes Mir client ............................. no
This problem will lead the program to crash at start up with the below error:
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
could not initialized egl display.
Please test the Qt like the following;
qmake
with the Qt that you compiled and make
./app --platform eglfs
DISPLAY=:0.0 ./app --platform eglfs
If it doesn't work, please provide the full output of the Qt configure and output of the problem.
I just manually copied the /opt folder from base raspbian to the buildroot sysroot which is
buildroot-2020.02.4/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot
and rebuilt the Qt.
changes in the config output:
QPA backends:
EGLFS Raspberry Pi ................... yes
It will work after i applied the Qt specified patch to the folder. Step 14 in the below link: RaspberryPi2EGLFS
It should require no Raspian files, actually. I tested it and it works without any issue. There should be another problem.
Hi again. I'm back to work on the Buildroot again, there is one last problem with my build which happens after appending dtb file to the zImage the audio stops working. i compared kernel input commands and there is no difference there and when I load snd_bcm2835 manually the os won't detect the sound card. looks like overlay of the rpi is stopped working after appending the dtb file to the zImage. related problem: Loading of kernel module with overlay
dmesg with the Buildroot kernel before appending dtb files:
3.755207] udevd[103]: starting eudev-3.2.9 [ 3.802586] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3 [ 3.819042] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.842445] hub 1-1.1:1.0: USB hub found [ 3.853656] hub 1-1.1:1.0: 3 ports detected [ 3.867214] vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 3.888497] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0 [ 3.938989] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 3.957565] bcm2835_vc_sm_cma_probe: Videocore shared memory driver [ 3.971302] usb 1-1.3: new low-speed USB device number 4 using dwc_otg
[ 3.997283] [vc_sm_connected_init]: installed successfully [ 4.050396] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 4.070678] bcm2835_audio soc:audio: card created with 8 channels
dmesg after appending:
[ 3.907642] udevd[103]: starting eudev-3.2.9 [ 3.977511] usb 1-1.3: New USB device found, idVendor=093a, idProduct=2510, bcdDevice= 1.00 [ 3.992137] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.005281] vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 4.006094] usb 1-1.3: Product: USB Optical Mouse [ 4.033152] usb 1-1.3: Manufacturer: PixArt [ 4.045333] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0 [ 4.061777] input: PixArt USB Optical Mouse as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:093A:2510.0001/input/input0 [ 4.088312] hid-generic 0003:093A:2510.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-3f980000.usb-1.3/input0 [ 4.114584] usb 1-1.1.2: new low-speed USB device number 5 using dwc_otg [ 4.134025] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 4.151817] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 4.176720] [vc_sm_connected_init]: installed successfully [ 4.215620] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.310748] usb 1-1.1.2: New USB device found, idVendor=258a, idProduct=0001, bcdDevice= 1.00 [ 4.326623] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.341704] usb 1-1.1.2: Product: USB KEYBOARD [ 4.353537] usb 1-1.1.2: Manufacturer: SINO WEALTH [ 4.372238] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
from the looks of it kernel is not detecting the sound card after appending the dtp files.
I'm really suspicious with the overlay folder in the boot partition, maybe I need to apeend that too but a folder is not the input of the command:
cat zImage myboard.dtb > my-zImage
Hey @mehranmd ,
Overlays should not require appending to be processed. There should be another problem. I recommend you this;
~~1. dmesg
to kernel without appended dtb, which plays the sound
dmesg
to kernel with appended dtb, which doesn't plays the sounddmesg
logs, check what is different, what different parameters are applied to the sound-available kernel. This should give some clue about the problem.~~Looking forward to your good news!
I just though that overlays may not be processed by start.elf when we have appended-dtb. You can verify this like that;
This should work, if this is the problem.
Well, I did those tests exactly and the sound works in un-appended version of my kernel image. I found related problems in the link below but I will test what you suggested as well. Overlay load problem
New version of uboot supports overlays but the thing is, Raspberry's boot process is kind of different than a common boot process. In Raspberry, start.elf processes dtb and overlays and do the necessary settlements about the device before booting the kernel. If you append dtb to kernel and remove it in boot partition, you should handle the things manually that start.elf would apply by processing dtb and overlays.
Hi, Thanks for your consideration. I managed to enable the network and DHCP with 4sec boot time. but the network won't work as expected. literally no packet goes through. Today I'm going to work on that issue and then I go after the sound card. Again I will share my config for every module I enable hopefully it will be useful to someone else.
hi mehranmd, Can you share the your buildroot config.? As you promise.
Hi. Congratulations on the job well done. performance on the base image is really good and even ready to use for pure embedded systems. I need to modify the build root to support USB & Ethernet & Wlan on rpi3 b+ but unfortunately after trying many Q&A posts on the internet and forums failed to achieve my goal.
I will point out the articles that I used and what I did.
1_http://nightly.buildroot.org/manual.html on this article, I read it all carefully and mostly focused on the "6.3. init system" part. I understood that I need to enable the "ifup down scripts' in 'make menuconfig in order to make ifupdown available from the initab. ofcurse we need to activate other options in this page to have proper access to network functionality but I'm not going to point them out since they are already activated in the default configuration.
2_https://jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Buildroot.html Another build root but with long loading time (20 sec with class 10 sd card) but fully functional. i noticed there are few differences in 'linux-menuconfig' command pannel. i assume it's because of the different version of the Linux kernel they used, any way I tried to hard copy the settings manually from this build root to yours but outcome was failure ofcurse. i tried to use the .config which is generated in the linux-(some odd code) instead of the original one and the os which came out of those configs wont even boot now. (didn't had much hope on this method at the start but I had to try)
3_https://git.busybox.net/busybox/tree/examples/inittab I tried to understand the inittab mechanism in busybox and figured out it's working just fine and there is nothing I could do to improve/fix my situation.
4_https://subscription.packtpub.com/book/hardware_and_creative/9781783289455/1/ch01lvl1sec09/generating-a-basic-root-filesystem-must-know Really long article on the matter of building root from scratch. it was just hard to relate the article sections to the your build root but I can tell there is nothing missing on the matter.
so in short I have the drivers there from the 'linux-menuconfig' and proper packages from the 'menuconfig'. but my problem is still standing. Any share of thoughts and opinions would be extremely welcome and appreciated.