From db1af18670b9b73fd29782c01b0da0bfce6efd06 Mon Sep 17 00:00:00 2001 From: Paul Whalen Date: Jun 25 2019 19:51:20 +0000 Subject: Merge #35 `Add OLPC XO-1.75` --- diff --git a/SUPPORTED-BOARDS b/SUPPORTED-BOARDS index 7276c16..e09e651 100644 --- a/SUPPORTED-BOARDS +++ b/SUPPORTED-BOARDS @@ -31,5 +31,5 @@ ST Devices: stih410-b2260 Other Devices: -arndale chiliboard cl-som-am57x rpi2 rpi3 +arndale chiliboard cl-som-am57x rpi2 rpi3 olpc_xo175 diff --git a/arm-image-installer b/arm-image-installer index 1752234..c2b29c8 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -433,7 +433,7 @@ if [ "$TARGET" != "" ]; then else PREFIX=/tmp/root fi - if [ "$TARGET" = "rpi2" ] || [ "$TARGET" = "rpi3" ]; then + if [ "$TARGET" = "rpi2" ] || [ "$TARGET" = "rpi3" ] || [ "$TARGET" = "olpc_xo175" ]; then . "${BOARDDIR}/${TARGET}" elif [ -d "${PREFIX}/usr/share/uboot/${TARGET}" ]; then . "${BOARDDIR}/${TARGET}" diff --git a/boards.d/olpc_xo175 b/boards.d/olpc_xo175 new file mode 100644 index 0000000..efd7435 --- /dev/null +++ b/boards.d/olpc_xo175 @@ -0,0 +1,74 @@ +#!/bin/bash + +SYSCON=ttyS2,115200 + +echo "= Copying loader scripts to boot partition" + +mkdir -p /tmp/boot/boot +cat > /tmp/boot/boot/olpc.fth <<'EOF' +\ OLPC XO boot script + +: check-ofw-version ( -- ) + " /" find-device " compatible" get-property + abort" No compatible property on /" ( -- compatible$ ) + " mrvl,mmp2" 2swap substring? not if + cr + ." Firmware Q4E00 or newer is needed to boot a Devicetree enabled kernel." cr + cr + ." One way to update is to copy http://dev.laptop.org/~quozl/q4e00ja.rom" cr + ." to a FAT partition on a USB flash stick and run ""flash u:\q4e00ja.rom""" cr + cr + ." Aborting boot." cr + show-sad + abort + then +; + +: unix-to-ofw-path ( $ -- $ ) + " last:" 2swap $cat2 + 2dup + begin dup 0<> while + 1 - + 2dup + dup c@ + ascii / = if ascii \ swap c! else drop then + repeat + 2drop +; + +: load-extlinux-conf ( $ -- ) + $read-file if exit then + 2dup + + 0 0 to boot-device + 0 0 to ramdisk + 0 0 to boot-file + + begin + linefeed left-parse-string + + -leading bl left-parse-string + 2dup " label" $= if + 4drop + \ If we see a label, but already have boot-device set, then + \ we drop the rest instead of proceeding to read another entry + boot-device and 0<> if drop 0 then + else + 2dup " kernel" $= if 2over unix-to-ofw-path to boot-device else + 2dup " linux" $= if 2over unix-to-ofw-path to boot-device else + 2dup " initrd" $= if 2over unix-to-ofw-path to ramdisk else + 2dup " append" $= if 2over to boot-file + then then then then + 4drop + then + + dup 0 = + until + 2drop + free-mem +; + +visible unfreeze +check-ofw-version +" last:\extlinux\extlinux.conf" load-extlinux-conf +boot +EOF