KernelDriverProgrammingCourse2015/OutlineDay2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 23: | Line 23: | ||
## Building and running your own kernel | ## Building and running your own kernel | ||
### Build and install u-boot for your board using the [[KernelDriverProgrammingCourse2015/OutlineDay1 | instructions from Day 1]] | ### Build and install u-boot for your board using the [[KernelDriverProgrammingCourse2015/OutlineDay1 | instructions from Day 1]] | ||
### Cross compile your own kernel, following the [[KernelDriverProgrammingCourse2015/PreparationDay2 preparation instructions] for today | ### Cross compile your own kernel, following the [[KernelDriverProgrammingCourse2015/PreparationDay2 | preparation instructions]] for today | ||
### Install this kernel by copying arch/arm/boot/zImage to the cards boot partition | ### Install this kernel by copying arch/arm/boot/zImage to the cards boot partition | ||
### Also copy over the build dtb files arch/arm/boot/dts/sun?i-*.dtb to the dtb dir under the boot partition | ### Also copy over the build dtb files arch/arm/boot/dts/sun?i-*.dtb to the dtb dir under the boot partition | ||
Line 33: | Line 33: | ||
## Pick a [[KernelDriverProjects | project]] and start working on it | ## Pick a [[KernelDriverProjects | project]] and start working on it | ||
### Any [[KernelDriverProjects | project]] from the [[KernelDriverProjects | list]] will do, basically there are 3 options to chose from: | ### Any [[KernelDriverProjects | project]] from the [[KernelDriverProjects | list]] will do, basically there are 3 options to chose from: | ||
### Projects to enable features and or complete boards in u-boot / devicetree as done during [[KernelDriverProgrammingCourse2015/OutlineDay1 | day 1]. | ### Projects to enable features and or complete boards in u-boot / devicetree as done during [[KernelDriverProgrammingCourse2015/OutlineDay1 | day 1]]. | ||
### Writing an i2c input device driver, as discussed today, either a [[KernelDriverProjects#Silead_GSL1680_touchcreen_driver | Silead GSL1680 touchcreen driver]], [[KernelDriverProjects#Focaltech_ft5x_touchscreen_driver | Focaltech ft5x touchscreen driver]], [[KernelDriverProjects#Memsic_MXC622X_accelerometer_driver | Memsic MXC622X accelerometer driver]], or a [[KernelDriverProjects#Bosch_BMA250_accelerometer_driver | Bosch BMA250 accelerometer driver]]. | ### Writing an i2c input device driver, as discussed today, either a [[KernelDriverProjects#Silead_GSL1680_touchcreen_driver | Silead GSL1680 touchcreen driver]], [[KernelDriverProjects#Focaltech_ft5x_touchscreen_driver | Focaltech ft5x touchscreen driver]], [[KernelDriverProjects#Memsic_MXC622X_accelerometer_driver | Memsic MXC622X accelerometer driver]], Freescale [[KernelDriverProjects#Freescale_MMA7660_accelerometer_driver | MMA7660]] or [[KernelDriverProjects#Freescale_MMA8452_accelerometer_driver | MMA8452]] accelerometer driver or a [[KernelDriverProjects#Bosch_BMA250_accelerometer_driver | Bosch BMA250 accelerometer driver]]. | ||
### Any other [[KernelDriverProjects | project]] from the [[KernelDriverProjects | list]] | ### Any other [[KernelDriverProjects | project]] from the [[KernelDriverProjects | list]] | ||
Back to [[KernelDriverProgrammingCourse2015]] | Back to [[KernelDriverProgrammingCourse2015]] |
Latest revision as of 09:13, 9 August 2015
Kernel Driver Programming Course Day 2
- Intro
- Welcome
- Results of the first course day, a number of changes have been queued up for merging into the official kernel sources
- Some further changes are queued up in my sunxi-wip branch as they rely on the pmic for otg vbus-detection and the matching pmic code is not yet merged upstream
- Plan for today:
- Kernel is an intermediate between hardware and applications, a device driver typically has 2 interfaces, one side talking to the hardware, and another side talking to userspace
- i2c hardware and driver basics
- Looking at a userspace interface from a userspace pov: input devices / evdev
- Looking at evdev from the kernel side
- Handson
- i2c hardware and driver basics
- i2c hardware basics
- Exploring an i2c device using i2cdetect and i2cget
- Looking at a basic i2c driver
- Lunch Break
- Looking at a userspace interface from a userspace pov: input devices / evdev
- evemu-record demo
- Looking at evdev from the kernel side
- Looking at an example of an i2c input driver
- Handson
- Building and running your own kernel
- Build and install u-boot for your board using the instructions from Day 1
- Cross compile your own kernel, following the preparation instructions for today
- Install this kernel by copying arch/arm/boot/zImage to the cards boot partition
- Also copy over the build dtb files arch/arm/boot/dts/sun?i-*.dtb to the dtb dir under the boot partition
- Boot your board, login as root and do "uname -a" to verify that the board is running your kernel
- Building and running a standalone driver
- On your laptop download the basic i2c driver, edit the Makefile adjusting the path to the linux kernel sources and CROSS_COMPILE= settings to match your system
- Type "make" to build the driver, and then transfer the generated .ko file to your ARM board
- On your arm system do "insmod i2c-basic-drv.ko" and then "lsmod" to verify that the module has loaded
- Pick a project and start working on it
- Any project from the list will do, basically there are 3 options to chose from:
- Projects to enable features and or complete boards in u-boot / devicetree as done during day 1.
- Writing an i2c input device driver, as discussed today, either a Silead GSL1680 touchcreen driver, Focaltech ft5x touchscreen driver, Memsic MXC622X accelerometer driver, Freescale MMA7660 or MMA8452 accelerometer driver or a Bosch BMA250 accelerometer driver.
- Any other project from the list
- Building and running your own kernel