驱动入门hello world

Linux设备驱动开发入门——Hello world       近期做的工作主要有两个,一是将dvsdk_4中的video_copy项目移植到自己的板子上,在参考资料极其匮乏的情况下,本人继续发扬艰苦奋斗的作风和打不死的小强精神,终于将Omap3530中的DSP成功地跑起来了。另一个工作就是开始学习Linux设备驱动开发,为编写新设备的驱动做准备。dvsdk的内容比较庞杂,所做的工作还在整理之中,后面我会发出来。Linux设备驱动开发的资料很多 阅读详情

首先mkdir hello1文件夹,在下面编写hello.c

vi hello.c 

  1. #include <linux/init.h>  
  2. #include <linux/module.h>  
  3. MODULE_LICENSE("Dual BSD/GPL");  
  4.    
  5. static int hello_init(void)  
  6. {  
  7.     printk(KERN_ALERT "Hello, fanmaolin\n");  
  8.     return 0;  
  9. }  
  10.    
  11.    
  12.    
  13. static void hello_exit(void)  
  14. {  
  15.     printk(KERN_ALERT "Goodbye, fanmaolin\n");  
  16. }  
  17.    
  18.    
  19. module_init(hello_init);  
  20. module_exit(hello_exit);  



在该路径下编写Makefile

vim Makefile



然后make



生成的hello.ko传到开发板上进行编译


tftp -gr hello.ko 192.168.1.2  
insmod hello.ko       安装驱动模块
dmesg              查看printk信息
lsmod               列出模块
rmmod hello     删除

