/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

10,181 Subscribers

0

Seeking advice: Why is Embedded Iot the best decision major in IT bachelors?

Hi everyone,

I'm an IT bachelors student deciding between a major in IoT Network or Embedded IoT and need some advice on which might lead to better job prospects after graduation. I've heard Embedded IoT has fewer positions but offers big upsides, however would someone mind answering these:

  1. What are these upsides? Higher salary, faster job advancement, better job opportunities, or something else?

  2. How long might it take to see these benefits, and what factors help achieve them? Does location, networking, or starting your own company matter?

  3. Also, would AI knowledge like machine learning and algorithms be an advantage in an embedded engineering career?

Thanks for your insights!

1 Comment
2024/05/15
19:19 UTC

4

Roadmap to learn embedded Linux device driver development?

2 Comments
2024/05/14
02:53 UTC

10

is embedded linux a trend ?

Hello, Embedded Linux Community,

I am an embedded software engineer with a background in C, AVR, ARM, AUTOSAR, Python, and C++. Unfortunately, in Egypt, there are currently no job openings for embedded engineers. The embedded company that used to specialize in the automotive industry has stopped hiring juniors since last year, and this trend continues to date.

There is a growing belief that embedded Linux is the future, and companies will eventually need more embedded Linux engineers. However, despite people studying and preparing for this shift, there have been no new developments in either bare-metal embedded or embedded Linux in Egypt.

8 Comments
2024/05/13
11:34 UTC

0

help me choose a career path, please!

TL;DR: Should I pursue network engineering as a job and develop embedded systems in my free time, or work as an embedded systems developer and explore network engineering on my own? I plan to eventually transition into a cybersecurity role focused on pentesting or application security.

Hello Reddit community,

I'm about a year away from earning my bachelor’s degree in Computer Science, and I'm currently weighing my career options—possibly even considering more than just the two I'm about to discuss. I'd love to get your insights and advice.

My passion lies in cybersecurity. In my spare time, I've been diving into reverse engineering and binary exploitation. While I find it fascinating, I'm still a beginner and not yet skilled enough to secure a job in this area. I aim to build a strong foundation of skills through my career choices. Importantly, I have very strong coding fundamentals, which I believe will help me adapt and excel in any technical role. Eventually, I want to pivot to cybersecurity, but I believe in gaining a solid grasp of the fundamentals first.

I'm considering two main paths: becoming an embedded systems developer or a network engineer. There are other roles like DevOps that interest me, but they also require networking knowledge.

So, my question is: would it be more practical to work as an embedded systems developer while learning about network engineering in my free time, or the other way around? I'm dedicated to continuous learning in various CS and IT topics—not just for the career benefits but to amass the broadest and deepest knowledge possible to make a strong entry into cybersecurity.

For example, while I could set up a comprehensive home lab for network engineering, it might not fully replicate real-world conditions. On the other hand, working on embedded systems at home with the right equipment might not be too different from professional settings, except that professional settings might involve tasks that are less interesting or beneficial to me.

I'm also exploring OS development, which seems just as feasible to pursue at home as at a job, provided the equipment is adequate.

I appreciate your guidance and insights on which path might offer the best learning opportunities for a future in cybersecurity.

4 Comments
2024/05/12
09:33 UTC

0

Embedded Systems new graduate

Hi, I have recently graduated from Embedded Systems Development graduate certificate at Conestoga College. Back in Inda I studied Bachelor's in Electronics and Communication Engineering. Also have worked in a software company for an year.I am interested in both the embedded hardware and software, also I am searching for jobs in Firmware. So, What should be my next step, what certification should I take? in the field of Embedded Systems. Please someone help me. What are the opportunities in Canada.

2 Comments
2024/05/11
14:21 UTC

9

when I try to build my buildroot

8 Comments
2024/05/08
23:32 UTC

5

Luckfox Pico Max ft Alpine Linux with Giveaway (Language Warning!)

5 Comments
2024/05/07
14:08 UTC

5

Rockchip SoC, uart woes

I am new to a lot of this, especially UART and Logic Analyzers.

Story: I have a Rockchip Android tablet that I flashed with an incorrect u-boot.img - leading to the device no longer booting into MASKROM mode or being detected by PC.

