aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing-Chun Liu (PaulLiu) <paulliu@debian.org>2022-08-24 20:37:19 +0800
committerYing-Chun Liu (PaulLiu) <paulliu@debian.org>2022-08-24 20:37:19 +0800
commit2260154ffd3881ce2d73439dcd054a78ca9174a0 (patch)
tree8ab183029b1331d94b890d318af44013c7ac4282
Init release.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
-rwxr-xr-xbuild_rockpi_image.sh41
-rwxr-xr-xdownload_everything.sh22
2 files changed, 63 insertions, 0 deletions
diff --git a/build_rockpi_image.sh b/build_rockpi_image.sh
new file mode 100755
index 0000000..ca8e6f4
--- /dev/null
+++ b/build_rockpi_image.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#set -x
+
+SELFPID=$$
+renice 10 -p "$SELFPID"
+ionice -c 3 -p "$SELFPID"
+#taskset -c -pa 0,1 "$SELFPID"
+#ulimit -Sv 10000000
+
+LOG_FILE=rockpi-log-`date +%Y%m%d%H%M%S`.txt
+exec > >(tee ${LOG_FILE}) 2>&1
+echo Starting at `date -Iseconds`
+
+UBOOTPATH=`pwd`/u-boot-mainline
+KERNELPATH=`pwd`/kernel
+mkdir -p output/host/image
+OUTPUTPATH=`pwd`/output/host/image
+
+export PATH="$PATH":/sbin:/usr/sbin
+
+# Install deps
+#sudo apt-get install gcc-aarch64-linux-gnu gcc-arm-none-eabi debootstrap qemu-user-static
+#sudo apt install lz4 cpio qemu-system-arm rsync
+#sudo apt install procps
+#sudo apt install gdisk
+
+cd aosp
+source build/envsetup.sh
+
+# clean the image
+rm -f "$OUTPUTPATH"/test.img
+
+# Set the (psudo) Target
+lunch aosp_cf_x86_64_phone-userdebug
+#make -j8
+
+# Remove this line to not rebuild the kernel
+#export SKIP_MRPROPER=1
+
+# Build image
+./device/google/cuttlefish/tools/create_base_image_arm.sh "$UBOOTPATH" "$KERNELPATH" "$OUTPUTPATH"/test.img
diff --git a/download_everything.sh b/download_everything.sh
new file mode 100755
index 0000000..b31ffca
--- /dev/null
+++ b/download_everything.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+SELFPID=$$
+renice 10 -p "$SELFPID"
+ionice -c 3 -p "$SELFPID"
+
+UBOOTREPO="https://android.googlesource.com/kernel/manifest/"
+#UBOOTREPO="https://android.googlesource.com/platform/manifest"
+UBOOTBRANCH="u-boot-mainline"
+KERNELREPO="https://android.googlesource.com/kernel/manifest"
+KERNELBRANCH="common-android13-5.15"
+AOSPREPO="https://android.googlesource.com/platform/manifest"
+AOSPBRANCH="master"
+
+# Checkout U-Boot
+mkdir -p u-boot-mainline && cd u-boot-mainline && repo init -u "$UBOOTREPO" -b "$UBOOTBRANCH" && repo sync && cd -
+
+# Checkout Kernel
+mkdir -p kernel && cd kernel && repo init -u "$KERNELREPO" -b "$KERNELBRANCH" && repo sync && cd -
+
+# Checkout AOSP
+mkdir -p aosp && cd aosp && repo init -u "$AOSPREPO" -b "$AOSPBRANCH" && repo sync && cd -