Android6.0.1-compile-Ubuntu20.04 - 2023.02.18

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

2023.02.

18

Setup your computer environment

In addition to the packages requested on the Android website, the following


packages are also needed:

$ sudo apt-get install uuid uuid-dev


$ sudo apt-get install zlib1g-dev liblz-dev
$ sudo apt-get install liblzo2-2 liblzo2-dev
$ sudo apt-get install lzop
$ sudo apt-get install git-core curl
$ sudo apt-get install u-boot-tools
$ sudo apt-get install mtd-utils

$ sudo apt-get install android-tools-fsutils

$ sudo apt-get install android-sdk-ext4-utils


$ sudo apt-get install android-sdk-libsparse-utils
$ sudo apt-get install openjdk-7-jdk

2021.12.25

Step1.
This step for compile C sources

export LC_ALL=C

Step2.
/build/core/configure_local_jack.mk

LOCAL_JACK_ENABLED := #eku2021.12.25 $(strip $(LOCAL_JACK_ENABLED))

Step3.

ERROR: Communication error with Jack server (2)


make: *** [build/core/prebuilt_internal.mk:317:
out/target/common/obj/JAVA_LIBRARIES/sdk_v12_intermediates/classes.jack] Error 255

export _JAVA_OPTIONS=-Xmx4096m

Picked up _JAVA_OPTIONS: -Xmx4g

Users are strongly recommended to migrate to the new APIs.


frameworks/base/media/java/android/media/SRTRenderer.java:168: error: as of release 9, '_' is a
keyword, and may not be used as an identifier
final int _ = 0;
^
frameworks/base/media/java/android/media/SRTRenderer.java:187: error: as of release 9, '_' is a
keyword, and may not be used as an identifier
Message msg = mEventHandler.obtainMessage(MEDIA_TIMED_TEXT, _, _, parcel);
^
frameworks/base/media/java/android/media/SRTRenderer.java:187: error: as of release 9, '_' is a
keyword, and may not be used as an identifier
Message msg = mEventHandler.obtainMessage(MEDIA_TIMED_TEXT, _, _, parcel);
^
3 errors
make: *** [build/core/droiddoc.mk:168: out/target/common/docs/api-stubs-timestamp] Error 45

Step1. Installation of JDK1.70

JDK1.7
http://www.wearedev.net/209?
PHPSESSID=9e405022834f61104dc69dbaa2474e47

$sudo mkdir -p /usr/local/java

$sudo cp -r jdk-7u80-linux-x64.tar.gz /usr/local/java/

/usr/local/java 폴더로 이동합니다.

$cd /usr/local/java

다음 명령어로 압축을 풀어줍니다.

$sudo tar xvzf jdk-7u80-linux-x64.tar.gz

/etc/profile 을 열고 파일 하단에 다음 설정을 추가합니다.

$sudo vi /etc/profile
JAVA_HOME=/usr/local/java/jdk1.7.0_80
JRE_HOME=/usr/local/java/jdk1.7.0_80
PATH=$PATH:$JRE_HOME/bin:$JAVA_HOME/bin

export JAVA_HOME
export JRE_HOME
export PATH

다음 명령어를 실행합니다.

$sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_80/bin/java" 1


$sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_80/bin/javac" 1
$sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_80/bin/javaws" 1
$sudo update-alternatives --set java /usr/local/java/jdk1.7.0_80/bin/java
$sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_80/bin/javac
$sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_80/bin/javaws

/etc/profile 에 추가한 JAVA 설정을 적용합니다.

$source /etc/profile

제대로 설치가 된것을 확인하기 위하여 다음 명령어를 실행합니다.

$java -version

다음과 같은 메세지가 나온다면 설치가 정상적으로 완료 되었습니다.

java version "1.7.0_80"


Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Step3. finally added the following lines(/build/core/java.mk).


#eku2021.12.25
LOCAL_PROGUARD_ENABLED :=disabled
#eku2021.12.25

Extract Step.

You can run swapoff -a as root to swap all memory back in. Don't forget to run swapon -a
afterwards to make swap available again. Note that swapoff will fail if there is not enough physical
memory available to swap everything back in.

$sudo swapoff -a
$sudo swapon -a
Compile error
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
still errors

