Patch optimized memcpy into kelvin libc

Change-Id: I0983477be8733e8788fb431d6e0493a54d5a936d
diff --git a/download-toolchain.sh b/download-toolchain.sh
index 1aac8b9..c166486 100755
--- a/download-toolchain.sh
+++ b/download-toolchain.sh
@@ -99,8 +99,16 @@
 # Patch Kelvin custom ops
 if [[ "${TOOLCHAIN_TARGET}" == "KELVIN" ]]; then
   pushd "${TOOLCHAIN_GCC_SRC}/riscv-binutils" > /dev/null
-  git apply "${ROOTDIR}/build/patches/kelvin/0001-Kelvin-riscv-binutils-patch.patch"
+  git am "${ROOTDIR}/build/patches/kelvin/0001-Kelvin-riscv-binutils-patch.patch"
   cp "${ROOTDIR}/build/patches/kelvin/kelvin-opc.h" "include/opcode/kelvin-opc.h"
   cp "${ROOTDIR}/build/patches/kelvin/kelvin-opc.c" "opcodes/kelvin-opc.c"
   popd > /dev/null
+
+  pushd "${TOOLCHAIN_GCC_SRC}/riscv-gcc" > /dev/null
+  git am "${ROOTDIR}/build/patches/riscv-gcc/0001-Define-__KELVIN__.patch"
+  popd > /dev/null
+
+  pushd "${TOOLCHAIN_GCC_SRC}/riscv-newlib" > /dev/null
+  git am "${ROOTDIR}/build/patches/riscv-newlib/0001-Add-memcpy-kelvin.c.patch"
+  popd > /dev/null
 fi