/r/embeddedlinux

Photograph via snooOG

A place for everything related to Embedded Linux, news, articles, talks etc.

Embedded Linux news, articles, talks... etc.

/r/embeddedlinux

12,545 Subscribers

5

Looking for guidances on Embedded/ Wireless Technology/ Firmware developement/ Kernel Development Path

Working in a telecom company with 2.5 YoE, barely given tasks that actually boosts my skill, but the tasks i get are all mundane and time consuming. Right now i feel like a little out of touch from actual development. Thats the background of me.

So recently i have been hearing a lot about these paths of Firmware development (on Yocto, Zephyr, etc) , Wireless Development (Wifi 6 and 7, etc), Kernel and Device Driver development and the amount of knowledge that can be gained in them. Also these have very few developers in it too. So i wanted to upskill myself in them.

But i am confused on where to start, what to start, what are the prerequisites, i tried using ChatGPT too but i am not getting a decent guidance. Thought that anyone who is/ has been already in this domain, could provide me some insights and guidances. Tbh the senior devs and leads in my org are not ready to guide me, feels like they are gatekeeping (pretty sure i heard them talk a few times that if i get guidance i will switch jobs 🌚)

It would really be helpful if i get some guidance in this, as i dont want to waste my year end holidays sitting idle, why not upskill myself. I am open to discuss in DMs, ready to learn and open to learn a lot from the insights

P.S. its been a while i posted in reddit and i just came back to reddit after a long time. Please bare with my word usage or sentence formation or "read the room" skill posting this.

Thanks for reading my post till here. Hope you have a great day

0 Comments
2024/11/30
05:40 UTC

1

What is your dream company as a Embedded developer?(Saw this post thought of asking here)

0 Comments
2024/11/26
03:43 UTC

3

No such file or directory/dev/mem

Hi Folks,

I'm using Linux kernel 6.3.6 and I want to read some memory mapped IO registers using our beloved devmem tool.

I have already:

CONFIG_DEVMEM=y CONFIG_STRICT_DEVMEM=n CONFIGLIO_STRICT_DEVMEM=n

in my kernel configuration.

But there is no file /dev/mem after the boot.

Is it make sense that we simply create it using mknod?

Or am I still missing a configuration?

Many thanks!

2 Comments
2024/11/25
18:04 UTC

6

Bootlin courses: General Embedded Linux or Buildroot (or both)?

I've seen Bootlin courses recommended frequently here. Ultimately, I want to use Buildroot on a project, but I'm new to embedded Linux in general so I'm wondering if it's worth starting with their Embedded Linux course before taking their Buildroot specific one.

I'm pretty experienced with Linux on servers, but haven't built it from scratch. I've built VMs and container images. I've played around a bit with U-Boot on a running product, but never set it up from scratch. If I jump straight to Buildroot, am I going to be missing some important background? Or is it a bit redundant to take both?

(Cost is not a huge issue because I have a professional development stipend.)

3 Comments
2024/11/25
16:41 UTC

8

Moving from MCU/STM32 to Yocto: Where to start?

Emb. Linux is gaining popularity and I don't want to be left behind. How can I best practice emb linux in my freetime without access to labs, lots of equipment, or custom boards? What can I do on just a dev board that's a good practice for real life use?

6 Comments
2024/11/25
14:53 UTC

3

how to install packages using opkg?

root@raspberrypi4-64:~# opkg update
root@raspberrypi4-64:~# opkg install curl
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'curl'.
root@raspberrypi4-64:~# opkg install htop
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'htop'.
root@raspberrypi4-64:~# opkg install openssh-client
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'openssh-client'.
root@raspberrypi4-64:~# opkg install ssh-agent
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ssh-agent'.
root@raspberrypi4-64:~# opkg install ssh-add
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ssh-add'.

My local.conf file looks like this

MACHINE ??= "raspberrypi4-64"
IMAGE_FEATURES += "ssh-server-openssh package-management"
PACKAGE_CLASSES ?= "package_ipk" 
DL_DIR ?= "${TOPDIR}/downloads" 
SSTATE_DIR ?= "${TOPDIR}/sstate-cache" 
DISTRO ?= "poky"

EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"

BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    HALT,${TMPDIR},100M,1K \
    HALT,${DL_DIR},100M,1K \
    HALT,${SSTATE_DIR},100M,1K \
    HALT,/tmp,10M,1K"
    
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"