I therefore started to explore UART as a way to get an understanding of what was happening on device. I'm having a hard time with what I am seeing in Logic2 / Pulseview.

When I connect the device to power, I get a constant stream of repeating characters. First conclusion was that this is a Baud Rate issue / frame errors. However, I've tried - unsuccessfully - to find a baud rate that changes the data received.

I'm learning bootloader development, and have some understanding of what should in theory be happening with this device when powered on.

I'd really appreciate it if someone could help me with this, or shed some insight.

Images: Rockchip board - Logic2 data

EDIT: Additionally, I have observed that the same activity recorded in Logic2 (image above) occurs on both TX and RX, and only in the absence of a ground connection. This leads me to wonder if what I am seeing in Logic2 is not 'data' - but how the Analyzer reacts to the presence of a current. Is it possible I have a dead board?

9 Comments
2024/05/07
03:54 UTC

6

How do linux-base e-readers achieve long battery life?

Hi,

I'm curious how linux-based e-readers can achieve the week to month-long battery life?

Obviously, they have to use some sort of low-power mode, maybe run tickless to reduce interrupt load but there must be more to it?

Anyone wants to elaborate?

3 Comments
2024/05/06
02:50 UTC

3

RTlinux

Hello everyone,

I'm carrying out research on RTlinux, I would like your help as I have difficulty finding information on the internet, could you tell me if there is any type of process and memory management present in RTlinux, or even a general bias about it?

1 Comment
2024/05/05
15:05 UTC

1

Buildroot Allwinner F1C200s and UART PPP problem

Hi,

I have an Allwinner F1C200s and I'm experiencing some problems with PPP. The modem is Telit EXS82-W and is connected via UART (no HWFC) to /dev/ttyS0.

Buildroot repo that I'm using is this one: https://github.com/aodzip/buildroot-tiny200

pppd and everything that needs to be enabled was enabled in menuconfig. I have created a chat script that puts the modem in PPP mode and that works fine. Once I run the chat script I am greeted with those two messages:

Serial connection established.
Couldn't set tty to PPP discipline: Invalid argument

