summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-11-16 21:17:46 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2017-11-16 21:17:46 +0800
commit9675cc502dfe55c75fe5cf98adccb46a7b77efa5 (patch)
tree3e6029a547920d33520be24740c60a10523db634
parent8346542b9c807a288654a9acd42b60397a9a957c (diff)
add iptables.h and other updates like tag
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--android-tools/android-links.txt1
-rwxr-xr-xandroid-tools/hikey/hikey-deploy.sh2
-rw-r--r--android-tools/java.txt10
-rw-r--r--android-tools/test/Android.mk5
-rw-r--r--android-tools/test/main.c27
-rwxr-xr-xbuild.sh3
-rw-r--r--host-tools/gdb.txt2
-rwxr-xr-xhost-tools/iptables.sh49
-rwxr-xr-xsync-o.sh3
9 files changed, 95 insertions, 7 deletions
diff --git a/android-tools/android-links.txt b/android-tools/android-links.txt
index 2a60412..e46e985 100644
--- a/android-tools/android-links.txt
+++ b/android-tools/android-links.txt
@@ -1,4 +1,5 @@
https://source.android.com/source/build-numbers.html
+https://developers.google.com/android/images
https://developers.google.com/android/nexus/blobs-preview
Android Study:
https://docs.google.com/document/d/1RAQLeZYSJWuYWt3cOBP7AoDTv3AJToISXBZSeJZTSkE/edit#
diff --git a/android-tools/hikey/hikey-deploy.sh b/android-tools/hikey/hikey-deploy.sh
index 505479d..2d89e47 100755
--- a/android-tools/hikey/hikey-deploy.sh
+++ b/android-tools/hikey/hikey-deploy.sh
@@ -35,7 +35,7 @@ function flash_image(){
sleep 2
}
-flash_image fastboot "${FIRMWARE_DIR}"/fip.bin
+#flash_image fastboot "${FIRMWARE_DIR}"/fip.bin
#flash_image boot ${img_dir}/boot_fat.uefi.img
flash_image boot ${img_dir}/boot.img
flash_image system ${img_dir}/system.img
diff --git a/android-tools/java.txt b/android-tools/java.txt
index 225d352..7b8ef03 100644
--- a/android-tools/java.txt
+++ b/android-tools/java.txt
@@ -1,3 +1,13 @@
+zygote:
+frameworks/base/core/jni/AndroidRuntime.cpp
+frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk
+
+art:
+art/runtime/gc/heap.cc
+art/runtime/runtime.cc
+art/runtime/runtime_options.def
+
+
from UsingPerfOnAndroid
https://wiki.linaro.org/LMG/Engineering/UsingPerfOnAndroid
= Run Java on Android
diff --git a/android-tools/test/Android.mk b/android-tools/test/Android.mk
index 907a645..74870fb 100644
--- a/android-tools/test/Android.mk
+++ b/android-tools/test/Android.mk
@@ -4,13 +4,12 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
main.c \
-LOCAL_MODULE := test-pointer-size
+LOCAL_MODULE := test
LOCAL_MODULE_TAGS := debug
#LOCAL_CFLAGS += -std=gnu99
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+#LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
-LOCAL_MODULE := test-pointer-size
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
diff --git a/android-tools/test/main.c b/android-tools/test/main.c
index 08476cc..4a2eca3 100644
--- a/android-tools/test/main.c
+++ b/android-tools/test/main.c
@@ -1,6 +1,31 @@
#include <stdio.h>
+#include <stdlib.h>
+/* test using the following allocation sizes */
+const size_t allocSizes[] = {
+// 1 << 8, // small
+// 1 << 16, // large
+ 1 << 23 // huge
+};
+
+int iterations = 1;
int main() {
- printf("pointer size=%lu\n", sizeof(void *));
+ //printf("pointer size=%lu\n", sizeof(void *));
+
+ for(int j=0; j<iterations; j++){
+ for(int index = 0; index < 3; index++){
+ void* p = malloc(allocSizes[index]);
+ printf("size=%zu, index=%d, p=%p, j=%d\n", allocSizes[index], index, p, j);
+ free(p);
+ }
+ }
+ printf("=====================================\n");
+ for(int index = 0; index<3; index++){
+ for(int j=0; j<iterations; j++){
+ void* p = malloc(allocSizes[index]);
+ printf("size=%zu, index=%d, p=%p, j=%d\n", allocSizes[index], index, p, j);
+ free(p);
+ }
+ }
return 0;
}
diff --git a/build.sh b/build.sh
index 57e77e5..ac8c95d 100755
--- a/build.sh
+++ b/build.sh
@@ -177,6 +177,9 @@ function build_tools_ddmlib(){
}
function build_x15(){
+ rm -fr out/target/product/am57xevm/vendor*
+ rm -fr out/target/product/am57xevm/system*
+ rm -fr out/target/product/am57xevm/obj/ETC/system_build_prop_intermediates/
# compile kernel
if false; then
diff --git a/host-tools/gdb.txt b/host-tools/gdb.txt
index aedb5a0..3f88772 100644
--- a/host-tools/gdb.txt
+++ b/host-tools/gdb.txt
@@ -1,4 +1,4 @@
-139|flounder:/data/local/tmp # gdbserver64 --help
+139|flounder:/data/local/tmp # gdbserver64 --help
Usage: gdbserver [OPTIONS] COMM PROG [ARGS ...]
gdbserver [OPTIONS] --attach COMM PID
gdbserver [OPTIONS] --multi COMM
diff --git a/host-tools/iptables.sh b/host-tools/iptables.sh
new file mode 100755
index 0000000..d2e9bcc
--- /dev/null
+++ b/host-tools/iptables.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+sudo sysctl -w net.ipv4.ip_forward=1
+
+# ppp0 is the vpn interface
+# http://www.revsys.com/writings/quicktips/nat.html
+# http://www.karlrupp.net/en/computer/nat_tutorial
+#sudo echo 1 > /proc/sys/net/ipv4/ip_forward
+#sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
+#sudo iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT
+#sudo iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT
+
+
+sudo iptables -F
+sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
+sudo iptables -A FORWARD -o tun0 -j ACCEPT
+sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -i tun0 -j ACCEPT
+
+sudo iptables -t nat -F
+sudo iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eno1 -j MASQUERADE
+sudo iptables -t nat -A POSTROUTING -o eno0 -j MASQUERADE
+sudo iptables -A FORWARD -s 192.168.10.0/24 -o eno1 -j ACCEPT
+sudo iptables -A FORWARD -d 192.168.10.0/24 -m conntrack --ctstate ESTABLISHED,RELATED -i eno1 -j ACCEPT
+
+
+# Default policy to drop all incoming packets
+iptables -P INPUT DROP
+iptables -P FORWARD DROP
+
+# Accept incoming packets from localhost and the LAN interface
+iptables -A INPUT -i lo -j ACCEPT
+iptables -A INPUT -i eno4 -j ACCEPT
+
+# Accept incoming packets from the WAN if the router initiated
+# the connection
+iptables -A INPUT -i eno0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+
+# Forward LAN packets to the WAN
+iptables -A FORWARD -i eno4 -o eno0 -j ACCEPT
+
+# Forward WAN packets to the LAN if the LAN initiated the
+# connection
+iptables -A FORWARD -i eno0 -o eno4 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+
+# NAT traffic going out the WAN interface
+iptables -t nat -A POSTROUTING -o eno0 -j MASQUERADE
+
+# rc.local needs to exit with 0
+exit 0
diff --git a/sync-o.sh b/sync-o.sh
index 79f1d52..f00dd43 100755
--- a/sync-o.sh
+++ b/sync-o.sh
@@ -15,7 +15,7 @@ else
fi
branch="android-o-preview-4"
-branch="android-8.0.0_r23"
+branch="android-8.0.0_r34"
LOCAL_MANIFEST="git://android-git.linaro.org/platform/manifest.git"
LOCAL_MANIFEST_BRANCH="linaro-oreo"
@@ -28,6 +28,7 @@ ${BASE}/sync-projects.sh \
device/linaro/hikey \
kernel/linaro/hisilicon/ \
frameworks/base \
+ frameworks/native \
system/sepolicy \
# system/vold \