CONF_VERSION = "2"

BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws"
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
BB_HASHSERVE = "auto"
BB_SIGNATURE_HANDLER = "OEEquivHash"

LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch"

ENABLE_UART = "1"

INHERIT += "rm_work"

BB_NUMBER_THREADS = "9"
PARALLEL_MAKE = "-j 9"

IMAGE_FEATURES += "ssh-server-openssh package-management"

IMAGE_ROOTFS_EXTRA_SPACE = "8388608"
# Size in KB (8GB)

IMAGE_FSTYPES ?= "wic.bz2"

IMAGE_NAME = "splash_openssh_pkg_rootfs8_systemd_core_build_git_pipv2"

CORE_IMAGE_EXTRA_INSTALL += "packagegroup-core-buildessential python3-pip git"

DISTRO_FEATURES:append = " systemd usrmerge"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

How do yo install these packges using opkg?

Or do you add this packages as IMAGE_INSTALL in yocto build config

I am checking if the package is available or not in recipes, and if I need any package for my project, I had to rebuild the image again and do the setup again the whole time.

It would be good if some way to download package from inside the image.

I am new to yoctoproject. I don't know how to work with packages and images in yocto.

Please help me

1 Comment
2024/11/25
10:27 UTC

4

Looking to upgrade my git-fu.

Working with embedded linux leaves me with some really giant repositories that are a bear to navigate. Github, and the git cli is just a slug to flip through histories and compare repos when they are this large. Does anybody have any special tools they like for making their kernel hacking more introspectable?

3 Comments
2024/11/23
17:22 UTC

6

Raspberry Pi alternative

For someone who wants to start developing embedded linux, what are some good alternatives for raspberry pi? Preferably at similar or lower price point

22 Comments
2024/11/23
10:55 UTC

3

Help with USB on custom carrier board

Hey, currently building an embedded yocto linux system with an rpi cm4 on a custom carrier board.

we have it wired such that the usb data lines on the cm4 go directly to the usb port. (we have series resistors on the lines too).

We have run into the problem where the cm4 will not detect any connected usb peripherals at all.

We have put the same cm4 on the standard cm4io board, and it works as expected.

We suspect that the issue is that becasue we require the raspberrypi4-64 machine definition, that its set up to explicitly expect a usb hub ic to be connected to it, and if not it just fails to do any usb activities, but thats just a theory. We are not particularly experienced with embedded linux.

For more info, I have confirmed that the device is in host mode, and that the dwc2 driver is loaded.

Thank you for your time!

5 Comments
2024/11/21
15:48 UTC

2

What happened to the devicetree.org schemas?

I'm looking into adding a LTC2309 to my device tree. Looking into the kernel documentation for the LTC2497 I'm pointed to http://devicetree.org/schemas/iio/adc/lltc,ltc2497.yaml# for documentation, but that seems to have linkrotted since it was created in 2020. Have these sort of schema details migrated somewhere I could look?

7 Comments
2024/11/21
15:43 UTC

0

Need guidance

Hey all, I am currently working with one of service based MNC in India as senior consultant (embedded) with CTC of around 24 LPA. I’ve a total experience of 6+ years. Now I’m not sure how to move further in my career. As in what I can think of I’ve 3 ways :

  1. Keep learning new skills on my own or from online platform and keep switching companies to get hike.

  2. Do an MBA/ executive MBA from leading B School in India.

  3. Do M.Tech from abroad and then again go into the market.

I am really not sure which path I should go with. Please help me with your experience and let me know if there’s some other path available that I’m not aware of.

Thankyou in advance !!

1 Comment
2024/11/20
11:56 UTC

2

Need help to interface OV5647 over MIPI CSI to SAMA7G5 ek

I am working on SAMA7G5 ek board. I want to use OV5647/any other camera with it over MIPI CSI. I am building custom linux distro using buildroot. To achieve interfacing, I am referring https://www.linux4sam.org/bin/view/Linux4SAM/Sama7g5Xisc
https://www.linux4sam.org/bin/view/Linux4SAM/MediaController

these links. But still I am not getting how to do it.

After enabling support of camera sensor and CSI2 D Phy, I am facing errors like
# media-ctl -p

Failed to enumerate /dev/media0 (-2)

# v4l2-ctl --list-devices

Cannot open device /dev/video0, exiting.

#

