diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-20 15:08:29 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 47519b4428c6faecd6e51b2809095f53bd3a0b81 (patch) | |
| tree | b41a99d0fe008cfb497eac4d05b7fd343ffce32c /resources/ct1986.sh | |
| parent | c81898d6a760e2057f0933c9da6160702a4d0f61 (diff) | |
Infrastructure more or less set up!
It remains to tweak ct1986.c and add a .login file to autorun stuff!
Diffstat (limited to 'resources/ct1986.sh')
| -rwxr-xr-x | resources/ct1986.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/resources/ct1986.sh b/resources/ct1986.sh new file mode 100755 index 0000000..fac57d5 --- /dev/null +++ b/resources/ct1986.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +set -u +set -e + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +cp output/build/linux-custom/arch/arm/boot/dts/overlays/hd44780-lcd.dtbo "${BINARIES_DIR}/rpi-firmware/overlays/" + +echo "root=/dev/mmcblk0p2 rootwait console=ttyAMA0,115200 hdmi_blanking=2" \ + > "${BINARIES_DIR}/rpi-firmware/cmdline.txt" + +cat > "${BINARIES_DIR}/rpi-firmware/config.txt" <<EOF +start_file=start.elf +fixup_file=fixup.dat +kernel=zImage +gpu_mem_256=0 +gpu_mem_512=0 +gpu_mem_1024=0 +dtoverlay=hd44780-lcd.dtbo +dtparam=pin_d4=26,pin_d5=19,pin_d6=13,pin_d7=6,pin_en=20,pin_rs=21 +EOF + +# Pass an empty rootpath. genimage makes a full copy of the given rootpath to +# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk +# space. We don't rely on genimage to build the rootfs image, just to insert a +# pre-built one in the disk image. + +trap 'rm -rf "${ROOTPATH_TMP}"' EXIT +ROOTPATH_TMP="$(mktemp -d)" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${ROOTPATH_TMP}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? |
