aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Pfeffer <zach.pfeffer@linaro.org>2012-12-13 08:06:37 -0600
committerZach Pfeffer <zach.pfeffer@linaro.org>2012-12-13 11:49:19 -0600
commitb04e50dcf7ad5f6ea0e33887371ef1f94bc0b54c (patch)
tree72231294bc08f8b4869b6cae2c87aa4a6c973812
downloadat-b04e50dcf7ad5f6ea0e33887371ef1f94bc0b54c.tar.gz
Initial commit
Some tools to work with builds in faster, but non-standard ways install.sh - Install scripts to a specific location bi.sh - Build a linux-system.axf standalone bk.sh - Build a kernel standalone ord.sh - Open the ramdisk to hack on crd.sh - Create a ramdisk from the open one makemmc.sh - Create the mmc.bin pkg.sh - Download linaro-image-tools and create mmc.bin get.sh - Get the componets to just build the kernel and bootwrapper remake_boot.sh - make Signed-off-by: Zach Pfeffer <zach.pfeffer@linaro.org>
-rwxr-xr-xbi.sh45
-rwxr-xr-xbk.sh11
-rwxr-xr-xcrd.sh5
-rwxr-xr-xget.sh6
-rwxr-xr-xinstall.sh10
-rwxr-xr-xmakemmc.sh1
-rwxr-xr-xord.sh11
-rwxr-xr-xpkg.sh7
-rwxr-xr-xremake_boot.sh13
-rwxr-xr-xrun.sh21
10 files changed, 130 insertions, 0 deletions
diff --git a/bi.sh b/bi.sh
new file mode 100755
index 0000000..59a7ec3
--- /dev/null
+++ b/bi.sh
@@ -0,0 +1,45 @@
+MSG="
+You can get one by downloading a boot.tar.bz2 from:
+ https://android-build.linaro.org/builds/~linaro-android-restricted/lindt-white/
+ Downloads > target > vexpress
+ tar -jxvf boot.tar.bz2
+"
+
+if [ ! -e out/target/product/vexpress/obj/kernel/arch/arm64/boot/Image ]; then
+ echo "Build your kernel first with ./bk.sh"
+ exit
+fi
+
+if [ -z "$1" ]; then
+if [ ! -e out/target/product/vexpress/ramdisk.img ]; then
+ echo "Pass the full path to a ramdisk.img or make a ramdisk.img"
+ echo "$MSG"
+ exit
+fi
+else
+if [ ! -e "$1" ]; then
+ echo "The path $1 doesn't exist."
+ echo "Please pass a path to a ramdisk that does exist."
+ echo "$MSG"
+ exit
+fi
+fi
+
+ln -sf $(pwd)/out/target/product/vexpress/obj/kernel/arch/arm64/boot/Image out/target/product/vexpress/kernel
+ln -sf $(pwd)/out/target/product/vexpress/obj/kernel/scripts/dtc/dtc ./boot-wrapper/dtc
+ln -sf $(pwd)/kernel/arch/arm64/boot/dts/vexpress-v2p-aarch64.dts ./boot-wrapper/vexpress-v2p-aarch64.dts
+ln -sf $(pwd)/kernel/arch/arm64/boot/dts/vexpress-v2m-rs1.dtsi ./boot-wrapper/vexpress-v2m-rs1.dtsi
+ln -sf $(pwd)/kernel/arch/arm64/boot/dts/skeleton.dtsi ./boot-wrapper/skeleton.dtsi
+ln -sf $(pwd)/out/target/product/vexpress/kernel ./boot-wrapper/Image
+ln -sf $(pwd)/out/target/product/vexpress/ramdisk.img ./boot-wrapper/filesystem.cpio.gz
+PATH=$(pwd)/gcc-linaro-aarch64-linux-gnu-4.7/bin:$PATH && \
+make -C ./boot-wrapper clean && \
+make -C ./boot-wrapper CROSS_COMPILE=aarch64-linux-gnu-
+cp -fa ./boot-wrapper/linux-system.axf out/target/product/vexpress/boot/linux-system.axf
+rm ./boot-wrapper/dtc
+rm ./boot-wrapper/vexpress-v2p-aarch64.dts
+rm ./boot-wrapper/vexpress-v2m-rs1.dtsi
+rm ./boot-wrapper/skeleton.dtsi
+rm ./boot-wrapper/Image
+rm ./boot-wrapper/filesystem.cpio.gz
+
diff --git a/bk.sh b/bk.sh
new file mode 100755
index 0000000..2829e04
--- /dev/null
+++ b/bk.sh
@@ -0,0 +1,11 @@
+KERNEL_OUT=$(pwd)/out/target/product/vexpress/obj/kernel
+CPUS=`grep -c processor /proc/cpuinfo`
+
+mkdir -p $KERNEL_OUT
+
+if [ -z "$1" ]; then
+PATH=$(pwd)/gcc-linaro-aarch64-linux-gnu-4.7/bin:$PATH && \
+make -j${CPUS} -C kernel O=$KERNEL_OUT ARCH=arm64 defconfig vexpress-android_defconfig
+fi
+PATH=$(pwd)/gcc-linaro-aarch64-linux-gnu-4.7/bin:$PATH && \
+make -j${CPUS} -C kernel O=$KERNEL_OUT ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image
diff --git a/crd.sh b/crd.sh
new file mode 100755
index 0000000..bd36bfb
--- /dev/null
+++ b/crd.sh
@@ -0,0 +1,5 @@
+cd rd
+find ./ | cpio -H newc -o > ../ramdisk
+gzip ../ramdisk -c > ../ramdisk.img
+cd ..
+cp ramdisk.img out/target/product/vexpress/ramdisk.img \ No newline at end of file
diff --git a/get.sh b/get.sh
new file mode 100755
index 0000000..8da23ec
--- /dev/null
+++ b/get.sh
@@ -0,0 +1,6 @@
+git clone git://android.git.linaro.org/people/pfefferz/gcc-linaro-aarch64-linux-gnu-4.7
+git clone git://android.git.linaro.org/people/pfefferz/boot-wrapper-aarch64 boot-wrapper
+git clone git://git.linaro.org/people/antipov/linux-aarch64 kernel
+pushd kernel
+git checkout android64
+popd \ No newline at end of file
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..f0be289
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,10 @@
+if [ ! -d $1 ]; then
+echo "$1 doesn't exist, exiting"
+exit
+fi
+
+echo "installing:"
+echo "$(ls)"
+echo "$1"
+
+cp * $1 \ No newline at end of file
diff --git a/makemmc.sh b/makemmc.sh
new file mode 100755
index 0000000..3cfea59
--- /dev/null
+++ b/makemmc.sh
@@ -0,0 +1 @@
+./linaro-image-tools/linaro-android-media-create --image_file mmc.bin --image_size 2000M --dev vexpress --system out/target/product/vexpress/system.tar.bz2 --userdata out/target/product/vexpress/userdata.tar.bz2 --boot out/target/product/vexpress/boot.tar.bz2 \ No newline at end of file
diff --git a/ord.sh b/ord.sh
new file mode 100755
index 0000000..4661ddd
--- /dev/null
+++ b/ord.sh
@@ -0,0 +1,11 @@
+if [ -d rd ]; then
+echo "rd exists, refusing to overwrite"
+exit
+fi
+
+mkdir rd
+cd rd
+pwd
+cp ../out/target/product/vexpress/ramdisk.img ../filesystem.cpio.gz
+gzip -d ../filesystem.cpio.gz
+cpio -i < ../filesystem.cpio \ No newline at end of file
diff --git a/pkg.sh b/pkg.sh
new file mode 100755
index 0000000..8f90a7f
--- /dev/null
+++ b/pkg.sh
@@ -0,0 +1,7 @@
+if [ ! -f ./linaro-image-tools/linaro-android-media-create ]; then
+bzr branch lp:linaro-image-tools
+fi
+
+export BINOUT=out/target/product/vexpress
+
+./linaro-image-tools/linaro-android-media-create --image_file mmc.bin --image_size 2000M --dev vexpress --system $BINOUT/system.tar.bz2 --userdata $BINOUT/userdata.tar.bz2 --boot $BINOUT/boot.tar.bz2 \ No newline at end of file
diff --git a/remake_boot.sh b/remake_boot.sh
new file mode 100755
index 0000000..f6e95ef
--- /dev/null
+++ b/remake_boot.sh
@@ -0,0 +1,13 @@
+export ANDROID_DIR=$(pwd)
+export KERNEL_DIR=$ANDROID_DIR/kernel
+export TOOLCHAIN_DIR=$ANDROID_DIR/gcc-linaro-aarch64-linux-gnu-4.7/bin
+export BOOT_WRAPPER_DIR=$ANDROID_DIR/boot-wrapper
+pushd $BOOT_WRAPPER_DIR
+ln -sf $KERNEL_DIR/scripts/dtc/dtc dtc
+ln -sf $KERNEL_DIR/arch/arm64/boot/dts/vexpress-v2p-aarch64.dts vexpress-v2p-aarch64.dts
+ln -sf $KERNEL_DIR/arch/arm64/boot/dts/vexpress-v2m-rs1.dtsi vexpress-v2m-rs1.dtsi
+ln -sf $KERNEL_DIR/arch/arm64/boot/dts/skeleton.dtsi skeleton.dtsi
+ln -sf $KERNEL_DIR/arch/arm64/boot/Image Image
+ln -sf $BOOT_DIR/Initrd filesystem.cpio.gz
+make CROSS_COMPILE=aarch64-linux-gnu-
+popd \ No newline at end of file
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..a935083
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,21 @@
+. /home/pfefferz/aarch64/RTSM_AEMv8/ModelDebugger_7.1/source_me.sh
+export PATH=$PATH:/home/pfefferz/aarch64/RTSM_AEMv8/ModelDebugger_7.1/bin/
+export ARMLMD_LICENSE_FILE="8224@flexlm.linaro.org"
+
+if [ ! -f ran_run.txt ]; then
+ssh -L 8224:localhost:8224 -L 18224:localhost:18224 -N portfwd@23.21.178.170 &
+touch ran_run.txt
+fi
+
+export BINOUT=out/target/product/vexpress
+
+model_shell64 -a $BINOUT/boot/linux-system.axf /home/pfefferz/aarch64/RTSM_AEMv8/lib/Linux64/RTSM_VE_AEMv8A.so -C motherboard.mmc.p_mmc_file=$(pwd)/mmc.bin -C cluster.NUM_CORES=1 -C cluster.cpu0.unpredictable_WPMASKANDBAS=0 \
+-C cluster.cpu0.unpredictable_non-contigous_BAS=0 \
+-C cluster.cpu1.unpredictable_WPMASKANDBAS=0 \
+-C cluster.cpu1.unpredictable_non-contigous_BAS=0 \
+-C cluster.cpu2.unpredictable_WPMASKANDBAS=0 \
+-C cluster.cpu2.unpredictable_non-contigous_BAS=0 \
+-C cluster.cpu3.unpredictable_WPMASKANDBAS=0 \
+-C cluster.cpu3.unpredictable_non-contigous_BAS=0 \
+-C cluster.take_ccfail_undef=0
+