Also I couldn't find any DT overlay for OV5647.
Thank you in advance.

1 Comment
2024/11/19
11:27 UTC

3

Need help for carrier path !

Hi I'm new to this sub Please suggest what and how i need to learn to reach my next step in my embedded carrier
Let me give some insights about myself so that you can understand

1.I completed my BE ECE in 2020.

2.i worked in a startup for 2 years after without getting job for 6 months initially with only knowledge of arduino

  1. in startup(textile industry) i went through a self learning phase and developed a sorting product which i came to exposure of aruduino,sensors,pneumaitc actuators,ac,dc,concepts and some pheriparals i used only library files i didn't develop anything.

4.Then i joined an MNC(service based) there i worked on a project with stm32 so i learned a lot like how a controller works what is a register how to use data sheets etc i used cube ide to generate code and work .

5.After a year since there is no sign of self improvement and i havent placed in any live project in MNC i joined a mid scale company (power supply and air conditioner machine industry) with fast phased envoironment to exit my comfort zone now im working here

  1. Here i learned more things by using dsPIC micro controller learned some pheriperals deeper knowledge in pwm, deeper knowledge in registers and here i'm daily working with code to solve something

7.Since i don't have any seniors around me in same field please help me to shape my carrier path suggest some list of industrial used topics to lern i'm ok with c still learning c++ do i need any other language i've heared about RTOS and dont know how to learn Please somebody help thanks in advance

6 Comments
2024/11/15
04:09 UTC

8

Do any of you use JTAG as a major part of your embedded Linux workflow?

I'm mostly a hardware person, and I almost always get asked to include a JTAG connection in a custom board.

However, I've really only ever seen two scenarios during embedded Linux board bringup:

  • You get everything right, and the board "just works" and boots a kernel (or boots enough that you can debug issues with the serial console)
  • You bork something so badly that you can't get any sign of life out of the thing - i.e. you can't even connect to the thing with JTAG.

Just curious - I'm always wondering if there's something major I'm missing by not taking more advantage of JTAG

8 Comments
2024/11/14
21:38 UTC

2

Raspberry Pi Compute Module 5 hands-on

0 Comments
2024/11/14
20:04 UTC

2

Choosing H61 Motherboards for learning Embedded Linux

Hi Everyone,

I am totally new to Embedded linux

I want to start learning Embedded linux so I searched some boards many people were suggesting BeagleBone Black but it was nearly 6000(INR) . After searching some time I found that Zebronics H61 Motherboards which costs only 1100(INR) since it needs a core it might cost additional 500(INR), so it would cost within 1800(INR).

DOUBTS:

  • Can H61 Boards be used for learning Embedded linux ?
  • If yes what would be the additional things that need to be taken care?
  • As for storage BeagleBone Black have eMMC and SD-Card support for storage purpose but this H61 Boards doesn't have SD-card or eMMC support . For this what need to be done?

Thanks in Advance

4 Comments
2024/11/14
15:51 UTC

3

X11 support for imx8mplus eval board

I have an application designed that captures mouse and keyboard events and flushes it to extended displays connected via ethernet using X11 library. The application works fine but now I'm facing trouble in executing it on nxp imx8mplus eval board. I have used Display rootWindow in the code and it is not working on the board. I have built the yocto with fsl-imx-xwayland distro. Is there any solution for this?

0 Comments
2024/11/14
07:36 UTC

5

memcpy() very slow on embedded hardware, how to speed it up?

Good day everyone,

I compiled a linux system for my lichee pi zero board with buildroot, and then cross-compiled a linux daemon that I'd written (runs in userland) for my system. The performance was way worse than I expected, so I decided to hunt down the performance bottleneck and I was able to narrow it down to slow memcpy() calls. The reason I used memcpy() was because I read online that it's hyperoptimized for copying large buffers around and I was getting very satisfying results from it on my host linux system. The data being copied is RAM to RAM

So I decided to ask, is there a software way to make memcpy() calls faster? Is there any option in buildroot or the kernel config that I can toggle? Is it the fault of the toolchain? What other tools and methods can I use to debug the slowness of memcpy()?

Thanks for your time

8 Comments
2024/11/12
21:45 UTC

5

Seeking Recommendations for C/C++ Libraries for Embedded Linux Service with Web API and WebSocket Support

Hello everyone,

