├── drivers_and_test ├── 10th_lcd │ ├── 1th │ │ └── lcd.c │ ├── 2th │ │ └── lcd.c │ ├── 3th │ │ └── lcd.c │ └── 4th │ │ ├── Makefile │ │ └── lcd.c ├── 11th_ts │ ├── 1th │ │ └── s3c_ts.c │ ├── 2th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 3th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 4th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 5th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 6th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 7th │ │ ├── Makefile │ │ └── s3c_ts.c │ ├── 8th │ │ ├── Makefile │ │ └── s3c_ts.c │ └── tslib-1.4.tar.gz ├── 12th_usb │ ├── 1th │ │ ├── Makefile │ │ └── usbmouse_as_key.c │ ├── 2th │ │ ├── Makefile │ │ └── usbmouse_as_key.c │ ├── 3th │ │ ├── Makefile │ │ └── usbmouse_as_key.c │ └── 4th │ │ ├── Makefile │ │ └── usbmouse_as_key.c ├── 13th_ramblock │ ├── 1th │ │ ├── Makefile │ │ └── ramblock.c │ ├── 2th │ │ ├── Makefile │ │ └── ramblock.c │ ├── 3th │ │ ├── Makefile │ │ └── ramblock.c │ ├── 4th │ │ ├── Makefile │ │ └── ramblock.c │ └── 5th │ │ ├── Makefile │ │ └── ramblock.c ├── 14th_nand │ ├── 1th │ │ └── s3c_nand.c │ ├── 2th │ │ ├── Makefile │ │ └── s3c_nand.c │ ├── 3th │ │ ├── Makefile │ │ └── s3c_nand.c │ ├── 4th │ │ ├── Makefile │ │ └── s3c_nand.c │ └── mtd-utils-05.07.23.tar.bz2 ├── 15th_nor │ ├── 1th │ │ ├── Makefile │ │ └── s3c_nor.c │ └── 2th │ │ ├── Makefile │ │ └── s3c_nor.c ├── 16th_virt_net │ ├── 1th │ │ ├── Makefile │ │ └── virt_net.c │ ├── 2th │ │ ├── Makefile │ │ └── virt_net.c │ ├── 3th │ │ ├── Makefile │ │ └── virt_net.c │ └── 4th │ │ ├── Makefile │ │ └── virt_net.c ├── 17th_dm9000c │ ├── 修改好的 │ │ ├── Makefile │ │ └── dm9dev9000c.c │ └── 厂家提供的 │ │ └── dm9dev9000c.c ├── 18th_i2c │ └── at24cxx │ │ ├── Makefile │ │ ├── at24cxx.c │ │ ├── head.S │ │ ├── i2c.bin │ │ ├── i2c.c │ │ ├── i2c.dis │ │ ├── i2c.h │ │ ├── i2c.lds │ │ ├── i2c_elf │ │ ├── include │ │ ├── ctype.h │ │ ├── gcclib.h │ │ ├── kernel.h │ │ ├── stdio.h │ │ ├── string.h │ │ ├── system.h │ │ └── types.h │ │ ├── init.c │ │ ├── interrupt.c │ │ ├── interrupt.h │ │ ├── lib │ │ ├── Makefile │ │ ├── ctype.c │ │ ├── div64.S │ │ ├── div64.h │ │ ├── lib1funcs.S │ │ ├── muldi3.c │ │ ├── printf.c │ │ ├── printf.h │ │ ├── string.c │ │ ├── vsprintf.c │ │ └── vsprintf.h │ │ ├── m41t11.c │ │ ├── m41t11.h │ │ ├── main.c │ │ ├── nand.c │ │ ├── s3c24xx.h │ │ ├── serial.c │ │ ├── serial.h │ │ └── si │ │ ├── 18th_i2c.IAB │ │ ├── 18th_i2c.IAD │ │ ├── 18th_i2c.IMB │ │ ├── 18th_i2c.IMD │ │ ├── 18th_i2c.PFI │ │ ├── 18th_i2c.PO │ │ ├── 18th_i2c.PR │ │ ├── 18th_i2c.PRI │ │ ├── 18th_i2c.PS │ │ └── 18th_i2c.WK3 ├── 19th_i2c_drv │ ├── 1th │ │ ├── Makefile │ │ └── at24cxx.c │ ├── 2th │ │ ├── Makefile │ │ └── at24cxx.c │ ├── 3th │ │ ├── Makefile │ │ └── at24cxx.c │ ├── 4th │ │ ├── Makefile │ │ └── at24cxx.c │ └── 5th │ │ ├── Makefile │ │ ├── at24cxx.c │ │ ├── i2c_test │ │ └── i2c_test.c ├── 20th_chrdev_another │ ├── 1th │ │ ├── Makefile │ │ └── hello.c │ ├── 2th │ │ ├── Makefile │ │ └── hello.c │ ├── hello_test │ └── hello_test.c ├── 21th_sound │ ├── app │ │ ├── libid3tag-0.15.1b.tar.gz │ │ ├── libmad-0.15.1b.tar.gz │ │ └── madplay-0.15.2b.tar.gz │ └── driver │ │ ├── s3c-wm8976.c │ │ └── s3c2410-uda1341.c ├── 22th_dma │ ├── 1th │ │ └── dma.c │ ├── 2th │ │ └── dma.c │ ├── 3th │ │ └── dma.c │ ├── 4th │ │ └── dma.c │ └── dma_test.c ├── 23th_debug_with_printk │ ├── Makefile │ ├── first_drv.c │ ├── first_drv_ok.c │ ├── firstdrvtest │ └── firstdrvtest.c ├── 24th_proc_mymsg │ ├── 1th │ │ └── mymsg.c │ ├── 2th │ │ └── mymsg.c │ ├── 3th │ │ └── mymsg.c │ ├── 4th │ │ └── mymsg.c │ ├── 5th │ │ └── mymsg.c │ ├── 6th │ │ └── mymsg.c │ ├── first_drv_myprintk │ │ ├── Makefile │ │ ├── first_drv.c │ │ ├── firstdrvtest │ │ └── firstdrvtest.c │ └── log.txt ├── 25th_debug_segmentfault │ ├── first_drv │ │ ├── Makefile │ │ ├── first_drv.c │ │ ├── firstdrvtest │ │ ├── firstdrvtest.c │ │ └── frist_drv.dis │ └── kallsyms.txt ├── 26th_debug_regeditor │ ├── first_drv │ │ ├── Makefile │ │ ├── first_drv.c │ │ ├── firstdrvtest │ │ └── firstdrvtest.c │ ├── ker_rw.c │ └── regeditor.c ├── 27th_debug_with_timer │ ├── first_drv.dis │ ├── first_drv │ │ ├── Makefile │ │ ├── first_drv.c │ │ ├── firstdrvtest │ │ └── firstdrvtest.c │ └── kallsyms.txt ├── 28th_app_debug │ ├── ld-linux.so.2.dis │ ├── test_debug.c │ ├── test_debug.dis │ └── test_debug_static.dis ├── 29th_app_system_call │ ├── kernel │ │ ├── calls.S │ │ ├── read_write.c │ │ └── syscalls.h │ └── test_system_call.c ├── 30th_debug_with_system_call │ ├── kernel │ │ ├── calls.S │ │ ├── read_write.c │ │ └── syscalls.h │ ├── read_write.c │ ├── test_sc │ ├── test_sc.c │ ├── test_sc.dis │ ├── test_sc_sleep │ ├── test_sc_sleep.c │ ├── test_sc_sleep.dis │ ├── test_sc_sleep_swi │ └── test_sc_swi ├── 31th_debug_input_emulate │ ├── 1th │ │ └── s3c_ts.c │ ├── 2th │ │ └── s3c_ts.c │ ├── Makefile │ ├── input_replay.c │ ├── mymsg.c │ └── s3c_ts.c ├── 32th_my_bootloader │ ├── 1th │ │ ├── Makefile │ │ ├── boot.bin │ │ ├── boot.c │ │ ├── boot.dis │ │ ├── boot.lds │ │ ├── init.c │ │ ├── setup.h │ │ └── start.S │ └── 2th │ │ ├── Makefile │ │ ├── boot.bin │ │ ├── boot.c │ │ ├── boot.dis │ │ ├── boot.lds │ │ ├── init.c │ │ ├── setup.h │ │ └── start.S ├── 7th_buttons_all │ ├── Makefile │ ├── buttons.c │ ├── buttons_test │ └── buttons_test.c ├── 8th_buttons_input │ ├── Makefile │ └── buttons.c ├── 9th_led_bus_drv_dev │ ├── Makefile │ ├── led_dev.c │ ├── led_drv.c │ ├── led_test │ └── led_test.c ├── buttons │ ├── Makefile │ ├── button_test.c │ └── s3c24xx_buttons.c ├── fb_test │ ├── Makefile │ ├── fb.h │ ├── fb_test │ └── fb_test.c ├── fifth_drv │ ├── Makefile │ ├── fifth_drv.c │ ├── fifthdrvtest │ └── fifthdrvtest.c ├── first_drv │ ├── Makefile │ ├── first_drv.c │ ├── firstdrvtest │ └── firstdrvtest.c ├── forth_drv │ ├── Makefile │ ├── forth_drv.c │ ├── forthdrvtest │ └── forthdrvtest.c ├── leds │ ├── Makefile │ ├── ledtest │ ├── ledtest.c │ └── myleds.c ├── regeditor │ ├── Makefile │ ├── regeditor │ └── regeditor.c ├── second_drv │ ├── Makefile │ ├── second_drv.c │ ├── seconddrvtest │ └── seconddrvtest.c ├── sixth_drv │ ├── Makefile │ ├── sixth_drv.c │ ├── sixthdrvtest │ └── sixthdrvtest.c ├── test │ ├── Makefile │ ├── signal │ ├── signal.c │ ├── test_drv.c │ ├── testdrv_test │ ├── testdrv_test.c │ ├── third_drv.c │ ├── thirddrvtest │ └── thirddrvtest.c ├── third_drv │ ├── Makefile │ ├── third_drv.c │ ├── thirddrvtest │ └── thirddrvtest.c ├── 图片 │ ├── 3.4.2内核下的I2C驱动.jpg │ ├── DMA.jpg │ ├── I2C驱动程序.jpg │ ├── LCD.jpg │ ├── NAND FLASH驱动程序.jpg │ ├── NOR FLASH驱动程序.jpg │ ├── UEVENT.jpg │ ├── USB设备驱动程序.jpg │ ├── input1.jpg │ ├── mdev.jpg │ ├── mmu.jpg │ ├── timer.jpg │ ├── 分层分离.jpg │ ├── 初接触开发板.jpg │ ├── 块设备驱动程序的引入.jpg │ ├── 声卡驱动程序.jpg │ ├── 声卡驱动程序之编写WM8976.jpg │ ├── 字符设备驱动程序的另一种写法.jpg │ ├── 应用调试.jpg │ ├── 怎么看原理图.jpg │ ├── 移植最新版本3.4.2内核.jpg │ ├── 移植最新的u-boot.jpg │ ├── 移植驱动到3.4.2内核上.jpg │ ├── 网卡驱动程序.jpg │ ├── 自己写bootloader.jpg │ ├── 裸板调试.jpg │ ├── 触摸屏.jpg │ └── 驱动调试.jpg └── 文档 │ ├── 3.4.2内核下的I2C驱动.TXT │ ├── I2C驱动程序.TXT │ ├── LCD驱动程序.TXT │ ├── NAND FLASH驱动程序.TXT │ ├── NOR FLASH驱动程序.TXT │ ├── RTC驱动程序.TXT │ ├── USB描述符.bmp │ ├── USB设备驱动程序.TXT │ ├── Windows.wav │ ├── input子系统.TXT │ ├── ptrace │ ├── Tracing tricks with ptrace.htm │ ├── list1.txt │ ├── list10.txt │ ├── list11.txt │ ├── list12.txt │ ├── list13.txt │ ├── list14.txt │ ├── list15.txt │ ├── list2.txt │ ├── list3.txt │ ├── list4.txt │ ├── list5.txt │ ├── list6.txt │ ├── list7.txt │ ├── list8.txt │ └── list9.txt │ ├── tslib-1.4.tar.gz │ ├── tslib编译使用方法.TXT │ ├── uevent.txt │ ├── 初接触开发板之基本操作.TXT │ ├── 块设备驱动程序.TXT │ ├── 声卡驱动程序.TXT │ ├── 寄存器位查看小工具.exe │ ├── 应用调试.TXT │ ├── 怎么看原理图.TXT │ ├── 目录.TXT │ ├── 移植所有驱动到3.4.2内核去.TXT │ ├── 移植最新版本3.4.2内核.TXT │ ├── 移植最新的u-boot.TXT │ ├── 网卡驱动程序.TXT │ ├── 自己写bootloader.TXT │ ├── 裸板调试.TXT │ ├── 触摸屏驱动程序.TXT │ └── 驱动调试.TXT ├── 学前班_第0课_图片 ├── 初接触开发板.jpg └── 怎么看原理图.jpg ├── 毕业班_文档_图片_源码_bin ├── arm-linux-gcc-4.3.2.tar.bz2 ├── 毕业班第1课自己写bootloader │ ├── 32th_my_bootloader │ │ ├── 1th │ │ │ ├── Makefile │ │ │ ├── boot.bin │ │ │ ├── boot.c │ │ │ ├── boot.dis │ │ │ ├── boot.lds │ │ │ ├── init.c │ │ │ ├── setup.h │ │ │ └── start.S │ │ └── 2th │ │ │ ├── Makefile │ │ │ ├── boot.bin │ │ │ ├── boot.c │ │ │ ├── boot.dis │ │ │ ├── boot.lds │ │ │ ├── init.c │ │ │ ├── setup.h │ │ │ └── start.S │ ├── 自己写bootloader.TXT │ └── 自己写bootloader.jpg ├── 毕业班第2课移植最新UBOOT_文档_图片_补丁 │ ├── u-boot-2012.04.01_100ask.patch │ ├── 移植最新的u-boot.TXT │ └── 移植最新的u-boot.jpg ├── 毕业班第3课移植新内核_文档_图片_补丁_二进制程序 │ ├── bin │ │ ├── fs_mini_mdev_new.jffs2 │ │ ├── fs_mini_mdev_new.yaffs2 │ │ ├── u-boot_new.bin │ │ └── uImage_new │ ├── mkyaffsimage工具 │ │ └── yaffs_source_util_larger_small_page_nand.tar.bz2 │ ├── u-boot和内核补丁 │ │ ├── linux-3.4.2_100ask.patch │ │ └── u-boot-2012.04.01_100ask.patch │ ├── 文档_图片 │ │ ├── 移植最新版本3.4.2内核.TXT │ │ └── 移植最新版本3.4.2内核.jpg │ └── 用git下载的yaffs最新源码 │ │ └── yaffs2.tar.bz2 └── 毕业班第4课移植驱动到3.4.2内核_文档_图片_源码 │ └── drivers_and_test_new │ ├── jz2440 │ ├── 10th_lcd │ │ ├── Makefile │ │ └── lcd.c │ ├── 11th_ts │ │ ├── Makefile │ │ ├── s3c_ts.c │ │ └── tslib-1.4.tar.gz │ ├── 12th_usb │ │ ├── Makefile │ │ └── usbmouse_as_key.c │ ├── 13th_ramblock │ │ ├── Makefile │ │ └── ramblock.c │ ├── 14th_nand │ │ ├── Makefile │ │ ├── mtd-utils-05.07.23.tar.bz2 │ │ └── s3c_nand.c │ ├── 15th_nor │ │ ├── Makefile │ │ └── s3c_nor.c │ ├── 16th_virt_net │ │ ├── Makefile │ │ └── virt_net.c │ ├── 17th_dm9000c │ │ ├── Makefile │ │ ├── dm9000.h │ │ └── dm9dev9000c.c │ ├── 26th_debug_regeditor │ │ ├── first_drv │ │ │ ├── Makefile │ │ │ ├── first_drv.c │ │ │ ├── firstdrvtest │ │ │ └── firstdrvtest.c │ │ ├── ker_rw.c │ │ └── regeditor.c │ ├── 7th_buttons_all │ │ ├── Makefile │ │ ├── buttons.c │ │ ├── buttons_test │ │ └── buttons_test.c │ ├── 8th_buttons_input │ │ ├── Makefile │ │ └── buttons.c │ ├── fb_test │ │ ├── Makefile │ │ ├── fb.h │ │ └── fb_test.c │ ├── fifth_drv │ │ ├── Makefile │ │ ├── fifth_drv.c │ │ ├── fifthdrvtest │ │ └── fifthdrvtest.c │ ├── first_drv │ │ ├── Makefile │ │ ├── first_drv.c │ │ ├── firstdrvtest │ │ └── firstdrvtest.c │ ├── forth_drv │ │ ├── Makefile │ │ ├── forth_drv.c │ │ ├── forthdrvtest │ │ └── forthdrvtest.c │ ├── second_drv │ │ ├── Makefile │ │ ├── second_drv.c │ │ ├── seconddrvtest │ │ └── seconddrvtest.c │ ├── sixth_drv │ │ ├── Makefile │ │ ├── sixth_drv.c │ │ ├── sixthdrvtest │ │ └── sixthdrvtest.c │ └── third_drv │ │ ├── Makefile │ │ ├── third_drv.c │ │ ├── thirddrvtest │ │ └── thirddrvtest.c │ ├── 移植所有驱动到3.4.2内核去.TXT │ └── 移植驱动到3.4.2内核上.jpg ├── 硬件部件实验代码 ├── debug_with_jtag │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── nand.bin │ ├── nand.c │ ├── nand.dis │ └── nand.lds ├── debug_with_jtag_gdb_eclipse │ ├── .cproject │ ├── .project │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── init │ │ ├── Makefile │ │ ├── init.S │ │ ├── init.bin │ │ ├── init.dis │ │ └── init_elf │ ├── main.c │ ├── nand.c │ ├── nand.lds │ └── nand_elf ├── debug_with_led │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── nand.bin │ ├── nand.c │ ├── nand.dis │ └── nand.lds ├── debug_with_uart │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── nand.bin │ ├── nand.c │ ├── nand.dis │ ├── nand.lds │ └── s3c24xx.h ├── gpio │ ├── key_led │ │ ├── Makefile │ │ ├── crt0.S │ │ ├── key_led.bin │ │ ├── key_led.c │ │ ├── key_led.dis │ │ └── key_led_elf │ ├── led_on │ │ ├── Makefile │ │ ├── led_on.S │ │ ├── led_on.bin │ │ └── led_on_elf │ ├── led_on_c │ │ ├── Makefile │ │ ├── crt0.S │ │ ├── led_on_c.bin │ │ ├── led_on_c.c │ │ ├── led_on_c.dis │ │ └── led_on_c_elf │ └── leds │ │ ├── Makefile │ │ ├── crt0.S │ │ ├── leds.c │ │ └── leds.lds ├── int │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── interrupt.c │ ├── main.c │ └── s3c24xx.h ├── lcd │ ├── Makefile │ ├── framebuffer.c │ ├── framebuffer.h │ ├── head.S │ ├── include │ │ ├── ctype.h │ │ ├── gcclib.h │ │ ├── kernel.h │ │ ├── stdio.h │ │ ├── string.h │ │ ├── system.h │ │ └── types.h │ ├── init.c │ ├── interrupt.c │ ├── interrupt.h │ ├── lcd.bin │ ├── lcd.lds │ ├── lcddrv.c │ ├── lcddrv.h │ ├── lcdlib.c │ ├── lcdlib.h │ ├── lib │ │ ├── Makefile │ │ ├── ctype.c │ │ ├── div64.S │ │ ├── div64.h │ │ ├── lib1funcs.S │ │ ├── muldi3.c │ │ ├── printf.c │ │ ├── printf.h │ │ ├── string.c │ │ ├── vsprintf.c │ │ └── vsprintf.h │ ├── main.c │ ├── nand.c │ ├── s3c24xx.h │ ├── sc │ │ ├── lcd视频例子.IAB │ │ ├── lcd视频例子.IAD │ │ ├── lcd视频例子.IMB │ │ ├── lcd视频例子.IMD │ │ ├── lcd视频例子.PFI │ │ ├── lcd视频例子.PO │ │ ├── lcd视频例子.PR │ │ ├── lcd视频例子.PRI │ │ ├── lcd视频例子.PS │ │ ├── lcd视频例子.SearchResults │ │ ├── lcd视频例子.WK3 │ │ └── mach-zhiyuan2440.c │ ├── serial.c │ └── serial.h ├── lcd_debug │ ├── Makefile │ ├── framebuffer.c │ ├── framebuffer.h │ ├── head.S │ ├── include │ │ ├── ctype.h │ │ ├── gcclib.h │ │ ├── kernel.h │ │ ├── stdio.h │ │ ├── string.h │ │ ├── system.h │ │ └── types.h │ ├── init.c │ ├── interrupt.c │ ├── interrupt.h │ ├── lcd.bin │ ├── lcd.lds │ ├── lcddrv.c │ ├── lcddrv.h │ ├── lcdlib.c │ ├── lcdlib.h │ ├── lib │ │ ├── Makefile │ │ ├── ctype.c │ │ ├── div64.S │ │ ├── div64.h │ │ ├── lib1funcs.S │ │ ├── muldi3.c │ │ ├── printf.c │ │ ├── printf.h │ │ ├── string.c │ │ ├── vsprintf.c │ │ └── vsprintf.h │ ├── main.c │ ├── nand.c │ ├── s3c24xx.h │ ├── serial.c │ └── serial.h ├── leds │ ├── Makefile │ ├── crt0.S │ ├── leds.bin │ ├── leds.c │ ├── leds.dis │ └── leds.lds ├── mmu │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── leds.c │ └── mmu.lds ├── nand │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── nand.c │ └── nand.lds ├── sdram │ ├── Makefile │ ├── head.S │ ├── leds.c │ └── sdram.dis ├── uart │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── s3c24xx.h │ ├── serial.h │ └── uart.lds └── 要调试的不能执行的程序 │ ├── Makefile │ ├── head.S │ ├── init.c │ ├── main.c │ ├── nand.c │ └── nand.lds └── 第32课_新内核下的I2C驱动 └── i2c ├── 1th_i2c_new_device ├── Makefile ├── at24cxx_dev.c └── at24cxx_drv.c ├── 2th_i2c_new_probed_device ├── Makefile ├── at24cxx_dev.c └── at24cxx_drv.c ├── 3.4.2内核下的I2C驱动.TXT ├── 3.4.2内核下的I2C驱动.jpg ├── 3th_all_adapter_detect ├── Makefile └── at24cxx_drv.c ├── 4th_device_driver_test ├── Makefile ├── at24cxx_dev.c ├── at24cxx_drv.c └── i2c_test.c ├── 5th_user_space_test └── i2c_usr_test.c ├── 6th_i2c_bus ├── 1th │ └── i2c_bus_s3c2440.c └── 2th │ ├── Makefile │ └── i2c_bus_s3c2440.c └── i2c-tools-3.1.0.tar.bz2 /drivers_and_test/10th_lcd/1th/lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/10th_lcd/1th/lcd.c -------------------------------------------------------------------------------- /drivers_and_test/10th_lcd/2th/lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/10th_lcd/2th/lcd.c -------------------------------------------------------------------------------- /drivers_and_test/10th_lcd/3th/lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/10th_lcd/3th/lcd.c -------------------------------------------------------------------------------- /drivers_and_test/10th_lcd/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += lcd.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/10th_lcd/4th/lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/10th_lcd/4th/lcd.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/1th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/1th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/2th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/2th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/3th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/3th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/4th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/4th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/5th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/5th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/5th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/6th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/6th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/6th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/7th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/7th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/7th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/8th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/8th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/8th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/11th_ts/tslib-1.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/11th_ts/tslib-1.4.tar.gz -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += usbmouse_as_key.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/1th/usbmouse_as_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/12th_usb/1th/usbmouse_as_key.c -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += usbmouse_as_key.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/2th/usbmouse_as_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/12th_usb/2th/usbmouse_as_key.c -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += usbmouse_as_key.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/3th/usbmouse_as_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/12th_usb/3th/usbmouse_as_key.c -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += usbmouse_as_key.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/12th_usb/4th/usbmouse_as_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/12th_usb/4th/usbmouse_as_key.c -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/1th/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/13th_ramblock/1th/ramblock.c -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/2th/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/13th_ramblock/2th/ramblock.c -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/3th/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/13th_ramblock/3th/ramblock.c -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/4th/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/13th_ramblock/4th/ramblock.c -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/5th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/13th_ramblock/5th/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/13th_ramblock/5th/ramblock.c -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/1th/s3c_nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/14th_nand/1th/s3c_nand.c -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nand.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/2th/s3c_nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/14th_nand/2th/s3c_nand.c -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nand.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/3th/s3c_nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/14th_nand/3th/s3c_nand.c -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nand.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/4th/s3c_nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/14th_nand/4th/s3c_nand.c -------------------------------------------------------------------------------- /drivers_and_test/14th_nand/mtd-utils-05.07.23.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/14th_nand/mtd-utils-05.07.23.tar.bz2 -------------------------------------------------------------------------------- /drivers_and_test/15th_nor/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nor.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/15th_nor/1th/s3c_nor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/15th_nor/1th/s3c_nor.c -------------------------------------------------------------------------------- /drivers_and_test/15th_nor/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nor.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/15th_nor/2th/s3c_nor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/15th_nor/2th/s3c_nor.c -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += virt_net.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/1th/virt_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/16th_virt_net/1th/virt_net.c -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += virt_net.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/2th/virt_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/16th_virt_net/2th/virt_net.c -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += virt_net.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/3th/virt_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/16th_virt_net/3th/virt_net.c -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += virt_net.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/16th_virt_net/4th/virt_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/16th_virt_net/4th/virt_net.c -------------------------------------------------------------------------------- /drivers_and_test/17th_dm9000c/修改好的/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += dm9dev9000c.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/17th_dm9000c/修改好的/dm9dev9000c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/17th_dm9000c/修改好的/dm9dev9000c.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | INCLUDEDIR := $(shell pwd)/include 9 | CFLAGS := -Wall -O2 10 | CPPFLAGS := -nostdinc -I$(INCLUDEDIR) 11 | 12 | export CC LD OBJCOPY OBJDUMP INCLUDEDIR CFLAGS CPPFLAGS AR 13 | 14 | objs := head.o init.o nand.o interrupt.o i2c.o at24cxx.o serial.o main.o lib/libc.a 15 | 16 | i2c.bin: $(objs) 17 | ${LD} -Ti2c.lds -o i2c_elf $^ 18 | ${OBJCOPY} -O binary -S i2c_elf $@ 19 | ${OBJDUMP} -D -m arm i2c_elf > i2c.dis 20 | 21 | .PHONY : lib/libc.a 22 | lib/libc.a: 23 | cd lib; make; cd .. 24 | 25 | %.o:%.c 26 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 27 | 28 | %.o:%.S 29 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 30 | 31 | clean: 32 | make clean -C lib 33 | rm -f i2c.bin i2c_elf i2c.dis *.o 34 | 35 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/at24cxx.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "i2c.h" 4 | 5 | unsigned char at24cxx_read(unsigned char address) 6 | { 7 | unsigned char val; 8 | printf("at24cxx_read address = %d\r\n", address); 9 | i2c_write(0xA0, &address, 1); 10 | printf("at24cxx_read send address ok\r\n"); 11 | i2c_read(0xA0, (unsigned char *)&val, 1); 12 | printf("at24cxx_read get data ok\r\n"); 13 | return val; 14 | } 15 | 16 | void at24cxx_write(unsigned char address, unsigned char data) 17 | { 18 | unsigned char val[2]; 19 | val[0] = address; 20 | val[1] = data; 21 | i2c_write(0xA0, val, 2); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/head.S -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/i2c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/i2c.bin -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/i2c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/i2c.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/i2c.h: -------------------------------------------------------------------------------- 1 | //==================================================================== 2 | // File Name : 2410IIC.h 3 | // Function : S3C2410 IIC Test Program Head file 4 | // Program : Shin, On Pil (SOP) 5 | // Date : March 20, 2002 6 | // Version : 0.0 7 | // History 8 | // 0.0 : Programming start (March 11, 2002) -> SOP 9 | //==================================================================== 10 | 11 | #ifndef __2410IIC_H__ 12 | #define __2410IIC_H__ 13 | 14 | void i2c_init(void); 15 | void i2c_write(unsigned int slvAddr, unsigned char *buf, int len); 16 | void i2c_read(unsigned int slvAddr, unsigned char *buf, int len); 17 | void I2CIntHandle(void); 18 | 19 | #endif //__2410IIC_H__ 20 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/i2c.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { head.o(.text) 4 | init.o(.text) 5 | nand.o(.text) 6 | *(.text) 7 | } 8 | .rodata ALIGN(4) : {*(.rodata*)} 9 | .data ALIGN(4) : { *(.data) } 10 | __bss_start = .; 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | __bss_end = .; 13 | } 14 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/i2c_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/i2c_elf -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/include/gcclib.h: -------------------------------------------------------------------------------- 1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ 2 | /* I Molton 29/07/01 */ 3 | 4 | #define BITS_PER_UNIT 8 5 | #define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT) 6 | 7 | typedef unsigned int UQItype __attribute__ ((mode (QI))); 8 | typedef int SItype __attribute__ ((mode (SI))); 9 | typedef unsigned int USItype __attribute__ ((mode (SI))); 10 | typedef int DItype __attribute__ ((mode (DI))); 11 | typedef int word_type __attribute__ ((mode (__word__))); 12 | typedef unsigned int UDItype __attribute__ ((mode (DI))); 13 | 14 | #ifdef __ARMEB__ 15 | struct DIstruct {SItype high, low;}; 16 | #else 17 | struct DIstruct {SItype low, high;}; 18 | #endif 19 | 20 | typedef union 21 | { 22 | struct DIstruct s; 23 | DItype ll; 24 | } DIunion; 25 | 26 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/include/kernel.h: -------------------------------------------------------------------------------- 1 | #define INT_MAX ((int)(~0U>>1)) 2 | #define INT_MIN (-INT_MAX - 1) 3 | #define UINT_MAX (~0U) 4 | #define LONG_MAX ((long)(~0UL>>1)) 5 | #define LONG_MIN (-LONG_MAX - 1) 6 | #define ULONG_MAX (~0UL) 7 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/include/stdio.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _STDIO_H 3 | #define _STDIO_H 4 | 5 | #include "types.h" 6 | 7 | #ifndef _VALIST 8 | #define _VALIST 9 | typedef char *va_list; 10 | #endif /* _VALIST */ 11 | 12 | extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); 13 | extern int snprintf(char * buf, size_t size, const char *fmt, ...); 14 | extern int vsprintf(char *buf, const char *fmt, va_list args); 15 | extern int sprintf(char * buf, const char *fmt, ...); 16 | extern int vsscanf(const char * buf, const char * fmt, va_list args); 17 | extern int sscanf(const char * buf, const char * fmt, ...); 18 | 19 | extern void putc(unsigned char c); 20 | extern unsigned char getc(void); 21 | 22 | int printf(const char *fmt, ...); 23 | int scanf(const char * fmt, ...); 24 | 25 | #endif /* _STDIO_H */ 26 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/include/types.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _TPYES_H 3 | #define _TPYES_H 4 | 5 | #ifndef NULL 6 | #define NULL 0 7 | #endif 8 | 9 | #ifndef _SIZE_T 10 | #define _SIZE_T 11 | typedef unsigned int size_t; 12 | #endif /* _SIZE_T */ 13 | 14 | 15 | #endif /* _TPYES_H */ 16 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/init.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/interrupt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/interrupt.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/interrupt.h: -------------------------------------------------------------------------------- 1 | void EINT_Handle(); 2 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/lib/Makefile: -------------------------------------------------------------------------------- 1 | objs := div64.o lib1funcs.o ctype.o muldi3.o printf.o string.o vsprintf.o 2 | 3 | libc.a: $(objs) 4 | ${AR} -r -o $@ $^ 5 | 6 | %.o:%.c 7 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 8 | 9 | %.o:%.S 10 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 11 | 12 | clean: 13 | rm -f libc.a *.o 14 | 15 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/lib/printf.c: -------------------------------------------------------------------------------- 1 | #include "vsprintf.h" 2 | #include "string.h" 3 | #include "printf.h" 4 | 5 | extern void putc(unsigned char c); 6 | extern unsigned char getc(void); 7 | 8 | #define OUTBUFSIZE 1024 9 | #define INBUFSIZE 1024 10 | 11 | 12 | static unsigned char g_pcOutBuf[OUTBUFSIZE]; 13 | static unsigned char g_pcInBuf[INBUFSIZE]; 14 | 15 | 16 | int printf(const char *fmt, ...) 17 | { 18 | int i; 19 | int len; 20 | va_list args; 21 | 22 | va_start(args, fmt); 23 | len = vsprintf(g_pcOutBuf,fmt,args); 24 | va_end(args); 25 | for (i = 0; i < strlen(g_pcOutBuf); i++) 26 | { 27 | putc(g_pcOutBuf[i]); 28 | } 29 | 30 | return len; 31 | } 32 | 33 | 34 | 35 | int scanf(const char * fmt, ...) 36 | { 37 | int i = 0; 38 | unsigned char c; 39 | va_list args; 40 | 41 | while(1) 42 | { 43 | c = getc(); 44 | if((c == 0x0d) || (c == 0x0a)) 45 | { 46 | g_pcInBuf[i] = '\0'; 47 | break; 48 | } 49 | else 50 | { 51 | g_pcInBuf[i++] = c; 52 | } 53 | } 54 | 55 | va_start(args,fmt); 56 | i = vsscanf(g_pcInBuf,fmt,args); 57 | va_end(args); 58 | 59 | return i; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/lib/printf.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _PRINTF_H 3 | #define _PRINTF_H 4 | 5 | int printf(const char *fmt, ...); 6 | int scanf(const char * fmt, ...); 7 | 8 | #endif /* _PRINTF_H */ 9 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/m41t11.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/m41t11.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/m41t11.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/m41t11.h -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/main.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/nand.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/serial.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/serial.c -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/serial.h: -------------------------------------------------------------------------------- 1 | void uart0_init(void); 2 | void putc(unsigned char c); 3 | unsigned char getc(void); 4 | int isDigit(unsigned char c); 5 | int isLetter(unsigned char c); 6 | -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IAB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IAB -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IAD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IAD -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IMB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IMB -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IMD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.IMD -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PFI: -------------------------------------------------------------------------------- 1 | t`  2 |  -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PO -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PR -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PRI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PRI -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.PS -------------------------------------------------------------------------------- /drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.WK3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/18th_i2c/at24cxx/si/18th_i2c.WK3 -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/1th/at24cxx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/1th/at24cxx.c -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/2th/at24cxx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/2th/at24cxx.c -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/3th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/3th/at24cxx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/3th/at24cxx.c -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/4th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/4th/at24cxx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/4th/at24cxx.c -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/5th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/5th/at24cxx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/5th/at24cxx.c -------------------------------------------------------------------------------- /drivers_and_test/19th_i2c_drv/5th/i2c_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/19th_i2c_drv/5th/i2c_test -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/1th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += hello.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/1th/hello.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/20th_chrdev_another/1th/hello.c -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += hello.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/2th/hello.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/20th_chrdev_another/2th/hello.c -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/hello_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/20th_chrdev_another/hello_test -------------------------------------------------------------------------------- /drivers_and_test/20th_chrdev_another/hello_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | /* 10 | * hello_test /dev/hello0 11 | */ 12 | 13 | void print_usage(char *file) 14 | { 15 | printf("%s \n", file); 16 | } 17 | 18 | int main(int argc, char **argv) 19 | { 20 | int fd; 21 | if (argc != 2) 22 | { 23 | print_usage(argv[0]); 24 | return 0; 25 | } 26 | 27 | fd = open(argv[1], O_RDWR); 28 | if (fd < 0) 29 | printf("can't open %s\n", argv[1]); 30 | else 31 | printf("can open %s\n", argv[1]); 32 | 33 | return 0; 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /drivers_and_test/21th_sound/app/libid3tag-0.15.1b.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/21th_sound/app/libid3tag-0.15.1b.tar.gz -------------------------------------------------------------------------------- /drivers_and_test/21th_sound/app/libmad-0.15.1b.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/21th_sound/app/libmad-0.15.1b.tar.gz -------------------------------------------------------------------------------- /drivers_and_test/21th_sound/app/madplay-0.15.2b.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/21th_sound/app/madplay-0.15.2b.tar.gz -------------------------------------------------------------------------------- /drivers_and_test/21th_sound/driver/s3c-wm8976.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/21th_sound/driver/s3c-wm8976.c -------------------------------------------------------------------------------- /drivers_and_test/21th_sound/driver/s3c2410-uda1341.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/21th_sound/driver/s3c2410-uda1341.c -------------------------------------------------------------------------------- /drivers_and_test/22th_dma/1th/dma.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/22th_dma/1th/dma.c -------------------------------------------------------------------------------- /drivers_and_test/22th_dma/2th/dma.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/22th_dma/2th/dma.c -------------------------------------------------------------------------------- /drivers_and_test/22th_dma/3th/dma.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/22th_dma/3th/dma.c -------------------------------------------------------------------------------- /drivers_and_test/22th_dma/4th/dma.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/22th_dma/4th/dma.c -------------------------------------------------------------------------------- /drivers_and_test/22th_dma/dma_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | /* ./dma_test nodma 9 | * ./dma_test dma 10 | */ 11 | #define MEM_CPY_NO_DMA 0 12 | #define MEM_CPY_DMA 1 13 | 14 | void print_usage(char *name) 15 | { 16 | printf("Usage:\n"); 17 | printf("%s \n", name); 18 | } 19 | 20 | 21 | int main(int argc, char **argv) 22 | { 23 | int fd; 24 | 25 | if (argc != 2) 26 | { 27 | print_usage(argv[0]); 28 | return -1; 29 | } 30 | 31 | fd = open("/dev/dma", O_RDWR); 32 | if (fd < 0) 33 | { 34 | printf("can't open /dev/dma\n"); 35 | return -1; 36 | } 37 | 38 | if (strcmp(argv[1], "nodma") == 0) 39 | { 40 | while (1) 41 | { 42 | ioctl(fd, MEM_CPY_NO_DMA); 43 | } 44 | } 45 | else if (strcmp(argv[1], "dma") == 0) 46 | { 47 | while (1) 48 | { 49 | ioctl(fd, MEM_CPY_DMA); 50 | } 51 | } 52 | else 53 | { 54 | print_usage(argv[0]); 55 | return -1; 56 | } 57 | return 0; 58 | } 59 | 60 | -------------------------------------------------------------------------------- /drivers_and_test/23th_debug_with_printk/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/23th_debug_with_printk/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/23th_debug_with_printk/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/23th_debug_with_printk/first_drv_ok.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/23th_debug_with_printk/first_drv_ok.c -------------------------------------------------------------------------------- /drivers_and_test/23th_debug_with_printk/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/23th_debug_with_printk/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/23th_debug_with_printk/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/1th/mymsg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | struct proc_dir_entry *myentry; 14 | 15 | const struct file_operations proc_mymsg_operations = { 16 | }; 17 | 18 | static int mymsg_init(void) 19 | { 20 | myentry = create_proc_entry("mymsg", S_IRUSR, &proc_root); 21 | if (myentry) 22 | myentry->proc_fops = &proc_mymsg_operations; 23 | return 0; 24 | } 25 | 26 | static void mymsg_exit(void) 27 | { 28 | remove_proc_entry("mymsg", &proc_root); 29 | } 30 | 31 | module_init(mymsg_init); 32 | module_exit(mymsg_exit); 33 | 34 | MODULE_LICENSE("GPL"); 35 | 36 | -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/2th/mymsg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | struct proc_dir_entry *myentry; 14 | 15 | static ssize_t mymsg_read(struct file *file, char __user *buf, 16 | size_t count, loff_t *ppos) 17 | { 18 | printk("mymsg_read\n"); 19 | return 0; 20 | } 21 | 22 | const struct file_operations proc_mymsg_operations = { 23 | .read = mymsg_read, 24 | }; 25 | 26 | static int mymsg_init(void) 27 | { 28 | myentry = create_proc_entry("mymsg", S_IRUSR, &proc_root); 29 | if (myentry) 30 | myentry->proc_fops = &proc_mymsg_operations; 31 | return 0; 32 | } 33 | 34 | static void mymsg_exit(void) 35 | { 36 | remove_proc_entry("mymsg", &proc_root); 37 | } 38 | 39 | module_init(mymsg_init); 40 | module_exit(mymsg_exit); 41 | 42 | MODULE_LICENSE("GPL"); 43 | 44 | -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/3th/mymsg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/3th/mymsg.c -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/4th/mymsg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/4th/mymsg.c -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/5th/mymsg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/5th/mymsg.c -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/6th/mymsg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/6th/mymsg.c -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/first_drv_myprintk/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/first_drv_myprintk/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/first_drv_myprintk/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/first_drv_myprintk/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/24th_proc_mymsg/first_drv_myprintk/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/24th_proc_mymsg/first_drv_myprintk/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/25th_debug_segmentfault/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/25th_debug_segmentfault/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/25th_debug_segmentfault/first_drv/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/25th_debug_segmentfault/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/25th_debug_segmentfault/first_drv/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/25th_debug_segmentfault/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/25th_debug_segmentfault/first_drv/frist_drv.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/25th_debug_segmentfault/first_drv/frist_drv.dis -------------------------------------------------------------------------------- /drivers_and_test/26th_debug_regeditor/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/26th_debug_regeditor/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/26th_debug_regeditor/first_drv/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/26th_debug_regeditor/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/26th_debug_regeditor/first_drv/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/26th_debug_regeditor/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/26th_debug_regeditor/ker_rw.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/26th_debug_regeditor/ker_rw.c -------------------------------------------------------------------------------- /drivers_and_test/27th_debug_with_timer/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/27th_debug_with_timer/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/27th_debug_with_timer/first_drv/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/27th_debug_with_timer/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/27th_debug_with_timer/first_drv/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/27th_debug_with_timer/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/28th_app_debug/test_debug.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | void C(int *p) 5 | { 6 | *p = 0x12; 7 | } 8 | 9 | 10 | void B(int *p) 11 | { 12 | C(p); 13 | } 14 | 15 | void A(int *p) 16 | { 17 | B(p); 18 | } 19 | 20 | void A2(int *p) 21 | { 22 | C(p); 23 | } 24 | 25 | 26 | int main(int argc, char **argv) 27 | { 28 | int a; 29 | int *p = NULL; 30 | 31 | A2(&a); // A2 > C 32 | printf("a = 0x%x\n", a); 33 | 34 | A(p); // A > B > C 35 | 36 | return 0; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /drivers_and_test/28th_app_debug/test_debug_static.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/28th_app_debug/test_debug_static.dis -------------------------------------------------------------------------------- /drivers_and_test/29th_app_system_call/test_system_call.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | //#include 4 | 5 | //#if defined(__thumb__) || defined(__ARM_EABI__) 6 | //#define __NR_SYSCALL_BASE 0 7 | //#else 8 | #define __NR_SYSCALL_BASE 0x900000 9 | //#endif 10 | 11 | void hello(char *buf, int count) 12 | { 13 | /* swi */ 14 | 15 | asm ("mov r0, %0\n" /* save the argment in r0 */ 16 | "mov r1, %1\n" /* save the argment in r0 */ 17 | "swi %2\n" /* do the system call */ 18 | : 19 | : "r"(buf), "r"(count), "i" (__NR_SYSCALL_BASE + 352) 20 | : "r0", "r1"); 21 | } 22 | 23 | int main(int argc, char **argv) 24 | { 25 | printf("in app, call hello\n"); 26 | hello("www.100ask.net", 15); 27 | return 0; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/kernel/read_write.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/kernel/read_write.c -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/read_write.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/read_write.c -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int cnt = 0; 5 | 6 | void C(void) 7 | { 8 | int i = 0; 9 | 10 | while (1) 11 | { 12 | printf("Hello, cnt = %d, i = %d\n", cnt, i); 13 | cnt++; 14 | i = i + 2; 15 | } 16 | } 17 | 18 | void B(void) 19 | { 20 | C(); 21 | } 22 | 23 | 24 | void A(void) 25 | { 26 | B(); 27 | } 28 | 29 | int main(int argc, char **argv) 30 | { 31 | A(); 32 | return 0; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc.dis -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc_sleep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc_sleep -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc_sleep.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | int cnt = 0; 6 | 7 | void C(void) 8 | { 9 | int i = 0; 10 | 11 | while (1) 12 | { 13 | printf("Hello, cnt = %d, i = %d\n", cnt, i); 14 | cnt++; 15 | i = i + 2; 16 | sleep(5); 17 | } 18 | } 19 | 20 | void B(void) 21 | { 22 | C(); 23 | } 24 | 25 | 26 | void A(void) 27 | { 28 | B(); 29 | } 30 | 31 | int main(int argc, char **argv) 32 | { 33 | A(); 34 | return 0; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc_sleep.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc_sleep.dis -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc_sleep_swi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc_sleep_swi -------------------------------------------------------------------------------- /drivers_and_test/30th_debug_with_system_call/test_sc_swi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/30th_debug_with_system_call/test_sc_swi -------------------------------------------------------------------------------- /drivers_and_test/31th_debug_input_emulate/1th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/31th_debug_input_emulate/1th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/31th_debug_input_emulate/2th/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/31th_debug_input_emulate/2th/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/31th_debug_input_emulate/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | obj-m += mymsg.o -------------------------------------------------------------------------------- /drivers_and_test/31th_debug_input_emulate/mymsg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/31th_debug_input_emulate/mymsg.c -------------------------------------------------------------------------------- /drivers_and_test/31th_debug_input_emulate/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/31th_debug_input_emulate/s3c_ts.c -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | CFLAGS := -Wall -O2 9 | CPPFLAGS := -nostdinc -nostdlib -fno-builtin 10 | 11 | objs := start.o init.o boot.o 12 | 13 | boot.bin: $(objs) 14 | ${LD} -Tboot.lds -o boot.elf $^ 15 | ${OBJCOPY} -O binary -S boot.elf $@ 16 | ${OBJDUMP} -D -m arm boot.elf > boot.dis 17 | 18 | %.o:%.c 19 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 20 | 21 | %.o:%.S 22 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 23 | 24 | clean: 25 | rm -f *.o *.bin *.elf *.dis 26 | 27 | -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/boot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/1th/boot.bin -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/boot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/1th/boot.c -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/boot.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x33f80000; 3 | .text : { *(.text) } 4 | 5 | . = ALIGN(4); 6 | .rodata : {*(.rodata*)} 7 | 8 | . = ALIGN(4); 9 | .data : { *(.data) } 10 | 11 | . = ALIGN(4); 12 | __bss_start = .; 13 | .bss : { *(.bss) *(COMMON) } 14 | __bss_end = .; 15 | } 16 | -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/1th/init.c -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/1th/start.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/1th/start.S -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | CFLAGS := -Wall -O2 9 | CPPFLAGS := -nostdinc -nostdlib -fno-builtin 10 | 11 | objs := start.o init.o boot.o 12 | 13 | boot.bin: $(objs) 14 | ${LD} -Tboot.lds -o boot.elf $^ 15 | ${OBJCOPY} -O binary -S boot.elf $@ 16 | ${OBJDUMP} -D -m arm boot.elf > boot.dis 17 | 18 | %.o:%.c 19 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 20 | 21 | %.o:%.S 22 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 23 | 24 | clean: 25 | rm -f *.o *.bin *.elf *.dis 26 | 27 | -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/boot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/2th/boot.bin -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/boot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/2th/boot.c -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/boot.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x33f80000; 3 | .text : { *(.text) } 4 | 5 | . = ALIGN(4); 6 | .rodata : {*(.rodata*)} 7 | 8 | . = ALIGN(4); 9 | .data : { *(.data) } 10 | 11 | . = ALIGN(4); 12 | __bss_start = .; 13 | .bss : { *(.bss) *(COMMON) } 14 | __bss_end = .; 15 | } 16 | -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/2th/init.c -------------------------------------------------------------------------------- /drivers_and_test/32th_my_bootloader/2th/start.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/32th_my_bootloader/2th/start.S -------------------------------------------------------------------------------- /drivers_and_test/7th_buttons_all/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += buttons.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/7th_buttons_all/buttons.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/7th_buttons_all/buttons.c -------------------------------------------------------------------------------- /drivers_and_test/7th_buttons_all/buttons_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/7th_buttons_all/buttons_test -------------------------------------------------------------------------------- /drivers_and_test/7th_buttons_all/buttons_test.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | /* sixthdrvtest 14 | */ 15 | int fd; 16 | 17 | void my_signal_fun(int signum) 18 | { 19 | unsigned char key_val; 20 | read(fd, &key_val, 1); 21 | printf("key_val: 0x%x\n", key_val); 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | unsigned char key_val; 27 | int ret; 28 | int Oflags; 29 | 30 | //signal(SIGIO, my_signal_fun); 31 | 32 | fd = open("/dev/buttons", O_RDWR); 33 | if (fd < 0) 34 | { 35 | printf("can't open!\n"); 36 | return -1; 37 | } 38 | 39 | //fcntl(fd, F_SETOWN, getpid()); 40 | 41 | //Oflags = fcntl(fd, F_GETFL); 42 | 43 | //fcntl(fd, F_SETFL, Oflags | FASYNC); 44 | 45 | 46 | while (1) 47 | { 48 | ret = read(fd, &key_val, 1); 49 | printf("key_val: 0x%x, ret = %d\n", key_val, ret); 50 | //sleep(5); 51 | } 52 | 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /drivers_and_test/8th_buttons_input/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += buttons.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/8th_buttons_input/buttons.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/8th_buttons_input/buttons.c -------------------------------------------------------------------------------- /drivers_and_test/9th_led_bus_drv_dev/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += led_drv.o 11 | obj-m += led_dev.o 12 | -------------------------------------------------------------------------------- /drivers_and_test/9th_led_bus_drv_dev/led_dev.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/9th_led_bus_drv_dev/led_dev.c -------------------------------------------------------------------------------- /drivers_and_test/9th_led_bus_drv_dev/led_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/9th_led_bus_drv_dev/led_drv.c -------------------------------------------------------------------------------- /drivers_and_test/9th_led_bus_drv_dev/led_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/9th_led_bus_drv_dev/led_test -------------------------------------------------------------------------------- /drivers_and_test/9th_led_bus_drv_dev/led_test.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* led_test on 8 | * led_test off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/led", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/buttons/Makefile: -------------------------------------------------------------------------------- 1 | CROSS=arm-linux- 2 | 3 | all: button_test 4 | 5 | button_test: button_test.c 6 | $(CROSS)gcc -o $@ button_test.c -static 7 | 8 | clean: 9 | @rm -rf button_test *.o 10 | -------------------------------------------------------------------------------- /drivers_and_test/buttons/button_test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/buttons/button_test.c -------------------------------------------------------------------------------- /drivers_and_test/buttons/s3c24xx_buttons.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/buttons/s3c24xx_buttons.c -------------------------------------------------------------------------------- /drivers_and_test/fb_test/Makefile: -------------------------------------------------------------------------------- 1 | CC=arm-linux-gcc 2 | 3 | fb_test: fb_test.c 4 | $(CC) -o $@ $^ 5 | 6 | clean: 7 | rm -f *.o fb_test 8 | -------------------------------------------------------------------------------- /drivers_and_test/fb_test/fb_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/fb_test/fb_test -------------------------------------------------------------------------------- /drivers_and_test/fifth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += fifth_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/fifth_drv/fifth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/fifth_drv/fifth_drv.c -------------------------------------------------------------------------------- /drivers_and_test/fifth_drv/fifthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/fifth_drv/fifthdrvtest -------------------------------------------------------------------------------- /drivers_and_test/fifth_drv/fifthdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | /* fifthdrvtest 14 | */ 15 | int fd; 16 | 17 | void my_signal_fun(int signum) 18 | { 19 | unsigned char key_val; 20 | read(fd, &key_val, 1); 21 | printf("key_val: 0x%x\n", key_val); 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | unsigned char key_val; 27 | int ret; 28 | int Oflags; 29 | 30 | signal(SIGIO, my_signal_fun); 31 | 32 | fd = open("/dev/buttons", O_RDWR); 33 | if (fd < 0) 34 | { 35 | printf("can't open!\n"); 36 | } 37 | 38 | fcntl(fd, F_SETOWN, getpid()); 39 | 40 | Oflags = fcntl(fd, F_GETFL); 41 | 42 | fcntl(fd, F_SETFL, Oflags | FASYNC); 43 | 44 | 45 | while (1) 46 | { 47 | sleep(1000); 48 | } 49 | 50 | return 0; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /drivers_and_test/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/first_drv/first_drv.c -------------------------------------------------------------------------------- /drivers_and_test/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/first_drv/firstdrvtest -------------------------------------------------------------------------------- /drivers_and_test/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /drivers_and_test/forth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += forth_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/forth_drv/forth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/forth_drv/forth_drv.c -------------------------------------------------------------------------------- /drivers_and_test/forth_drv/forthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/forth_drv/forthdrvtest -------------------------------------------------------------------------------- /drivers_and_test/forth_drv/forthdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | /* forthdrvtest 10 | */ 11 | int main(int argc, char **argv) 12 | { 13 | int fd; 14 | unsigned char key_val; 15 | int ret; 16 | 17 | struct pollfd fds[1]; 18 | 19 | fd = open("/dev/buttons", O_RDWR); 20 | if (fd < 0) 21 | { 22 | printf("can't open!\n"); 23 | } 24 | 25 | fds[0].fd = fd; 26 | fds[0].events = POLLIN; 27 | while (1) 28 | { 29 | ret = poll(fds, 1, 5000); 30 | if (ret == 0) 31 | { 32 | printf("time out\n"); 33 | } 34 | else 35 | { 36 | read(fd, &key_val, 1); 37 | printf("key_val = 0x%x\n", key_val); 38 | } 39 | } 40 | 41 | return 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /drivers_and_test/leds/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += myleds.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/leds/ledtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/leds/ledtest -------------------------------------------------------------------------------- /drivers_and_test/leds/ledtest.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/leds/ledtest.c -------------------------------------------------------------------------------- /drivers_and_test/leds/myleds.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/leds/myleds.c -------------------------------------------------------------------------------- /drivers_and_test/regeditor/Makefile: -------------------------------------------------------------------------------- 1 | CROSS=arm-linux- 2 | 3 | all: regeditor 4 | 5 | regeditor: regeditor.c 6 | $(CROSS)gcc -o $@ regeditor.c -static 7 | 8 | clean: 9 | @rm -rf regeditor *.o 10 | -------------------------------------------------------------------------------- /drivers_and_test/regeditor/regeditor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/regeditor/regeditor -------------------------------------------------------------------------------- /drivers_and_test/second_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += second_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/second_drv/second_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/second_drv/second_drv.c -------------------------------------------------------------------------------- /drivers_and_test/second_drv/seconddrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/second_drv/seconddrvtest -------------------------------------------------------------------------------- /drivers_and_test/second_drv/seconddrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* seconddrvtest 8 | */ 9 | int main(int argc, char **argv) 10 | { 11 | int fd; 12 | unsigned char key_vals[4]; 13 | int cnt = 0; 14 | 15 | fd = open("/dev/buttons", O_RDWR); 16 | if (fd < 0) 17 | { 18 | printf("can't open!\n"); 19 | } 20 | 21 | while (1) 22 | { 23 | read(fd, key_vals, sizeof(key_vals)); 24 | if (!key_vals[0] || !key_vals[1] || !key_vals[2] || !key_vals[3]) 25 | { 26 | printf("%04d key pressed: %d %d %d %d\n", cnt++, key_vals[0], key_vals[1], key_vals[2], key_vals[3]); 27 | } 28 | } 29 | 30 | return 0; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /drivers_and_test/sixth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += sixth_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/sixth_drv/sixth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/sixth_drv/sixth_drv.c -------------------------------------------------------------------------------- /drivers_and_test/sixth_drv/sixthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/sixth_drv/sixthdrvtest -------------------------------------------------------------------------------- /drivers_and_test/sixth_drv/sixthdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | /* sixthdrvtest 14 | */ 15 | int fd; 16 | 17 | void my_signal_fun(int signum) 18 | { 19 | unsigned char key_val; 20 | read(fd, &key_val, 1); 21 | printf("key_val: 0x%x\n", key_val); 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | unsigned char key_val; 27 | int ret; 28 | int Oflags; 29 | 30 | //signal(SIGIO, my_signal_fun); 31 | 32 | fd = open("/dev/buttons", O_RDWR | O_NONBLOCK); 33 | if (fd < 0) 34 | { 35 | printf("can't open!\n"); 36 | return -1; 37 | } 38 | 39 | //fcntl(fd, F_SETOWN, getpid()); 40 | 41 | //Oflags = fcntl(fd, F_GETFL); 42 | 43 | //fcntl(fd, F_SETFL, Oflags | FASYNC); 44 | 45 | 46 | while (1) 47 | { 48 | ret = read(fd, &key_val, 1); 49 | printf("key_val: 0x%x, ret = %d\n", key_val, ret); 50 | sleep(5); 51 | } 52 | 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /drivers_and_test/test/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += third_drv.o 11 | obj-m += test_drv.o 12 | -------------------------------------------------------------------------------- /drivers_and_test/test/signal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/test/signal -------------------------------------------------------------------------------- /drivers_and_test/test/signal.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | void my_signal_fun(int signum) 6 | { 7 | static int cnt = 0; 8 | printf("signal = %d, %d times\n", signum, ++cnt); 9 | } 10 | 11 | int main(int argc, char **argv) 12 | { 13 | 14 | signal(SIGUSR1, my_signal_fun); 15 | 16 | while (1) 17 | { 18 | sleep(1000); 19 | } 20 | return 0; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /drivers_and_test/test/test_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/test/test_drv.c -------------------------------------------------------------------------------- /drivers_and_test/test/testdrv_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/test/testdrv_test -------------------------------------------------------------------------------- /drivers_and_test/test/testdrv_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | int fd; 11 | 12 | void my_sig_fun(int signo) 13 | { 14 | //static int cnt = 0; 15 | //printf("Get signal: %d, %d times\n", signo, ++cnt); 16 | 17 | unsigned char key_val; 18 | 19 | read(fd, &key_val, 1); 20 | printf("key_val = 0x%x\n", key_val); 21 | } 22 | 23 | int main(int argc, char **argv) 24 | { 25 | int flags; 26 | fd = open("/dev/buttons", O_RDWR); 27 | if (fd < 0) 28 | { 29 | printf("can't open!\n"); 30 | return -1; 31 | } 32 | 33 | fcntl(fd, F_SETOWN, getpid()); 34 | 35 | flags = fcntl(fd, F_GETFL); 36 | fcntl(fd, F_SETFL, flags | FASYNC); 37 | 38 | 39 | signal(SIGIO, my_sig_fun); 40 | while (1) 41 | { 42 | sleep(1000); 43 | } 44 | return 0; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /drivers_and_test/test/third_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/test/third_drv.c -------------------------------------------------------------------------------- /drivers_and_test/test/thirddrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/test/thirddrvtest -------------------------------------------------------------------------------- /drivers_and_test/test/thirddrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | /* thirddrvtest 10 | */ 11 | int main(int argc, char **argv) 12 | { 13 | int fd; 14 | unsigned char key_val; 15 | struct pollfd fds[1]; 16 | int ret; 17 | 18 | fd = open("/dev/buttons", O_RDWR); 19 | if (fd < 0) 20 | { 21 | printf("can't open!\n"); 22 | } 23 | 24 | fds[0].fd = fd; 25 | fds[0].events = POLLIN; 26 | 27 | while (1) 28 | { 29 | ret = poll(fds, 1, 5000); 30 | if (ret == 0) 31 | { 32 | printf("time out\n"); 33 | } 34 | else 35 | { 36 | read(fd, &key_val, 1); 37 | printf("key_val = 0x%x\n", key_val); 38 | } 39 | } 40 | 41 | return 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /drivers_and_test/third_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += third_drv.o 11 | -------------------------------------------------------------------------------- /drivers_and_test/third_drv/third_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/third_drv/third_drv.c -------------------------------------------------------------------------------- /drivers_and_test/third_drv/thirddrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/third_drv/thirddrvtest -------------------------------------------------------------------------------- /drivers_and_test/third_drv/thirddrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | /* thirddrvtest 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | unsigned char key_val; 14 | 15 | fd = open("/dev/buttons", O_RDWR); 16 | if (fd < 0) 17 | { 18 | printf("can't open!\n"); 19 | } 20 | 21 | while (1) 22 | { 23 | //read(fd, &key_val, 1); 24 | //printf("key_val = 0x%x\n", key_val); 25 | sleep(5); 26 | } 27 | 28 | return 0; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /drivers_and_test/图片/3.4.2内核下的I2C驱动.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/3.4.2内核下的I2C驱动.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/DMA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/DMA.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/I2C驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/I2C驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/LCD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/LCD.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/NAND FLASH驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/NAND FLASH驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/NOR FLASH驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/NOR FLASH驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/UEVENT.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/UEVENT.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/USB设备驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/USB设备驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/input1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/input1.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/mdev.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/mdev.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/mmu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/mmu.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/timer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/timer.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/分层分离.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/分层分离.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/初接触开发板.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/初接触开发板.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/块设备驱动程序的引入.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/块设备驱动程序的引入.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/声卡驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/声卡驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/声卡驱动程序之编写WM8976.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/声卡驱动程序之编写WM8976.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/字符设备驱动程序的另一种写法.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/字符设备驱动程序的另一种写法.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/应用调试.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/应用调试.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/怎么看原理图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/怎么看原理图.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/移植最新版本3.4.2内核.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/移植最新版本3.4.2内核.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/移植最新的u-boot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/移植最新的u-boot.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/移植驱动到3.4.2内核上.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/移植驱动到3.4.2内核上.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/网卡驱动程序.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/网卡驱动程序.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/自己写bootloader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/自己写bootloader.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/裸板调试.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/裸板调试.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/触摸屏.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/触摸屏.jpg -------------------------------------------------------------------------------- /drivers_and_test/图片/驱动调试.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/图片/驱动调试.jpg -------------------------------------------------------------------------------- /drivers_and_test/文档/3.4.2内核下的I2C驱动.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/3.4.2内核下的I2C驱动.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/I2C驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/I2C驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/LCD驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/LCD驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/NAND FLASH驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/NAND FLASH驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/NOR FLASH驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/NOR FLASH驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/RTC驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/RTC驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/USB描述符.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/USB描述符.bmp -------------------------------------------------------------------------------- /drivers_and_test/文档/USB设备驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/USB设备驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/Windows.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/Windows.wav -------------------------------------------------------------------------------- /drivers_and_test/文档/input子系统.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/input子系统.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list1.txt: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | main() 4 | { 5 | ptrace(PTRACE_TRACEME, 0, 0, 0); 6 | while(1); 7 | } 8 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list11.txt: -------------------------------------------------------------------------------- 1 | //wait for child to stop at the `exec' 2 | wait(&status); 3 | while(1) { 4 | // do just one instruction 5 | ptrace(PTRACE_SINGLESTEP, pid, 0, 0); 6 | wait(&status); 7 | if(WIFEXITED(status)) break; 8 | // `addr' is address of `i' in child process 9 | dat = ptrace(PTRACE_PEEKDATA, pid, addr, 0); 10 | if(dat == 10) { 11 | ptrace(PTRACE_POKEDATA, pid, addr, 2341); 12 | ptrace(PTRACE_CONT, pid, 0, 0); 13 | break; 14 | } 15 | } 16 | wait(&status); 17 | if(WIFEXITED(status))printf("child over\n"); 18 | 19 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list12.txt: -------------------------------------------------------------------------------- 1 | 2 | //compile into `child5' 3 | int i; 4 | main() 5 | { 6 | i = 10; 7 | printf("child: i = %d\n", i); 8 | } 9 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list13.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | main() 7 | { 8 | 9 | int status = 0, pid, r; 10 | struct user_regs_struct uregs; 11 | if ((pid=fork())==0) { 12 | printf("pid = %d, ppid = %d\n", getpid(), getppid()); 13 | ptrace(PTRACE_TRACEME, 0, 0, 0); 14 | kill(getpid(), SIGINT); 15 | r = getpid(); 16 | printf("%d\n", r); 17 | } else { 18 | wait(&status); 19 | ptrace(PTRACE_SYSCALL, pid, 0, 0); 20 | wait(&status); 21 | ptrace(PTRACE_GETREGS, pid, 0, &uregs); 22 | //this should print 20, syscall number of getpid 23 | printf("syscall nr: %d\n", uregs.orig_eax); 24 | // 64 is syscall number of getppid 25 | uregs.orig_eax = 64; 26 | ptrace(PTRACE_SETREGS, pid, 0, &uregs); 27 | ptrace(PTRACE_CONT, pid, 0, 0); 28 | wait(&status); 29 | if(WIFEXITED(status))printf("child over\n"); 30 | sleep(1000); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list14.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | main() 7 | { 8 | 9 | int status = 0, pid, addr; 10 | struct user_regs_struct uregs; 11 | 12 | scanf("%x%d", &addr, &pid); 13 | ptrace(PTRACE_ATTACH, pid, 0, 0); 14 | wait(&status); 15 | ptrace(PTRACE_GETREGS, pid, 0, &uregs); 16 | printf("eip: %x\n", uregs.eip); 17 | uregs.eip = addr; 18 | ptrace(PTRACE_SETREGS, pid, 0, &uregs); 19 | ptrace(PTRACE_CONT, pid, 0, 0); 20 | wait(&status); 21 | if(WIFEXITED(status))printf("child over\n"); 22 | sleep(1000); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list15.txt: -------------------------------------------------------------------------------- 1 | fun() 2 | { 3 | while(1) printf("hello\n"); 4 | } 5 | 6 | main() 7 | { 8 | while(1); 9 | } 10 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list2.txt: -------------------------------------------------------------------------------- 1 | /* `tracer' parent */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | main() 7 | { 8 | int pid, status; 9 | if((pid = fork()) == 0) { 10 | execl("/home2/lfy/child1", "child1", 0); 11 | printf("exec failed...\n"); 12 | } else { 13 | sleep(1); 14 | kill(pid, SIGINT); 15 | wait(&status); // wait for child to stop 16 | if(WIFSTOPPED(status)) 17 | printf("child has stopped...\n"); 18 | sleep(3); 19 | ptrace(PTRACE_CONT, pid, 0, 0); 20 | /* Will not come out of this wait because 21 | * child does not terminate. 22 | */ 23 | wait(&status); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list3.txt: -------------------------------------------------------------------------------- 1 | /* compile this program to `child1' */ 2 | #include 3 | main() 4 | { 5 | ptrace(PTRACE_TRACEME, 0, 0, 0); 6 | while(1) printf("hello\n"); 7 | } 8 | 9 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list4.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | main() 6 | { 7 | int pid, status; 8 | if((pid = fork()) == 0) { 9 | ptrace(PTRACE_TRACEME, 0, 0, 0); 10 | execl("/home2/lfy/child2", "child2", 0); 11 | printf("exec failed...\n"); 12 | } else { 13 | wait(&status); 14 | if(WIFSTOPPED(status)) 15 | printf("child has stopped...\n"); 16 | sleep(10); 17 | ptrace(PTRACE_CONT, pid, 0, 0); 18 | wait(&status); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list5.txt: -------------------------------------------------------------------------------- 1 | //compile into `child2' 2 | main() 3 | { 4 | /* Note that we are not calling ptrace(PTRACE_TRACEME,...) 5 | * here. That will be done by the process which has 6 | * exec'd this one. 7 | */ 8 | printf("child starts...\n"); 9 | sleep(1); 10 | while(1) printf("hello\n"); 11 | } 12 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list6.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | main() 7 | { 8 | 9 | int i = 0, status = 0, pid; 10 | struct user_regs_struct uregs; 11 | 12 | if ((pid=fork())==0) { 13 | ptrace(PTRACE_TRACEME, 0, 0, 0); 14 | execl("/home2/lfy/child3", "child3", 0); 15 | printf("execl error...\n"); 16 | } else { 17 | wait(&status); 18 | ptrace(PTRACE_CONT, pid, 0, 0); 19 | sleep(1); 20 | //child should have got into the loop by 21 | //this time! 22 | kill(pid, SIGINT); 23 | wait(&status); 24 | ptrace(PTRACE_GETREGS, pid, 0, &uregs); 25 | printf("ebx = %d\n", uregs.ebx); 26 | uregs.ebx = 245; 27 | ptrace(PTRACE_SETREGS, pid, 0, &uregs); 28 | ptrace(PTRACE_CONT, pid, 0, 0); 29 | wait(&status); 30 | printf("parent: out of wait: %d...\n", WIFSTOPPED(status)); 31 | sleep(100); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list7.txt: -------------------------------------------------------------------------------- 1 | /* Compile this program into `child3' */ 2 | main() 3 | { 4 | printf("child3 starts...\n"); 5 | asm("pushl %ebx\n\t" 6 | "movl $143, %ebx\n\t" 7 | "L1: cmpl $245, %ebx\n\t" 8 | "jne L1\n\t" 9 | "popl %ebx\n\t"); 10 | printf("child3 outside loop...\n"); 11 | } 12 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list8.txt: -------------------------------------------------------------------------------- 1 | /* Compile this program into `child4' */ 2 | int i = 143; 3 | main() 4 | { 5 | printf("child4 starts...\n"); 6 | while(i != 245); 7 | printf("child4 outside loop...\n"); 8 | } 9 | -------------------------------------------------------------------------------- /drivers_and_test/文档/ptrace/list9.txt: -------------------------------------------------------------------------------- 1 | //segment of code which alters value of 2 | //a variable in a child process. Identical 3 | //to code which reads and changes register value. 4 | 5 | //`addr' is address of variable being accessed. 6 | data = ptrace(PTRACE_PEEKDATA, pid, addr, 0); 7 | printf("data = %d\n", data); 8 | data = 245; 9 | ptrace(PTRACE_POKEDATA, pid, addr, data); 10 | ptrace(PTRACE_CONT, pid, 0, 0); 11 | wait(&status); 12 | 13 | -------------------------------------------------------------------------------- /drivers_and_test/文档/tslib-1.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/tslib-1.4.tar.gz -------------------------------------------------------------------------------- /drivers_and_test/文档/tslib编译使用方法.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/tslib编译使用方法.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/uevent.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/uevent.txt -------------------------------------------------------------------------------- /drivers_and_test/文档/初接触开发板之基本操作.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/初接触开发板之基本操作.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/块设备驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/块设备驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/声卡驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/声卡驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/寄存器位查看小工具.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/寄存器位查看小工具.exe -------------------------------------------------------------------------------- /drivers_and_test/文档/应用调试.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/应用调试.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/怎么看原理图.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/怎么看原理图.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/目录.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/目录.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/移植所有驱动到3.4.2内核去.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/移植所有驱动到3.4.2内核去.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/移植最新版本3.4.2内核.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/移植最新版本3.4.2内核.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/移植最新的u-boot.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/移植最新的u-boot.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/网卡驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/网卡驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/自己写bootloader.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/自己写bootloader.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/裸板调试.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/裸板调试.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/触摸屏驱动程序.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/触摸屏驱动程序.TXT -------------------------------------------------------------------------------- /drivers_and_test/文档/驱动调试.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/drivers_and_test/文档/驱动调试.TXT -------------------------------------------------------------------------------- /学前班_第0课_图片/初接触开发板.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/学前班_第0课_图片/初接触开发板.jpg -------------------------------------------------------------------------------- /学前班_第0课_图片/怎么看原理图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/学前班_第0课_图片/怎么看原理图.jpg -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/arm-linux-gcc-4.3.2.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/arm-linux-gcc-4.3.2.tar.bz2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | CFLAGS := -Wall -O2 9 | CPPFLAGS := -nostdinc -nostdlib -fno-builtin 10 | 11 | objs := start.o init.o boot.o 12 | 13 | boot.bin: $(objs) 14 | ${LD} -Tboot.lds -o boot.elf $^ 15 | ${OBJCOPY} -O binary -S boot.elf $@ 16 | ${OBJDUMP} -D -m arm boot.elf > boot.dis 17 | 18 | %.o:%.c 19 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 20 | 21 | %.o:%.S 22 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 23 | 24 | clean: 25 | rm -f *.o *.bin *.elf *.dis 26 | 27 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/boot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/boot.bin -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/boot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/boot.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/boot.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x33f80000; 3 | .text : { *(.text) } 4 | 5 | . = ALIGN(4); 6 | .rodata : {*(.rodata*)} 7 | 8 | . = ALIGN(4); 9 | .data : { *(.data) } 10 | 11 | . = ALIGN(4); 12 | __bss_start = .; 13 | .bss : { *(.bss) *(COMMON) } 14 | __bss_end = .; 15 | } 16 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/init.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/start.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/1th/start.S -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | CFLAGS := -Wall -O2 9 | CPPFLAGS := -nostdinc -nostdlib -fno-builtin 10 | 11 | objs := start.o init.o boot.o 12 | 13 | boot.bin: $(objs) 14 | ${LD} -Tboot.lds -o boot.elf $^ 15 | ${OBJCOPY} -O binary -S boot.elf $@ 16 | ${OBJDUMP} -D -m arm boot.elf > boot.dis 17 | 18 | %.o:%.c 19 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 20 | 21 | %.o:%.S 22 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 23 | 24 | clean: 25 | rm -f *.o *.bin *.elf *.dis 26 | 27 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/boot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/boot.bin -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/boot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/boot.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/boot.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x33f80000; 3 | .text : { *(.text) } 4 | 5 | . = ALIGN(4); 6 | .rodata : {*(.rodata*)} 7 | 8 | . = ALIGN(4); 9 | .data : { *(.data) } 10 | 11 | . = ALIGN(4); 12 | __bss_start = .; 13 | .bss : { *(.bss) *(COMMON) } 14 | __bss_end = .; 15 | } 16 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/init.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/start.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/32th_my_bootloader/2th/start.S -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/自己写bootloader.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/自己写bootloader.TXT -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/自己写bootloader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第1课自己写bootloader/自己写bootloader.jpg -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/u-boot-2012.04.01_100ask.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/u-boot-2012.04.01_100ask.patch -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/移植最新的u-boot.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/移植最新的u-boot.TXT -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/移植最新的u-boot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第2课移植最新UBOOT_文档_图片_补丁/移植最新的u-boot.jpg -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/fs_mini_mdev_new.jffs2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/fs_mini_mdev_new.jffs2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/fs_mini_mdev_new.yaffs2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/fs_mini_mdev_new.yaffs2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/u-boot_new.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/u-boot_new.bin -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/uImage_new: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/bin/uImage_new -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/mkyaffsimage工具/yaffs_source_util_larger_small_page_nand.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/mkyaffsimage工具/yaffs_source_util_larger_small_page_nand.tar.bz2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/u-boot和内核补丁/u-boot-2012.04.01_100ask.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/u-boot和内核补丁/u-boot-2012.04.01_100ask.patch -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/文档_图片/移植最新版本3.4.2内核.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/文档_图片/移植最新版本3.4.2内核.TXT -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/文档_图片/移植最新版本3.4.2内核.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/文档_图片/移植最新版本3.4.2内核.jpg -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/用git下载的yaffs最新源码/yaffs2.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第3课移植新内核_文档_图片_补丁_二进制程序/用git下载的yaffs最新源码/yaffs2.tar.bz2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/10th_lcd/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += lcd.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/10th_lcd/lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/10th_lcd/lcd.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/11th_ts/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_ts.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/11th_ts/s3c_ts.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/11th_ts/s3c_ts.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/11th_ts/tslib-1.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/11th_ts/tslib-1.4.tar.gz -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/12th_usb/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += usbmouse_as_key.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/12th_usb/usbmouse_as_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/12th_usb/usbmouse_as_key.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/13th_ramblock/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += ramblock.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/13th_ramblock/ramblock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/13th_ramblock/ramblock.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/14th_nand/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nand.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/14th_nand/mtd-utils-05.07.23.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/14th_nand/mtd-utils-05.07.23.tar.bz2 -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/14th_nand/s3c_nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/14th_nand/s3c_nand.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/15th_nor/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += s3c_nor.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/15th_nor/s3c_nor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/15th_nor/s3c_nor.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/16th_virt_net/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += virt_net.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/16th_virt_net/virt_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/16th_virt_net/virt_net.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/17th_dm9000c/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += dm9dev9000c.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/17th_dm9000c/dm9dev9000c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/17th_dm9000c/dm9dev9000c.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-2.6.22.6 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/first_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/firstdrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/ker_rw.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/26th_debug_regeditor/ker_rw.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += buttons.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/buttons.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/buttons.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/buttons_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/buttons_test -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/7th_buttons_all/buttons_test.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | /* sixthdrvtest 14 | */ 15 | int fd; 16 | 17 | void my_signal_fun(int signum) 18 | { 19 | unsigned char key_val; 20 | read(fd, &key_val, 1); 21 | printf("key_val: 0x%x\n", key_val); 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | unsigned char key_val; 27 | int ret; 28 | int Oflags; 29 | 30 | //signal(SIGIO, my_signal_fun); 31 | 32 | fd = open("/dev/buttons", O_RDWR); 33 | if (fd < 0) 34 | { 35 | printf("can't open!\n"); 36 | return -1; 37 | } 38 | 39 | //fcntl(fd, F_SETOWN, getpid()); 40 | 41 | //Oflags = fcntl(fd, F_GETFL); 42 | 43 | //fcntl(fd, F_SETFL, Oflags | FASYNC); 44 | 45 | 46 | while (1) 47 | { 48 | ret = read(fd, &key_val, 1); 49 | printf("key_val: 0x%x, ret = %d\n", key_val, ret); 50 | //sleep(5); 51 | } 52 | 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/8th_buttons_input/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += buttons.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/8th_buttons_input/buttons.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/8th_buttons_input/buttons.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fb_test/Makefile: -------------------------------------------------------------------------------- 1 | CC=arm-linux-gcc 2 | 3 | fb_test: fb_test.c 4 | $(CC) -o $@ $^ 5 | 6 | clean: 7 | rm -f *.o fb_test 8 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += fifth_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/fifth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/fifth_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/fifthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/fifthdrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/fifth_drv/fifthdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | /* fifthdrvtest 14 | */ 15 | int fd; 16 | 17 | void my_signal_fun(int signum) 18 | { 19 | unsigned char key_val; 20 | read(fd, &key_val, 1); 21 | printf("key_val: 0x%x\n", key_val); 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | unsigned char key_val; 27 | int ret; 28 | int Oflags; 29 | 30 | signal(SIGIO, my_signal_fun); 31 | 32 | fd = open("/dev/buttons", O_RDWR); 33 | if (fd < 0) 34 | { 35 | printf("can't open!\n"); 36 | } 37 | 38 | fcntl(fd, F_SETOWN, getpid()); 39 | 40 | Oflags = fcntl(fd, F_GETFL); 41 | 42 | fcntl(fd, F_SETFL, Oflags | FASYNC); 43 | 44 | 45 | while (1) 46 | { 47 | sleep(1000); 48 | } 49 | 50 | return 0; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += first_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/first_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/first_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/firstdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/firstdrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/first_drv/firstdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* firstdrvtest on 8 | * firstdrvtest off 9 | */ 10 | int main(int argc, char **argv) 11 | { 12 | int fd; 13 | int val = 1; 14 | fd = open("/dev/xyz", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | if (argc != 2) 20 | { 21 | printf("Usage :\n"); 22 | printf("%s \n", argv[0]); 23 | return 0; 24 | } 25 | 26 | if (strcmp(argv[1], "on") == 0) 27 | { 28 | val = 1; 29 | } 30 | else 31 | { 32 | val = 0; 33 | } 34 | 35 | write(fd, &val, 4); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += forth_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/forth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/forth_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/forthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/forthdrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/forth_drv/forthdrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | /* forthdrvtest 10 | */ 11 | int main(int argc, char **argv) 12 | { 13 | int fd; 14 | unsigned char key_val; 15 | int ret; 16 | 17 | struct pollfd fds[1]; 18 | 19 | fd = open("/dev/buttons", O_RDWR); 20 | if (fd < 0) 21 | { 22 | printf("can't open!\n"); 23 | } 24 | 25 | fds[0].fd = fd; 26 | fds[0].events = POLLIN; 27 | while (1) 28 | { 29 | ret = poll(fds, 1, 5000); 30 | if (ret == 0) 31 | { 32 | printf("time out\n"); 33 | } 34 | else 35 | { 36 | read(fd, &key_val, 1); 37 | printf("key_val = 0x%x\n", key_val); 38 | } 39 | } 40 | 41 | return 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += second_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/second_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/second_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/seconddrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/seconddrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/second_drv/seconddrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* seconddrvtest 8 | */ 9 | int main(int argc, char **argv) 10 | { 11 | int fd; 12 | unsigned char key_vals[4]; 13 | int cnt = 0; 14 | 15 | fd = open("/dev/buttons", O_RDWR); 16 | if (fd < 0) 17 | { 18 | printf("can't open!\n"); 19 | } 20 | 21 | while (1) 22 | { 23 | read(fd, key_vals, sizeof(key_vals)); 24 | if (!key_vals[0] || !key_vals[1] || !key_vals[2] || !key_vals[3]) 25 | { 26 | printf("%04d key pressed: %d %d %d %d\n", cnt++, key_vals[0], key_vals[1], key_vals[2], key_vals[3]); 27 | } 28 | } 29 | 30 | return 0; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/sixth_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += sixth_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/sixth_drv/sixth_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/sixth_drv/sixth_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/sixth_drv/sixthdrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/sixth_drv/sixthdrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += third_drv.o 11 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/third_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/third_drv.c -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/thirddrvtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/thirddrvtest -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/jz2440/third_drv/thirddrvtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* thirddrvtest 8 | */ 9 | int main(int argc, char **argv) 10 | { 11 | int fd; 12 | unsigned char key_val; 13 | 14 | fd = open("/dev/buttons", O_RDWR); 15 | if (fd < 0) 16 | { 17 | printf("can't open!\n"); 18 | } 19 | 20 | while (1) 21 | { 22 | read(fd, &key_val, 1); 23 | printf("key_val = 0x%x\n", key_val); 24 | } 25 | 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/移植所有驱动到3.4.2内核去.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/移植所有驱动到3.4.2内核去.TXT -------------------------------------------------------------------------------- /毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/移植驱动到3.4.2内核上.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/毕业班_文档_图片_源码_bin/毕业班第4课移植驱动到3.4.2内核_文档_图片_源码/drivers_and_test_new/移植驱动到3.4.2内核上.jpg -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/nand.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/nand.bin -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/nand.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag/nand.dis -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { 4 | head.o(.text) 5 | init.o(.text) 6 | nand.o 7 | *(.text) 8 | } 9 | .rodata ALIGN(4) : {*(.rodata)} 10 | .data ALIGN(4) : { *(.data) } 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -g -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -g -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/Makefile: -------------------------------------------------------------------------------- 1 | objs := init.o 2 | 3 | all: $(objs) 4 | arm-elf-ld -Ttext 0x0000000 -o init_elf $^ 5 | arm-elf-objcopy -O binary -S init_elf init.bin 6 | arm-elf-objdump -D -m arm init_elf > init.dis 7 | 8 | %.o:%.c 9 | arm-elf-gcc -Wall -g -c -o $@ $< 10 | 11 | %.o:%.S 12 | arm-elf-gcc -Wall -g -c -o $@ $< 13 | 14 | clean: 15 | rm -f init.bin init_elf init.dis *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init.S -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init.bin -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/init/init_elf -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { 4 | head.o(.text) 5 | init.o(.text) 6 | nand.o 7 | *(.text) 8 | } 9 | .rodata ALIGN(4) : {*(.rodata)} 10 | .data ALIGN(4) : { *(.data) } 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_jtag_gdb_eclipse/nand_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_jtag_gdb_eclipse/nand_elf -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/nand.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/nand.bin -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/nand.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_led/nand.dis -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_led/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { 4 | head.o(.text) 5 | init.o(.text) 6 | nand.o 7 | *(.text) 8 | } 9 | .rodata ALIGN(4) : {*(.rodata)} 10 | .data ALIGN(4) : { *(.data) } 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/nand.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/nand.bin -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/nand.dis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/debug_with_uart/nand.dis -------------------------------------------------------------------------------- /硬件部件实验代码/debug_with_uart/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { 4 | head.o(.text) 5 | init.o(.text) 6 | nand.o 7 | *(.text) 8 | } 9 | .rodata ALIGN(4) : {*(.rodata)} 10 | .data ALIGN(4) : { *(.data) } 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/key_led/Makefile: -------------------------------------------------------------------------------- 1 | key_led.bin : crt0.S key_led.c 2 | arm-linux-gcc -g -c -o crt0.o crt0.S 3 | arm-linux-gcc -g -c -o key_led.o key_led.c 4 | arm-linux-ld -Ttext 0x0000000 -g crt0.o key_led.o -o key_led_elf 5 | arm-linux-objcopy -O binary -S key_led_elf key_led.bin 6 | arm-linux-objdump -D -m arm key_led_elf > key_led.dis 7 | clean: 8 | rm -f key_led.dis key_led.bin key_led_elf *.o -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/key_led/crt0.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/key_led/crt0.S -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/key_led/key_led.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/key_led/key_led.bin -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/key_led/key_led.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/key_led/key_led.c -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/key_led/key_led_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/key_led/key_led_elf -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on/Makefile: -------------------------------------------------------------------------------- 1 | led_on.bin : led_on.S 2 | arm-linux-gcc -g -c -o led_on.o led_on.S 3 | arm-linux-ld -Ttext 0x0000000 -g led_on.o -o led_on_elf 4 | arm-linux-objcopy -O binary -S led_on_elf led_on.bin 5 | clean: 6 | rm -f led_on.bin led_on_elf *.o 7 | -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on/led_on.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on/led_on.S -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on/led_on.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on/led_on.bin -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on/led_on_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on/led_on_elf -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on_c/Makefile: -------------------------------------------------------------------------------- 1 | led_on_c.bin : crt0.S led_on_c.c 2 | arm-linux-gcc -g -c -o crt0.o crt0.S 3 | arm-linux-gcc -g -c -o led_on_c.o led_on_c.c 4 | arm-linux-ld -Ttext 0x0000000 -g crt0.o led_on_c.o -o led_on_c_elf 5 | arm-linux-objcopy -O binary -S led_on_c_elf led_on_c.bin 6 | arm-linux-objdump -D -m arm led_on_c_elf > led_on_c.dis 7 | clean: 8 | rm -f led_on_c.dis led_on_c.bin led_on_c_elf *.o 9 | -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on_c/crt0.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on_c/crt0.S -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on_c/led_on_c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on_c/led_on_c.bin -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on_c/led_on_c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on_c/led_on_c.c -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/led_on_c/led_on_c_elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/led_on_c/led_on_c_elf -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/leds/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -ffreestanding 2 | leds.bin : crt0.S leds.c 3 | arm-linux-gcc $(CFLAGS) -c -o crt0.o crt0.S 4 | arm-linux-gcc $(CFLAGS) -c -o leds.o leds.c 5 | arm-linux-ld -Ttext 0x0000000 crt0.o leds.o -o leds_elf 6 | # arm-linux-ld -Tleds.lds crt0.o leds.o -o leds_elf 7 | arm-linux-objcopy -O binary -S leds_elf leds.bin 8 | arm-linux-objdump -D -m arm leds_elf > leds.dis 9 | clean: 10 | rm -f leds.dis leds.bin leds_elf *.o 11 | -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/leds/crt0.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/leds/crt0.S -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/leds/leds.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/gpio/leds/leds.c -------------------------------------------------------------------------------- /硬件部件实验代码/gpio/leds/leds.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x00; 3 | .text : { *(.text) } 4 | .rodata ALIGN(4) : {*(.rodata)} 5 | .data ALIGN(4) : { *(.data) } 6 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 7 | } 8 | -------------------------------------------------------------------------------- /硬件部件实验代码/int/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o interrupt.o main.o 2 | 3 | int.bin: $(objs) 4 | arm-linux-ld -Ttext 0x00000000 -o int_elf $^ 5 | arm-linux-objcopy -O binary -S int_elf $@ 6 | arm-linux-objdump -D -m arm int_elf > int.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -O2 -c -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -O2 -c -o $@ $< 13 | 14 | clean: 15 | rm -f int.bin int_elf int.dis *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/int/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/int/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/int/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/int/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/int/interrupt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/int/interrupt.c -------------------------------------------------------------------------------- /硬件部件实验代码/int/main.c: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | while(1); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | INCLUDEDIR := $(shell pwd)/include 9 | CFLAGS := -Wall -O2 10 | CPPFLAGS := -nostdinc -I$(INCLUDEDIR) 11 | 12 | export CC LD AR OBJCOPY OBJDUMP INCLUDEDIR CFLAGS CPPFLAGS 13 | 14 | objs := head.o init.o nand.o interrupt.o serial.o lcddrv.o framebuffer.o lcdlib.o main.o lib/libc.a 15 | 16 | lcd.bin: $(objs) 17 | ${LD} -Tlcd.lds -o lcd_elf $^ 18 | ${OBJCOPY} -O binary -S lcd_elf $@ 19 | ${OBJDUMP} -D -m arm lcd_elf > lcd.dis 20 | 21 | .PHONY : lib/libc.a 22 | lib/libc.a: 23 | cd lib; make; cd .. 24 | 25 | %.o:%.c 26 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 27 | 28 | %.o:%.S 29 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 30 | 31 | clean: 32 | make clean -C lib 33 | rm -f lcd.bin lcd_elf lcd.dis *.o 34 | 35 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/framebuffer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/framebuffer.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/framebuffer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/framebuffer.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/include/gcclib.h: -------------------------------------------------------------------------------- 1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ 2 | /* I Molton 29/07/01 */ 3 | 4 | #define BITS_PER_UNIT 8 5 | #define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT) 6 | 7 | typedef unsigned int UQItype __attribute__ ((mode (QI))); 8 | typedef int SItype __attribute__ ((mode (SI))); 9 | typedef unsigned int USItype __attribute__ ((mode (SI))); 10 | typedef int DItype __attribute__ ((mode (DI))); 11 | typedef int word_type __attribute__ ((mode (__word__))); 12 | typedef unsigned int UDItype __attribute__ ((mode (DI))); 13 | 14 | #ifdef __ARMEB__ 15 | struct DIstruct {SItype high, low;}; 16 | #else 17 | struct DIstruct {SItype low, high;}; 18 | #endif 19 | 20 | typedef union 21 | { 22 | struct DIstruct s; 23 | DItype ll; 24 | } DIunion; 25 | 26 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/include/kernel.h: -------------------------------------------------------------------------------- 1 | #define INT_MAX ((int)(~0U>>1)) 2 | #define INT_MIN (-INT_MAX - 1) 3 | #define UINT_MAX (~0U) 4 | #define LONG_MAX ((long)(~0UL>>1)) 5 | #define LONG_MIN (-LONG_MAX - 1) 6 | #define ULONG_MAX (~0UL) 7 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/include/stdio.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _STDIO_H 3 | #define _STDIO_H 4 | 5 | #include "types.h" 6 | 7 | #ifndef _VALIST 8 | #define _VALIST 9 | typedef char *va_list; 10 | #endif /* _VALIST */ 11 | 12 | extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); 13 | extern int snprintf(char * buf, size_t size, const char *fmt, ...); 14 | extern int vsprintf(char *buf, const char *fmt, va_list args); 15 | extern int sprintf(char * buf, const char *fmt, ...); 16 | extern int vsscanf(const char * buf, const char * fmt, va_list args); 17 | extern int sscanf(const char * buf, const char * fmt, ...); 18 | 19 | extern void putc(unsigned char c); 20 | extern unsigned char getc(void); 21 | 22 | int printf(const char *fmt, ...); 23 | int scanf(const char * fmt, ...); 24 | 25 | #endif /* _STDIO_H */ 26 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/include/types.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _TPYES_H 3 | #define _TPYES_H 4 | 5 | #ifndef NULL 6 | #define NULL 0 7 | #endif 8 | 9 | #ifndef UINT32 10 | #define UINT32 unsigned int 11 | #endif 12 | 13 | #ifndef UINT16 14 | #define UINT16 unsigned short 15 | #endif 16 | 17 | #ifndef UINT8 18 | #define UINT8 unsigned char 19 | #endif 20 | 21 | #ifndef _SIZE_T 22 | #define _SIZE_T 23 | typedef unsigned int size_t; 24 | #endif /* _SIZE_T */ 25 | 26 | 27 | #endif /* _TPYES_H */ 28 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/interrupt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/interrupt.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/interrupt.h: -------------------------------------------------------------------------------- 1 | void EINT_Handle(); 2 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/lcd.bin -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcd.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x00000000; 3 | .init : AT(0){ head.o init.o nand.o} 4 | . = 0x30000000; 5 | .text : AT(4096) { *(.text) } 6 | .rodata ALIGN(4) : AT((LOADADDR(.text)+SIZEOF(.text)+3)&~(0x03)) {*(.rodata*)} 7 | .data ALIGN(4) : AT((LOADADDR(.rodata)+SIZEOF(.rodata)+3)&~(0x03)) { *(.data) } 8 | __bss_start = .; 9 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 10 | __bss_end = .; 11 | } 12 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcddrv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/lcddrv.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcddrv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/lcddrv.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcdlib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/lcdlib.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lcdlib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/lcdlib.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lib/Makefile: -------------------------------------------------------------------------------- 1 | objs := div64.o lib1funcs.o ctype.o muldi3.o printf.o string.o vsprintf.o 2 | 3 | libc.a: $(objs) 4 | ${AR} -r -o $@ $^ 5 | 6 | %.o:%.c 7 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 8 | 9 | %.o:%.S 10 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 11 | 12 | clean: 13 | rm -f libc.a *.o 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lib/printf.c: -------------------------------------------------------------------------------- 1 | #include "vsprintf.h" 2 | #include "printf.h" 3 | #include "string.h" 4 | 5 | extern void putc(unsigned char c); 6 | extern unsigned char getc(void); 7 | 8 | #define OUTBUFSIZE 1024 9 | #define INBUFSIZE 1024 10 | 11 | 12 | static unsigned char g_pcOutBuf[OUTBUFSIZE]; 13 | static unsigned char g_pcInBuf[INBUFSIZE]; 14 | 15 | 16 | int printf(const char *fmt, ...) 17 | { 18 | int i; 19 | int len; 20 | va_list args; 21 | 22 | va_start(args, fmt); 23 | len = vsprintf(g_pcOutBuf,fmt,args); 24 | va_end(args); 25 | for (i = 0; i < strlen(g_pcOutBuf); i++) 26 | { 27 | putc(g_pcOutBuf[i]); 28 | } 29 | return len; 30 | } 31 | 32 | 33 | 34 | int scanf(const char * fmt, ...) 35 | { 36 | int i = 0; 37 | unsigned char c; 38 | va_list args; 39 | 40 | while(1) 41 | { 42 | c = getc(); 43 | if((c == 0x0d) || (c == 0x0a)) 44 | { 45 | g_pcInBuf[i] = '\0'; 46 | break; 47 | } 48 | else 49 | { 50 | g_pcInBuf[i++] = c; 51 | } 52 | } 53 | 54 | va_start(args,fmt); 55 | i = vsscanf(g_pcInBuf,fmt,args); 56 | va_end(args); 57 | 58 | return i; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/lib/printf.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _PRINTF_H 3 | #define _PRINTF_H 4 | 5 | int printf(const char *fmt, ...); 6 | int scanf(const char * fmt, ...); 7 | 8 | #endif /* _PRINTF_H */ 9 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.IAB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.IAB -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.IAD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.IAD -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.IMB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.IMB -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.IMD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.IMD -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.PFI: -------------------------------------------------------------------------------- 1 |  2 |    -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.PO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.PO -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.PR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.PR -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.PRI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.PRI -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.PS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.PS -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.SearchResults: -------------------------------------------------------------------------------- 1 | ---- VDEN_NORM Matches (1 in 1 files) ---- 2 | Lcddrv.h:#define VDEN_NORM 0 3 | ---- VDEN_INV Matches (1 in 1 files) ---- 4 | Lcddrv.h:#define VDEN_INV 1 5 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/sc/lcd视频例子.WK3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/sc/lcd视频例子.WK3 -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/serial.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd/serial.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd/serial.h: -------------------------------------------------------------------------------- 1 | void uart0_init(void); 2 | void putc(unsigned char c); 3 | unsigned char getc(void); 4 | int isDigit(unsigned char c); 5 | int isLetter(unsigned char c); 6 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC = arm-linux-gcc 3 | LD = arm-linux-ld 4 | AR = arm-linux-ar 5 | OBJCOPY = arm-linux-objcopy 6 | OBJDUMP = arm-linux-objdump 7 | 8 | INCLUDEDIR := $(shell pwd)/include 9 | CFLAGS := -Wall -O2 -g 10 | CPPFLAGS := -nostdinc -I$(INCLUDEDIR) 11 | 12 | export CC LD AR OBJCOPY OBJDUMP INCLUDEDIR CFLAGS CPPFLAGS 13 | 14 | objs := head.o init.o nand.o interrupt.o serial.o lcddrv.o framebuffer.o lcdlib.o main.o lib/libc.a 15 | 16 | lcd.bin: $(objs) 17 | ${LD} -Tlcd.lds -o lcd_elf $^ 18 | ${OBJCOPY} -O binary -S lcd_elf $@ 19 | ${OBJDUMP} -D -m arm lcd_elf > lcd.dis 20 | 21 | .PHONY : lib/libc.a 22 | lib/libc.a: 23 | cd lib; make; cd .. 24 | 25 | %.o:%.c 26 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 27 | 28 | %.o:%.S 29 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 30 | 31 | clean: 32 | make clean -C lib 33 | rm -f lcd.bin lcd_elf lcd.dis *.o 34 | 35 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/framebuffer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/framebuffer.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/framebuffer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/framebuffer.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/include/gcclib.h: -------------------------------------------------------------------------------- 1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ 2 | /* I Molton 29/07/01 */ 3 | 4 | #define BITS_PER_UNIT 8 5 | #define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT) 6 | 7 | typedef unsigned int UQItype __attribute__ ((mode (QI))); 8 | typedef int SItype __attribute__ ((mode (SI))); 9 | typedef unsigned int USItype __attribute__ ((mode (SI))); 10 | typedef int DItype __attribute__ ((mode (DI))); 11 | typedef int word_type __attribute__ ((mode (__word__))); 12 | typedef unsigned int UDItype __attribute__ ((mode (DI))); 13 | 14 | #ifdef __ARMEB__ 15 | struct DIstruct {SItype high, low;}; 16 | #else 17 | struct DIstruct {SItype low, high;}; 18 | #endif 19 | 20 | typedef union 21 | { 22 | struct DIstruct s; 23 | DItype ll; 24 | } DIunion; 25 | 26 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/include/kernel.h: -------------------------------------------------------------------------------- 1 | #define INT_MAX ((int)(~0U>>1)) 2 | #define INT_MIN (-INT_MAX - 1) 3 | #define UINT_MAX (~0U) 4 | #define LONG_MAX ((long)(~0UL>>1)) 5 | #define LONG_MIN (-LONG_MAX - 1) 6 | #define ULONG_MAX (~0UL) 7 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/include/stdio.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _STDIO_H 3 | #define _STDIO_H 4 | 5 | #include "types.h" 6 | 7 | #ifndef _VALIST 8 | #define _VALIST 9 | typedef char *va_list; 10 | #endif /* _VALIST */ 11 | 12 | extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); 13 | extern int snprintf(char * buf, size_t size, const char *fmt, ...); 14 | extern int vsprintf(char *buf, const char *fmt, va_list args); 15 | extern int sprintf(char * buf, const char *fmt, ...); 16 | extern int vsscanf(const char * buf, const char * fmt, va_list args); 17 | extern int sscanf(const char * buf, const char * fmt, ...); 18 | 19 | extern void putc(unsigned char c); 20 | extern unsigned char getc(void); 21 | 22 | int printf(const char *fmt, ...); 23 | int scanf(const char * fmt, ...); 24 | 25 | #endif /* _STDIO_H */ 26 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/include/types.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _TPYES_H 3 | #define _TPYES_H 4 | 5 | #ifndef NULL 6 | #define NULL 0 7 | #endif 8 | 9 | #ifndef UINT32 10 | #define UINT32 unsigned int 11 | #endif 12 | 13 | #ifndef UINT16 14 | #define UINT16 unsigned short 15 | #endif 16 | 17 | #ifndef UINT8 18 | #define UINT8 unsigned char 19 | #endif 20 | 21 | #ifndef _SIZE_T 22 | #define _SIZE_T 23 | typedef unsigned int size_t; 24 | #endif /* _SIZE_T */ 25 | 26 | 27 | #endif /* _TPYES_H */ 28 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/interrupt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/interrupt.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/interrupt.h: -------------------------------------------------------------------------------- 1 | void EINT_Handle(); 2 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/lcd.bin -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcd.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : AT(4096) { head.o(.txt) 4 | *(.text) } 5 | .rodata ALIGN(4) : AT((LOADADDR(.text)+SIZEOF(.text)+3)&~(0x03)) {*(.rodata*)} 6 | .data ALIGN(4) : AT((LOADADDR(.rodata)+SIZEOF(.rodata)+3)&~(0x03)) { *(.data) } 7 | __bss_start = .; 8 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 9 | __bss_end = .; 10 | } 11 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcddrv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/lcddrv.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcddrv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/lcddrv.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcdlib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/lcdlib.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lcdlib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/lcdlib.h -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lib/Makefile: -------------------------------------------------------------------------------- 1 | objs := div64.o lib1funcs.o ctype.o muldi3.o printf.o string.o vsprintf.o 2 | 3 | libc.a: $(objs) 4 | ${AR} -r -o $@ $^ 5 | 6 | %.o:%.c 7 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 8 | 9 | %.o:%.S 10 | ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 11 | 12 | clean: 13 | rm -f libc.a *.o 14 | 15 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lib/printf.c: -------------------------------------------------------------------------------- 1 | #include "vsprintf.h" 2 | #include "printf.h" 3 | #include "string.h" 4 | 5 | extern void putc(unsigned char c); 6 | extern unsigned char getc(void); 7 | 8 | #define OUTBUFSIZE 1024 9 | #define INBUFSIZE 1024 10 | 11 | 12 | static unsigned char g_pcOutBuf[OUTBUFSIZE]; 13 | static unsigned char g_pcInBuf[INBUFSIZE]; 14 | 15 | 16 | int printf(const char *fmt, ...) 17 | { 18 | int i; 19 | int len; 20 | va_list args; 21 | 22 | va_start(args, fmt); 23 | len = vsprintf(g_pcOutBuf,fmt,args); 24 | va_end(args); 25 | for (i = 0; i < strlen(g_pcOutBuf); i++) 26 | { 27 | putc(g_pcOutBuf[i]); 28 | } 29 | return len; 30 | } 31 | 32 | 33 | 34 | int scanf(const char * fmt, ...) 35 | { 36 | int i = 0; 37 | unsigned char c; 38 | va_list args; 39 | 40 | while(1) 41 | { 42 | c = getc(); 43 | if((c == 0x0d) || (c == 0x0a)) 44 | { 45 | g_pcInBuf[i] = '\0'; 46 | break; 47 | } 48 | else 49 | { 50 | g_pcInBuf[i++] = c; 51 | } 52 | } 53 | 54 | va_start(args,fmt); 55 | i = vsscanf(g_pcInBuf,fmt,args); 56 | va_end(args); 57 | 58 | return i; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/lib/printf.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _PRINTF_H 3 | #define _PRINTF_H 4 | 5 | int printf(const char *fmt, ...); 6 | int scanf(const char * fmt, ...); 7 | 8 | #endif /* _PRINTF_H */ 9 | -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/serial.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/lcd_debug/serial.c -------------------------------------------------------------------------------- /硬件部件实验代码/lcd_debug/serial.h: -------------------------------------------------------------------------------- 1 | void uart0_init(void); 2 | void putc(unsigned char c); 3 | unsigned char getc(void); 4 | int isDigit(unsigned char c); 5 | int isLetter(unsigned char c); 6 | -------------------------------------------------------------------------------- /硬件部件实验代码/leds/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS := -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding 2 | all : crt0.S leds.c 3 | arm-linux-gcc $(CFLAGS) -c -o crt0.o crt0.S 4 | arm-linux-gcc $(CFLAGS) -c -o leds.o leds.c 5 | arm-linux-ld -Tleds.lds crt0.o leds.o -o leds_elf 6 | arm-linux-objcopy -O binary -S leds_elf leds.bin 7 | arm-linux-objdump -D -m arm leds_elf > leds.dis 8 | clean: 9 | rm -f leds.dis leds.bin leds_elf *.o 10 | -------------------------------------------------------------------------------- /硬件部件实验代码/leds/crt0.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/leds/crt0.S -------------------------------------------------------------------------------- /硬件部件实验代码/leds/leds.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/leds/leds.bin -------------------------------------------------------------------------------- /硬件部件实验代码/leds/leds.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/leds/leds.c -------------------------------------------------------------------------------- /硬件部件实验代码/leds/leds.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x00; 3 | .text : { *(.text) } 4 | .rodata ALIGN(4) : {*(.rodata)} 5 | .data ALIGN(4) : { *(.data) } 6 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 7 | } 8 | -------------------------------------------------------------------------------- /硬件部件实验代码/mmu/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o leds.o 2 | 3 | mmu.bin : $(objs) 4 | arm-linux-ld -Tmmu.lds -o mmu_elf $^ 5 | arm-linux-objcopy -O binary -S mmu_elf $@ 6 | arm-linux-objdump -D -m arm mmu_elf > mmu.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -O2 -c -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -O2 -c -o $@ $< 13 | 14 | clean: 15 | rm -f mmu.bin mmu_elf mmu.dis *.o 16 | 17 | -------------------------------------------------------------------------------- /硬件部件实验代码/mmu/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/mmu/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/mmu/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/mmu/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/mmu/leds.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/mmu/leds.c -------------------------------------------------------------------------------- /硬件部件实验代码/mmu/mmu.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | firtst 0x00000000 : { head.o init.o } 3 | second 0xB0004000 : AT(2048) { leds.o } 4 | } 5 | -------------------------------------------------------------------------------- /硬件部件实验代码/nand/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/nand/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/nand/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/nand/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/nand/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/nand/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/nand/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/nand/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/nand/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/nand/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | firtst 0x00000000 : { head.o init.o nand.o} 3 | second 0x30000000 : AT(4096) { main.o } 4 | } 5 | 6 | -------------------------------------------------------------------------------- /硬件部件实验代码/sdram/Makefile: -------------------------------------------------------------------------------- 1 | sdram.bin : head.S leds.c 2 | arm-linux-gcc -c -o head.o head.S 3 | arm-linux-gcc -c -o leds.o leds.c 4 | arm-linux-ld -Ttext 0x30000000 head.o leds.o -o sdram_elf 5 | arm-linux-objcopy -O binary -S sdram_elf sdram.bin 6 | arm-linux-objdump -D -m arm sdram_elf > sdram.dis 7 | clean: 8 | rm -f sdram.dis sdram.bin sdram_elf *.o 9 | -------------------------------------------------------------------------------- /硬件部件实验代码/sdram/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/sdram/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/sdram/leds.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/sdram/leds.c -------------------------------------------------------------------------------- /硬件部件实验代码/uart/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o serial.o main.o 2 | 3 | uart.bin: $(objs) 4 | arm-linux-ld -Tuart.lds -o uart_elf $^ 5 | arm-linux-objcopy -O binary -S uart_elf $@ 6 | arm-linux-objdump -D -m arm uart_elf > uart.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -O2 -c -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -O2 -c -o $@ $< 13 | 14 | clean: 15 | rm -f uart.bin uart_elf uart.dis *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/uart/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/uart/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/uart/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/uart/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/uart/main.c: -------------------------------------------------------------------------------- 1 | #include "serial.h" 2 | 3 | int main() 4 | { 5 | unsigned char c; 6 | uart0_init(); // 波特率115200,8N1(8个数据位,无校验位,1个停止位) 7 | 8 | while(1) 9 | { 10 | // 从串口接收数据后,判断其是否数字或子母,若是则加1后输出 11 | c = getc(); 12 | if (isDigit(c) || isLetter(c)) 13 | putc(c+1); 14 | } 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /硬件部件实验代码/uart/serial.h: -------------------------------------------------------------------------------- 1 | void uart0_init(void); 2 | void putc(unsigned char c); 3 | unsigned char getc(void); 4 | int isDigit(unsigned char c); 5 | int isLetter(unsigned char c); 6 | -------------------------------------------------------------------------------- /硬件部件实验代码/uart/uart.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { *(.text) } 4 | .rodata ALIGN(4) : {*(.rodata)} 5 | .data ALIGN(4) : { *(.data) } 6 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 7 | } 8 | -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/Makefile: -------------------------------------------------------------------------------- 1 | objs := head.o init.o nand.o main.o 2 | 3 | nand.bin : $(objs) 4 | arm-linux-ld -Tnand.lds -o nand_elf $^ 5 | arm-linux-objcopy -O binary -S nand_elf $@ 6 | arm-linux-objdump -D -m arm nand_elf > nand.dis 7 | 8 | %.o:%.c 9 | arm-linux-gcc -Wall -c -O2 -o $@ $< 10 | 11 | %.o:%.S 12 | arm-linux-gcc -Wall -c -O2 -o $@ $< 13 | 14 | clean: 15 | rm -f nand.dis nand.bin nand_elf *.o 16 | -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/head.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/要调试的不能执行的程序/head.S -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/要调试的不能执行的程序/init.c -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/要调试的不能执行的程序/main.c -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/nand.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/硬件部件实验代码/要调试的不能执行的程序/nand.c -------------------------------------------------------------------------------- /硬件部件实验代码/要调试的不能执行的程序/nand.lds: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x30000000; 3 | .text : { 4 | head.o(.text) 5 | init.o(.text) 6 | nand.o 7 | *(.text) 8 | } 9 | .rodata ALIGN(4) : {*(.rodata)} 10 | .data ALIGN(4) : { *(.data) } 11 | .bss ALIGN(4) : { *(.bss) *(COMMON) } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/1th_i2c_new_device/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx_dev.o 11 | obj-m += at24cxx_drv.o 12 | #obj-m += i2c_bus_s3c2440.o 13 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/1th_i2c_new_device/at24cxx_dev.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | static struct i2c_board_info at24cxx_info = { 11 | I2C_BOARD_INFO("at24c08", 0x50), 12 | }; 13 | 14 | static struct i2c_client *at24cxx_client; 15 | 16 | static int at24cxx_dev_init(void) 17 | { 18 | struct i2c_adapter *i2c_adap; 19 | 20 | i2c_adap = i2c_get_adapter(0); 21 | at24cxx_client = i2c_new_device(i2c_adap, &at24cxx_info); 22 | i2c_put_adapter(i2c_adap); 23 | 24 | return 0; 25 | } 26 | 27 | static void at24cxx_dev_exit(void) 28 | { 29 | i2c_unregister_device(at24cxx_client); 30 | } 31 | 32 | 33 | module_init(at24cxx_dev_init); 34 | module_exit(at24cxx_dev_exit); 35 | MODULE_LICENSE("GPL"); 36 | 37 | 38 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/1th_i2c_new_device/at24cxx_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/1th_i2c_new_device/at24cxx_drv.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/2th_i2c_new_probed_device/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx_dev.o 11 | obj-m += at24cxx_drv.o 12 | #obj-m += i2c_bus_s3c2440.o 13 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/2th_i2c_new_probed_device/at24cxx_dev.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | static struct i2c_client *at24cxx_client; 10 | 11 | static const unsigned short addr_list[] = { 0x60, 0x50, I2C_CLIENT_END }; 12 | 13 | static int at24cxx_dev_init(void) 14 | { 15 | struct i2c_adapter *i2c_adap; 16 | struct i2c_board_info at24cxx_info; 17 | 18 | memset(&at24cxx_info, 0, sizeof(struct i2c_board_info)); 19 | strlcpy(at24cxx_info.type, "at24c08", I2C_NAME_SIZE); 20 | 21 | i2c_adap = i2c_get_adapter(0); 22 | at24cxx_client = i2c_new_probed_device(i2c_adap, &at24cxx_info, addr_list, NULL); 23 | i2c_put_adapter(i2c_adap); 24 | 25 | if (at24cxx_client) 26 | return 0; 27 | else 28 | return -ENODEV; 29 | } 30 | 31 | static void at24cxx_dev_exit(void) 32 | { 33 | i2c_unregister_device(at24cxx_client); 34 | } 35 | 36 | 37 | module_init(at24cxx_dev_init); 38 | module_exit(at24cxx_dev_exit); 39 | MODULE_LICENSE("GPL"); 40 | 41 | 42 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/2th_i2c_new_probed_device/at24cxx_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/2th_i2c_new_probed_device/at24cxx_drv.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/3.4.2内核下的I2C驱动.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/3.4.2内核下的I2C驱动.TXT -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/3.4.2内核下的I2C驱动.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/3.4.2内核下的I2C驱动.jpg -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/3th_all_adapter_detect/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | #obj-m += at24cxx_dev.o 11 | obj-m += at24cxx_drv.o 12 | #obj-m += i2c_bus_s3c2440.o 13 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/3th_all_adapter_detect/at24cxx_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/3th_all_adapter_detect/at24cxx_drv.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/4th_device_driver_test/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | obj-m += at24cxx_dev.o 11 | obj-m += at24cxx_drv.o 12 | #obj-m += i2c_bus_s3c2440.o 13 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/4th_device_driver_test/at24cxx_dev.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | static struct i2c_board_info at24cxx_info = { 11 | I2C_BOARD_INFO("at24c08", 0x50), 12 | }; 13 | 14 | static struct i2c_client *at24cxx_client; 15 | 16 | static int at24cxx_dev_init(void) 17 | { 18 | struct i2c_adapter *i2c_adap; 19 | 20 | i2c_adap = i2c_get_adapter(0); 21 | at24cxx_client = i2c_new_device(i2c_adap, &at24cxx_info); 22 | i2c_put_adapter(i2c_adap); 23 | 24 | return 0; 25 | } 26 | 27 | static void at24cxx_dev_exit(void) 28 | { 29 | i2c_unregister_device(at24cxx_client); 30 | } 31 | 32 | 33 | module_init(at24cxx_dev_init); 34 | module_exit(at24cxx_dev_exit); 35 | MODULE_LICENSE("GPL"); 36 | 37 | 38 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/4th_device_driver_test/at24cxx_drv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/4th_device_driver_test/at24cxx_drv.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/6th_i2c_bus/1th/i2c_bus_s3c2440.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/6th_i2c_bus/1th/i2c_bus_s3c2440.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/6th_i2c_bus/2th/Makefile: -------------------------------------------------------------------------------- 1 | KERN_DIR = /work/system/linux-3.4.2 2 | 3 | all: 4 | make -C $(KERN_DIR) M=`pwd` modules 5 | 6 | clean: 7 | make -C $(KERN_DIR) M=`pwd` modules clean 8 | rm -rf modules.order 9 | 10 | #obj-m += at24cxx_dev.o 11 | #obj-m += at24cxx_drv.o 12 | obj-m += i2c_bus_s3c2440.o 13 | -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/6th_i2c_bus/2th/i2c_bus_s3c2440.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/6th_i2c_bus/2th/i2c_bus_s3c2440.c -------------------------------------------------------------------------------- /第32课_新内核下的I2C驱动/i2c/i2c-tools-3.1.0.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyysu/Linux-ARM9-/28d9b8141d7a482868b7c3568b853bee34ef88c3/第32课_新内核下的I2C驱动/i2c/i2c-tools-3.1.0.tar.bz2 --------------------------------------------------------------------------------