User Tools

Site Tools


tutorials:ct1:installation:a20_a20-add_custom_plan_board_android_configuration

A20 A20-add Custom Plan Board Android Configuration

About this Article

Modification plan resources

Replace the lichee/tools/pack_brandy/chips/sun7i/configs/android/sugar-xxx/bootlogo.bmp file

Replace the android/device/softwinner/sugar-xxx/initlogo.rle file This file can use general BMP images with lichee/tools/tools_win/LogoGen tool to generate

Storage self-checking logo is: The startup process of the box , if internal storage failure, will be displayed on the screen of the logo image, power can remind users don't wait for repair is completed, its size is the same as inilogo, same format. Replace the android/device/softwinner/sugar-xxx/initlogo.rle file After the replacement if you want to test the effect, can be in adb sheell environment using the following commands:

#set_ext4_err_bit /dev/block/by-name/cache
#reboot

Self-checking interface can be seen after reboot

4 Program files within a directory description

Add your own solutions directory in the device directory XXX (such as sugar - ref001), configuration of software, all on this directory, each project files in the directory name and structure is basically the same, the following in the sugar - ref001, for example.

4.1 sugar-xxx.mk

Inside the file defines the internal need to customize the information, such as the need of pre-loaded apk, needs to be compiled apk source code, product name, and so on. Should change the file name to his own plan,such as: sugar-ref001.mk. File a few more important value of the variable is likely to change, meaning is as follows:

(1) PRODUCT_PACKAGES

Here defines the need to add the product package, after added, will compile the source code, packaged in the firmware after will have the apk or library file, you need to add the generated apk or .so file, should put it “.mk”file defined in the PACKAGENAME added value, such as box using the application package for Homlet TvdSettings, TvdLauncher, TvdVideo, TvdFileManager.

(2) PRODUCT_COPY_FILES

Compile time put the environment variables defined in the copied to the specified path, such as in the scheme of sugar - ref001 directory of custom made one for infrared remote button mapping file, want to copy it at compile time to "system/usr/keylayout" directory, so to write:

PRODUCT_COPY_FILES += \
	device/softwinner/sugar-ref001/sun7i-ir.kl:system/usr/keylayout/sun7i-ir.kl \

(3) PRODUCT_PROPERTY_OVERRIDES(Define the Property environment parameters )

This command is used to add system properties to the android system, these attributes would be collected during compilation, eventually into the system of "the system/build.prop" file, is loaded when the phone is switched on, can be read from a system to be set accordingly. Such as the following attribute defines the default time zone of the firmware, country, language.

PRODUCT_PROPERTY_OVERRIDES += \
	persist.sys.timezone=Asia/Shanghai \
	persist.sys.language=zh \
	persist.sys.country=CN

4.2 AndroidProducts.mk

There is only a word:

PRODUCT_MAKEFILES := \
	$(LOCAL_DIR)/sugar_ref001.mk

"Sugar_ref001. Mk" which is what is said above files, so also want to replace their scheme of the file name.

4.3 BoardConfig.mk

This file is generally defines the Wifi and some other configuration variables. In the same way, and initiative under the file name the name of the related words have to change their plans.

4.4 init.sun7i.rc

The script will be invoked in the android system startup, function is related to plan do the driving load and service initialization, some customers customized service, can also be loaded in the "init. Sun7i.rc" .

4.5 initlogo.rle

Custom boot log pictures, the default is 720 p pictures, pictures can use "lichee/tools/tools_win/LogoGen.Zip" small tool to generate.

4.6 needfix.rle

Boot file system self-check repair interface logo image, as large as initlogo, also can use "lichee/tools/tools_win/LogoGen.Zip "small tool to generate.

4.7 recovery.fstab

This file is defined in the 'recovery' stage partitions or equipment corresponds to the mount point, general default to the male version of the partition.

4.8 sun7i-ir.kl

In view of the remote control button mapping value configuration.

4.9 vendorsetup.sh

It’s content is usually as below

add_lunch_combo sugar_ref001-eng

'lunch' at compile time after you will see' sugar_xxx eng' this option, if it is modified to :

add_lunch_combo sugar_ref001-user

'lunch' at compile time after you will see' sugar_xxx user' this option.The difference between the two lies in the eng version for engineering development, by default, the adb's open and open root privileges, and user version don't open the default adb and do not open the root permissions. Release the firmware usually to compile the user mode, which can improve the safety of the system.

4.10 vold.fstab

Here is on storage devices (such as an SD card, nandflash, usb, sata) definition.When just creating a custom solution directory can not change, when need to customize the board mounted in the storage unit to modify again.

4.11 package.sh

The package will be invoked script, In the case of sugar - ref001 content as follows:

#!/bin/bash
DEBUG="uart0"
SIGMODE="none"

if [ "$1" = "-d" -o "$2" = "-d" ]; then
	echo "----------debug version, have card0 printf-----------"
	DEBUG="card0";
else
	echo "----------realse version, have uart0 printf-----------"
fi

cd $PACKAGE
./pack -c sun7i -p android -b sugar-ref001  -d ${DEBUG} -s ${SIGMODE}

cd -

when transplant need to change the 'sugar - ref001' to their project name, and name and lichee/tools/pack_brandy/one/sun7i/configs/android scheme configuration directory name should be consistent, otherwise the package' pack 'complains, the script now supports three parameters, two commonly used:

pack:Package produce firmware pack -d:Packaged produce serial port information from SD/TF card slot output into the firmware.

tutorials/ct1/installation/a20_a20-add_custom_plan_board_android_configuration.txt · Last modified: 2014/10/28 11:35 by parker