GNU/Linux & Ethernet: How layer models work
5:05
GNU/Linux & Ethernet: Introduction
8:24
Using 1-Wire in Linux
8:08
4 ай бұрын
Linux Driver Workshop 2024
1:03:06
5 ай бұрын
Пікірлер
@duanle4049
@duanle4049 2 сағат бұрын
Thanks Johannes, keep growing up. I hope in the future you can make tutorial related to Virtualization/Hypervisor like KVM, XEN, Jailhouse....
@s4degh
@s4degh 5 сағат бұрын
I really appreciate your videos. Thank you for producing such informative content.
@logananthece9337
@logananthece9337 Күн бұрын
Hi, The BAR's are mapped to some 32-bit address right, Are there any possibilities to use/access those addresses? How?
@llmnr3xp0sed
@llmnr3xp0sed Күн бұрын
This is the KZbin channel that I've been looking for!!
@stendall
@stendall Күн бұрын
Hi Johannes, I keep getting operation not permitted when I try to load the dev_nr module. I am using sudo, and I tried as root. Still not permitted. The Major number is definitely not in use before I attempt insmod, but it does show up in /proc/devices after I attempt insmod even though insmod fails. I tried downgrading my version of raspian to buster which uses a kernel version nearer to the one you use, but get the same issue. edit0: if I pass 0 to register_chrdev as the major, it works, and dmesg tells me it chose major 0 and minor 237, but /proc/devices looks like it is saying 237 is the major. If I reboot, and check 237 and my_dev_nr not longer visible in /proc/devices, and try setting MYMAJOR to 237, then it still fails with operation not permitted. edit: I have no such problem with the hello world insmod edit2: I also posted to reddit (more detailed look here): www.reddit.com/r/linuxquestions/comments/1fdpuwn/requesting_help_with_a_baffling_kvm_chrdev/
@user-bo2mf6gm3p
@user-bo2mf6gm3p 5 күн бұрын
I don't quite understand. Are there 2 types of DMA controllers? One inside PCI device (if device provides it) and another in CPU itself? And can I use any of them to copy data PCI <--> RAM or I have to rely on PCI device (to implement DMA inside) only?
@johannes4gnu_linux96
@johannes4gnu_linux96 Күн бұрын
Yes, that's true. The Processor normally comes with DMA controllers and PCI devices also can have DMA controllers built into them. This video shows you how to use the DMA controller of my emulated PCI device. I already made a video showing you how to use a DMA controller on an ARM based system. kzbin.info/www/bejne/oZ2clGl6p6mhftE Sadly I could find a good example for x86 yet.
@ImSubodhPandey
@ImSubodhPandey 6 күн бұрын
Can you please let me know to get workshop discussion details?
@johannes4gnu_linux96
@johannes4gnu_linux96 Күн бұрын
You can find details to the workshops here: chemnitzer.linux-tage.de/2024/de/programm/beitrag/108 In Prague and Kiel I will basically give this workshop again.
@TrashmanMoon
@TrashmanMoon 7 күн бұрын
Thanks! have a nice day!
@spideyboy9588
@spideyboy9588 9 күн бұрын
whenever i try to do echo > 1 /dev/my_gpio_driver it doesnt change the value to 1 also there is an error shown in the kernel log as invalid input. can u help me with this?
@techlobo2409
@techlobo2409 9 күн бұрын
Only just been watching this - useful pointer on how to get the cp2112 board LED to switch on / off as a way of verifying operation. Just a point of interest: you can use i2cdetect -r -y 'bus-number' to get a listing of addresses via the cp2112 adapter.
@guderian557
@guderian557 11 күн бұрын
How feasible would it be to port an existing Linux driver that you have the source code for to an older windows version? More specifically, Windows 98? The reason I ask is that I am kind of into retro computers and retro gaming and some of the old graphics cards that work in windows 98 are becoming increasingly rare and pricey. So having a driver even for a low end modern graphics card for win 98 would be extremely helpful.
@fghoussen
@fghoussen 11 күн бұрын
Using this approach, is it possible to pass data from kernel to user space? Replacing the button by a temperature sensor, I get the temperature as an int allocated in kernel space memory: is it possible to pass this int (or a copy of it) to a user space application and covert it into an int allocated in user space memory?
@adult11252
@adult11252 11 күн бұрын
I just found that pwm_request and pwm_free is deprecated and it's not found in Kernel v.6.6. May I ask for a tutorial? I try to find tutorial but nothing comes to mind.
@T44enterprismalFORTE
@T44enterprismalFORTE 12 күн бұрын
CK h tee cyoyp rhoczieiel niler
@nerdycatgamer
@nerdycatgamer 15 күн бұрын
thoughts on plan9 arg macros? ARGBEGIN ARGEND etc
@SimonTheNoob
@SimonTheNoob 18 күн бұрын
A gem in my suggestion list... LOVE IT!
@JacksonEdward-h5i
@JacksonEdward-h5i 18 күн бұрын
Lopez Kenneth Lewis Amy Robinson Karen
@rohanjoshi8785
@rohanjoshi8785 19 күн бұрын
Haha what are the odds that I started learning Ethernet and you dropped a series on this.. excellent. Keep going. A suggestion would be to improve audio quality as I can hear little even on full volume. Or maybe adjustments to mic gain levels would help Thanks
@johannes4gnu_linux96
@johannes4gnu_linux96 15 күн бұрын
Thanks for the hint. I will try to improve the audio next time.
@supra1712
@supra1712 19 күн бұрын
This is going to be a great tutorial series. Thanks!
@jholloway77
@jholloway77 19 күн бұрын
I love this channel. There, i said it! You provide wonderful introduction to Linux development for new developers that his the perfect mark between beginner friendly yet still in depth
@perceptron9834
@perceptron9834 19 күн бұрын
Which speeds do you plan to support?
@johannes4gnu_linux96
@johannes4gnu_linux96 15 күн бұрын
For twisted pair I want to Cover 10Base and 100Base-TX. The W7500 can't use Gbit Ethernet.
@perceptron9834
@perceptron9834 20 күн бұрын
Good idea 💡
@thoup
@thoup 20 күн бұрын
Very cool stuff, especially looking forward to the project based stuff. I am trying to learn more about linux internals through projects as well, and so far I have created a basic linux kernel module on my own (a magic 8ball) but im trying to figure out some more advanced projects to work on to build my knowledge further. Any reccomendations?
@focuseletronica
@focuseletronica 21 күн бұрын
será magnífico esta jornada... Grato por compartilhar conhecimento!
@lazarocamargo
@lazarocamargo 21 күн бұрын
Excelente tutorial, thanks a lot!!!!
@benjaminpotter4801
@benjaminpotter4801 21 күн бұрын
i love how relatable this video is! thank you for not pretending everything went smoothly, and being human. keep up the good work :)
@adhilwazeer7115
@adhilwazeer7115 22 күн бұрын
Good video!! Can i know how did you increased the font size on the console? would be a great tip thanks
@johannes4gnu_linux96
@johannes4gnu_linux96 21 күн бұрын
Thank you. Pressing Ctrl and Plus should do the trick ;)
@cutiepie0608
@cutiepie0608 22 күн бұрын
Hi , can u share the pins on which you connected the Seven segments on AT32U4 pro micro
@johannes4gnu_linux96
@johannes4gnu_linux96 21 күн бұрын
You can find the pinout here in the main functions: github.com/Johannes4Linux/USB_Tutorial/blob/main/00_microcontroller_firmware/01_ctrl_transfers/main.c
@cutiepie0608
@cutiepie0608 Күн бұрын
@@johannes4gnu_linux96 i am facing this error while reading control transfer driver.head: error reading '/proc/my_usb_dev': Operation not permitted
@creataKulkarni
@creataKulkarni 22 күн бұрын
Hello Johannes, facing a small issue. It says "Could not insert the module, operation not permitted" and in the kernel logs it says , read_write - Device number Major: 236, Minor: 0 was registered! Can not allocate GPIO 4. Edit: Imaged a Legacy OS, with old kernel version and the problem is resolved
@johannes4gnu_linux96
@johannes4gnu_linux96 21 күн бұрын
Hi, maybe you have to use an offset for the GPIO pin. Execute "ls /dev/gpiochip*" in a terminal. This will give you the offset. Let's say you get /dev/gpiochip501 as the output. Then add the offset 501 to the 4, so here 505 would be the offset should use.
@creataKulkarni
@creataKulkarni 21 күн бұрын
@@johannes4gnu_linux96 Thank you for your response, I will try that out!
@VasonMaitree
@VasonMaitree 12 күн бұрын
@@johannes4gnu_linux96 Hello, Johannes. I am also facing the same issue too, and after I executed "ls /dev/gpiochip*", it's show /dev/gpiochip0, /dev/gpiochip1 and /dev/gpiochip2. Which offset I need to use? FYI, I use RPi3B with RPiOS Latest one.
@VasonMaitree
@VasonMaitree 12 күн бұрын
@johannes4gnu_linux96 @creataKulkarni I already solved it! I must use number and label that can be seen in /sys/kernel/debug/gpio. Use cat /sys/kernel/debug/gpio to check number and label. I hope it's help.
@benjaminpotter4801
@benjaminpotter4801 23 күн бұрын
cool video! i cant help but notice you have a tab width of 8 spaces… wth.
@johannes4gnu_linux96
@johannes4gnu_linux96 23 күн бұрын
Thank you. Yes, 8 Spaces per Tab is the recommendation of the Linux Kernel Coding style guidelines and I try to follow them ;)
@jacktheripper2109
@jacktheripper2109 29 күн бұрын
hi, can you provide example of sending control transfer with data phase?
@johannes4gnu_linux96
@johannes4gnu_linux96 23 күн бұрын
Here you go: kzbin.info/www/bejne/oYuxd56fiqZreaM
@tzgardner
@tzgardner 29 күн бұрын
9:16 What exactly are you pointing to when you have the following path -C /lib/modules/$(shell uname -r)/build? I'm getting a "no such file or directory"
@johannes4gnu_linux96
@johannes4gnu_linux96 23 күн бұрын
It resovles to something similar like this: /lib/modules/6.10.5-arch1-1/build If you are missing the build folder, you have to install the linux kernel headders, e.g. with "sudo apt install raspberrypi-linux-headers" on a raspberry pi.
@perceptron9834
@perceptron9834 Ай бұрын
register_chardev() is pretty old way (for kernel version < 2.6 ) to register the device. This methode registers minor numbers 0-255 and sets up a default cdev for each.
@jakesanchez3552
@jakesanchez3552 Ай бұрын
Thank you, this was very helpful.
@aowowow-no1xe
@aowowow-no1xe Ай бұрын
Hey, will I need any other hardware besides a raspberry PI to follow this series?
@johannes4gnu_linux96
@johannes4gnu_linux96 23 күн бұрын
Yes, a breadboard, LEDs, some Resistors, buttons, some jumper wires and an Atmega microcontroller or RPi Pico (in the future) can be used to follow along.
@sohampurkait-j4q
@sohampurkait-j4q Ай бұрын
Great Content ! I am just wondering why you are using ioread8() instead of inb() as it seems to be a port mapped I/O.
@johannes4gnu_linux96
@johannes4gnu_linux96 23 күн бұрын
Thank you. Yes, you are right, the inb function would be more appropriate here as we are accessing I/O ports. But ioread8 also seems to work.
@rogo7330
@rogo7330 Ай бұрын
One important feature of POSIX getopt is that when you pass to it argument '--' it will stop parsing arguments and set optind into next index after '--'. Also option arguments can be written in the same argument as the option expecting it, thus [ "-f" "file.txt" ] and [ "-ffile.txt" ] are the same. This can be exploited to introduce "long" options like "--help" or "--whatever-you-want=yes". We just need to specify '-' as option flag in getopt and specify that it expects an option argument. Since argument '--' alone will always be parsed first we still have the option to explicitly stop parsing arguments, but '--help' for example will be parsed as option '-' with optarg "help". Bingo, we have now long options! One caveat is that we can't specify "-:" at the begining of optstring since it can be interpreted by GNU versions as something else. Because of that you can put '?' as first character in optstring since it is not a valid option flag anyway and you should not try to use it because in the shell it will try glob files that look like '-a', '-A', '--', and so on.
@thoup
@thoup Ай бұрын
When I try the command "./qemu-arm ../../busybox-1.36.1/busybox" I get the error: "qemu-arm: /home/thoup/kernel_hacking/busybox-1.36.1/busybox: Unable to find a guest_base to satisfy all guest address mapping requirements 00000000-ffffffff" I am running on an aarch64 linux system!
@thoup
@thoup Ай бұрын
Also, why do you emulate 32 bit instead of 64 bit?
@starpawsy
@starpawsy Ай бұрын
Not as good as the old AT&T System V standard. Sadly, even Unix has become bloatware.
@ShubhamPatil-v8u
@ShubhamPatil-v8u Ай бұрын
Hey, Thanks brother for making its easier for us to understand this pcie driver
@anon_y_mousse
@anon_y_mousse Ай бұрын
More people should use this instead of trying to come up with their own custom solutions.
@ShreyaMandal-f7b
@ShreyaMandal-f7b Ай бұрын
Thanks Johannes for the wonderful explanation. Here why are you not using mmap() ? Is mmap() not possible here or you are trying out a different method ? Are these address space different from memory address space ?
@johannes4gnu_linux96
@johannes4gnu_linux96 Ай бұрын
@@ShreyaMandal-f7b you are welcome ;) you can only memory map memory but Not io Ports. Thats why I am using the io functions here. But modern devices don't use Classic io Ports any longer. Instead they are using memory mapped io (mmio) which can bei accessed with mmap.
@yonatanelizarov6747
@yonatanelizarov6747 Ай бұрын
HI! Can i replace the led in dc motor and control its speed?
@kevenv2010
@kevenv2010 Ай бұрын
Nice and to the point! I really appreciate your videos on demystifying Linux dev, thanks and keep up the good work!
@theuser1240
@theuser1240 Ай бұрын
you forgot to put the variable of %s for the first printf but how did it print the app name in default case?
@johannes4gnu_linux96
@johannes4gnu_linux96 Ай бұрын
Yes thats an error, thanks for the correction. I don't know why it is working. GCC Magic or maybe the Pointer to the argv[0] String is lucky or randomly stored in the Register which is also used by printf for the First Argument.
@killermonkey1392
@killermonkey1392 Ай бұрын
Likely the latter, you may notice that in the first instance where -n is passed without an argument, the program name is actually shown as "./greeter: optio", which is the first 16 bytes of the getopt error message (isn't C fun?)
@creataKulkarni
@creataKulkarni Ай бұрын
Finally started with driver development, thanks Johannes, you make concepts easily understandable!
@ShreyaMandal-f7b
@ShreyaMandal-f7b Ай бұрын
1st off all Thank You for this Informative video series. Please explain why calculation of the offset is required @11:27 ? In Kernel module also is it required ?
@johannes4gnu_linux96
@johannes4gnu_linux96 Ай бұрын
You are welcome. The Offset is needed because of mmap. Mmap returns a page align Pointer. In case the BAR is smaller then the pagesize (4kByte) it is possible the BAR doesn't start at the start of the page and you have to add an Offset. If they BAR is bigger then a page, you don't need an Offset. Hope this helps ;)
@sahhaf1234
@sahhaf1234 Ай бұрын
Excellent, as usual.... One objection: AT the figure @3:10, CPU is drawn as the head of the PCI tree. AFAIK this is not correct, as the cpu does not have PCI pins. Cpu connects to MCH, and IOCH, and these have PCI pins..
@johannes4gnu_linux96
@johannes4gnu_linux96 Ай бұрын
Thank you. Yes you are right here, my mistake.
@TrackballClick
@TrackballClick Ай бұрын
The keyboard resembles me of a chopper rumbling in the background.
@ShreyaMandal-f7b
@ShreyaMandal-f7b Ай бұрын
How you are accessing 7 segment display with only 5 output pin ?
@johannes4gnu_linux96
@johannes4gnu_linux96 Ай бұрын
Check out my other answer. I made a mistake here, the 7 segment display is connected to the 8 Data pins of the serial port which can be controlled by Byte 0.