No video

Introduction to Embedded Linux Part 3 - Flash SD Card and Boot Process | Digi-Key Electronics

  Рет қаралды 63,018

DigiKey

DigiKey

Күн бұрын

Linux is a powerful operating system that can be compiled for a number of platforms and architectures. One of the biggest draws is its ability to be customized for an application. Tools like Buildroot, OpenWRT, and Yocto Project help us create custom Linux distributions for embedded systems.
In this video series, we will explore Buildroot and the Yocto Project. We also demonstrate how you might develop applications for embedded Linux. We will not dive into the specifics of how each of these systems work but give you a good starting place so you can read or watch more advanced material about working with embedded Linux.
See this written tutorial if you would like to review the commands issued in this tutorial for the Yocto Project: www.digikey.co...
In the previous episode ( • Introduction to Embedd... ), we generated a custom Linux image using the Yocto Project for the STM32MP157D-DK1.
In this episode, we look at how a boot chain works in order to begin running the Linux kernel. We then examine the output of the Yocto Project build process to find which image files are required to create a successful boot chain. For this project, we will use the TF-A trusted boot from Arm as the first stage bootloader, and we will use U-Boot as the second stage bootloader.
The hardcoded ROM bootloader first executes the first stage bootloader (FSBL), which configures the clocks, DDR memory, and loads the second stage bootloader (SSBL). The second stage bootloader configures any necessary peripherals (e.g. networking, USB, display drivers) and begins execution of the kernel. The kernel mounts the root filesystem (rootfs) and executes the processes required to run Linux.
You can read more about ST’s boot chain process in this presentation: www.st.com/con...
We format an SD card with the necessary partitions and flash the image files to those partitions. We then plug the SD card into our STM32MP157D-DK1 and boot into Linux.
The ST tool for flashing SD cards (or other memory) with OS images is the STM32CubeProgrammer, which you can read about here: wiki.st.com/st...
Product Links:
www.digikey.co...
Related Videos:
• STM32MP1 workshop - 1 ...
Related Project Links:
www.digikey.co...
Related Articles:
forum.digikey....
Learn more:
Maker.io - www.digikey.co...
Digi-Key’s Blog - TheCircuit www.digikey.co...
Connect with Digi-Key on Facebook / digikey.electronics
And follow us on Twitter / digikey