>: tftp -gr hello.ko 192.168.1.2
hello.ko             100% |*******************************| 24436   0:00:00 ETA
>: insmod hello.ko 
Hello, fanmaolin
>: dmesg
Linux version 3.0.0 (fanmaolin@Centeros.ocaldomain) (gcc version 4.5.4 (Buildroot 2012.08) ) #16 Fri Mar 24 16:53:14 CST 2017
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.600 MHz, memory 101.400 MHz, peripheral 50.700 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c04b5e30, node_mem_map c04ea000
  Normal zone: 128 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 16256 pages, LIFO batch:3
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 mem=64M ubi.mtd=2 root=ubi0:rootfs rootwait rootfstype=ubifs rw
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59880k/59880k available, 5656k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0027000   ( 124 kB)
      .text : 0xc0027000 - 0xc0491298   (4521 kB)
      .data : 0xc0492000 - 0xc04b6660   ( 146 kB)
       .bss : 0xc04b6684 - 0xc04e985c   ( 205 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 202.54 BogoMIPS (lpj=506368)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 99 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NTFS driver 2.1.30 [Flags: R/W].
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 116
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttyS0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: ttyS1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttyS2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 651 at 0x000005160000
Bad eraseblock 825 at 0x000006720000
Bad eraseblock 1667 at 0x00000d060000
Bad eraseblock 1787 at 0x00000df60000
Bad eraseblock 1879 at 0x00000eae0000
Creating 5 MTD partitions on "NAND":
0x000000000000-0x000000100000 : "bootloader"
0x000000100000-0x000001000000 : "linux"
0x000001000000-0x000003800000 : "rootfs"
0x000003800000-0x000009c00000 : "apps"
0x000000000000-0x000010000000 : "data"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: max. sequence number:       0
UBI: volume 0 ("rootfs") re-sized from 313 to 313 LEBs
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "rootfs"
UBI: MTD device size:            40 MiB
UBI: number of good PEBs:        320
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 320
UBI: number of PEBs reserved for bad PEB handling: 3
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  1869742398
UBI: background thread "ubi_bgt0d" started, PID 673
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at c48a6300,c48a8304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   39094272 bytes (38178 KiB, 37 MiB, 303 LEBs)
UBIFS: journal size:       5419008 bytes (5292 KiB, 5 MiB, 42 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 124K
usb 1-1: new full speed USB device number 2 using s3c2410-ohci
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
dm9000 dm9000: eth0: link down
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Hello, fanmaolin
>: lsmod
hello 660 0 - Live 0xbf004000
>: rmmod hello
Goodbye, fanmaolin
>: 


问题及解决:

没有网卡,安装dm9000网卡

>: tftp -gr hello.ko 192.168.1.2
hello.ko             100% |*******************************| 24436   0:00:00 ETA
>: insmod hello.ko 
Hello, fanmaolin
>: dmesg
Linux version 3.0.0 (fanmaolin@Centeros.ocaldomain) (gcc version 4.5.4 (Buildroot 2012.08) ) #16 Fri Mar 24 16:53:14 CST 2017
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.600 MHz, memory 101.400 MHz, peripheral 50.700 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c04b5e30, node_mem_map c04ea000
  Normal zone: 128 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 16256 pages, LIFO batch:3
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 mem=64M ubi.mtd=2 root=ubi0:rootfs rootwait rootfstype=ubifs rw
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59880k/59880k available, 5656k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0027000   ( 124 kB)
      .text : 0xc0027000 - 0xc0491298   (4521 kB)
      .data : 0xc0492000 - 0xc04b6660   ( 146 kB)
       .bss : 0xc04b6684 - 0xc04e985c   ( 205 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 202.54 BogoMIPS (lpj=506368)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 99 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NTFS driver 2.1.30 [Flags: R/W].
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 116
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttyS0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: ttyS1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttyS2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 651 at 0x000005160000
Bad eraseblock 825 at 0x000006720000
Bad eraseblock 1667 at 0x00000d060000
Bad eraseblock 1787 at 0x00000df60000
Bad eraseblock 1879 at 0x00000eae0000
Creating 5 MTD partitions on "NAND":
0x000000000000-0x000000100000 : "bootloader"
0x000000100000-0x000001000000 : "linux"
0x000001000000-0x000003800000 : "rootfs"
0x000003800000-0x000009c00000 : "apps"
0x000000000000-0x000010000000 : "data"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: max. sequence number:       0
UBI: volume 0 ("rootfs") re-sized from 313 to 313 LEBs
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "rootfs"
UBI: MTD device size:            40 MiB
UBI: number of good PEBs:        320
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 320
UBI: number of PEBs reserved for bad PEB handling: 3
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  1869742398
UBI: background thread "ubi_bgt0d" started, PID 673
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at c48a6300,c48a8304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   39094272 bytes (38178 KiB, 37 MiB, 303 LEBs)
UBIFS: journal size:       5419008 bytes (5292 KiB, 5 MiB, 42 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 124K
usb 1-1: new full speed USB device number 2 using s3c2410-ohci
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
dm9000 dm9000: eth0: link down
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Welcome to Lingyun IOT System Lab.
Official Website: www.iot-yun.com
Wow! It's very good and I have learn much from it, thanks!
Hello, fanmaolin
>: lsmod
hello 660 0 - Live 0xbf004000
>: rmmod hello
Goodbye, fanmaolin
>: 

完成


问题:

1、没有安装dm9000网卡,下一篇写在内核安装方法。

2、Makefile 路径错误,改正后Ok

3、insmod: can't insert 'hello.ko': invalid module format  解决办法参考http://blog.csdn.net/zengxianyang/article/details/50505998(他人博客)




















NUC972 MTD分区详解(UBI error: vtbl_check: too large reserved_pebs 824, good PEBs 512 错误分析) 1. 在内核中修改nand MTD分区后出现错误 错误如下: UBI error: vtbl_check: too large reserved_pebs 824, good PEBs 512 UBI error: vtbl_check: volume table check failed: record 0, error 9 以下是我的MTD分区信息:(drivers/mtd/nand/nuc970_nand.c) 错误分析 我们查看log发现内核mtd初始化是成功的,只是在ubi挂载文件系统部分出现 阅读详情

相关推荐

Linux驱动开发入门:编写Hello World驱动程序

在Linux系统中,驱动程序是与硬件设备交互的关键组件。编写自己的Linux驱动程序是学习嵌入式系统和设备驱动开发的重要一步。本文将介绍如何编写一个简单的Hello World驱动程序,以帮助初学者入门。步骤1:设置开发环境 首先,确保你的系统已经安装了所需的开发工具和内核源代码。你可以使用以下命令安装所需的软件包: 步骤2:创建驱动程序源代码文件 使用任何你喜欢的文本编辑器创建一个新的C源代码文件,命名为hello_world.c。 在这个简单的驱动程序中,我们使用了Linux内核提供的一些宏和函数。__

2301_79325657的博客 281

UBI文件系统

在linux-2.6.27以前,谈到Flash文件系统,大家很多时候多会想到cramfs、jffs2、yaffs2等文件系统。它们也都是基于文件系统+mtd+flash设备的架构。linux-2.6.27后,内核加入了一种新型的flash文件系统UBI(Unsorted Block Images)。这里简单介绍下UBI文件系统加入的原因,及使用方法。我也是刚接触到这个文件系统,可能有理解不对的地方,也请指正。 一、产生的背景 FLASH具有的“先擦除再写入”、坏块、“有限的读写次数”等特性,目前管理FLAS

鬼臾区的专栏 5100

Abel逆变换及其求解方法

Abel逆变换常应用在轴对称的、光学薄的火焰、羽流或等离子体重建。

weixin_49783507的博客 8394

dm37xx android2.3.4增加recovery升级功能(二)——调试

转载请注明文章出处和作者! 出处:http://blog.csdn.net/xl19862005 作者:大熊(Xandy) 在上一篇中简单的说明了一下要增加recovery功能所涉及到的代码修改部分,代码修改成功之后并不等于所需要的功能就OK了,编译通过烧录到目标板之后还有一大堆的问题需要处理! 经过一天的努力bootloader及recovery添加并编译成功了,烧录到样

80后的梦想 2820

ESP32水墨屏日历实战:低功耗自动更新与HTTPS数据解析

本文详细介绍了ESP32水墨屏日历项目的开发实践,重点讲解了低功耗自动更新与HTTPS数据解析的实现方法。通过ESP32的自动休眠功能和水墨屏的零功耗特性,结合HTTPS请求安全获取网络数据,实现了高效节能的桌面日历应用。项目代码开源,适合物联网开发者参考。

xx56789的博客 780

别再羡慕专业版!用这个批处理脚本,一键给Win11家庭版装上官方沙盒

本文详细介绍了如何通过批处理脚本在Windows 11家庭版上安装官方Windows沙盒(Windows Sandbox),无需复杂操作即可享受专业版功能。脚本自动激活系统内置组件,提供安全隔离的虚拟化环境,适用于软件测试、安全浏览等场景。

weixin_26757925的博客 505

ubifs文件系统的制作以及移植

修改根文件系统: [lingyun@localhostetc]$ vim mdev.conf sd[a-z][0-9]      0:0 0777        @(mount /dev/$MDEV /mnt/usb) sd[a-z]           0:0 0777        $(umount /mnt/usb) #ub[a-z][0-9]      0:00777

杨正的专栏 2242

spark3.x 写入hudi报错

【代码】spark3.x 写入hudi报错。

W2484980893的博客 1582

Linux驱动程序入门—Hello World

Linux驱动程序入门—Hello World来源: ChinaUnix博客  日期:2009.11.19 21:17 (共有0条评论) 我要评论 1、引言    记得在学习VC++和C语言的时候,一开始都会以一个HELLO WORLD的例子作为演示,将学者逐渐引入殿

三少GG 1179

使用FreeNAS软件部署ISCSI的SAN架构存储(IP-SAN)练习题

进入系统后先 ping 10.1.1.88 通不通,ping通就往下做,不通就把winserver 2019的网卡改为自动获取的在ping。注意:如果点击 Initiators 添加显示的跟我不一样,在左上有允许所有的启动器的就打勾(跟我一样就略)注意我当前用的系统是centos7,因为每个系统位置都不同,修改的行号可能有偏差。两个适配器指定不同的网卡,第一张指定为:VMnet5,第二张指定为:VMnet6。由于系统已经自带了一张,我们只要添加的一张网卡就可以。进入web界面后,使用root用户进行登录。

hack_18520的博客 1698

数据资产目录(SailCatalog)和数据地图(SailMap)

笔者接下来准备开发大数据平台(XSailboat)中的数据资产目录(SailCatalog)和数据地图(SailMap)相关的功能,本文用以记录笔者关于此部分功能的概念梳理和主体功能设计。

OkGogooXSailboat的博客 2336

Linux2.6驱动程序入门—Hello World

1、引言     记得在学习VC++和C语言的时候,一开始都会以一个HELLO WORLD的例子作为演示,将学者逐渐引入殿堂,这个几乎成了计算机编程语言学习必经的一个入门之路。     当然,在学习linux编程的时候也是这样,下面的例子应该是再熟悉不过了:     首先用VI编写一个C程序:vi hello.c     #include   "stdio.h"      int ma

lwe的专栏 792

【RT-DETR有效改进】利用MobileNetV3替换Backbone(轻量化网络结构,提点)

本文给大家带来的改进机制是,其主要改进思想集中在结合硬件感知的网络架构搜索(NAS)和NetAdapt算法,以优化移动设备CPU上的性能。它采用了新颖的架构设计,包括反转残差结构和线性瓶颈层,以及新的高效分割解码器Lite Reduced Atrous Spatial Pyramid Pooling(LR-ASPP),以提升在移动分类、检测和分割任务上的表现。实验表明,MobileNets在资源和准确性的权衡方面表现出色,并在多种应用(如对象检测、细粒度分类、面部属性识别和大规模地理定位)中展现了其有效性。

Snu77的博客 2756

CH340入门指南:从驱动安装到第一个Hello World

尝试修改发送的信息内容,可以加入变量、传感器数据等,让输出信息更有趣。

IndigoNight21的博客 1201

【笔记篇】Davinci Configurator TcpIp模块

AUTOSAR TCP/IP模块配置介绍

weixin_47571898的博客 991

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

fl2440——驱动入门,hello world!

如同C语言的学习一样,入门是从hello world开始的,现在学习驱动设备也选择从这里开始吧! ^_^ 先贴上代码:/********************************************************************************* * Copyright: (C) 2017 TangBin<tangbinmvp@gmail.com>

C_Aya的博客 829

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

[linux驱动1]入门程序 hello world

hello.c #include <linux/module.h> #include <linux/init.h> /*驱动初始化函数*/ int hello_init(void) { printk("hello eixt"); return 0; } /*驱动卸载函数*/ void hello_exit(void) { printk("hello eixt"); } MODULE_AUTHOR("kele>"); M.

技术学习 123

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

Linux设备驱动开发入门――Hello world

Linux设备驱动开发入门――Hello world 2011年06月20日   近期做的工作主要有两个,一是将dvsdk_4中的video_copy项目移植到自己的板子上,在参考资料极其匮乏的情况下,本人继续发扬艰苦奋斗的作风和打不死的小强精神,终于将Omap3530中的DSP成功地跑起来了。另一个工作就是开始学习Linux设备驱动开发,为编写新设备的驱动做准备。dvsdk的内容比较庞...

zn108zn 199

linux驱动程序博客,Linux驱动程序入门—Hello World

Linux驱动程序入门—Hello WorldOHY 200807161、引言记得在学习VC++和C语言的时候,一开始都会以一个HELLO WORLD的例子作为演示,将学者逐渐引入殿堂,这个几乎成了计算机编程语言学习必经的一个入门之路。当然,在学习linux编程的时候也是这样,下面的例子应该是再熟悉不过了:首先用VI编写一个C程序:vi hello.c#include"stdio.h"int ...

weixin_42538752的博客 187

Linux驱动开发入门:从Hello World到字符设备驱动实战

Linux内核模块是操作系统与硬件交互的核心组件,其本质是一种可动态加载到内核空间执行的代码。理解其工作原理,关键在于掌握内核模块的编译、加载机制以及内核与用户空间的安全数据交换。这项技术对于嵌入式系统、物联网设备开发具有极高的价值,它使得开发者能够为定制硬件编写专用接口,实现高效、稳定的底层控制。在具体应用场景中,字符设备驱动是最常见的形式之一,它通过文件操作接口(如open、read、write)为用户程序提供访问硬件的通道。本文聚焦于Linux驱动开发实践,通过一个完整的“内存字符设备”驱动项目,详细

weixin_33908217的博客 455

Linux 驱动编译 hello world 入门 (待补充)

obj-m=demo.o:告诉内核编译框架,当前目录要编译 demo.c 为 demo.ko,把 demo.c 编译成 demo.o,再链接生成 demo.ko 内核模块。/lib/modules/$(uname -r)/build 当前内核对应的内核头文件源码目录。modules:内核顶层 Makefile 的目标,专门用来编译 .ko 驱动模块。M=$(PWD):告诉内核编译系统,外部模块源码所在目录(驱动代码所在的目录)系统日志打印 Goodbye, cruel world。

BITMelody的博客 240

Linux内核驱动开发入门:从Hello World到GPIO实战

操作系统内核是计算机系统的核心,负责管理硬件资源和提供基础服务。内核通过驱动程序与硬件交互,实现设备控制与数据交换。驱动开发的价值在于打通硬件与软件,是嵌入式系统、物联网和高性能计算等领域的关键技术。在Linux系统中,内核模块作为驱动的基本单元,支持动态加载与卸载,为硬件抽象提供了灵活框架。通过实现文件操作接口,驱动程序将硬件设备映射为设备文件,使应用程序能通过标准系统调用进行访问。本文以GPIO控制为例,结合虚拟化环境搭建与内核编程实践,演示如何从零构建一个可工作的字符设备驱动,涵盖模块编译、设备注册、

angou6476的博客 499

Linux内核入门(二)Hello World 驱动程序

本文主要探讨如何在 linux下编写一个Hello World入门级别的驱动程序以及演示驱动程序的加载、卸载以及调试的方法与步骤

Mr_Jaychong的博客 2191

驱动学习,入门基础--Hello World

#include #include static int hello_init( void ) { printk(KERN_ALERT "Hello World !\n"); } static void hello_exit( void ) { printk(KERN_ALERT "Goodbye World !\n"); } module_ini

XDmemory 366
上一篇: 根文件系统制作一制作根文件系统树
下一篇: fl2440 dm9000网卡驱动安装
fml1997
博客等级 码龄10年 30粉丝 56原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值