Android porting on the tq2440 Development Board)

Source: Internet
Author: User
I. Current Progress
1. Android can run on the tq2440 Development Board through NFS

Recently, I compiled the android file system and run it on TQ. This is more than the bin program of the pandatv version. The basic functions have been implemented. You can refer:
Http://d.namipan.com/d/b64ce43b2388e5e1f66af18149824b98cd13b926c4921f02
Try downloading the file system. Sort out the file system in another day and send a detailed transplant process and precautions.
Network settings:
Route add default GW 192.168.1.1 Dev eth0
Setprop net. dns1 202.120.223.5

1. Use ADB
Ubuntu:
Export adbhost = 192.168.1.101
ADB kill-Server
ADB start-Server
ADB Shell
2. Disable battery at startup
Modify: frameworks/base/services/JNI/com_android_server_batteryservice.cpp. For the patch, see the attachment.
Add
Setprop battery. fake_ac 1

Ii. Current Defects
1. the touch screen is not calibrated
2. The clock stops in Android, stops the zygote process, restarts the system, and updates the clock, but does not stop again.
3. Migration steps
1. Port the android kernel to the tq2440 Development Board.
1. Download linux-2.6.25-android-1.0_r1.tar.gz from http://code.google.com/p/android/downloads/list.
2. decompress the kernel to the user directory, such as/root/kernel. Git.
3. Enter the kernel. Git folder, such as CD ~ /Kernel. Git/
4, modify the ARCH/ARM/plat-s3c24xx/common-smdk.c file in the NAND Flash partition settings, such as gedit ARCH/ARM/plat-s3c24xx/common-smdk.c
Modify the static struct mtd_partition smdk_default_nand_part [] struct:
Static struct mtd_partition smdk_default_nand_part [] = {
[0] = {
. Name = "tq2440_uboot ",
. Size = 0x00040000,
. Offset = 0x00000000,
},
[1] = {
. Name = "tq2440_kernel ",
. Offset = 0x0004c000,
. Size = 0x00200000,
},
[2] = {
. Name = "tq2440_yaffs2 ",
. Offset = 0x0024c000,
. Size = 0x03db0000,
}
};
5. Download ia32 GNU/Linux tar from http://www.codesourcery.com/gnu_toolchains/arm/portal/release644.
6. Extract the file to the user directory, such as/usr/local/ARM/arm-2008q3
7. Enter the arm-2008q3/bin folder, such as CD ~ /Arm-2008q3/bin/
8. Add the current path to the environment variable, such as export Path = $ PWD: $ path, or modify ~ /. Bashrc file and log on again
9. Enter the kernel folder, such as CD ~ /Kernel. Git/
10. Modify the makefile, such as gedit makefile.
Change arch and cross_compile
# Arch? = $ (Subarch)
Arch? = Arm
# Cross_compile? = Arm-Eabi-
Cross_compile? = Arm-None-gnueabi-
11. Use make s3c2410_defconfig to configure the 2410 kernel by default.
12. Run make menuconfig.
(1) Ensure that the content in system type ---> arm system type () is Samsung S3C2410, s3c2412, s3c2413, S3C2440, s3c2442, and s3c2443.
(2) ensure system type ---> S3C2410 machines --->
Smdk2410/a9m2410 is selected
(3) deselect content related to goldfish.
Device Drivers ---> character devices ---> <> goldfish tty driver
Device Drivers ---> Power Supply Class Support ---> <> goldfish battery Driver (new)
Device Drivers ---> real time clock ---> <> goldfish (new)
Device Drivers ---> graphics support ---> support for frame buffer devices ---> <> goldfish framebuffer
(4) choose S3C2410 LCD-related content
Device Drivers ---> graphics support ---> support for frame buffer devices ---> <*> S3C2410 LCD framebuffer support
Device Drivers ---> graphics support --->
Bootup logo --->
Standard black and white Linux logo
Device Drivers ---> graphics support --->
Bootup logo --->
Standard 16-color Linux logo
Device Drivers ---> graphics support --->
Bootup logo --->
Standard 224-color Linux logo
(5) required options for selecting the android Kernel
Kernel features --->
Use the arm Eabi to compile the kernel
General setup --->
Use full shmem filesystem
General setup --->
Enable Android's shared memory subsystem
System type --->
Support thumb user Binaries
Device Drivers ---> Android --->
Android log driver
Device Drivers ---> Android ---> <*> binder IPC driver
(6) Select Android kernel options whenever possible
Device Drivers ---> Android --->
Ram Buffer Console
Device Drivers ---> Android --->
Android timed gpio driver
Device Drivers ---> Android --->
Only allow certain groups to create sockets
(7) Other config options, such as system support, should be selected together
Config_android_power = y
Config_android_power_stat = y
Config_android_power_alarm = y
(You can select fields such as android_power in the kconfig file, or directly modify the. config file)
13. Exit and save. config
2. Transplant the LCD driver to the Linux-2.6.25 kernel (Steps 2, 3, 4 can be referred to the manual, you can also refer to my other articles)
Tq2440 LCD transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 3 & extra = Page % 3d1
3. Porting touch screen driver to Linux-2.6.25 Kernel

