Android development process based on the 4412 Development Board

Source: Internet
Author: User
Tags bmp image

For the 4412 Development Board using Samsung 2410 Chip, based on the ARM9 architecture, due to the limitations of their own computer hardware, can only run Android4.0.3 system.

1, Uboot This direct use official image burn write can, general situation not to repeat burn write.

Slightly.

Burn write command: Fastboot.exe Flash bootloader U-boot-itop-4412.bin

2. Linux Kernel

1) device driver

--Character device driver

--Miscellaneous device drivers

--I2C device driver (two modes

A,linux Internal I²C System

Includes two parts: I²c device Drive and I²c bus drive, bus drive already exists in kernel, device driver please write it yourself.

I have to spit it out here. 4412 Development Board, although there are 7 I²c interface, but only two external! I2C6 and I2c7,i2c7 plug-in is the touch drive, should not continue to plug other devices, because I²c bus can only respond to a device at the same time, so can use only i2c6, unfortunately I struggled for a long time, still can not request to the bus, has been busy bus, return-110.

b, analog i²c timing using Gpio

Analog I²c needs to be aware of the chip's i²c timing, otherwise it will not get ack!! This method can be registered with miscellaneous devices, and drivers are similar to miscellaneous device drivers.

2) Register to kernel (platform file: arch/arm/mach-exynos/mach-itop4412.c

--Character type equipment

First, the device information is declared, note the. Name variable inside, and the name variable needs to be the same as the. Name in the driver to enter the probe function successfully.

struct platform_device s3c_device_xxx ={        . Name   "match-name" ,        . ID             =-1,};

It is then registered in the Platform_device *smdk4x12_devices[] __initdata function, so that a character class device is registered successfully.

&s3c_device_xxx,

Fill in the matching information needed in the device driver

struct platform_driver xxx_driver = {    = xxx_probe,    = Xxx_remove,    = Xxx_shutdown,    . Suspend  = xxx_suspend,    = Xxx_resume,    = {         = match-name        , //this. Name is the item that needs to be matched  = this_module,    }};

--I2C Drive

First you need to make sure that no other drives occupy the I²c bus, taking I2c7 as an example:

Static struct i2c_board_info i2c_devs7[] __initdata = {#ifdef config_touchscreen_tsc2007    {        I2c_board_ INFO ("tsc2007"0x48),//match, from device address (read/write addr>>1)        . Type         "tsc2007",        . Platform_data    = &Tsc2007_info,         = Irq_eint (0),    },#endif};

The platform file is already registered in the INIT function, so just add your own device name to OK.

3) Compiling

A, compile into kernel

Open the Makefile and Kconfig files in the directory where the drive is located, taking LEDs as an example

--makfile

At the end of the add obj-$ (config_leds_ctl) + = ITOP4412_LEDS.O, generate the ITOP4412_LEDS.O file.

--kconfig

At the end, add the following information:

config leds_ctl         BOOL " Enable LEDS config "        default y        help          Enable LEDS config

b, compile with module

Makefile file as above.

The Kconfig file changes as follows:

config leds_ctl         " Enable LEDS config "        default y        help          Enable LEDS config

Configuration information is written, use the Make Menuconfig command in Ubuntu to enter the kernel configuration

With the Enable LEDS config option selected, leds_ctl= 1, otherwise 0.

The configuration in the platform file is as follows:

--Compile into kernel

#ifdef CONFIG_LEDS_CTL struct platform_device s3c_device_leds_ctl = {        . Name   "LEDs" ,        . ID             =-1,}; #endif

--Compile with module

#if defined (config_leds_ctl) | | Defined (config_leds_ctl_module)struct platform_device s3c_device_leds_ctl = {        . Name     "LEDs",        . ID             =-1,}; #endif

Note that the two are still a little different.

3) Change the Linux boot image

Convert a BMP image into an array using the IMAGE2LCD software

Change the contents of the second array in the Drivers/video/samsung/itop-4412.h file, ok!

If only the text is displayed, then the background of the picture is set to black: #ffffff

The final execute make command is OK.

Generates a Zimage file: arch/arm/boot/zimage

Burn write command: Fastboot.exe Flash kernel zimage

3. Android System compilation

1) Permissions to access device nodes

Open device/samsung/smdk4x12/conf/init.smdk4x12.rc

At last add chmod 0777 xxx, save exit.

      Attention!! This file will eventually be packaged in ramdisk_uboot.img, so you need to burn the system while burning it, otherwise the change fails.

2) app start-up

Open Device/samsung/smdk4x12/device.mk, take LEDs for example

+ =         device/samsung/smdk4x12/apk/topeet/ledtest/ledtest.apk:system/app/+ =         device /samsung/smdk4x12/apk/topeet/ledtest/libled.so:system/lib/libled.so

Note: Notice the path problem, and download the file to the appropriate directory, that is, the. apk and. So files are located in the device/samsung/smdk4x12/apk/topeet/ledtest directory.

3) Change the logo displayed when Android starts

I'm a little trickery here. Change Picture resources directly: Frameworks/base/core/res/assets/images

There are two files in this directory, android-logo-mask.png this is the image that is displayed when Android is launched.

Compiling android using the./build_android.sh command

Finally, the system image is generated: System.img and ramdisk_uboot.img files located in the out/target/product/smdk4x12 directory.

Burn write command: Fastboot.exe Flash system System.img/fastboot.exe Flash RAMDisk ramdisk-uboot.img

Last reboot: FastBoot reboot

---------------------------------------------< end >-------------------------------------------------

Android development process based on the 4412 Development Board

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.