ifconfig gives me nothing useful. lsmod shows me that no modules are present, but I need the ppp_generic and ppp_async modules, as far as I know (correct me if I'm wrong). After some googling, I see that I have to include the modules before building the kernel/image by executing the make linux-menuconfig command, go to device drivers and check them, but running it only starts building the image.

Anyone ever stumbled on a similar problem and knows how to solve it?

Thank you in advance.

6 Comments
2024/05/03
18:21 UTC

0

How to create Shared folder in linux

Hello guys, I created a shared folder using

sudo mkdir /usr/local/share/projects

and created a group called heroes and add users batman, kanishk(user who create the shared folder ) using the commands.

sudo addgroup heroes

sudo usermod -aG heroes batman

sudo usermod -aG heroes kanishk

getent group heroes

heroes:x:1002:batman,kanishk

Now i set the project folder owership to the group heroes which contain users( kanishk,batman).

sudo chown :heroes /usr/local/share/projects

And also changed permission of folder for group to write by the command.

sudo chmod 775 /usr/local/share/projects

The problem is i can read and write the folder from the user batman but i can only read from the user kanishk.

The output shows the permission denied

But the ownership of folder have for both user from group heroes.

So whats the problem . Whether i missed something. I also used

sudo chmod g+s /usr/local/share/projects

1 Comment
2024/05/01
17:12 UTC

4

Do I need knowledge of ARM to work on Linux?

Mechatronics 3rd year here,just wondering if I need to master ARM in order to work with embedded linux?

I believe I am good enough in C and C++,and I know enough on AVR ,did some projects on them even.

Is there something else I need to know before I start linux? Some people told me I need to be proficient in embedded ARM and embedded AVR before starting linux.

Some clarification would be nice.

14 Comments
2024/04/30
19:47 UTC

0

Embedded software engineer

Hello I am start Learning embedded what is the roadmap of embedded software engineer can you please give me it will be helpful for me

Thanks in advance

8 Comments
2024/04/23
16:22 UTC

3

Inconsistent illegal instruction when trying to read elapsed clock cycles

Hello

I am merely trying to read the number of elapsed clock cycles but 80% of times I run my code I just fault and get "Illegal instruction" and the remaining time it measures 15 elapsed clock cycles (which sounds plausible: 3 times 1 clock cycles for nop + the read overhead). I would understand if it constantly failed, but in this case it sometimes works. Why don't I get a consistent behavior?

This is the line that leads to the fault:

 asm volatile("mrs %0, PMCCNTR_EL0":"=r"(tic));

I have the code hereunder for Cortex A53, Linux version 5.4.72-v8.

My kernelspace driver:

#include <linux/init.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/cdev.h>
#include <linux/device.h>

MODULE_AUTHOR("Thor Zeus");
MODULE_DESCRIPTION("Elapsed clock cycles");
MODULE_LICENSE("GPL");

static const struct file_operations my_fops;

static int __init custom_init(void) {

    /* Select performance event counter 0. */
    asm volatile("msr PMEVCNTR0_EL0, %0"::"r"(0x00000000));

    /* Enable access from userspace to all counters. */
    asm volatile("msr PMUSERENR_EL0, %0"::"r"(0xF));

    /* Performance monitor control register. */
    int32_t value = 0;
    value |= 1; /* Enable all counters */
    value |= 2; /* Reset event counter to zero */
    value |= 4; /* Reset PMC counter to zero */
    asm volatile("msr pmcr_el0, %0" : : "r" (value));

    /* Enable cycle counter registers for counter 0. */
    asm volatile("msr PMCNTENSET_EL0, %0" : : "r" (0x1));

    printk("Enabled counters.\n");

    return 0;
}

static long unlocked_ioctl(struct file *f , unsigned int cmd, unsigned long arg)
{
    (void)f;
    (void)cmd;
    (void)arg;

    return 0;
}

static void __exit custom_exit(void) {
}

static const struct file_operations my_fops = {
    .unlocked_ioctl = unlocked_ioctl,
    .owner = THIS_MODULE
};

module_init(custom_init);
module_exit(custom_exit);

My simple userspace code I use to thest this:

#include <stdio.h>
#include <inttypes.h>

int main(void){

    uint32_t tic = 0;
    asm volatile("mrs %0, PMCCNTR_EL0":"=r"(tic)); <--- ILLEGAL INSTRUCTION
    asm volatile("nop");
    asm volatile("nop");
    asm volatile("nop");
    uint32_t toc = 0;
    asm volatile("mrs %0, PMCCNTR_EL0":"=r"(toc));

    fprintf(stdout, "%d - %d = %d\n", tic, toc, toc-tic);

    return 0;
}

In case this matters, this is the (outdated) document I used to know how to address the registers: https://developer.arm.com/documentation/ddi0595/2021-12/

As well as the technical reference manual: https://developer.arm.com/documentation/ddi0500/latest/

I went through this page as well which contains a lot of usefull information as, apparently, performance counters are also used by ARM's trusted firmware. But haven't seen anything in there that I may have missed: https://trustedfirmware-a.readthedocs.io/en/latest/perf/performance-monitoring-unit.html

Any input is welcome

7 Comments
2024/04/22
22:56 UTC

4

Develop custom Distros on Yocto

Hi all,

I'm pretty new at image building with Yocto, but I've managed to learn the basics to use poky and different images to create my Linux OS. Last week I stumbled across ST's custom distro (OpenSt Linux or something like that) and I'm now curious. How can one create a custom Linux distro for embedded environments? Or adapt a common distro (such as Ubuntu or Arch) to work in embedded devices?

Edit: I found some good instructions on the great Yocto doc (https://docs.yoctoproject.org/dev-manual/custom-distribution.html), but if any of you have a example or reference project and want to share I'm grateful.

3 Comments
2024/04/21
15:59 UTC

2

Help!!

I am recently working on a hardware hacking project where I am trying to modify the firmware of an embedded device. The problem is when I am trying to find the root file system I found out that the root file system is a cpio archive which is compressed using lzma. when I decompress it,it successfully shows the root file system. If i compress the same fs again it produces a different lzma file which is less in size and it got some bytes different in the start.

File 1 File2

0x3: b'80' 0x3: b'00'

0x4: b'00' 0x4: b'02'

After this from 0x48f to the end of file all bytes are different.

I googled about this and found that they might be using different algorithms but I am not sure what goes on deep with it.

It would be nice if some on could help.

Could dictionary size be an issue?

4 Comments
2024/04/18
14:58 UTC

2

Not really usefull stuff around

Is it just me or is the market not really going on? First as the linux soc came out it was fun to have a pi or something else and play with them. Now we have nvme and other stuff and its not anymore the same because we are always very limited (lanes). I miss the times when you just could buy an old sgi/sun/dec alpha or something else and could do more with these systems.

1 Comment
2024/04/14
11:03 UTC

5

storing the dtb together with uboot in spi flash

I have been tinkering with a rockpro64 and pinebook pro lately and researching more about the boot procedure and the hassle of switching images. Now I was thinking, would it be possible to put your device specific dtb in your spi flash together with u-boot.

This way u-boot will always have the right dtb nearby, with something like uefi boot enabled in u-boot I think this could give a very nice user experience in switching between different images.

Is this possible? Keeping your bootloader and dtb up to date will be a bit finnicky from a package managing perspective I think, but on a general system this doesn't get managed by a package manager either. So maybe that is fine.

I guess overlays are not going to possible either, unless they can be dynamically loaded in from userspace, which I believe I have seen some stuff for. But again, this is very system specific and doesn't fit well in a generic package manager.

8 Comments
2024/04/10
19:09 UTC

3

How can I learn embedded linux without hardware.

So I have been following the book mastering embedded linux and some youtube videos. But just realised that I can't run qemu on virtualbox. So what are my options to learn and get good at embedded linux without any hardware.

10 Comments
2024/04/07
18:04 UTC

10

RTOS in Embedded Linux Applications

Hi,

For an embedded application that requires networking (BLE + Wi-Fi or Ethernet), computer vision (need for two MIPI-CSI interfaces), UI (need for MIPI-DSI interfaces), AI (GPU or even NPU), and also some real-time constraints like LED strip control, motor control, and BLE notifications, what is the industry standard approach? In my view, there are three potential solutions:

  • Use a real-time operating system (RTOS) in embedded Linux applications, such as RT-Linux or Preempt_rt.
  • Utilize SoCs like the NXP IMX8, which already have a Quad-Core Cortex A55 running Linux, paired with a single Cortex-M4 or Cortex-M7 running an RTOS for the real-time constraint features.
  • Develop a custom system with a CPU running Linux and then incorporate an MCU for the real-time constraint features (with the MCU not integrated with the CPU running Linux) where the MCU will communicate with the CPU running Linux using UART or even USB communication.

Just to provide some context, I have designed a simulator of our embedded system using nRF52 SoCs for the iOS and Android teams to develop and test the mobile application which will interact with the embedded device. This allows them to work outside the office (remote) since the embedded product is being developed at the office. The BLE implementation on nRF52 SoCs is working flawlessly. Several BLE characteristics have the "Notify" attribute, and the iOS or Android app simply subscribes to the notification and receives the new values immediately (up to 5 per second, which requires real-time processing for optimal user experience). However, when the product runs on an embedded Linux device, although the BLE GATT Profile implementation is the same, the mobile applications can't receive the new values immediately (sometimes taking 2 to 3 seconds). I strongly believe this issue is due to the Linux operating system on the embedded system. Therefore, I am considering separating the Linux system, which runs the computer vision, AI algorithms, and user interface with MIPI-DSI, from the real-time constraint features like BLE and LED strips to make sure I can use a RTOS for real-time constrain features.

I would like to use RT-Linux or Preempt_rt. Is this used in industrial projects?

13 Comments
2024/04/06
23:48 UTC

4

Book recommendation

I like to learn embedded system c. Any book recommendation? And also i like to do mini projects. So, is there
any websites or book regarding projects?

4 Comments
2024/04/05
11:20 UTC

1

serialWrite() causing a lockup

I'm working on an SDR using the Zynq 7010 chip. I have a small program running but when I enable the function to write the output to a serial port, it runs for 118 cycles and then freezes. I can stop the program and restart it, but it freezes on the first cycle. If I power cycle, it will run for the 118 cycles again.

Assuming Im running out of memory somewhere but cant find where.

2 Comments
2024/04/04
14:24 UTC

8

open source software

I want to get some experience with Yocto and I am trying to do some builds and want to add some open source software to my builds. I will use Apache as a webser but want to add other software. For example something that would be the backend and take inputs from Apache and make some system changes using dbus. I am just trying to play around with these system components and services and link them in different ways but don’t want to have to write anything myself at this point. If you have any idea of cool stuff I can use I’ll appreciate the recommendation. Thanks.

3 Comments
2024/04/03
22:53 UTC

2

Which fundamental data structures needed when we work on Embedded Linux?

I have started an exciting journey to get into the field of Embedded Linux. For two years, I have written embedded software for Microcontrollers in C. But I did not get to work with complex data structures. I understand that a good understanding of some foundation data structure is needed to good at embedded linux? Can someone please tell me which data structures I need to have good hands-on?

9 Comments
2024/04/02
06:06 UTC

3

Apollo Lake GPIO output control with Linux

I'm currently trying to bring up a 20x4 LCD char display embedded in an OEM NAS server, the original nas (Linux based) firmware can drive the LCD through the mainboard GPIO (supermicro A2SAV, apollo lake). I managed to replace the bios to the standard AMIBIOS and install fresh linux on it.

The thing is I couldn't manage to drive the GPIO output, saw this reference which confirm that the GPIO cannot be driven to high as output, but it should be possible as the original firmware doing exactly that. I'm not sure if it's due to the BIOS update (the builtin BIOS is password protected so I had to replace it) or is there anything I should tweak from the kernel's end? I can detect the input fine.

Any ideas or pointers on how to debug this? The original firmware is proprietary despite linux based and I no longer have access to it.

0 Comments
2024/03/31
14:35 UTC

5

What is an affordable dev-kit w/ NAND/NOR memory layout allowing me to learn/tinker w/ UBI/UBIFS as well as JFFS2 in a Yocto setting?

As the question states I’m trying to find a dev platform that meets these requirements.

  • I absolutely 100% do not want anything to do with NXP
  • Must have NOR memory so I can learn about memory layout in NOR and how burn primary/redundant images (e.g. JFFS2 or UBIFS application image, kernel, etc) to. I want tinker more within a uboot environment and just better understand QSPI NOR overall.
  • Must allow me to run a ramdisk filesystem that I can put in NOR. I would also like to be able to boot a rootfs from a sd card too. I’m struggling a bit at the moment understand how to set all this up.
  • Must have NAND memory so I can learn about setting up UBI/UBIFS (wear leveling) and setting up partitions for persistent data management.
  • The dev-kit is affordable and allows capability to work w/ it in a Macbook M3 environment.
  • Kodos if there’s already Yocto BSP support for it. Also Kodos if there’s a some fpga fabric I can play with. Kodos if it’s a microsemi or Xilinx product.

I have looked at a few dev-kits but they are NXP dev-kits and they are above $1000. I’ve had very bad experience with NXP in industry, would like to not have anything to do with them. I’ve got docker working nicely w/ Yocto so I just need a dev kit I can hopefully work w/ on my Macbook (which is a M3, so its arm).

7 Comments
2024/03/30
23:29 UTC

3

Pacakge Needed For A Specific recipe

Hi all , Am new to embedded linux , i am trying to build a customized yocto image on rpi3 , My question is if i want to implement a new feature from where shall i know the packages needed for this specific feature in order to add them in the IMAGE_INSTALL, in other words how shall i know the prerequisites of a specific feature ? For example if i want to add qt and a camera to run them on my customized yocto image , from where shall i know the packages needed in order to get the qt application and the camera running .

2 Comments
2024/03/27
18:57 UTC

5

New

I am new to the linux environment. I need some advice where can i start embedded learning in linux. Which linux family/version is useful for embedded system and programming. Is there any reference like roadmap or list so that i can learn what are the necessary thing I should learn. Please tell ur learning experience and how it usefull for u now.

3 Comments
2024/03/27
16:35 UTC

Back To Top