Thanks Johannes, keep growing up. I hope in the future you can make tutorial related to Virtualization/Hypervisor like KVM, XEN, Jailhouse....
@s4degh5 сағат бұрын
I really appreciate your videos. Thank you for producing such informative content.
@logananthece9337Күн бұрын
Hi, The BAR's are mapped to some 32-bit address right, Are there any possibilities to use/access those addresses? How?
@llmnr3xp0sedКүн бұрын
This is the KZbin channel that I've been looking for!!
@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-bo2mf6gm3p5 күн бұрын
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Күн бұрын
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.
@ImSubodhPandey6 күн бұрын
Can you please let me know to get workshop discussion details?
@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.
@TrashmanMoon7 күн бұрын
Thanks! have a nice day!
@spideyboy95889 күн бұрын
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?
@techlobo24099 күн бұрын
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.
@guderian55711 күн бұрын
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.
@fghoussen11 күн бұрын
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?
@adult1125211 күн бұрын
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.
@T44enterprismalFORTE12 күн бұрын
CK h tee cyoyp rhoczieiel niler
@nerdycatgamer15 күн бұрын
thoughts on plan9 arg macros? ARGBEGIN ARGEND etc
@SimonTheNoob18 күн бұрын
A gem in my suggestion list... LOVE IT!
@JacksonEdward-h5i18 күн бұрын
Lopez Kenneth Lewis Amy Robinson Karen
@rohanjoshi878519 күн бұрын
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_linux9615 күн бұрын
Thanks for the hint. I will try to improve the audio next time.
@supra171219 күн бұрын
This is going to be a great tutorial series. Thanks!
@jholloway7719 күн бұрын
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
@perceptron983419 күн бұрын
Which speeds do you plan to support?
@johannes4gnu_linux9615 күн бұрын
For twisted pair I want to Cover 10Base and 100Base-TX. The W7500 can't use Gbit Ethernet.
@perceptron983420 күн бұрын
Good idea 💡
@thoup20 күн бұрын
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?
@focuseletronica21 күн бұрын
será magnífico esta jornada... Grato por compartilhar conhecimento!
@lazarocamargo21 күн бұрын
Excelente tutorial, thanks a lot!!!!
@benjaminpotter480121 күн бұрын
i love how relatable this video is! thank you for not pretending everything went smoothly, and being human. keep up the good work :)
@adhilwazeer711522 күн бұрын
Good video!! Can i know how did you increased the font size on the console? would be a great tip thanks
@johannes4gnu_linux9621 күн бұрын
Thank you. Pressing Ctrl and Plus should do the trick ;)
@cutiepie060822 күн бұрын
Hi , can u share the pins on which you connected the Seven segments on AT32U4 pro micro
@johannes4gnu_linux9621 күн бұрын
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Күн бұрын
@@johannes4gnu_linux96 i am facing this error while reading control transfer driver.head: error reading '/proc/my_usb_dev': Operation not permitted
@creataKulkarni22 күн бұрын
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_linux9621 күн бұрын
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.
@creataKulkarni21 күн бұрын
@@johannes4gnu_linux96 Thank you for your response, I will try that out!
@VasonMaitree12 күн бұрын
@@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.
@VasonMaitree12 күн бұрын
@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.
@benjaminpotter480123 күн бұрын
cool video! i cant help but notice you have a tab width of 8 spaces… wth.
@johannes4gnu_linux9623 күн бұрын
Thank you. Yes, 8 Spaces per Tab is the recommendation of the Linux Kernel Coding style guidelines and I try to follow them ;)
@jacktheripper210929 күн бұрын
hi, can you provide example of sending control transfer with data phase?
@johannes4gnu_linux9623 күн бұрын
Here you go: kzbin.info/www/bejne/oYuxd56fiqZreaM
@tzgardner29 күн бұрын
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_linux9623 күн бұрын
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Ай бұрын
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Ай бұрын
Thank you, this was very helpful.
@aowowow-no1xeАй бұрын
Hey, will I need any other hardware besides a raspberry PI to follow this series?
@johannes4gnu_linux9623 күн бұрын
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Ай бұрын
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_linux9623 күн бұрын
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Ай бұрын
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Ай бұрын
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Ай бұрын
Also, why do you emulate 32 bit instead of 64 bit?
@starpawsyАй бұрын
Not as good as the old AT&T System V standard. Sadly, even Unix has become bloatware.
@ShubhamPatil-v8uАй бұрын
Hey, Thanks brother for making its easier for us to understand this pcie driver
@anon_y_mousseАй бұрын
More people should use this instead of trying to come up with their own custom solutions.
@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Ай бұрын
@@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Ай бұрын
HI! Can i replace the led in dc motor and control its speed?
@kevenv2010Ай бұрын
Nice and to the point! I really appreciate your videos on demystifying Linux dev, thanks and keep up the good work!
@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Ай бұрын
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Ай бұрын
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Ай бұрын
Finally started with driver development, thanks Johannes, you make concepts easily understandable!
@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Ай бұрын
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Ай бұрын
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Ай бұрын
Thank you. Yes you are right here, my mistake.
@TrackballClickАй бұрын
The keyboard resembles me of a chopper rumbling in the background.
@ShreyaMandal-f7bАй бұрын
How you are accessing 7 segment display with only 5 output pin ?
@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.