Tq2440 touch screen transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 4 & extra = Page % 3d1
Set the number of rows to 256
TS. Dev-> evbit [0] = bit (ev_syn) | bit (ev_key) | bit (ev_abs );
TS. Dev-> keybit [bit_word (btn_touch)] = bit (btn_touch );
Changed:
TS. Dev-> evbit [0] = bit_mask (ev_syn) | bit_mask (ev_key) | bit_mask (ev_abs );
TS. Dev-> keybit [bit_word (btn_touch)] = bit_mask (btn_touch );
4. Porting NIC Driver to Linux-2.6.25 Kernel

Tq2440 Nic transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 5 & extra = Page % 3d1
5. Create an android root file system supporting armv4
1. From http://d.namipan.com/d/403e5eb4ec3af5d8029d994879808140f0c9222be3858a02
Or
Http://www.hiapk.com/bbs/download.php? Keyid = f5d24255c772ca9eb4772a6a86274a1705ef58019c851c4172830c94b24c361d
Download the android armv4 root file

2. Add the null and console device nodes under/dev.
Mknod-M 660 null C 1 3
Mknod-M 660 console C 5 1

3. Modify the startup parameter init to/init in U-boot. The complete command line is as follows:

A. Press and hold the Space key at startup.
B. Select [0] set the boot parameters.
C, [1] Set NFS boot parameter
D. Enter 192.168.1.3 (this is the IP address of your PC and mine) and press Enter.
E. Enter 192.168.1.6 (this is the board IP address, which is the default IP address), press enter, and enter 255.255.255.0.
F, select [3] Set parameter. This is very important. Enter bootargs, press enter, and enter console = ttysac0 root =/dev/nfs init =/init nfsroot = 192.168.1.3: /root_nfs IP = 192.168.1.6: 192.168.1.3: 192.168.1.6: 255.255.255.0: www.arm9.org.ru: eth0: Off
G, save and restart

Note: The tq2440 Kernel File seems to be faulty during nfs startup. We recommend that you follow the step 5 to drive the NIC./root_nfs is your NFS directory and set it to your own.
4. Modify the/init. RC file to remove all mount commands except Mount tmpfs/sqlite_stmt_journals size = 4 m.
After the system is created, you should be able to see the beautiful big table. To start a file for the first time, you need to create a file. tq2440 is faster to start. It takes about 5 minutes. It takes only one minute to start each time.

Note: At this point, Android is able to drive the file system. Because the file system is too large, the file system has more than 70 megabytes, and 2440 has only 64 MB of space, so it can only be used in NFS mode. Which day can I streamline the file system? Maybe I can reach 64 mb. I will write it later!

