/* Route-Critical (index, V6 §3.6.3 — erzeugt von tools/generate_critical_css.mjs) */ .collapse:not(.show){display:none}.navbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar>.container-fluid{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.mydraft-svg-icon{display:inline-block;vertical-align:middle;color:currentcolor;flex-shrink:0;transition:color var(--duration-fast, 150ms) ease,stroke var(--duration-fast, 150ms) ease,fill var(--duration-fast, 150ms) ease}.mydraft-svg-icon circle,.mydraft-svg-icon line,.mydraft-svg-icon path,.mydraft-svg-icon polygon,.mydraft-svg-icon polyline,.mydraft-svg-icon rect{transition:stroke var(--duration-fast, 150ms) ease,fill var(--duration-fast, 150ms) ease}@layer components{.live-pulse-dot{width:8px;height:8px}}.min-w-0{min-width:0}@layer overrides{.live-radar-header-badge{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.35);color:#fca5a5;font-size:.75rem;font-weight:700;transition:.25s;cursor:pointer}}@layer overrides{.live-pulse-dot{width:8px;height:8px;background-color:var(--threat-critical,#ef4444);border-radius:50%;display:inline-block;box-shadow:rgba(239,68,68,.7) 0 0 0 0}}@layer overrides{body.light .live-radar-header-badge,html[data-bs-theme=light] .live-radar-header-badge{background:#fbd9dd;border-color:#eeb2b8;color:#8a1723!important}}.isharestuff-live-ticker{color:var(--color-text-body,#f8fafc);backdrop-filter:none;flex-wrap:wrap;row-gap:.3rem;background:var(--color-surface,rgba(15,23,42,.85))!important;border:1px solid var(--color-border,rgba(255,255,255,.12))!important;padding:.45rem .5rem!important;margin-bottom:.75rem!important}.ticker-content{mask-image:linear-gradient(to right,transparent 0px,rgb(0,0,0) 14px,rgb(0,0,0) calc(100% - 14px),transparent 100%);touch-action:pan-y;cursor:grab;user-select:none;-webkit-tap-highlight-color:transparent;order:1;width:100%;max-width:100%;flex:0 0 100%!important}.isharestuff-live-ticker .ticker-lead-group{order:2;width:100%;justify-content:space-between;margin-right:0!important}.ticker-track{display:flex;align-items:center;white-space:nowrap;will-change:transform;transform:translate3d(0,0,0);--ticker-speed:1;animation-name:isharestuffTicker;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:calc(26s / var(--ticker-speed, 1))}.ticker-link{max-width:min(78vw,340px);font-size:.82rem;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:baseline;transition:color .2s;color:var(--color-text-heading,#f8fafc)!important}.isharestuff-live-ticker .ticker-ctrl-btn{min-width:44px;height:44px;font-size:.78rem;-webkit-tap-highlight-color:transparent}.ticker-controls-bar{gap:.4rem}.ticker-counter{font-family:var(--bs-font-monospace, ui-monospace, monospace);font-size:.72rem;line-height:1;color:var(--color-text-secondary,#94a3b8);min-width:3.4em;text-align:center;user-select:none;white-space:nowrap;margin-left:auto}.ticker-item{font-size:.82rem}.ticker-item .ticker-date{font-size:.72rem;vertical-align:baseline}.ticker-text-group{display:inline-flex;align-items:baseline}.ticker-badge-live-btn{border:0;cursor:pointer;text-decoration:none!important}.ticker-badge{font-size:.78rem!important;min-height:44px!important;min-width:44px!important;padding:6px 12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-toggler{display:none}}@media (prefers-reduced-motion:reduce){@layer overrides{#news-popup,#news-toast-banner,.animate-pulse,.live-pulse-dot,.live-pulsing-dot,.news-item-card{animation:none;transition:none}}.ticker-track{animation:none!important}.ticker-content{cursor:default}}@media (min-width:768px){.isharestuff-live-ticker{flex-wrap:nowrap;row-gap:0;backdrop-filter:blur(12px);padding:.5rem!important;margin-bottom:1rem!important}.isharestuff-live-ticker .ticker-content{order:0;width:auto;max-width:none;flex:1 1 auto!important}.isharestuff-live-ticker .ticker-lead-group{order:0;width:auto;justify-content:flex-start;margin-right:1rem!important}.ticker-controls-bar{gap:.3rem}.isharestuff-live-ticker .ticker-ctrl-btn{min-width:30px;height:auto;font-size:inherit}.ticker-counter{font-size:.66rem;margin-left:0}.ticker-track{animation-duration:calc(40s / var(--ticker-speed, 1))}.ticker-link{max-width:340px;font-size:.85rem}.ticker-item{font-size:.85rem}.ticker-badge{font-size:inherit!important;min-height:0!important;min-width:0!important;padding:.5rem 1rem!important}}@media (max-width:359.98px){.ticker-counter{display:none}.ticker-controls-bar{gap:.3rem}.ticker-badge{padding:6px 9px!important}} 🔒 Embedded Linux Development - Part 4 | Sichere Programmierung – TSECURITY.DE Zum Hauptinhalt springen
YouTube Security VideosAndroid Police: The interesting company that could replace OnePlus.(18.10.2026 um 19:30 Uhr)
•
YouTube Security VideosNeil Patel: Your Competitor Stole Your Next Article(18.10.2026 um 20:04 Uhr)
•
YouTube Security VideosGoogle: Who could it be? 🧐(18.10.2026 um 17:59 Uhr)
••••
Linux Tipps & HardeningDSA-6570-1 haproxy - security update(18.10.2026 um 02:00 Uhr)
•
Linux Tipps & HardeningDSA-6567-2 cifs-utils - regression update(18.10.2026 um 02:00 Uhr)
•••
YouTube Security VideosAndroid Police: The interesting company that could replace OnePlus.(18.10.2026 um 19:30 Uhr)
•
YouTube Security VideosNeil Patel: Your Competitor Stole Your Next Article(18.10.2026 um 20:04 Uhr)
•
YouTube Security VideosGoogle: Who could it be? 🧐(18.10.2026 um 17:59 Uhr)
••••
Linux Tipps & HardeningDSA-6570-1 haproxy - security update(18.10.2026 um 02:00 Uhr)
•
Linux Tipps & HardeningDSA-6567-2 cifs-utils - regression update(18.10.2026 um 02:00 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

Embedded Linux Development - Part 4

In this tutorial, I will go with the fourth stage of embedded Linux development which is the rootfs. Every Linux-based system have a filesystem. If you are on…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

In this tutorial, I will go with the fourth stage of embedded Linux development which is the rootfs.



Every Linux-based system have a filesystem. If you are on GNU/Linux, you already probably know it and how it structured.



Apart from that embedded Linux needs a few special applications to start up the system. The init is the first program that runs on user-space so that its process ID always is 1. This init program is responsible for start the other user-space applications and services like shell. It generally resides at /sbin/init, /etc/init, /bin/init or so on. The kernel try to find it and then run.



The organization of a Linux rootfs in terms of directories is well-defined by the Filesystem Hierarchy Standard. The general hierarchy:




  • /bin: Basic programs


  • /boot: Kernel images, configurations and booting tools


  • /dev: Device files


  • /etc: System-wide configuration


  • /home: Directory for the users home utilities


  • /lib: Basic libraries


  • /media: Mount points for removable media


  • /mnt: Mount point for a temporarily mounted filesystem


  • /proc: Mount point for the proc virtual filesystem


  • /root: How directory of the root user


  • /run: Run-time variable data


  • /sbin: Basic system programs


  • /sys: Mount point of the sysfs virtual filesystem


  • /tmp: Temporary files


  • /usr: User-specific utilities


  • /var: Variable data files, for system services




So in summary, I need to create a Linux rootfs and then put the required applications in there. I also want to build a development environment. For example, I want to run python 3 scripts, compiling C/C++ programs, or so on. But how?



There are three options here:




  • Building everything from scratch


  • A minimal BusyBox rootfs


  • A Debian rootfs with debootstap




Which option is for me?



Building everything from scratch means that creating the directories and then fetch the every program, package, library by hand. It means the hell of package dependency! It's not for me.



A minimal rootfs can be created with BusyBox easily. It can create the classic Linux directories and put the core utilities in there like cp, mkdir, ls or so on. If you're making embedded Linux system first time and just focusing on a "running" system, BusyBox is for you. But I need more. I wanna create a development environment!



The right tool is debootstrap program. It creates a base Debian rootfs including the utilities that we're using everyday like apt, systemctl, vi, or so on. This Debian rootfs is around ~200MB, while BusyBox rootfs is ~1MB.



By the way, if you want to go with BusyBox rootfs (while I'm not), below is the required commands:




$ git clone https://git.busybox.net/busybox
$ cd busybox
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc)
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig # optional
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_PREFIX=path/to/linux/rootfs install






Let's focus on debootstrap. Firstly download it.




$ sudo apt install qemu-user-static debootstrap






In here, I also installed qemu-user-static which lets me to run the ARM binaries onto x86_64.



Let's create the base Debian rootfs:




$ sudo debootstrap --arch=armhf --foreign bookworm path/to/linux/rootfs http://deb.debian.org/debian
$ sudo chroot path/to/linux/rootfs /debootstrap/debootstrap --second-stage






In here, bookworm is the nickname of Debian 12 which is the last stable version.



These two commands download the rootfs and then unpack it. So it takes some time (~30 minutes in my case). Don't forget, these just fetch the required and important packages from the Debian database, not fully OS.



The rootfs is ready to be used. But there are some tricks that you always must do:




$ sudo cp /usr/bin/qemu-arm-static <path/to/linux/rootfs>/usr/bin/






I also want to install the additional packages and make some settings. For example, you always must set the password. That means I need to run this rootfs on my Ubuntu host:




$ sudo chroot path/to/linux/rootfs






First thing you must is to update the password:




root@can:/# passwd
New password:
Retype new password:
passwd: password updated successfully






Install the additional packages if you want:




root@can:/# apt install gcc python3 vim openssh-server # and what you need






In here, make sure that you install the openssh-server. It's required for ssh command.



Lastly, I need to install the kernel modules in this rootfs. Go back to the kernel source and run:




$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=path/to/linux/rootfs modules_install






That's it. I created the proper Debian rootfs that I can make software development. In the next tutorial, I will use the all artifacts coming from u-boot, the kernel and the rootfs to make SD card image.



Resources:



Simmonds C., Mastering Embedded Linux Programming, Packt Publishing, 2015

Embedded Linux system development training, Bootlin, 2024

🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

ATT&CK-Navigator · IoC-Radar · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Intelligence Digest — free The top security news daily · unsubscribe anytime
Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
No reader ratings yet
Was this page helpful?
0
Jetzt Bewertung abgeben
🟢 Niedrig (1-3.9) 🟡 Mittel (4.0-6.9) 🔴 Hoch (7.0-8.9) Kritisch (9.0-10.0)

Related story clusters & sources (vector AI)

2 sources
OnlyFans Creators Are Pissed That Meta Lets Muse Talk Dirty
1 more source
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten Embedded Linux Development - Part 4

Thematisch verwandte Begriffe: Embedded, Linux, Development, Part · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Nächster Beitrag