Пікірлер: 40
@reptilicusrex4748
@reptilicusrex4748 2 жыл бұрын
This series of videos is very informative and explained extremely well. Especially this one, in which you took the time to create the partitions and filesystems manually for instructional purposes. Thanks for the effort.
@tljstewart
@tljstewart 2 жыл бұрын
Great videos! It’s difficult to find good content on these subjects.
@Telemanblues
@Telemanblues Жыл бұрын
Using the STM partition script worked like a charm. First pass of manual partitioning did not work for me for some reason. Awesome series. Thanks for all of you efforts.
@vonmakeheat
@vonmakeheat 2 жыл бұрын
Ok . I swore off low level coding tutorials for a while u sir got me excited to try this stuff again . I mean the explanation of mounting the rootfs after the cook init layer is literally 🔥
@nandospm
@nandospm 2 жыл бұрын
Great tutorial. I tried some different packages and images after last episode and used the FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv file as an argument to the STM32_Programmer_CLI. I am going to try this process next
@hamedzaheri7050
@hamedzaheri7050 2 жыл бұрын
Greate series. Thanks
@joshhaughton4547
@joshhaughton4547 2 жыл бұрын
Awesome video! Thanks so much for making this. You do a great job of explaining everything!
@byteslee1729
@byteslee1729 2 жыл бұрын
Free knowledge. Wow! I wish all universities taught students like that 😁🤣😂
@zzws524
@zzws524 2 жыл бұрын
Really appreciate your effort. Very clear...
@amrrasslan4329
@amrrasslan4329 2 жыл бұрын
thx for sharing i hope we see more advanced topics like these hats off to you sir
@anime-id9716
@anime-id9716 6 ай бұрын
Instant subscribe You teach me how to using dd and how to make partition via cli which very clear explanation
@sagarshubham8660
@sagarshubham8660 2 жыл бұрын
Hey Shawn and Digikey! Thanks for another great video. Did you get to try genimage for an sdcard image creation? That's how build root does it, for most hardware it has this option anyway, and you can use it with your Yocto build too :) Hope this helps.
@ShawnHymel
@ShawnHymel 2 жыл бұрын
I didn't know about genimage, thanks for the tip!
@adoormanusoman
@adoormanusoman 2 жыл бұрын
Hi, please add tutorial on how to add packages to custom Linux using yocto
@subhamdas2491
@subhamdas2491 2 жыл бұрын
Can we make iot project with this ...like getting digital, analog sensor value & process them in the cloud
@Hacker-at-Large
@Hacker-at-Large 2 жыл бұрын
Couldn’t you hear me screaming about expanding rootfs on the development system?
@ShawnHymel
@ShawnHymel 2 жыл бұрын
Don't worry...that's something I tackle in the next episode ;)
@Shamino0
@Shamino0 Жыл бұрын
@@ShawnHymel But you don't really want to hard-code any size for that file system. You always want it to fill all remaining space. My recommendation is to set the file system size to the minimum needed for a running system, and then expand that file system to fill its partition after writing it to the SD card. If you do it from the host, there are many tools. I like the graphical "gparted". Or you could use the "resize2fs" command. Or you could do it on the STM device, if your minimal installation has "resize2fs". It might, because that command is typically part of other low-level ext utilities like fsck, which really need to exist for a functioning system. One approach might be to add a script (maybe via systemd) that runs only on the first boot, which resizes the file system to fill the partition. Then (if you want to be really slick), the script can disable itself, so it won't try to run the next time you boot.
@alexscarbro796
@alexscarbro796 2 жыл бұрын
I guess the “Disco” layer is more likely to generate an SD card image since it’s targeted at a specific dev board, whereas this build was for a generic MP1 application?
@illie8066
@illie8066 9 ай бұрын
This is a very good series, simple and clear. however, I had a problem booting up the discovery kit and got 2 lines that stopped the boot sequence: [ 33.762475] vref: disabling [ 33.765065] vdda: disabling The whole process wad good, but after connecting the SD-card and starting the board, I got that.
@dnyaneshvarsalve
@dnyaneshvarsalve 9 ай бұрын
@illie8066 I got the same problem, have you found the solution?
@dnyaneshvarsalve2984
@dnyaneshvarsalve2984 9 ай бұрын
Hi, my problem is solved, edit the file to find rootfs with /dev/mmcblk0p5 instead of /dev/sdc5 (/dev/sdc5 in my case)
@illie8066
@illie8066 8 ай бұрын
Sorry for the late response, I had to put it on hold, So, thank you, @dnyaneshvarsalve2984, it worked for me too!! In my case, the location is: /media/illi/bootfs/mmc0_extlinux/extlinux.conf Naturally, I changed to: APPEND root=/dev/sdb5....... because in my case the partitions are sdb1..5. changed to mmcblk0p5 and it worked and I succeeded in logging the system. Thank you!!
@ugurcanusta7005
@ugurcanusta7005 2 жыл бұрын
Thanks for this video serie, you are being very helpful. Could you do some Qt applications by using this board, it would be great!!!
@joanelietheiligerruiz3144
@joanelietheiligerruiz3144 2 жыл бұрын
El Mejor!!!
@Mr_Gaurav
@Mr_Gaurav 2 жыл бұрын
hi i have a microchip sama5d3 xplaned board. I followed the same steps but I am unable to boot through SD card. I have spent two days in trouble shooting but didn't get any luck. can you please help?
@AndersJackson
@AndersJackson 2 жыл бұрын
There are a command, which I don't remember the name of, that expands ext3 and ext4 file systems. It is easy to run that, especially from Raspberry Pi or any other Linux system. "man -k ext4" should give you some clues where to find it.
@Shamino0
@Shamino0 Жыл бұрын
You're probably thinking of the "resize2fs" command. When run without any parameters other than the device, it will resize the file system to match the partition size. On Debian and related systems, it is part of the "e2fsprogs" package. This is the package that includes pretty low-level ext file utilities like fsck (e2fsck), so I would expect it to be in this minimal Linux build. But maybe the build is extremely minimal and therefore omitted this tool. Of course, it only needs to be on the device if you want to resize the file system from the STM32. You could also do that from the host PC after writing the file system to the SD card.
@nilutpolkashyap
@nilutpolkashyap 2 жыл бұрын
Can the same tutorial be tried with a Raspberry Pi?
@ShawnHymel
@ShawnHymel 2 жыл бұрын
Do you mean using the Raspberry Pi as the host machine or creating an image for the Raspberry Pi? If using as the host machine, then it should work, but it will take much longer (as the Pi is slower than most modern PCs). If you mean creating an image for the Pi, then that's also possible. I recommend checking out this tutorial: jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html
@nilutpolkashyap
@nilutpolkashyap 2 жыл бұрын
@@ShawnHymel Thanks a lot. I meant creating an image for the Raspberry Pi. I will surely try it out.
@dnyaneshvarsalve
@dnyaneshvarsalve 9 ай бұрын
after vref disabling and vdda disabling lines printed on terminal, I can't see any login prompt. any idea ?
@antoniofuentes1551
@antoniofuentes1551 5 ай бұрын
just have the same issue
@fayask9904
@fayask9904 Жыл бұрын
Raspberry Pi/beagle bone black /STM32MP157F-DK2 which one is better ??
@batkonashbandera5165
@batkonashbandera5165 Жыл бұрын
it depends what you need it for. if you need microcontroler for robotics or adc for sensors. BBB is better. If you just need server with some io, raspberry pi will do just fine. Don't do DK2, its crap.
@user-ww2lc1yo9c
@user-ww2lc1yo9c Жыл бұрын
Can Cygwin be used to do all this stuff?
@user-ww2lc1yo9c
@user-ww2lc1yo9c Жыл бұрын
A course like this could easily cost thousands of £
@andrsam3682
@andrsam3682 2 жыл бұрын
чертов гений
@markmanning2921
@markmanning2921 7 ай бұрын
not "in root file system", this is horrendously bad English: Correction: "in ***THE*** root file system" yes it matters.
Embedded Linux Booting Process (Multi-Stage Bootloaders, Kernel, Filesystem)
33:13
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 80 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 39 МЛН
Meet the one boy from the Ronaldo edit in India
00:30
Younes Zarou
Рет қаралды 15 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 13 МЛН
U-Boot Bootloader Firmware Extraction Tools
19:20
Matt Brown
Рет қаралды 8 М.
How Does Linux Boot Process Work?
4:44
ByteByteGo
Рет қаралды 611 М.
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 567 М.
Device Tree: hardware description for everybody !
43:17
Bootlin
Рет қаралды 87 М.
The Linux File System in 4  Minutes | A MUST Learn
3:51
Travis Media
Рет қаралды 33 М.
Rock 3C: Maker-priced SBC
19:40
ExplainingComputers
Рет қаралды 87 М.
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 80 МЛН