Note: The connection to the touch screen, LCD, and nic drivers is based on 2.6.29, while the android kernel is 2.6.25. For details about the 2.6.25 driver, refer to the tq2440 official documentation.
I. Current Progress
1. Android can run on the tq2440 Development Board through NFS

2010.03.12 update: Recently, I compiled the android file system and run it on TQ. It has more bin programs than pandatv. The basic functions have been implemented. You can refer:
Http://d.namipan.com/d/b64ce43b2388e5e1f66af18149824b98cd13b926c4921f02
Try downloading the file system. Sort out the file system in another day and send a detailed transplant process and precautions.
2010.04.09 update:
Network settings:
Route add default GW 192.168.1.1 Dev eth0
Setprop net. dns1 202.120.223.5
2010.05.08 update:
1. Use ADB
Ubuntu:
Export adbhost = 192.168.1.101
ADB kill-Server
ADB start-Server
ADB Shell
2. Disable battery at startup
Modify: frameworks/base/services/JNI/com_android_server_batteryservice.cpp. For the patch, see the attachment.
Add
Setprop battery. fake_ac 1

# Include <errno. h>
# Include <unistd. h>

# Include <cutils/properties. h>

# If have_android_ OS
# Include <Linux/IOCTL. h>
# Endif
@-173,6 + 176,29 @@