I’m working on an embedded Linux project with limited resources (128 MB of RAM and a CPU running at around 1.2 GHz). I need to implement a service that will run efficiently in this environment.

The service will need to include:

  1. A web server capable of hosting RESTful APIs.
  2. WebSocket support for client-side communication.
  3. Full compatibility with OpenSSL for secure communication.

Given these requirements, I would appreciate any recommendations for C/C++ libraries or frameworks that can help me implement this solution efficiently without compromising performance, considering the resource limitations.

I’m particularly interested in libraries that are lightweight, well-documented, and actively maintained. If you have experience working with any such libraries in similar environments, I would love to hear your suggestions!

Thanks in advance!

9 Comments
2024/11/11
16:40 UTC

3

How to best start experimenting with custom Linux builds and new GPU drivers

0 Comments
2024/11/11
00:01 UTC

3

Can someone help me with setting up NFS correctly for Beaglebone Black?

Hello,
I have been following a course on embedded linux by bootlin (https://bootlin.com/doc/training/embedded-linux/embedded-linux-slides.pdf) along with its accompanied lab guide (https://bootlin.com/doc/training/embedded-linux-bbb/embedded-linux-bbb-labs.pdf) and though I had NFS working previously it doesn't anymore and I am stumped. I have reached out to discord communities and forums but still haven't gotten back a single reply so though to try reddit too.
I have posted this on the beagleboard forum
https://forum.beagleboard.org/t/vfs-unable-to-mount-root-fs-via-nfs/40199

It may be that I have cocked my network configuration up somehow.
I believe I have followed the steps correctly bar any blind spots on my part.
I notice some things but I am not sure if these are clues.

  1. nfs-server status is active (exited) which is something that I am not so sure about. Usually services are active (running)
  2. The USB RNDIS interface on the host seems to start and stop and it doesn't show up with ip a when it should be trying to communicate with the nfs-server. I thinks this is portrayed in the logs with the state changes
  3. With rpcdebug -m nfsd -s all and rpcdebug -m nfs -s all journalctl --system -e will show the following

Any help appreciated.

Nov 04 21:23:25 hostPC kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 04 21:23:25 hostPC kernel: usb 3-1: Product: RNDIS/Ethernet Gadget
Nov 04 21:23:25 hostPC kernel: usb 3-1: Manufacturer: Texas Instruments
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2819] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/16)
Nov 04 21:23:25 hostPC kernel: rndis_host 3-1:2.0 eth0: register 'rndis_host' at usb-0000:05:00.4-1, RNDIS device, f8:dc:7a:00:00:01
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2854] device (eth0): interface index 28 renamed iface from 'eth0' to 'enp5s0f4u1c2'
Nov 04 21:23:25 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: renamed from eth0
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2914] device (enp5s0f4u1c2): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2922] device (enp5s0f4u1c2): carrier: link connected
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2923] device (enp5s0f4u1c2): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2926] policy: auto-activating connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2928] device (enp5s0f4u1c2): Activation: starting connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2928] device (enp5s0f4u1c2): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2929] device (enp5s0f4u1c2): state change: prepare -> config (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2930] device (enp5s0f4u1c2): state change: config -> ip-config (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4418] device (enp5s0f4u1c2): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 04 21:23:25 hostPC systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4960] device (enp5s0f4u1c2): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4962] device (enp5s0f4u1c2): state change: secondaries -> activated (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4966] device (enp5s0f4u1c2): Activation: successful, device activated.
Nov 04 21:23:31 hostPC kernel: usb 3-1: USB disconnect, device number 34
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: unregister 'rndis_host' usb-0000:05:00.4-1, RNDIS device
Nov 04 21:23:31 hostPC kernel: nfsd_inet6addr_event: removed fe80:0000:0000:0000:b186:fdf3:00bc:6c26
Nov 04 21:23:31 hostPC kernel: nfsd_inetaddr_event: removed 192.168.0.1
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.1667] device (enp5s0f4u1c2): state change: activated -> unmanaged (reason 'unmanaged-link-not-init', managed-type: 'removed')
Nov 04 21:23:31 hostPC kernel: usb 3-1: new high-speed USB device number 35 using xhci_hcd
Nov 04 21:23:31 hostPC kernel: usb 3-1: config 1 has 0 interfaces, different from the descriptor's value: 1
Nov 04 21:23:31 hostPC kernel: usb 3-1: New USB device found, idVendor=0451, idProduct=d022, bcdDevice= 3.15
Nov 04 21:23:31 hostPC kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 04 21:23:31 hostPC kernel: usb 3-1: Product: RNDIS/Ethernet Gadget
Nov 04 21:23:31 hostPC kernel: usb 3-1: Manufacturer: Texas Instruments
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 eth0: register 'rndis_host' at usb-0000:05:00.4-1, RNDIS device, f8:dc:7a:00:00:01
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7461] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/17)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7497] device (eth0): interface index 29 renamed iface from 'eth0' to 'enp5s0f4u1c2'
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: renamed from eth0
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7547] device (enp5s0f4u1c2): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7553] device (enp5s0f4u1c2): carrier: link connected
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7554] device (enp5s0f4u1c2): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7557] policy: auto-activating connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7558] device (enp5s0f4u1c2): Activation: starting connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7559] device (enp5s0f4u1c2): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7560] device (enp5s0f4u1c2): state change: prepare -> config (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7561] device (enp5s0f4u1c2): state change: config -> ip-config (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8898] device (enp5s0f4u1c2): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8910] device (enp5s0f4u1c2): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8911] device (enp5s0f4u1c2): state change: secondaries -> activated (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8913] device (enp5s0f4u1c2): Activation: successful, device activated.
Nov 04 21:23:36 hostPC kernel: usb 3-1: USB disconnect, device number 35
Nov 04 21:23:36 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: unregister 'rndis_host' usb-0000:05:00.4-1, RNDIS device
Nov 04 21:23:36 hostPC kernel: nfsd_inet6addr_event: removed fe80:0000:0000:0000:b186:fdf3:00bc:6c26
Nov 04 21:23:36 hostPC kernel: nfsd_inetaddr_event: removed 192.168.0.1
Nov 04 21:23:36 hostPC NetworkManager[51581]: <info>  [1730748216.8500] device (enp5s0f4u1c2): state change: activated -> unmanaged (reason 'unmanaged-link-not-init', managed-type: 'removed')
Nov 04 21:23:46 hostPC systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.Nov 04 21:23:25 hostPC kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 04 21:23:25 hostPC kernel: usb 3-1: Product: RNDIS/Ethernet Gadget
Nov 04 21:23:25 hostPC kernel: usb 3-1: Manufacturer: Texas Instruments
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2819] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/16)
Nov 04 21:23:25 hostPC kernel: rndis_host 3-1:2.0 eth0: register 'rndis_host' at usb-0000:05:00.4-1, RNDIS device, f8:dc:7a:00:00:01
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2854] device (eth0): interface index 28 renamed iface from 'eth0' to 'enp5s0f4u1c2'
Nov 04 21:23:25 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: renamed from eth0
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2914] device (enp5s0f4u1c2): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2922] device (enp5s0f4u1c2): carrier: link connected
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2923] device (enp5s0f4u1c2): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2926] policy: auto-activating connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2928] device (enp5s0f4u1c2): Activation: starting connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2928] device (enp5s0f4u1c2): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2929] device (enp5s0f4u1c2): state change: prepare -> config (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.2930] device (enp5s0f4u1c2): state change: config -> ip-config (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4418] device (enp5s0f4u1c2): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 04 21:23:25 hostPC systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4960] device (enp5s0f4u1c2): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4962] device (enp5s0f4u1c2): state change: secondaries -> activated (reason 'none', managed-type: 'full')
Nov 04 21:23:25 hostPC NetworkManager[51581]: <info>  [1730748205.4966] device (enp5s0f4u1c2): Activation: successful, device activated.
Nov 04 21:23:31 hostPC kernel: usb 3-1: USB disconnect, device number 34
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: unregister 'rndis_host' usb-0000:05:00.4-1, RNDIS device
Nov 04 21:23:31 hostPC kernel: nfsd_inet6addr_event: removed fe80:0000:0000:0000:b186:fdf3:00bc:6c26
Nov 04 21:23:31 hostPC kernel: nfsd_inetaddr_event: removed 192.168.0.1
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.1667] device (enp5s0f4u1c2): state change: activated -> unmanaged (reason 'unmanaged-link-not-init', managed-type: 'removed')
Nov 04 21:23:31 hostPC kernel: usb 3-1: new high-speed USB device number 35 using xhci_hcd
Nov 04 21:23:31 hostPC kernel: usb 3-1: config 1 has 0 interfaces, different from the descriptor's value: 1
Nov 04 21:23:31 hostPC kernel: usb 3-1: New USB device found, idVendor=0451, idProduct=d022, bcdDevice= 3.15
Nov 04 21:23:31 hostPC kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 04 21:23:31 hostPC kernel: usb 3-1: Product: RNDIS/Ethernet Gadget
Nov 04 21:23:31 hostPC kernel: usb 3-1: Manufacturer: Texas Instruments
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 eth0: register 'rndis_host' at usb-0000:05:00.4-1, RNDIS device, f8:dc:7a:00:00:01
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7461] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/17)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7497] device (eth0): interface index 29 renamed iface from 'eth0' to 'enp5s0f4u1c2'
Nov 04 21:23:31 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: renamed from eth0
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7547] device (enp5s0f4u1c2): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7553] device (enp5s0f4u1c2): carrier: link connected
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7554] device (enp5s0f4u1c2): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7557] policy: auto-activating connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7558] device (enp5s0f4u1c2): Activation: starting connection 'ethernet-enp5s0f4u1c2' (e8537e3c-5411-4dae-ab49-ca4780210b61)
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7559] device (enp5s0f4u1c2): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7560] device (enp5s0f4u1c2): state change: prepare -> config (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.7561] device (enp5s0f4u1c2): state change: config -> ip-config (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8898] device (enp5s0f4u1c2): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8910] device (enp5s0f4u1c2): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8911] device (enp5s0f4u1c2): state change: secondaries -> activated (reason 'none', managed-type: 'full')
Nov 04 21:23:31 hostPC NetworkManager[51581]: <info>  [1730748211.8913] device (enp5s0f4u1c2): Activation: successful, device activated.
Nov 04 21:23:36 hostPC kernel: usb 3-1: USB disconnect, device number 35
Nov 04 21:23:36 hostPC kernel: rndis_host 3-1:2.0 enp5s0f4u1c2: unregister 'rndis_host' usb-0000:05:00.4-1, RNDIS device
Nov 04 21:23:36 hostPC kernel: nfsd_inet6addr_event: removed fe80:0000:0000:0000:b186:fdf3:00bc:6c26
Nov 04 21:23:36 hostPC kernel: nfsd_inetaddr_event: removed 192.168.0.1
Nov 04 21:23:36 hostPC NetworkManager[51581]: <info>  [1730748216.8500] device (enp5s0f4u1c2): state change: activated -> unmanaged (reason 'unmanaged-link-not-init', managed-type: 'removed')
Nov 04 21:23:46 hostPC systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

