voron

experimental ARM OS
git clone git://git.2f30.org/voron.git
Log | Files | Refs | LICENSE

commit 539c277fe0be8c9f7c04dff1d7f6808014aa975a
parent 6e02b78afe88a83d1e147dd290b7a234561ff2bc
Author: oblique <psyberbits@gmail.com>
Date:   Wed May 15 00:40:10 +0300

Add omap4boot as a submodule

Diffstat:
.gitmodules | 3+++
scripts/panda_usbboot.sh | 38++++++++++++++++++++++++++++++++------
usbboot/omap4boot | 1+
usbboot/omap4boot_remove_signature_check.patch | 25+++++++++++++++++++++++++
4 files changed, 61 insertions(+), 6 deletions(-)
diff --git a/.gitmodules b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "usbboot/omap4boot"] + path = usbboot/omap4boot + url = git://github.com/swetland/omap4boot.git diff --git a/scripts/panda_usbboot.sh b/scripts/panda_usbboot.sh @@ -1,8 +1,34 @@ #!/bin/sh -if [ $# -eq 0 ]; then - BIN="usbbootImage" -else - BIN=$1 + +if [ $# -gt 0 ]; then + BIN=$(realpath "$1") fi -USBBOOT_PATH="${HOME}/embedded/panda/omap4boot/out/panda" -sudo ${USBBOOT_PATH}/usbboot ${USBBOOT_PATH}/aboot.bin $BIN + +[ $(basename ${PWD}) = "scripts" ] && cd .. + +if [ -z "$BIN" ]; then + BIN="${PWD}/usbbootImage" +fi + +if [ ! -f "$BIN" ]; then + echo "run \`make' first." + exit 1 +fi + +if [ -z "$OMAP4BOOT_PATH" ]; then + OMAP4BOOT_PATH="${PWD}/usbboot/omap4boot/out/panda" + if [ ! -f "${OMAP4BOOT_PATH}/usbboot" -o ! -f "${OMAP4BOOT_PATH}/aboot.bin" ]; then + git submodule init || exit 1 + git submodule update || exit 1 + cd usbboot/omap4boot || exit 1 + git reset --hard + patch -p1 -i ../omap4boot_remove_signature_check.patch + if [ -z "$TOOLCHAIN" ]; then + make TOOLCHAIN=arm-none-eabi- + else + make TOOLCHAIN="$TOOLCHAIN" + fi + fi +fi + +sudo "${OMAP4BOOT_PATH}/usbboot" "${OMAP4BOOT_PATH}/aboot.bin" "${BIN}" diff --git a/usbboot/omap4boot b/usbboot/omap4boot @@ -0,0 +1 @@ +Subproject commit b6c998113173e38655c8c9b40d88776992bdcd78 diff --git a/usbboot/omap4boot_remove_signature_check.patch b/usbboot/omap4boot_remove_signature_check.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile b/Makefile +index 5d4c674..800ca9d 100644 +--- a/Makefile ++++ b/Makefile +@@ -85,7 +85,6 @@ M_OBJS += libc/printf.o + M_OBJS += libc/strlen.o libc/memset.o libc/memcpy.o + M_OBJS += libc/raise.o + M_OBJS += aboot.o +-M_OBJS += trusted.o + M_OBJS += boot.o + M_OBJS += misc.o + M_LIBS := $(TARGET_LIBGCC) +diff --git a/aboot.c b/aboot.c +index 6c12694..126e40a 100644 +--- a/aboot.c ++++ b/aboot.c +@@ -34,7 +34,7 @@ + + #define WITH_MEMORY_TEST 0 + #define WITH_FLASH_BOOT 0 +-#define WITH_SIGNATURE_CHECK 1 ++#define WITH_SIGNATURE_CHECK 0 + + #if WITH_MEMORY_TEST + void memtest(void *x, unsigned count) {