Static void android_server_batteryservice_update (jnienv * Static int enable_fake_ac =-1if (enable_fake_ac =-1 char value [property_value_max];
Enable_fake_ac = 0if (property_get ("battery. fake_ac ", value, 0if (0 = strcmp (value," true ") | 0 = strcmp (value," 1 ")){
Enable_fake_ac = 1;
}
}
}
If (enable_fake_ac = 1-> setbooleanfield (OBJ, gfieldids. maconline, true-> setbooleanfield (OBJ, gfieldids. musbonline, false-> setbooleanfield (OBJ, gfieldids. mbatterypresent, true-> setintfield (OBJ, gfieldids. mbatterystatus, gconstants. statuscharging );
Env-> setintfield (OBJ, gfieldids. mbatterylevel, 50-> setintfield (OBJ, gfieldids. mbatteryvoltage, 4000-> setintfield (OBJ, gfieldids. mbatterytemperature, 20-> setintfield (OBJ, gfieldids. mbatteryhealth, gconstants. healthgood );
Env-> setobjectfield (OBJ, gfieldids. mbatterytechnology, env-> newstringutf ("fake" return;
}

Setbooleanfield (ENV, OBJ, ac_online_path, gfieldids. maconline );
Setbooleanfield (ENV, OBJ, usb_online_path, gfieldids. musbonline );
Setbooleanfield (ENV, OBJ, battery_present_path, gfieldids. mbatterypresent); copy the Code # include <errno. h>
# Include <unistd. h>

# Include <cutils/properties. h>

# If have_android_ OS
# Include <Linux/IOCTL. h>
# Endif
@-173,6 + 176,29 @@

Static void android_server_batteryservice_update (jnienv * Static int enable_fake_ac =-1if (enable_fake_ac =-1 char value [property_value_max];
Enable_fake_ac = 0if (property_get ("battery. fake_ac ", value, 0if (0 = strcmp (value," true ") | 0 = strcmp (value," 1 ")){
Enable_fake_ac = 1;
}
}
}
If (enable_fake_ac = 1-> setbooleanfield (OBJ, gfieldids. maconline, true-> setbooleanfield (OBJ, gfieldids. musbonline, false-> setbooleanfield (OBJ, gfieldids. mbatterypresent, true-> setintfield (OBJ, gfieldids. mbatterystatus, gconstants. statuscharging );
Env-> setintfield (OBJ, gfieldids. mbatterylevel, 50-> setintfield (OBJ, gfieldids. mbatteryvoltage, 4000-> setintfield (OBJ, gfieldids. mbatterytemperature, 20-> setintfield (OBJ, gfieldids. mbatteryhealth, gconstants. healthgood );
Env-> setobjectfield (OBJ, gfieldids. mbatterytechnology, env-> newstringutf ("fake" return;
}

Setbooleanfield (ENV, OBJ, ac_online_path, gfieldids. maconline );
Setbooleanfield (ENV, OBJ, usb_online_path, gfieldids. musbonline );
Setbooleanfield (ENV, OBJ, battery_present_path, gfieldids. mbatterypresent); copy the code

Ii. Current Defects
1. the touch screen is not calibrated
2. The clock stops in Android, stops the zygote process, restarts the system, and updates the clock, but does not stop again.
3. Migration steps
1. Port the android kernel to the tq2440 Development Board.
1. Download linux-2.6.25-android-1.0_r1.tar.gz from http://code.google.com/p/android/downloads/list.
2. decompress the kernel to the user directory, such as/root/kernel. Git.
3. Enter the kernel. Git folder, such as CD ~ /Kernel. Git/
4, modify the ARCH/ARM/plat-s3c24xx/common-smdk.c file in the NAND Flash partition settings, such as gedit ARCH/ARM/plat-s3c24xx/common-smdk.c
Modify static struct mtd_partition smdk_default_nand_part [] structure to static struct mtd_partition smdk_default_nand_part [] = 0] = {
. Name = "tq2440_uboot ",
. Size = 0x00040000,
. Offset = 0 x000000001] = {
. Name = "tq2440_kernel ",
. Offset = 0x0004c000,
. Size = 0x002000002] = {
. Name = "tq2440_yaffs2 ",
. Offset = 0x0024c000,
. Size = 0x03db0000 copy the code

5. Download ia32 GNU/Linux tar from http://www.codesourcery.com/gnu_toolchains/arm/portal/release644.
6. Extract the file to the user directory, such as/usr/local/ARM/arm-2008q3
7. Enter the arm-2008q3/bin folder, such as CD ~ /Arm-2008q3/bin/
8. Add the current path to the environment variable, such as export Path = $ PWD: $ path, or modify ~ /. Bashrc file and log on again
9. Enter the kernel folder, such as CD ~ /Kernel. Git/
10. Modify the makefile, such as gedit makefile.
Change arch and cross_compile
# Arch? = $ (Subarch)
Arch? = Arm
# Cross_compile? = Arm-Eabi-
Cross_compile? = Arm-None-gnueabi-
11. Use make s3c2410_defconfig to configure the 2410 kernel by default.
12. Run make menuconfig.
(1) Ensure that the content in system type ---> arm system type () is Samsung S3C2410, s3c2412, s3c2413, S3C2440, s3c2442, and s3c2443.
(2) ensure system type ---> S3C2410 machines --->
Smdk2410/a9m2410 is selected
(3) deselect content related to goldfish.
Device Drivers ---> character devices ---> <> goldfish tty driver
Device Drivers ---> Power Supply Class Support ---> <> goldfish battery Driver (new)
Device Drivers ---> real time clock ---> <> goldfish (new)
Device Drivers ---> graphics support ---> support for frame buffer devices ---> <> goldfish framebuffer
(4) choose S3C2410 LCD-related content
Device Drivers ---> graphics support ---> support for frame buffer devices ---> <*> S3C2410 LCD framebuffer support
Device Drivers ---> graphics support --->
Bootup logo --->
Standard black and white Linux logo
Device Drivers ---> graphics support --->
Bootup logo --->
Standard 16-color Linux logo
Device Drivers ---> graphics support --->
Bootup logo --->
Standard 224-color Linux logo
(5) required options for selecting the android Kernel
Kernel features --->
Use the arm Eabi to compile the kernel
General setup --->
Use full shmem filesystem
General setup --->
Enable Android's shared memory subsystem
System type --->
Support thumb user Binaries
Device Drivers ---> Android --->
Android log driver
Device Drivers ---> Android ---> <*> binder IPC driver
(6) Select Android kernel options whenever possible
Device Drivers ---> Android --->
Ram Buffer Console
Device Drivers ---> Android --->
Android timed gpio driver
Device Drivers ---> Android --->
Only allow certain groups to create sockets
(7) Other config options, such as system support, should be selected together
Config_android_power = y
Config_android_power_stat = y
Config_android_power_alarm = y
(You can select fields such as android_power in the kconfig file, or directly modify the. config file)
13. Exit and save. config
2. Transplant the LCD driver to the Linux-2.6.25 kernel (Steps 2, 3, 4 can be referred to the manual, you can also refer to my other articles)
Tq2440 LCD transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 3 & extra = Page % 3d1
3. Porting touch screen driver to Linux-2.6.25 Kernel

Tq2440 touch screen transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 4 & extra = Page % 3d1
Set the number of rows to 256
TS. Dev-> evbit [0] = bit (ev_syn) | bit (ev_key) | bit (ev_abs );
TS. Dev-> keybit [bit_word (btn_touch)] = bit (btn_touch );
Changed:
TS. Dev-> evbit [0] = bit_mask (ev_syn) | bit_mask (ev_key) | bit_mask (ev_abs );
TS. Dev-> keybit [bit_word (btn_touch)] = bit_mask (btn_touch );
4. Porting NIC Driver to Linux-2.6.25 Kernel

Tq2440 Nic transplantation can refer to my other articles: http://www.arm9.org.ru/viewthread.php? Tid = 5 & extra = Page % 3d1
5. Create an android root file system supporting armv4
1. From http://d.namipan.com/d/403e5eb4ec3af5d8029d994879808140f0c9222be3858a02
Or
Http://www.hiapk.com/bbs/download.php? Keyid = f5d24255c772ca9eb4772a6a86274a1705ef58019c851c4172830c94b24c361d
Download the android armv4 root file

2. Add the null and console device nodes under/dev.
Mknod-M 660 null C 1 3
Mknod-M 660 console C 5 1

3. Modify the startup parameter init to/init in U-boot. The complete command line is as follows:

A. Press and hold the Space key at startup.
B. Select [0] set the boot parameters.
C, [1] Set NFS boot parameter
D. Enter 192.168.1.3 (this is the IP address of your PC and mine) and press Enter.
E. Enter 192.168.1.6 (this is the board IP address, which is the default IP address), press enter, and enter 255.255.255.0.
F, select [3] Set parameter. This is very important. Enter bootargs, press enter, and enter console = ttysac0 root =/dev/nfs init =/init nfsroot = 192.168.1.3: /root_nfs IP = 192.168.1.6: 192.168.1.3: 192.168.1.6: 255.255.255.0: www.arm9.org.ru: eth0: Off
G, save and restart

Note: The tq2440 Kernel File seems to be faulty during nfs startup. We recommend that you follow the step 5 to drive the NIC./root_nfs is your NFS directory and set it to your own.
4. Modify the/init. RC file to remove all mount commands except Mount tmpfs/sqlite_stmt_journals size = 4 m.
After the system is created, you should be able to see the beautiful big table. To start a file for the first time, you need to create a file. tq2440 is faster to start. It takes about 5 minutes. It takes only one minute to start each time.

Note: At this point, Android is able to drive the file system. Because the file system is too large, the file system has more than 70 megabytes, and 2440 has only 64 MB of space, so it can only be used in NFS mode. Which day can I streamline the file system? Maybe I can reach 64 mb. I will write it later!

Note: The connection to the touch screen, LCD, and nic drivers is based on 2.6.29, while the android kernel is 2.6.25. For details about the 2.6.25 driver, refer to the tq2440 official documentation.

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.