PRODUCT_COPY_FILES
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/
etc/permissions/android.hardware.bluetooth_le.xml ignored.
No private recovery resources for TARGET_DEVICE sabresd_6dq
host Executable: acp
(out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
preparing StaticLib: libc++_static [including
out/host/linux-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/libc+
+abi.a]
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
prebuilts/misc/linux-x86/bison/bison -d -o
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y
.cpp frameworks/base/tools/aidl/aidl_language_y.y
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
host StaticLib: libc++_static
(out/host/linux-x86/obj/STATIC_LIBRARIES/libc+
+_static_intermediates/libc++_static.a)
logtags:
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core
/java/android/content/EventLogTags.java <=
frameworks/base/core/java/android/content/EventLogTags.logtags
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt
< (sizeof (_nl_value_type_LC_TIME) / sizeof
(_nl_value_type_LC_TIME[0]))' failed.
logtags:
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core
/java/android/speech/tts/EventLogTags.java <=
frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
prebuilts/misc/linux-x86/bison/bison: m4 subprocess failed: No such
file or directory
make: *** [build/core/binary.mk:609:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y
.cpp] Error 1
make: *** Waiting for unfinished jobs....
logtags:
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core
/java/android/webkit/EventLogTags.java <=
frameworks/base/core/java/android/webkit/EventLogTags.logtags
logtags:
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core
/java/com/android/internal/logging/EventLogTags.java <=
frameworks/base/core/java/com/android/internal/logging/EventLogTags.l
ogtags
make: *** [build/core/binary.mk:646:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l
.cpp] Aborted (core dumped)

#### make failed to build some targets (20 seconds) ####

eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$
sudo apt-get install g+±multilib gcc-multilib lib32ncurses5-
dev lib32readline-gplv2-dev lib32z1-dev

eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt install lib32ncurses5-dev

eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt-get install g++-multilib gcc-multilib
eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt-get install lib32z1-dev
eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt install lib32readline-dev

still error
including ./tools/external/fat32lib/Android.mk ...
PRODUCT_COPY_FILES
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/
etc/permissions/android.hardware.bluetooth_le.xml ignored.
No private recovery resources for TARGET_DEVICE sabresd_6dq
Install: out/host/linux-x86/lib64/libc++.so
host Executable: validatekeymaps
(out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/
validatekeymaps)
Install: out/host/linux-x86/framework/antlr-runtime.jar
Install: out/host/linux-x86/framework/guavalib.jar
host SharedLib: libcrypto-host (out/host/linux-x86/obj/lib/libcrypto-
host.so)
host Prebuilt: jarjar-apache-ant
(out/host/common/obj/JAVA_LIBRARIES/jarjar-apache-ant_intermediates/
javalib.jar)
host Prebuilt: jarjar-maven-plugin-api
(out/host/common/obj/JAVA_LIBRARIES/jarjar-maven-plugin-
api_intermediates/javalib.jar)
host Prebuilt: jarjar-asm (out/host/common/obj/JAVA_LIBRARIES/jarjar-
asm_intermediates/javalib.jar)
host Prebuilt: jarjar-asm-commons
(out/host/common/obj/JAVA_LIBRARIES/jarjar-asm-
commons_intermediates/javalib.jar)
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
prebuilts/misc/linux-x86/bison/bison -d -o
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y
.cpp frameworks/base/tools/aidl/aidl_language_y.y
host Prebuilt: asm-tools (out/host/common/obj/JAVA_LIBRARIES/asm-
tools_intermediates/javalib.jar)
host Prebuilt: guava-tools (out/host/common/obj/JAVA_LIBRARIES/guava-
tools_intermediates/javalib.jar)
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
prebuilts/misc/linux-x86/bison/bison: m4 subprocess failed: No such
file or directory
make: *** [build/core/binary.mk:609:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y
.cpp] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/core/binary.mk:646:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l
.cpp] Broken pipe
make: *** Deleting file
'out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_
l.cpp'
eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt install openjdk-8-jdk
eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK$ sudo apt install m4

/bin/bash: xmllint: command not found

sudo apt-get install libxml2-utils


now compilation running

Final successfully
2023-02-19 compiled ok.
2023.02.18

CAN -bus configuration for 250000 and sample time 80%.

$ ip link set can0 type can bitrate 250000 sample 0.80

we should add the above line at isobus.sh file

eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK/device/fsl/sabresd_6dq/apk/isobus$

Edit isobus.sh

#!/system/bin/sh
sleep 5
ifconfig can0 down
ip link set can0 type can bitrate 250000 sample 0.80
ifconfig can0 up
#for camera
chmod 666 /dev/video0

Recompile Android OS

./create.sh android 6q
we should copy the Android OS image files.

eku@eku-ThinkPad-P17-Gen-2i:~/3-Android/Android6-CAN/iTOP-
iMX6_android6.0.1-OK/out/target/product/sabresd_6dq$ ls

we need the following files.

1. system.img
2. u-boot.imx
3. recovery-topeet_10.1.img
4. boot-topeet_10.1.img

we change the name of files

recovery-topeet_10.1.img →recovery.img

then copy those files to mfgtools-android6.0-itop/Profiles/Linux/OS


Firmware/files
1. we should change the camera device driver

recompile kernel

problems

/home/eku/3-Android/Android6-CAN/iTOP-iMX6_android6.0.1-OK/
kernel_imx/../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/
bin/arm-linux-androideabi-ld: warning: unwinding may not work because
EXIDX input section 8 of arch/arm/crypto/built-in.o is not in EXIDX
output section

$sudo ln -s ../../../../../include/dt-bindings/ ./
2. we should change the i2c touchscreen driver

Then recompile again the android OS.

3. Check the booting up time.

My goal is to less than 10 seconds !

4. Booting logo with Kiwon electronics (U-boot, Kernel, RootFS)

5. Directly Run only Kiwon-VT application

6. Recompile the Kiwon-VT application with Qt creator

You might also like