(OK)(OK) [android-x86-6.0-rc1] compile_Android-x86_64_in_IBM-X3650-M4.txt

来源:互联网 发布:无线网络优化方案.ppt 编辑:程序博客网 时间:2024/06/05 05:52


[root@localhost ~]# cd /opt/android-x86/android-x86-6.0-rc1/[root@localhost android-x86-6.0-rc1]# cat /etc/redhat-releaseFedora release 24 (Twenty Four)[root@localhost ~]# uname -aLinux localhost.localdomain 4.5.5-300.fc24.x86_64 #1 SMP Thu May 19 13:05:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux[root@localhost ~]# free -h              total        used        free      shared  buff/cache   availableMem:            62G        488M        268M        1.8M         62G         61GSwap:            9G          4K          9G[root@localhost ~]# [root@localhost ~]# cat /proc/cpuinfoprocessor: 31vendor_id: GenuineIntelcpu family: 6model: 62model name: Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHzstepping: 4microcode: 0x428cpu MHz: 1201.484cache size: 20480 KBphysical id: 1siblings: 16core id: 7cpu cores: 8apicid: 47initial apicid: 47fpu: yesfpu_exception: yescpuid level: 13wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln ptsbugs:bogomips: 4004.93clflush size: 64cache_alignment: 64address sizes: 46 bits physical, 48 bits virtualpower management:++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++need java-1.7.0-openjdk, not java-1.8.0-openjdk++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++java -version[root@localhost gem5-stable]# ls /usr/lib/jvm/java                                           java-openjdk       jre-1.8.0-openjdk-1.8.0.91-6.b14.fc23.x86_64java-1.8.0                                     jre                jre-openjdkjava-1.8.0-openjdk                             jre-1.8.0java-1.8.0-openjdk-1.8.0.91-6.b14.fc23.x86_64  jre-1.8.0-openjdk[root@localhost gem5-stable]# ============================================Checking build tools versions...************************************************************You are attempting to build with the incorrect versionof java. Your version is: openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode).The required version is: "1.7.x" Please follow the machine setup instructions at    https://source.android.com/source/initializing.html************************************************************build/core/main.mk:171: *** stop#### make failed to build some targets (28 seconds) ####[root@localhost android-x86-6.0-rc1]# [root@localhost android-x86-6.0-rc1]# export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64[root@localhost android-x86-6.0-rc1]# export PATH=$JAVA_HOME/bin:$PATH[root@localhost android-x86-6.0-rc1]# java -versionjava version "1.7.0_75"OpenJDK Runtime Environment (fedora-2.5.4.2.fc20-x86_64 u75-b13)OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)[root@localhost android-x86-6.0-rc1]# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++install java-1.7.0-openjdk++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++http://koji.fedoraproject.org/koji/buildinfo?buildID=605625download: http://pan.baidu.com/s/1hs0iVukdnf search openjdkdnf install java-atk-wrapperdnf install glibc.i686dnf install libncurses.so.5[root@localhost Desktop]# ls java-1.7.0-openjdk-*java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-accessibility-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-debuginfo-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-demo-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-devel-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.fc20.x86_64.rpmjava-1.7.0-openjdk-src-1.7.0.75-2.5.4.2.fc20.x86_64.rpm[root@localhost Desktop]# rpm -ivh --force --nodeps java-1.7.0-openjdk-*[root@localhost Desktop]# java -version[root@localhost Desktop]# ls /usr/lib/jvm/export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64export PATH=$JAVA_HOME/bin:$PATH++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Android-x86 —— compile the source code —— VirtualBox++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++http://www.android-x86.org/getsourcecode[root@localhost android-x86-6.0-rc1]# pwd/opt/android-x86/android-x86-6.0-rc1[root@localhost android-x86-6.0-rc1]# export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64export PATH=$JAVA_HOME/bin:$PATH. build/envsetup.shlunch android_x86_64-userdebugm -j32 iso_img// [root@localhost android-x86-6.0-rc1]# // lunch android_x86-userdebug============================================PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=6.0.1TARGET_PRODUCT=android_x86_64TARGET_BUILD_VARIANT=userdebugTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=x86_64TARGET_ARCH_VARIANT=x86_64TARGET_CPU_VARIANT=TARGET_2ND_ARCH=x86TARGET_2ND_ARCH_VARIANT=x86TARGET_2ND_CPU_VARIANT=HOST_ARCH=x86_64HOST_OS=linuxHOST_OS_EXTRA=Linux-4.5.5-300.fc24.x86_64-x86_64-with-fedora-24-Twenty_FourHOST_BUILD_TYPE=releaseBUILD_ID=MOB30MOUT_DIR=out============================================[root@localhost android-x86-6.0-rc1]# m -j32 iso_imgTotal translation table size: 6900Total rockridge attributes bytes: 3312Total directory bytes: 12288Path table size(bytes): 88Done with: The File(s)                             Block(s)    220194Writing:   Ending Padblock                         Start Block 220238Done with: Ending Padblock                         Block(s)    150Max brk space used 23000220388 extents written (430 MB)out/target/product/x86_64/android_x86_64.iso is built successfully.make: Leaving directory '/opt/android-x86/android-x86-6.0-rc1'#### make completed successfully (01:13:38 (hh:mm:ss)) ####[root@localhost android-x86-6.0-rc1]# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[root@localhost android-x86-6.0-rc1]# ll -h out/target/product/x86_64/android_x86_64.iso-rw-r--r--. 1 root root 431M 7月  14 22:02 out/target/product/x86_64/android_x86_64.iso++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++So far, all is OK++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^dhcpcd// comment all dhcpcd    only done in device/generic/common/init.x86.rc (that is, init.android_x86_64.rc)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[root@localhost android-x86-6.0-rc1]# grep dhcpcd -R system/system/core/libnetutils/dhcp_utils.c:/* Utilities for managing the dhcpcd DHCP client daemon */// system/core/libcutils/fs_config.c:  { 00550, AID_DHCP, AID_SHELL, 0, "system/etc/dhcpcd/dhcpcd-run-hooks" },[root@localhost android-x86-6.0-rc1]# grep dhcpcd -R device/device/generic/common/init.x86.rc:service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL--------------------------------------------------vi system/core/rootdir/init.rc--------------------------------------------------    # reflect fwmark from incoming packets onto generated replies    write /proc/sys/net/ipv4/fwmark_reflect 1    write /proc/sys/net/ipv6/fwmark_reflect 1    # set fwmark on accepted sockets    write /proc/sys/net/ipv4/tcp_fwmark_accept 1service netd /system/bin/netd    class main    socket netd stream 0660 root system    socket dnsproxyd stream 0660 root inet    socket mdns stream 0660 root system    socket fwmarkd stream 0660 root inetservice mdnsd /system/bin/mdnsd    class main    user mdnsr    group inet net_raw    socket mdnsd stream 0660 mdnsr inet    disabled    oneshot----------------------------------------------------------------------------------------------------vi device/generic/common/init.x86.rc--------------------------------------------------#import /init.bluetooth.rc#service btattach /system/bin/btattach -Pbcm#    class main#    disabled#    oneshot#on property:init.svc.bluetoothd=running#    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci#on property:init.svc.bluetoothd=stopped#    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci#service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \#    -iwlan0 -Dnl80211 \#    -O/data/misc/wifi/sockets \#    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0    #   we will start as root and wpa_supplicant will switch to user wifi    #   after setting up the capabilities required for WEXT    #   user wifi    #   group wifi inet keystore#    class main#    socket wpa_wlan0 dgram 660 wifi wifi#    disabled#service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL#    class main#    disabled#    oneshot#service iprenew_wlan0 /system/bin/dhcpcd -n#    class main#    disabled#    oneshotservice dhcpcd_eth0 /system/bin/dhcpcd -ABDKL    class main    disabled    oneshotservice iprenew_eth0 /system/bin/dhcpcd -n    class main    disabled    oneshot#on property:init.svc.wpa_supplicant=stopped#    stop dhcpcd--------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^grub - set timeout=1^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[root@localhost android-x86-6.0-rc1]# vi bootable/newinstaller/install/scripts/1-install echo -e "${GRUB_OPTIONS:-default=0\ntimeout=6\nsplashimage=/grub/android-x86.xpm.gz\n}root (hd0,$1)\n" > $menulst--------------------------------------------------++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++recompile modified Android++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[root@localhost android-x86-6.0-rc1]# pwd/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/android-x86/android-x86-6.0-rc1[root@localhost android-x86-6.0-rc1]# cp frameworks/base/services/java/com/android/server/SystemServer.java .gedit SystemServer.java#--------------------------------------------------------------------// recompiled android-x86-6.0-rc1// otherwise, can't forward packages#--------------------------------------------------------------------scp SystemServer.java 10.109.253.80:/opt/android-x86/android-x86-6.0-rc1/frameworks/base/services/java/com/android/server/SystemServer.java/* * return to IBM-X3650-M4 */[root@localhost android-x86-6.0-rc1]# pwd/opt/android-x86/android-x86-6.0-rc1[root@localhost android-x86-6.0-rc1]# export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64export PATH=$JAVA_HOME/bin:$PATH. build/envsetup.shlunch android_x86_64-userdebugm -j32 iso_img[root@localhost android-x86-6.0-rc1]# ll -h /opt/android-x86/android-x86-6.0-rc1/out/target/product/x86_64/android_x86_64.iso-rw-r--r--. 1 root root 431M 7月  14 22:21 /opt/android-x86/android-x86-6.0-rc1/out/target/product/x86_64/android_x86_64.iso/* * return to PC */[root@localhost 158a840e-63fa-4544-b0b8-dc0d40c79241]# pwd/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241[root@localhost 158a840e-63fa-4544-b0b8-dc0d40c79241]# scp 10.109.253.80:/opt/android-x86/android-x86-6.0-rc1/out/target/product/x86_64/android_x86_64.iso .mv android_x86_64.iso android-x86_64-6.0-rc1.iso/* * then to install android_x86_64.iso in VirtualBox */++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++So far, all is OK OK++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++modify some files - http://blog.csdn.net/ztguang/article/details/51921491  (NO USE) (NO USE) (NO USE)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++// vi system/core/rootdir/init.rc  // sh /system/xbin/quagga/sbin/init_in_android-x86_64.shscp /opt/share-vm/fedora23server-share/seem_init.sh 10.109.253.80:/opt/android-x86/android-x86-6.0-rc1/device/generic/common/vi device/generic/common/device.mk    // after 31 line, add:    $(if $(wildcard $(PRODUCT_DIR)seem_init.sh),$(PRODUCT_DIR),$(LOCAL_PATH)/)seem_init.sh:system/etc/seem_init.sh \vi system/core/rootdir/init.rc    // at the end of the file, add:    service seem_init /system/etc/seem_init.sh        class main        user root        group root        oneshotvi system/core/rootdir/init.rc    // at 500 line, in section "on boot", add two lines:    setprop net.tcp.default_init_rwnd 60(already exist)    chown root shell /system/etc/seem_init.sh    chmod 0550 /system/etc/seem_init.shvi system/core/libcutils/fs_config.c    // at 112 line, in section "on boot", add one line:    { 00550, AID_ROOT,      AID_SHELL,     0, "system/etc/init.goldfish.sh" },(already exist)    { 00550, AID_ROOT,      AID_SHELL,     0, "system/etc/seem_init.sh" },++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++^^^^^^^^^^^^^^^^^^^^^^[root@localhost android-x86-6.0-rc1]# grep enableForwarding -R system/system/netd/server/TetherController.cpp:bool TetherController::enableForwarding(const char* requester) {system/netd/server/CommandListener.cpp:            success = sTetherCtrl->enableForwarding(argv[2]);^^^^^^^^^^^^^^^^^^^^^^[root@localhost android-x86-6.0-rc1]# grep ipfwd -R frameworks/ |grep enableframeworks/base/services/core/java/com/android/server/NetworkManagementService.java:            mConnector.execute("ipfwd", enable ? "enable" : "disable", "tethering");^^^^^^^^^^^^^^^^^^^^^^[root@localhost android-x86-6.0-rc1]# grep setIpForwardingEnabled -R frameworks/frameworks/base/services/core/java/com/android/server/connectivity/Tethering.java:                    mNMService.setIpForwardingEnabled(true);^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^./kernel/kernel/sysctl_binary.c:{CTL_INT,NET_IPV4_FORWARD,"ip_forward" },


0 0