Edit:

Finally cracked it.

So the problem was in the server networking configuration.

The tutorial I was following suggested running:

nmcli con add type ethernet ifname enxf8dc7a000001 ip4 192.168.0.1/24

This was working ok for the tftp transfer but for whatever reason after the tftp transfer it changed the ifname to something like enxf8dc000001c2 and it could not connect to the NFS server subsequently.

The final step of the puzzle is for me to set the connection based on the MAC address (which I don't know how to do yet).

Thanks everyone for your help.

9 Comments
2024/11/05
14:15 UTC

4

Advice or cheap hardware for NVME validation / enumeration?

Hi, I'm working on a project that's in the board bringup stage.

Things are way behind schedule so I'm being asked to modify our device tree to enable / validate PCIE. Specifically, I'm being asked to enable / test a PCIE Gen3 x2 slot with NVMe. The SoC vendor has PCIE definitions I am inheriting (I'm told PCIE was verified at SoC level, on their test hardware), but now I'm working on my system vendors carrier board.

I'm normally an application dev, so I'm learning as I go. The root controller is being established, I get kernel logs validating the PCIE training stage / bandwidth. But, my key m NVME doesn't enumerate. I have verified it enumerates on my Ubuntu machine.

lspci/lsblk/lsmod don't acknowledge the NVME drive in any capacity, nor do the kernel logs.

At this point, I'm interested in checking m.2 slot / pins with a breakout board or anything comparable. Do you have any advice? I don't have the resources to buy any equipment over, say, $1,000.

At the device tree level I've defined the major pins/refclk as far as I know. I think I'm perhaps just failing to fully describe a bus or something.

Thank you!

edit: I should specify that I've tried starting nvme modules at runtime, but nothing links to them. I've also initiated bus rescans 'echo 1 > /sys/bus/pci/rescan', but no luck there.

6 Comments
2024/11/05
02:02 UTC

7

Modifying Linux-Based XVR Device Firmware: .img Extraction, SquashFS, and LZMA Issues

https://preview.redd.it/szz6xh242syd1.png?width=729&format=png&auto=webp&s=1c846f0976397f06a7916f9799dd50c85b240341

Hello,

I'm working on analyzing and modifying a Linux-based firmware file for an XVR recording device using WSL, but I'm encountering several issues with extracting and accessing files in the .img firmware file.

  1. Binwalk Extraction Issue: I’ve tried using Binwalk for extraction, but instead of the expected squashfs file structure, I end up with dozens of .zlib files. Each .zlib file contains additional nested .zlib files, creating a "matryoshka doll" effect. I also tried using the mount method, but it fails to recognize the squashfs format and does not open it correctly.
  2. 7z and LZMA Issue: There is a 257C65.7z file within the firmware, which I believe might contain the operating system. This 7z file has an LZMA file inside, but I can’t extract it or access its contents. When I attempt to open it with 7zip, I receive a data error, and LZMA doesn’t recognize it as a valid LZMA file.

I’m having trouble identifying the root causes of these issues. If anyone has encountered similar problems or knows of alternative methods or tools that might work—especially for XVR device firmware—any advice would be greatly appreciated.

Thank you in advance!

2 Comments
2024/11/04
00:15 UTC

3

Query

If you were given the task of identifying unwanted components out of a yocto based customised OS, how would you do it?

Asking for a friend of course.😉

4 Comments
2024/11/03
14:54 UTC

4

Bitbake recipe not copying files to /usr/lib

I've been diving into yocto and building my own recipes and you all have been great. So, thank you for that.

I have a recipe that is doing a cmake build, but the cmake files do not provide an install method. So I am doing that manually. However, the libraries I copy to /usr/lib do not show up.

All other files references below are in the target image. Just not the static libs.

LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"

S = "${WORKDIR}/git"

inherit cmake

EXTRA_OECMAKE += "-DFETCHCONTENT_FULLY_DISCONNECTED=FALSE -DBUILD_TESTING=OFF -DENABLE_EXAMPLES=ON -DBUILD_DOCS=OFF -DENABLE_TRACING=ON -DCMAKE_BUILD_TYPE=Release" 

# Add protobuf-native and protobuf as dependencies
DEPENDS = "googletest googlebenchmark protobuf-native protobuf"
# Fetch source code from a Git repository
SRC_URI += "git://github.com/cactusdynamics/cactus-rt.git;protocol=https;branch=master"
SRCREV="${AUTOREV}"

FILES:${PN} += "${datadir}" 

do_install() {
  
	install -d "${D}"/usr/lib
  
	install -d "${D}"/usr/include
	install -d "${D}"/usr/include/cactus_rt
	install -d "${D}"/usr/include/quill
	install -d "${D}"/usr/include/readerwriterqueue
		
	install -d "${D}"/usr/share
	install -d "${D}"/usr/share/cactus_rt
	install -d "${D}"/usr/share/cactus_rt/examples
		
	cp -r "${S}"/include/cactus_rt "${D}"/usr/include
	cp -r "${B}"/_deps/quill-src/quill/include/quill "${D}"/usr/include
	
	install -m 0644 "${B}"/_deps/readerwriterqueue-src/atomicops.h "${D}"/usr/include/readerwriterqueue
	install -m 0644 "${B}"/_deps/readerwriterqueue-src/readerwriterqueue.h "${D}"/usr/include/readerwriterqueue
	install -m 0644 "${B}"/_deps/readerwriterqueue-src/readerwritercircularbuffer.h "${D}"/usr/include/readerwriterqueue
	
	install -m 0644 "${B}"/libcactus_rt.a "${D}"/usr/lib
	install -m 0644 "${B}"/_deps/quill-build/quill/libquill.a "${D}"/usr/lib


	find "${B}"/examples -type f -executable -exec cp {} "${D}"/usr/share/cactus_rt/examples \;
	

}
8 Comments
2024/11/01
17:09 UTC

4

will jtag help me?

I've never used jtag before so I'm not that familiar with its capabilities. I have a problem where my device locks up. The watchdog will get it eventually unless I turn off the watchdog. The problem is there is no crash dump or log or message of any kind. I probably have a few hundred hours into this bug over years, and have figured out that recording from the I2S microphone causes the hang, and it happens weather the microphone is connected or not. Is this the sort of thing that jtag would be helpful for? The processor is an im8 cortex A53 if anybody had any ideas on the best jtag for that.

13 Comments
2024/10/30
16:41 UTC

4

What is probing in an I2C linux driver?

You know, the thing with the i2c_driver struct which you define with the probe function? What is probing in this case? Does the i2c support hot pluging or does the i2c lines get tested when the module gets loaded. I'm asking because there is no equivalent for that in spi

3 Comments
2024/10/29
05:17 UTC

41

What kind of things are you creating with embedded Linux?

I'm just curious to read what kind of products are you guys creating with the use of embedded Linux? Robots, AI vision systems, medical, HMI, etc..?

26 Comments
2024/10/25
15:34 UTC

3

Using crops/extsdk-container to build Qt app for yocto system

Hello,

My personal laptop run on Manjaro Linux, so I decided to use crops container to run Yocto avoiding weird issues.

Now I am thinking to use equivalent container for app building with generate sdk : https://github.com/crops/extsdk-container

What do you think about this container and this workflow ?

I want to try to build Qt app with this container. I saw that Qt creator offer docker plugin to do that. But how to run the container with right options like sdk and mount directory ? Then how to select this toolchain inside Qtcreator ?

Thank for advice and help

0 Comments
2024/10/24
12:10 UTC

8

RT Kernel thread timing

I've got linux running on a TI625 processor (4 cores) with a custom 6.12 kernel.

I have the following kernel config enabled (And more, but these are the ones for timing and preempt)

CONFIG_PREEMPT_RT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_RCU=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_FULL=y
CONFIG_HZ_1000=y
CONFIG_HZ=1000

I'm using this small piece of code: #include <stdio.h> #include <pthread.h> #include <unistd.h> #include <time.h>

#include <errno.h>
#include <gpiod.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define LOOP_FREQUENCY_HZ 2
#define THOUSAND 1000LL
#define MILLION 1000000LL
#define BILLION 1000000000LL
#define LINE_OFFSET 41

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

long long get_ms(void) {
  static struct timespec start_time;
  struct timespec end_time;
  long long ms;
  if (!start_time.tv_sec) {
	printf("Starting clock\n");
	clock_gettime(CLOCK_MONOTONIC, &start_time);
  }
  clock_gettime(CLOCK_MONOTONIC, &end_time);
  ms = (end_time.tv_sec - start_time.tv_sec) * THOUSAND;
  ms += (end_time.tv_nsec - start_time.tv_nsec) / MILLION;

  return ms;
}

void *unlockMutex(void *arg) {
  struct timespec sleep_duration;
  sleep_duration.tv_sec = 0;
  sleep_duration.tv_nsec = BILLION / LOOP_FREQUENCY_HZ;

  while (1) {
	pthread_mutex_unlock(&mutex);
	clock_nanosleep(CLOCK_MONOTONIC, 0, &sleep_duration, NULL);
  }
  pthread_exit(NULL);
}

void *lockMutex(void *arg) {
  while (1) {
	pthread_mutex_lock(&mutex);
	printf("%lld\n", get_ms());
  }
  pthread_exit(NULL);
}

int main() {
  pthread_t thread1, thread2;
  pthread_attr_t attr;
  struct sched_param params;

  pthread_attr_init(&attr);
  pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
  pthread_attr_setschedpolicy(&attr, SCHED_FIFO);

  params.sched_priority = sched_get_priority_max(SCHED_FIFO);
  pthread_attr_setschedparam(&attr, &params);

  get_ms();

  // Create two threads
  pthread_create(&thread1, &attr, unlockMutex, NULL);
  pthread_create(&thread2, &attr, lockMutex, NULL);

  getchar();

  pthread_cancel(thread1);
  pthread_cancel(thread2);

  return 0;
}

The result is not what I would expect:

Starting clock
1
500
1000
1500
2000
2500
3000
3500
4001
4501
5001
5501
6001
6501
7001
7501
...
84509

So after about 85 seconds the timing has slipped about 10ms. I know it's not much, but I would have expected it to be more precise.

Is this expected or are there other config/code changes I can make?

3 Comments
2024/10/23
16:03 UTC

Back To Top