1. Android can already run on the TQ2440 development board via NFS
I recently compiled the android file system myself and ran it on TQ. It has more bin programs than the panda version, and the basic functions have been implemented. You can download the file system from:
http://d.namipan.com/d/b64ce43b2388e5e1f66af181
and try it out. I will organize it another day and post a detailed transplantation 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. Battery causes shutdown during startup
Modification: frameworks/base/services/jni/com_android_server_BatteryService.cpp, see the attached patch. Add
setprop battery.fake_ac 1
in the init.rc file
2. Current defects
1. The touch screen is not calibrated
2. The clock in Android stops, the zygote process ends, the system restarts, the clock is updated, but it stops again
III. Porting 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. Unzip 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 nand flash partition settings in the arch/arm/plat-s3c24xx/common-smdk.c file, such as gedit arch/arm/plat-s3c24xx/common-smdk.c
Modify the static struct mtd_partition smdk_default_nand_part[] structure to:
static struct mtd_partition smdk_default_nand_part[] = {
Device Drivers ---> Graphics support --->
Bootup logo --->
(5) Select the required options for 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) Try to select the optional options for the Android kernel
Device Drivers ---> Android --->
RAM buffer console
Device Drivers ---> Android --->
Android timed gpio driver
Device Drivers ---> Android --->
Only allow certain groups to create sockets
(7) For other CONFIG options, please select them as well if the system supports them
CONFIG_ANDROID_POWER =y
CONFIG_ANDROID_POWER_STAT =y
CONFIG_ANDROID_POWER_ALARM =y
(You can search for ANDROID_POWER and other fields in the Kconfig file to make a selection, or directly modify the .config file)
13. Exit and save .config
2. Port the LCD driver to the Linux-2.6.25 kernel (Steps 2, 3, and 4 can refer to the manual, or refer to my other articles) For the
LCD porting of TQ2440, please refer to my other article: http://www.arm9.org.ru/viewthread.php?tid=3&extra=page=1
3. Port the touch screen driver to the Linux-2.6.25 kernel For
Change
line 256
to:
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 the network card driver to the Linux-2.6.25 kernel For
5. Making an Android root file system that supports ARMv4 1. Download the Android root file system
from http://d.namipan.com/d/403e5eb4ec3af5d8029d9948
or
http://www.hiapk.com/bbs/download.php?keyid=f5d23685c772ca9eb4772a6a
Download the Android ARMv4 version root file
2. Add two device nodes, null and console, under /dev
mknod -m 660 null c 1 3
mknod -m 660 console c 5 1
3. In U-boot, modify the boot parameter init to /init. The complete command line is as follows:
a. Press and hold the space bar when starting up
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, mine is this), and press Enter
e. Enter 192.168.1.6 (this is the board IP, the default one), press Enter, enter 255.255.255.0
f, then select [3] Set parameter, this is very important, enter bootargs, press Enter, 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 kernel file that comes with TQ2440 seems to have problems with nfs startup. It is recommended to refer to step 5 to drive the network card; /root_nfs is your nfs directory, set it to your own
4. Modify the /init.rc file and remove all mount commands except mount tmpfs tmpfs /sqlite_stmt_journals size=4m
The system is complete, and you should be able to see a beautiful big table now. You need to create files for the first startup. TQ2440 starts relatively quickly, about 5 minutes. Then each startup only takes 1 minute.
Postscript: At this point, Android can be driven. Because the file system is too large, the file system has more than 70 megabytes, and 2440 has only 64m of space, so it can only use nfs. One day, I have time to streamline the file system, maybe it can be reduced to 64m, and I will write about it later!
Note: The above links for the touch screen, LCD, and network card drivers are based on 2.6.29, while the Android kernel is currently 2.6.25. For the 2.6.25 driver, please refer to the TQ2440 official document.
I. Current progress
1. Android can already run on the TQ2440 development board via NFS
2010.03.12 update: I recently compiled the Android file system myself and ran it on TQ. It has more bin programs than the Panda version, and the basic functions have been realized. You can download the file system from:
http://d.namipan.com/d/b64ce43b2388e5e1f66af181
and try it out. I will organize it another day and send a detailed transplantation 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. Battery causes shutdown during startup
Modification: frameworks/base/services/jni/com_android_server_BatteryService.cpp, see the attached patch. Add
setprop battery.fake_ac 1
in the init.rc file
#include
#include
#if HAVE_ANDROID_OS
#include
#endif
@@ -173,6 +176,29 @@
static void android_server_BatteryService_update(JNIEnv* env, jobject obj)
{
static int enable_fake_ac = -1;
if( enable_fake_ac == -1 ){
char value[PROPERTY_VALUE_MAX];
enable_fake_ac = 0;
if ( property_get("battery.fake_ac", value, 0 ) ){
if( 0 == strcmp( value, "true") || 0 == strcmp(value, "1") ){
enable_fake_ac = 1;
}
}
}
if( enable_fake_ac == 1 ){
env->SetBooleanField(obj, gFieldIds.mAcOnline, true);
env->SetBooleanField(obj, gFieldIds.mUsbOnline, false);
env->SetBooleanField(obj, gFieldIds.mBatteryPresent, true );
env->SetIntField(obj, gFieldIds .mBatteryStatus, gConstants.statusCharging);
env->SetIntField(obj, gFieldIds.mBatteryLevel, 50);
env->SetIntField(obj, gFieldIds.mBatteryVoltage, 4000);
env->SetIntField(obj, gFieldIds.mBatteryTemperature, 20) ;
env->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);
#include
#include
#if HAVE_ANDROID_OS
#include
#endif
@@ -173,6 +176,29 @@
static void android_server_BatteryService_update(JNIEnv* env, jobject obj)
{
static int enable_fake_ac = -1;
if( enable_fake_ac == -1 ){
char value[PROPERTY_VALUE_MAX];
enable_fake_ac = 0;
if ( property_get("battery.fake_ac", value, 0 ) ){
if( 0 == strcmp( value, "true") || 0 == strcmp(value, "1") ){
enable_fake_ac = 1;
}
}
}
if( enable_fake_ac == 1 ){
env->SetBooleanField(obj, gFieldIds.mAcOnline, true);
env->SetBooleanField(obj, gFieldIds.mUsbOnline, false);
env->SetBooleanField(obj, gFieldIds.mBatteryPresent, true );
env->SetIntField(obj, gFieldIds .mBatteryStatus, gConstants.statusCharging);
env->SetIntField(obj, gFieldIds.mBatteryLevel, 50);
env->SetIntField(obj, gFieldIds.mBatteryVoltage, 4000);
env->SetIntField(obj, gFieldIds.mBatteryTemperature, 20) ;
env->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);
2. Current defects
1. The touch screen is not calibrated
2. The clock in Android stops, the zygote process is terminated, the system restarts, the clock is updated, but it stops again
3. Migration steps
1. Migrate 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. Unzip 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 nand flash partition settings in the arch/arm/plat-s3c24xx/common-smdk.c file, such as gedit arch/arm/plat-s3c24xx/common-smdk.c
Modify the static struct mtd_partition smdk_default_nand_part[] structure to:
[0] = {
.name = "TQ2440_uboot",
.size = 0x00040000,
.offset = 0x00000000,
},
[1] = {
.name = "TQ2440_kernel",
.offset = 0x0004C000,
. size = 0x00200000,
},
[2] = {
.name = "TQ2440_yaffs2",
.offset = 0x0024C000,
.size = 0x03DB0000,
}
};
. 6. Unzip the files 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 the ~/.bashrc file and log in again
9. Enter the kernel folder, such as cd ~/kernel.git/
10. Modify the Makefile file, such as gedit Makefile
to change ARCH and CROSS_COMPILE
#ARCH
ARCH
#CROSS_COMPILE
CROSS_COMPILE
11. Use make s3c2410_defconfig to configure the 2410 kernel by default
12. Run make menuconfig
(1) Make sure the content in System Type ---> ARM system type () is Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442,S3C2443
(2) Make sure System Type ---> S3C2410 Machines --->
SMDK2410/A9M2410 is checked
(3) Deselect the content related to Goldfish
Device Drivers ---> Character devices ---> < > Goldfish TTY Driver
Device Drivers ---> Power supply class support ---> < >
Device Drivers ---> Real Time Clock ---> < >
Device Drivers ---> Graphics support - --> Support for frame buffer devices ---> < >
(4) Select S3C2410 LCD related content
Device Drivers ---> Graphics support ---> Support for frame buffer devices ---> <*>
Device Drivers ---> Graphics support ---> Bootup
logo --->
Device Drivers ---> Graphics support --->
Bootup logo --->
Device Drivers ---> Graphics support --->
Bootup logo --->
(5) Select the required options for 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) Try to select Android kernel optional options
Device Drivers ---> Android --->
RAM buffer console
Device Drivers ---> Android --->
Android timed gpio driver
Device Drivers ---> Android --->
Only allow certain groups to create sockets
(7) For other CONFIG options, if the system supports them, please select them together:
CONFIG_ANDROID_POWER = y
CONFIG_ANDROID_POWER_STAT = y
CONFIG_ANDROID_POWER_ALARM = y
(You can search for ANDROID_POWER and other fields in the Kconfig file to select, or directly modify the .config file)
13. Exit and save .config
2. Transplant LCD driver to Linux-2.6.25 kernel (steps 2, 3, and 4 can refer to the manual, or refer to my other articles) For the
LCD transplantation of TQ2440, please refer to my other article: http://www.arm9.org.ru/viewthread.php?tid=3&extra=page=1
3. Transplant touch screen driver to Linux-2.6.25 kernel For the
Change line 256
to:
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 the network card driver to the Linux-2.6.25 kernel For
5. Making an Android root file system that supports ARMv4
1. Download the root file system from http://d.namipan.com/d/403e5eb4ec3af5d8029d9948
or
http://www.hiapk.com/bbs/download.php?keyid=f5d23685c772ca9eb4772a6a
Download the root file of Android ARMv4 version
2. Add two device nodes, null and console, under /dev
mknod -m 660 null c 1 3
mknod -m 660 console c 5 1
3. Change the boot parameter init to /init in U-boot. The complete command line is as follows:
a. Press and hold the space bar when starting up
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, mine is this), press Enter
e. Enter 192.168.1.6 (this is the IP address of the board, the default is this), press Enter, enter 255.255.255.0
f, then select [3] Set parameter, this is very important, enter bootargs, press Enter, 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 kernel file that comes with TQ2440 seems to have problems with nfs startup. It is recommended to refer to the fifth step to drive the network card; /root_nfs This is your nfs directory, set it to your own
4. Modify the /init.rc file and remove all mount commands except mount tmpfs tmpfs /sqlite_stmt_journals size=4m
The system is complete, and you should now be able to see a beautiful large table. The first boot requires creating files. TQ2440 boots up relatively quickly, about 5 minutes. Each boot then takes only 1 minute.
Postscript: So far, Android can be driven. Since the file system is too large, the file system is more than 70 megabytes, and 2440 only has 64 megabytes of space, so it can only be driven by nfs. One day I will have time to streamline the file system to 64 megabytes, and I will write about it later!
Note: The above links for the touch screen, LCD, and network card drivers are all based on 2.6.29, while the Android kernel is currently 2.6.25. For the 2.6.25 driver, please refer to the TQ2440 official documentation.
Previous article:s3c2440 android port
Next article:ARM's explanation of PINSEL
Recommended ReadingLatest update time:2024-11-17 01:38
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Programmers make their own epidemic simulation program: The spread of the epidemic is more terrible than you think
- BornHack 2022 Game Badge
- Radar design will usher in a major change - reconfigurable PA
- Counting TI's star products in T-BOX: Automotive Ethernet | Section 1 DP83TC811S-Q1: Automotive Ethernet makes your T-BOX...
- Conclusion – How to cure sadness for single people: buy, buy, buy at TI!
- How to design an accurate and thermally efficient wearable body temperature detection system?
- Is it true that the greater the memory depth of an oscilloscope, the better?
- Will UWB positioning be as accurate as Beidou?
- Brief Introduction of Non-Magnetic Coil Solution for National Technology Intelligent Water Meter
- Adjusting the fire power of the induction cooker with a magnetic switch