++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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_64
java-1.8.0 jre jre-openjdk
java-1.8.0-openjdk jre-1.8.0
java-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 version
of 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-6.0.1_r46]#
[root@localhost android-6.0.1_r46]# 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-6.0.1_r46]# export PATH=JAVAHOME/bin:PATH
[root@localhost android-6.0.1_r46]# java -version
java 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-6.0.1_r46]#
*********************************************************
install java-1.7.0-openjdk
*********************************************************
http://koji.fedoraproject.org/koji/buildinfo?buildID=605625
dnf search openjdk
dnf install java-atk-wrapper
[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.rpm
java-1.7.0-openjdk-accessibility-1.7.0.75-2.5.4.2.fc20.x86_64.rpm
java-1.7.0-openjdk-debuginfo-1.7.0.75-2.5.4.2.fc20.x86_64.rpm
java-1.7.0-openjdk-demo-1.7.0.75-2.5.4.2.fc20.x86_64.rpm
java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.2.fc20.x86_64.rpm
java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.fc20.x86_64.rpm
java-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_64
export PATH=JAVAHOME/bin:PATH
*********************************************************
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
download Android-x86-* from http://www.fosshub.com/Android-x86.html/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Android-x86 —— compile the source code
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://www.android-x86.org/getsourcecode
[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=JAVAHOME/bin:PATH
[root@localhost android-x86-6.0-rc1]# . build/envsetup.sh
[root@localhost android-x86-6.0-rc1]# lunch android_x86-userdebug
[root@localhost android-x86-6.0-rc1]# m -j4 iso_img
Total translation table size: 6900
Total rockridge attributes bytes: 3312
Total directory bytes: 12288
Path table size(bytes): 88
Done with: The File(s) Block(s) 170078
Writing: Ending Padblock Start Block 170122
Done with: Ending Padblock Block(s) 150
Max brk space used 22000
170272 extents written (332 MB)
/bin/bash: isohybrid: 未找到命令
isohybrid not found.
Install syslinux 4.0 or higher if you want to build a usb bootable iso.
out/target/product/x86/android_x86.iso is built successfully.
make: Leaving directory '/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/android-x86/android-x86-6.0-rc1'
#### make completed successfully (03:19:54 (hh:mm:ss)) ####
------------------------------------------------------------
out/target/product/x86/android_x86.iso
[root@localhost android-x86-6.0-rc1]# ll -h out/target/product/x86/android_x86.iso
-rw-r--r--. 1 root root 333M 6月 13 18:42 out/target/product/x86/android_x86.iso
------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
install Android-x86 (android_x86.iso) in VirtualBox
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
refer to http://www.rickylford.com/install-android-5-1-on-virtualbox/
[root@localhost virtualbox-os]# pwd
/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os
[root@localhost virtualbox-os]# ll -h
-rw-------. 1 root root 5.1G 6月 14 21:24 android-x86-6.0-rc1-1.vdi
[root@localhost virtualbox-os]#
Note: the name of Android-x86 Virtualhost created in VirtualBox is "android-x86-6.0-rc1-1", after, we will create new Android-x86 Virtualhosts by copying "android-x86-6.0-rc1-1".
[root@localhost virtualbox-os]# cp android-x86-6.0-rc1-1.vdi android-x86-6.0-rc1-2.vdi
[root@localhost virtualbox-os]# ll -h
-rw-------. 1 root root 5.1G 6月 14 21:24 android-x86-6.0-rc1-1.vdi
-rw-------. 1 root root 5.1G 6月 14 21:17 android-x86-6.0-rc1-2.vdi
[root@localhost virtualbox-os]# VBoxManage internalcommands sethduuid android-x86-6.0-rc1-2.vdi
--------------------------------------------------------------------------
the up command must be executed,
otherwise, Error when importing VDI file in VirtualBox
--------------------------------------------------------------------------
Cannot register the hard disk '/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os/Android-x86-6.0-rc1-1.vdi' {dbfc8e7b-4969-4836-86d9-418e60328b83} because a hard disk '/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os/android-x86-6.0-rc1-2.vdi'
with UUID {dbfc8e7b-4969-4836-86d9-418e60328b83} already exists.
Solution:
[root@localhost virtualbox-os]# VBoxManage internalcommands sethduuid android-x86-6.0-rc1-1.vdi
UUID changed to: 865924c0-53b5-4aac-83b3-2402b33acdeb
[root@localhost virtualbox-os]# VBoxManage internalcommands dumphdinfo android-x86-6.0-rc1-1.vdi
--------------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
running Android-x86 in VirtualBox
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----------
in HOST
-----------
tunctl -t tap-left
ip link set up dev tap-left
brctl addbr br-android
brctl addif br-android tap-left
ip link set up dev br-android
ip addr add 10.1.1.1/24 dev br-android
ip route add 10.1.1.0/24 dev br-android
-----------
// VirtualBox > (android-x86-6.0-rc1-1) > Settings > Network > Adapter 1 > bridge, br-android.
-----------
in Android
-----------
-------------------------------------
// in HOST
[root@localhost busybox]# adb push busybox-x86_64 /data
[root@localhost busybox]# adb shell
// in Android
root@vbox86p:/ # cd data/
chmod 755 busybox-x86_64
-------------------------------------
// in Android
netcfg eth1 down
./busybox-x86_64 ifconfig eth1 down
./busybox-x86_64 ifconfig eth1 10.1.1.2 netmask 255.255.255.0 up
// ./busybox-x86_64 ip addr add 10.1.1.2/24 dev eth1
// ./busybox-x86_64 ip route add default via 10.1.1.1 dev eth1
./busybox-x86_64 route -n
./busybox-x86_64 ifconfig
./busybox-x86_64 ping 10.1.1.2
-----------
-------------------------------------
ifconfig br-android down
brctl delif br-android tap-left
brctl delif br-android eth1
brctl delbr br-android
ifconfig tap-left down
tunctl -d tap-left
//ip link delete veth_android44
//ip link delete X
-------------------------------------
http://cygnus.androidapksfree.com/hulk/com.UCMobile.intl_v10.10.0.796-238_Android-2.3.apk
http://www.apkmirror.com/wp-content/uploads/uploaded/5758ac63cb322/com.android.chrome_51.0.2704.81-270408111_minAPI21(x86)(nodpi)_apkmirror.com.apk
------------------------------------------------------------
--------------------------------------------------------------------------
netcat transfer file to android from fedora23
--------------------------------------------------------------------------
Server (fedora23)
[root@localhost Desktop]# pwd
/root/Desktop
[root@localhost Desktop]# ls cm-browser5-20-38.apk
cm-browser5-20-38.apk
[root@localhost Desktop]#
iptables -I INPUT -p tcp --dport 12123 -j ACCEPT
iptables -D INPUT -p tcp --dport 12123 -j ACCEPT
nc -l 12123 < chrome51.apk
Client (android)
nc 10.108.162.164 12123 > chrome51.apk
Client (fedora/linux)
nc -n 10.108.162.164 12123 > chrome51.apk
--------------------------------
nc -l 12123 > config.log
nc -n 172.17.0.1 12123 < config.log
--------------------------------------------------------------------------
Android 6.0 (Marshmallow) Install apk - INSTALL_FAILED_INVALID_URI
--------------------------------------------------------------------------
must be under the root directory:
cd /
pm install /sdcard/Download/chrome51.apk
Success
-------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
running two Android-x86 in VirtualBox, they connect to "ethernet bridge"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
brctl addbr br-android
ip link set up dev br-android
ip addr add 10.1.1.1/24 dev br-android
ip route add 10.1.1.0/24 dev br-android
ifconfig br-android down
brctl delbr br-android
// VirtualBox > (android-x86-6.0-rc1-1) > Settings > Network > Adapter 1 > bridge, br-android.
// in android-x86-6.0-rc1-1
ifconfig eth0 down
ifconfig eth0 10.1.1.10 netmask 255.255.255.0 up
// VirtualBox > (android-x86-6.0-rc1-2) > Settings > Network > Adapter 1 > bridge, br-android.
// in android-x86-6.0-rc1-2
ifconfig eth0 down
ifconfig eth0 10.1.1.20 netmask 255.255.255.0 up
android-x86-6.0-rc1-1 can ping android-x86-6.0-rc1-2, and vice verse
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
compile quagga in CentOS in Docker
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@dc90dd730230 quagga]# uname -a
Linux dc90dd730230 4.4.8-300.fc23.x86_64 #1 SMP Wed Apr 20 16:59:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@dc90dd730230 quagga]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@dc90dd730230 quagga]#
------------------------------------------------
root@cd2cc1b26be3:~/quagga# ls ..
quagga quagga-mtr quagga-svnsnap.tgz
root@cd2cc1b26be3:~/quagga# pwd
/root/quagga
// root@cd2cc1b26be3:~/quagga# ./update-autotools
// root@cd2cc1b26be3:~/quagga# aclocal -I m4 --install
root@cd2cc1b26be3:~/quagga#
./bootstrap.sh
./configure --enable-user=root --enable-group=root --enable-vtysh --with-cflags=-ggdb
----------------------------------------------------------------------------------------
Quagga configuration
--------------------
quagga version : 0.99.21mr2.2-dev
host operating system : linux-gnu
source code location : .
compiler : gcc
compiler flags : -ggdb
C++ compiler : g++
C++ compiler flags : -ggdb
make : make
includes :
linker flags : -lcrypt -lrt -ltermcap -lreadline -lm
state file directory : /var/run
config file directory : /usr/local/etc
example directory : /usr/local/etc
user to run as : root
group to run as : root
group for vty sockets :
config file mask : 0600
log file mask : 0600
generic netlink : no
(support for RFC 4938 link metrics)
----------------------------------------------------------------------------------------
make
make install
cd /usr/local/etc/
cp ospf6d.conf.sample ospf6d.conf
cp zebra.conf.sample zebra.conf
----------------------------------------------------------------------------------------
vi ospf6d.conf
----------------------------------------------------------------------------------------
interface eth0
ipv6 ospf6 priority 1
ipv6 ospf6 transmit-delay 1
ipv6 ospf6 ifmtu 1500
ipv6 ospf6 cost 1
ipv6 ospf6 hello-interval 2
ipv6 ospf6 dead-interval 6
ipv6 ospf6 retransmit-interval 5
ipv6 ospf6 network manet-designated-router
ipv6 ospf6 ackinterval 1800
ipv6 ospf6 backupwaitinterval 2000
ipv6 ospf6 twohoprefresh 3
ipv6 ospf6 hellorepeatcount 3
ipv6 ospf6 adjacencyconnectivity biconnected
ipv6 ospf6 lsafullness mdrfulllsa
ipv6 ospf6 flood-delay 100
!
router ospf6
instance-id 65
! router-id 10.1.0.1 (Note: Each node is not the same) (line 21)
interface eth0 area 0.0.0.0
protocol-traffic-class 184
redistribute ospf
redistribute connected
!
----------------------------------------------------------------------------------------
zebra -d
ospf6d -d
vtysh
> show ipv6 ospf6 route
> show ip route
> show ipv6 route
> exit
route add 123.123.123.123 reject
route -n
route del 123.123.123.123 reject
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, compile successfully quagga in CentOS in Docker
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// install_quagga-0.99.21mr2.2_on_android-x86_64_in_Fedora23.txt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
cross compile quagga-0.99.21mr2.2 for android-x86_64 in Fedora23
quagga-0.99.21mr2.2 can be got from http://downloads.pf.itd.nrl.navy.mil/ospf-manet/
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
www.nrl.navy.mil —— OSPF MANET Designated Routers (OSPF-MDR) Implementation
----------------------------------------------------------------------------------------
wget http://downloads.pf.itd.nrl.navy.mil/ospf-manet/nightly_snapshots/quagga-svnsnap.tgz
wget https://www.busybox.net/downloads/binaries/busybox-i686
----------------------------------------------------------------------------------------
[root@localhost quagga]# pwd
/opt/android-on-linux/quagga
[root@localhost quagga]# make clean
[root@localhost quagga]# ./bootstrap.sh
++++++++++++++++++ Issues
[root@localhost quagga]# gedit lib/zebra.h
//#include <sys/fcntl.h>
#include <fcntl.h>
++++++++++++++++++
xorp/libxorp/ipv4.hh:471:48: error: macro "static_assert" requires 2 arguments, but only 1 given
xorp/libxorp/ipv6.hh:425:52: error: macro "static_assert" requires 2 arguments, but only 1 given
[root@localhost quagga]# gedit ./xpimd/xorp/libxorp/ipv4.hh
//static_assert(sizeof(IPv4) == sizeof(uint32_t));
static_assert(sizeof(IPv4) == sizeof(uint32_t), "");
[root@localhost quagga]# gedit ./xpimd/xorp/libxorp/ipv6.hh
//static_assert(sizeof(IPv6) == 4 * sizeof(uint32_t));
static_assert(sizeof(IPv6) == 4 * sizeof(uint32_t), "");
[root@localhost quagga]# gedit ./xpimd/xorp/libxorp/ipvx.cc ./xpimd/xorp/libxorp/selector.cc ./xpimd/xorp/libproto/packet.hh
//static_assert(*);
[root@localhost quagga]# gedit ./xpimd/xorp/libxorp/utility.h
//#define UNUSED(var) static_assert(sizeof(var) != 0)
#define UNUSED(var) static_assert(sizeof(var) != 0, "")
[root@localhost quagga]# gedit ./xpimd/xorp/libxorp/ipv6.cc
//static_assert(sizeof(_addr) == sizeof(tmp_addr));
static_assert(sizeof(_addr) == sizeof(tmp_addr), "");
--------------
/opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/__config:598:0: note: this is the location of the previous definition
#define static_assert(__b, __m) \
--------------
++++++++++++++++++
xorp/fea/mfea_proto_comm.cc:1657:46: error: invalid conversion from 'void*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]
int_val = extract_host_int(CMSG_DATA(cmsgp));
-----
/opt/android-on-linux/android-ndk-r12/platforms/android-23/arch-x86/usr/include/sys/socket.h:112:0: note: this is the location of the previous definition
#define CMSG_DATA(cmsg) ((void*)((char*)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
[root@localhost quagga]# gedit ./xpimd/xorp/fea/mfea_proto_comm.cc
// add the following lines
#define CMSG_DATA(cmsg) ((uint8_t*)((char*)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
#ifndef CMSG_LEN
#else // ! HAVE_RFC3542
#undef HAVE_IPV6_MULTICAST_ROUTING
++++++++++++++++++++++
xorp/pim/pim_mrt_task.cc:185:14: error: ambiguous overload for 'operator!=' (operand types are 'std::__ndk1::list<PimMreTask*>::reverse_iterator {aka std::__ndk1::reverse_iterator<std::__ndk1::__list_iterator<PimMreTask*, void*> >}' and 'std::__ndk1::list<PimMreTask*>::reverse_iterator
{aka std::__ndk1::reverse_iterator<std::__ndk1::__list_iterator<PimMreTask*, void*> >}')
if (iter != pim_mre_task_list().rend()) {
^
xorp/pim/pim_mrt_task.cc:185:14: note: candidates are:
In file included from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/memory:604:0,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:628,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/string:439,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:15,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/ios:216,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/iostream:38,
from xorp/libxorp/xorp.h:35,
from xorp/pim/pim_mrt_task.cc:23:
/opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/iterator:593:1: note: bool std::__ndk1::operator!=(const std::__ndk1::reverse_iterator<_Iter1>&, const std::__ndk1::reverse_iterator<_Iter2>&) [with _Iter1 = std::__ndk1::__list_iterator<PimMreTask*,
void*>; _Iter2 = std::__ndk1::__list_iterator<PimMreTask*, void*>]
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
In file included from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:627:0,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/string:439,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:15,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/ios:216,
from /opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/iostream:38,
from xorp/libxorp/xorp.h:35,
from xorp/pim/pim_mrt_task.cc:23:
/opt/android-on-linux/android-ndk-r12/sources/cxx-stl/llvm-libc++/libcxx/include/utility:172:1: note: bool std::__ndk1::rel_ops::operator!=(const _Tp&, const _Tp&) [with _Tp = std::__ndk1::reverse_iterator<std::__ndk1::__list_iterator<PimMreTask*, void*> >]
operator!=(const _Tp& __x, const _Tp& __y)
^
------------
[root@localhost quagga]# gedit ./xpimd/xorp/pim/pim_mrt_task.cc (four places)
//if (iter != pim_mre_task_list().rend()) {
if (!(iter == pim_mre_task_list().rend())) {
++++++++++++++++++++++
[root@localhost quagga]# gedit ./xpimd/xorp/pim/pim_vif.cc
#include <netinet/ip6.h>
#include <netinet/in.h>
++++++++++++++++++++++
zebra_client.cc:186: error: undefined reference to 'zcalloc(int, unsigned int)'
zebra_client.cc:242: error: undefined reference to 'zfree(int, void*)'
[root@localhost quagga]# gedit xpimd/zebra_client.cc
#if 1 /* set to 1 to use system alloc directly */
#undef XMALLOC
#undef XCALLOC
#undef XREALLOC
#undef XFREE
#define XMALLOC(T,S) malloc((S))
#define XCALLOC(T,S) calloc(1, (S))
#define XREALLOC(T,P,S) realloc((P),(S))
#define XFREE(T,P) free((P))
#endif
++++++++++++++++++++++
zebra_router.cc:48: error: undefined reference to 'memory_init()'
[root@localhost quagga]# gedit xpimd/zebra_router.cc
vty_init(master);
//memory_init();
++++++++++++++++++++++
../lib/.libs/libzebra.so: error: undefined reference to 'crypt'
download from (libcrypt.so.1) https://sourceforge.net/p/android-x86/bootable_newinstaller/ci/9a49bb368ac83fa339678d259ec2c6c668267db8/tree/initrd/lib/libcrypt.so.1?format=raw
cp libcrypt.so.1 /opt/android-on-linux/android-ndk-r12/platforms/android-23/arch-x86/usr/lib/libcrypt.so
++++++++++++++++++++++
-------------------------------------------------------
android-ndk-r12 + android-23 + x86-4.9 (static linked), failed
-------------------------------------------------------
[root@localhost quagga]#
./bootstrap.sh
make clean
export NDK_ROOT="/opt/android-on-linux/android-ndk-r12"
export SYSROOT="NDKROOT/platforms/android−23/arch−x86"exportCFLAGS="−g−−pipe−−sysroot=SYSROOT -INDKROOT/toolchains/x86−4.9/prebuilt/linux−x8664/lib/gcc/i686−linux−android/4.9.x/include−fixed/−INDK_ROOT/platforms/android-23/arch-x86/usr/include -INDKROOT/sources/cxx−stl/llvm−libc++/libcxx/include/−INDK_ROOT/sources/android/support/include/"
export CPPFLAGS="CFLAGS"exportCXXFLAGS="CFLAGS"
export LDFLAGS="--sysroot=SYSROOT−LNDK_ROOT/platforms/android-23/arch-x86/usr/lib/ -LNDKROOT/sources/cxx−stl/stlport/libs/x86−LNDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86 -LNDKROOT/sources/cxx−stl/gnu−libstdc++/4.9/libs/x86−Wl,−dy−lcrypt−Wl,−dn−lstlportstatic−lc++−lm−lc"((cannotwork))exportCPATH="/opt/android−on−linux/android−ndk−r12/toolchains/x86−4.9/prebuilt/linux−x8664/bin"exportCPP="CPATH/i686-linux-android-cpp"
export CXX="CPATH/i686−linux−android−g++"exportCC="CPATH/i686-linux-android-gcc"
export LD="CPATH/i686−linux−android−ld"exportAR="CPATH/i686-linux-android-ar"
./configure --enable-user=root --enable-group=root --host=i686-android-linux --exec-prefix=/opt/android-on-linux/quagga/out --prefix=/opt/android-on-linux/quagga/out
make -j4
-----------------------------------------------------
http://blog.csdn.net/ztguang/article/details/51030002
// -Wl,-dn -lLibraries -lWorkflowEngineD -lxerces-c -lsqlite -lstdc++ -lc -lstlport_static -Wl,-dy
// -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn
// -Wl,-v -Wl,-dy -lcrypt -Wl,-dn
-----------------------------------------------------
echo "ac_cv_func_realloc_0_nonnull={ac_cv_func_realloc_0_nonnull=yes}" > arm-linux.cache
echo "ac_cv_func_realloc_works={ac_cv_func_realloc_works=yes}" >> arm-linux.cache
echo "ac_cv_func_malloc_0_nonnull=[Math Processing Error]NDK_ROOT/platforms/android-21/arch-x86"
export CFLAGS="-g --pipe --sysroot=SYSROOT−INDK_ROOT/toolchains/x86-4.8/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.8/include-fixed/ -INDKROOT/platforms/android−21/arch−x86/usr/include−INDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include/ -INDKROOT/sources/android/support/include/"exportCPPFLAGS="CFLAGS"
export CXXFLAGS="CFLAGS"exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−21/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86 -lstlport_shared -lcrypt
-lm -lc++ -lc"
export CPATH="/opt/android-on-linux/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin"
export CPP="CPATH/i686−linux−android−cpp"exportCXX="CPATH/i686-linux-android-g++"
export CC="CPATH/i686−linux−android−gcc"exportLD="CPATH/i686-linux-android-ld"
export AR="CPATH/i686−linux−android−ar"./configure−−enable−user=root−−enable−group=root−−host=i686−android−linux−−exec−prefix=/opt/android−on−linux/quagga/out−−prefix=/opt/android−on−linux/quagga/outmake−j4makeinstall−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−android−ndk−r19d+android−19+x86−4.8(dynamicallylinked),failed−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−makecleanexportNDKROOT="/opt/android−on−linux/android−ndk−r9d"exportSYSROOT="NDK_ROOT/platforms/android-19/arch-x86"
export CFLAGS="-g --pipe --sysroot=SYSROOT−INDK_ROOT/toolchains/x86-4.8/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.8/include-fixed/ -INDKROOT/platforms/android−19/arch−x86/usr/include−INDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include/ -INDKROOT/sources/android/support/include/"exportCPPFLAGS="CFLAGS"
export CXXFLAGS="CFLAGS"exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−19/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86 -lstlport_shared -lcrypt
-lm -lc++ -lc"
export CPATH="/opt/android-on-linux/android-ndk-r9d/toolchains/x86-4.8/prebuilt/linux-x86_64/bin"
export CPP="CPATH/i686−linux−android−cpp"exportCXX="CPATH/i686-linux-android-g++"
export CC="CPATH/i686−linux−android−gcc"exportLD="CPATH/i686-linux-android-ld"
export AR="[Math Processing Error]LIBS" */
LIBS=" LIBS"/∗LIBS="−lmLIBS" */
LIBS=" [Math Processing Error]SYSROOT -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86 -lstlport_shared -lcrypt
-lm -lc++ -lc"
export LDFLAGS="--sysroot=SYSROOT−LNDK_ROOT/platforms/android-23/arch-x86/usr/lib/ -LNDKROOT/sources/cxx−stl/stlport/libs/x86−LNDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86 -LNDKROOT/sources/cxx−stl/gnu−libstdc++/4.9/libs/x86−lstlportshared−lm−lc++−lc"exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−lcrypt−Wl,−dn−lstlportstatic−lm−lc++−lc−Wl,−dy"exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−static−Wl,−dn−lstlportstatic−lm−lc++−lc−Wl,−dy"//−Wl,−soname−Wl,libzebra.so−o.libs/libzebra.so−−−−−−−−−−−−−−−−−−−−−−−−−−canbesuccessful(dynamically)−−−−−−−−−−−−−−−−−−−−−−−−−−exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86 -lstlport_shared -lm -lc++
-lc"
export LDFLAGS="--sysroot=SYSROOT−fPIE−pie−LNDK_ROOT/platforms/android-23/arch-x86/usr/lib/ -LNDKROOT/sources/cxx−stl/stlport/libs/x86−LNDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86 -LNDKROOT/sources/cxx−stl/gnu−libstdc++/4.9/libs/x86−lstlportshared−lm−lc++−lc"−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−canbesuccessful(static)−−−−−−−−−−−−−−−−−−−−−−−−−−exportLDFLAGS="−−sysroot=SYSROOT -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−static−lstlportstatic−lm−lc++−lc"−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−GCC:−staticand−pieareincompatibleforx86−−−−−−−−−−−−−−−−−−−−−−−−−−Android5+——error:onlypositionindependentexecutables(PIE)aresupported.CFLAGS+=−fPIELDFLAGS+=−fPIE−piesuchas:exportCFLAGS="−I/softdev/arm−libs/include−fPIE"exportCPPLAGS="CPPFLAGS -fPIE"
export CXXLAGS="CXXFLAGS−fPIE"exportLDFLAGS="−L/softdev/arm−libs/lib−static−fPIE−pie"−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−(OK)(OK)(OK)(x86)−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−exportLDFLAGS="−−sysroot=SYSROOT -fPIE -pie -fuse-ld=bfd -LNDKROOT/platforms/android−23/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86
-lstlport_shared -lm -lc++ -lc"
-----------------------
./bootstrap.sh
make clean
export NDK_ROOT="/opt/android-on-linux/android-ndk-r12"
export SYSROOT="NDKROOT/platforms/android−23/arch−x86"exportCFLAGS="−g−−pipe−−sysroot=SYSROOT -fPIE -INDKROOT/toolchains/x86−4.9/prebuilt/linux−x8664/lib/gcc/i686−linux−android/4.9.x/include−fixed/−INDK_ROOT/platforms/android-23/arch-x86/usr/include -INDKROOT/sources/cxx−stl/llvm−libc++/libcxx/include/−INDK_ROOT/sources/android/support/include/"
export CPPFLAGS="CFLAGS"exportCXXFLAGS="CFLAGS"
export LDFLAGS="--sysroot=SYSROOT−fPIE−pie−LNDK_ROOT/platforms/android-23/arch-x86/usr/lib/ -LNDKROOT/sources/cxx−stl/stlport/libs/x86−LNDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86 -LNDKROOT/sources/cxx−stl/gnu−libstdc++/4.9/libs/x86−lstlportshared−lm−lc++−lc"exportCPATH="/opt/android−on−linux/android−ndk−r12/toolchains/x86−4.9/prebuilt/linux−x8664/bin"exportCPP="CPATH/i686-linux-android-cpp"
export CXX="CPATH/i686−linux−android−g++"exportCC="CPATH/i686-linux-android-gcc"
export LD="CPATH/i686−linux−android−ld"exportAR="CPATH/i686-linux-android-ar"
./configure --enable-user=root --enable-group=root --host=i686-android-linux --exec-prefix=/opt/android-on-linux/quagga/out --prefix=/opt/android-on-linux/quagga/out
----------------------------------------
[root@localhost quagga]# gedit Makefile
//INCLUDES = -I/usr/inet6/include
INCLUDES =
----------------------------------------
make -j4
make install
ll -h out/sbin
ll -h out/lib
adb push out/sbin/ /system/xbin/quagga/
adb push out/lib/libzebra.so /lib/
adb push out/lib/libospf.so /lib/
adb push out/lib/libospfapiclient.so /lib/
----------------------------------------
----------------------------------------------------
(OK)(OK)(OK) (x86) —— android-x86-4.4-r5 (API 19)
----------------------------------------------------
-----------------------
export LDFLAGS="--sysroot=SYSROOT−fPIE−pie−fuse−ld=bfd−LNDK_ROOT/platforms/android-19/arch-x86/usr/lib/ -LNDKROOT/sources/cxx−stl/stlport/libs/x86−LNDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86 -LNDKROOT/sources/cxx−stl/gnu−libstdc++/4.9/libs/x86−lstlportshared−lm−lc++−lc"−−−−−−−−−−−−−−−−−−−−−−−./bootstrap.shmakecleanexportNDKROOT="/opt/android−on−linux/android−ndk−r12"exportSYSROOT="NDK_ROOT/platforms/android-19/arch-x86"
export CFLAGS="-g --pipe --sysroot=SYSROOT−fPIE−INDK_ROOT/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/include-fixed/ -INDKROOT/platforms/android−19/arch−x86/usr/include−INDK_ROOT/platforms/android-21/arch-x86/usr/include
-INDKROOT/sources/cxx−stl/llvm−libc++/libcxx/include/−INDK_ROOT/sources/android/support/include/"
export CPPFLAGS="CFLAGS"exportCXXFLAGS="CFLAGS"
export LDFLAGS="--sysroot=SYSROOT−fPIE−pie−LNDK_ROOT/platforms/android-19/arch-x86/usr/lib/ -LNDKROOT/platforms/android−21/arch−x86/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x86−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86
-lstlport_shared -lm -lc++ -lc"
export CPATH="/opt/android-on-linux/android-ndk-r12/toolchains/x86-4.9/prebuilt/linux-x86_64/bin"
export CPP="CPATH/i686−linux−android−cpp"exportCXX="CPATH/i686-linux-android-g++"
export CC="CPATH/i686−linux−android−gcc"exportLD="CPATH/i686-linux-android-ld"
export AR="[Math Processing Error]NDK_ROOT/platforms/android-23/arch-x86_64"
export CFLAGS="-g --pipe --sysroot=SYSROOT−fPIE−INDK_ROOT/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/include-fixed/ -INDKROOT/platforms/android−23/arch−x8664/usr/include−INDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include/
-INDKROOT/sources/android/support/include/"exportCPPFLAGS="CFLAGS"
export CXXFLAGS="CFLAGS"exportLDFLAGS="−−sysroot=SYSROOT -fPIE -pie -LNDKROOT/platforms/android−23/arch−x8664/usr/lib/−LNDK_ROOT/sources/cxx-stl/stlport/libs/x86_64 -LNDKROOT/sources/cxx−stl/llvm−libc++/libs/x8664−LNDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64
-lstlport_shared -lm -lc++ -lc"
export CPATH="/opt/android-on-linux/android-ndk-r12/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin"
export CPP="CPATH/x8664−linux−android−cpp"exportCXX="CPATH/x86_64-linux-android-g++"
export CC="CPATH/x8664−linux−android−gcc"exportLD="CPATH/x86_64-linux-android-ld"
export AR="[Math Processing Error]f; done
cd -
-----------
[root@localhost virtualbox-os]# pwd
/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os
[root@localhost virtualbox-os]# ll -h
-rw-------. 1 root root 5.1G 6月 14 21:24 android-x86-6.0-rc1-1.vdi
-rw-------. 1 root root 5.1G 6月 14 21:17 android-x86-6.0-rc1-2.vdi
-rw-------. 1 root root 5.1G 6月 14 21:17 android-x86-6.0-rc1-3.vdi
-rw-------. 1 root root 5.1G 6月 14 21:17 android-x86-6.0-rc1-4.vdi
-rw-------. 1 root root 5.1G 6月 14 21:17 android-x86-6.0-rc1-5.vdi
[root@localhost virtualbox-os]#
-----------
to set up the first android-x86 VM in VirtualBox.
---> VirtualBox > (android-x86-6.0-rc1-1) > Settings > Network > Adapter 1 > bridge, br_a_1.
to set up the second android-x86 VM in VirtualBox.
---> VirtualBox > (android-x86-6.0-rc1-2) > Settings > Network > Adapter 1 > bridge, br_a_2.
to set up the second android-x86 VM in VirtualBox.
---> VirtualBox > (android-x86-6.0-rc1-3) > Settings > Network > Adapter 1 > bridge, br_a_3.
to set up the second android-x86 VM in VirtualBox.
---> VirtualBox > (android-x86-6.0-rc1-4) > Settings > Network > Adapter 1 > bridge, br_a_4.
to set up the second android-x86 VM in VirtualBox.
---> VirtualBox > (android-x86-6.0-rc1-5) > Settings > Network > Adapter 1 > bridge, br_a_5.
-----------
-----------
// in android-x86-6.0-rc1-1
-----------
ip addr add 172.17.0.1/16 dev eth0
ping 172.17.0.5
-----------
// in android-x86-6.0-rc1-5
-----------
ip addr add 172.17.0.5/16 dev eth0
ping 172.17.0.1
//ifconfig eth0 down
//ifconfig eth0 192.168.26.20 netmask 255.255.255.0 up
------------------------------------------------------------------------------------------
android-x86-6.0-rc1-1 can not ping android-x86-6.0-rc1-5
------------------------------------------------------------------------------------------
-----------------------
running NS3
-----------------------
[root@localhost ~]# cd /opt/tools/network_simulators/ns3/ns-allinone-3.25/ns-3.25
[root@localhost ns-3.25]# gedit scratch/manet-android-x86.cc
//----------------
TapBridgeHelper tapBridge;
tapBridge.SetAttribute ("Mode", StringValue ("UseLocal"));
tapBridge.SetAttribute ("DeviceName", StringValue ("tap_a_1"));
tapBridge.Install (nodes.Get (0), devices.Get (0));
tapBridge.SetAttribute ("DeviceName", StringValue ("tap_a_2"));
tapBridge.Install (nodes.Get (1), devices.Get (1));
tapBridge.SetAttribute ("DeviceName", StringValue ("tap_a_3"));
tapBridge.Install (nodes.Get (2), devices.Get (2));
tapBridge.SetAttribute ("DeviceName", StringValue ("tap_a_4"));
tapBridge.Install (nodes.Get (3), devices.Get (3));
tapBridge.SetAttribute ("DeviceName", StringValue ("tap_a_5"));
tapBridge.Install (nodes.Get (4), devices.Get (4));
//----------------
[root@localhost ns-3.25]# ./waf --run manet-android-x86 --vis
------------------------------------------------------------------------------------------
android-x86-6.0-rc1-1 can ping android-x86-6.0-rc1-5 successfully, and vice verse
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
clean
------------------------------------------------------------------------------------------
ifconfig br_a_1 down
brctl delif br_a_1 tap_a_1
brctl delbr br_a_1
ifconfig tap_a_1 down
tunctl -d tap_a_1
ifconfig br_a_2 down
brctl delif br_a_2 tap_a_2
brctl delbr br_a_2
ifconfig tap_a_2 down
tunctl -d tap_a_2
ifconfig br_a_3 down
brctl delif br_a_3 tap_a_3
brctl delbr br_a_3
ifconfig tap_a_3 down
tunctl -d tap_a_3
ifconfig br_a_4 down
brctl delif br_a_4 tap_a_4
brctl delbr br_a_4
ifconfig tap_a_4 down
tunctl -d tap_a_4
ifconfig br_a_5 down
brctl delif br_a_5 tap_a_5
brctl delbr br_a_5
ifconfig tap_a_5 down
tunctl -d tap_a_5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
So far, all is OK
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通