1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/makesd-defs Thu May 23 00:49:30 2019 +0200
1.3 @@ -0,0 +1,87 @@
1.4 +# single partition file system(s) - should boot if boot loader is in flash/eMMC
1.5 +debian -f ext4 -r debian -kboot latest -dboot latest -m latest -c latest
1.6 +lxde $debian -r lxde
1.7 +xfce $debian -r xfce
1.8 +quantumstep $debian -r quantumstep
1.9 +qtmoko $debian -c none -r qtmoko
1.10 +replicant $debian -k none -d none -m none -c none -r replicant
1.11 +pyraos $debian -c none -r pyraos
1.12 +phosh $debian -r phosh
1.13 +all $lxde $qtmoko $replicant $quantumstep
1.14 +all2 $xfce $qtmoko $phosh $quantumstep
1.15 +
1.16 +# production images (dual partition) for specific devices
1.17 +gta04 -f fat -s 5 -b GTA04/latest -k latest -d latest $lxde -k none -d none -s 95
1.18 +l2804 $gta04
1.19 +gta04one -f fat -s 5 -b GTA04-OneNAND/latest -k latest -d latest $lxde -k none -d none -s 95
1.20 +gta04a5 $gta04one
1.21 +l2804a5 $gta04one
1.22 +gta04b2 -f fat -s 5 -b Letux-3704/latest -k latest -d latest $lxde -k none -d none -s 95
1.23 +l3704 $gta04b2
1.24 +gta04b3 -f fat -s 5 -b Letux-7004/latest -k latest -d latest $lxde -k none -d none -s 95
1.25 +l7004 $gta04b3
1.26 +gta04b7 -f fat -s 5 -b Neo900/latest -k latest -d latest $lxde -k none -d none -s 95
1.27 +neo900 $gta04b7
1.28 +bb -f fat -s 5 -b Letux-BeagleBoard/latest -k latest -d latest $lxde -k none -d none -s 95
1.29 +beagleboard $bb
1.30 +bbb -f fat -s 5 -b Letux-BeagleBone-Black/latest -k latest -d latest $lxde -k none -d none -s 95
1.31 +lc8 -f fat -s 5 -b Letux-Cortex-8/latest -k latest -d latest $lxde -k none -d none -s 95
1.32 +pocketbeagle $lc8
1.33 +bb+b1 -f fat -s 5 -b OpenMoko-Beagle-Hybrid/latest -k latest -d latest $lxde -k none -d none -s 95
1.34 +bb+b2 -f fat -s 5 -b Openmoko-Beagle-Hybrid-b2/latest -k latest -d latest $lxde -k none -d none -s 95
1.35 +bb+b4 -f fat -s 5 -b Openmoko-Beagle-Hybrid-b4/latest -k latest -d latest $lxde -k none -d none -s 95
1.36 +bb+b7 -f fat -s 5 -b BeagleBoard-Neo900/latest -k latest -d latest $lxde -k none -d none -s 95
1.37 +panda-es -f fat -s 5 -b PandaBoard-ES/latest -k latest -d latest $lxde -k none -d none -s 95
1.38 +omap5432evm -f fat -s 5 -b OMAP5-uEVM/latest -k latest -d latest $lxde -k none -d none -s 95
1.39 +omap5432evm+pyra -f fat -s 5 -b OMAP5-uEVM+Pyra4.9/latest -k latest -d latest $lxde -k none -d none -s 95
1.40 +pyra+lc15 -f fat -s 5 -b Pyra+LC15/latest -k latest -d latest $lxde -k none -d none -s 95
1.41 +pyra+lc15-4.9 -f fat -s 5 -b Pyra+LC15-4.9/latest -k latest -d latest $lxde -k none -d none -s 95
1.42 +pyra+lc15-4gb -f fat -s 5 -b Pyra+LC15-4GB/latest -k latest-lpae -d latest-lpae $lxde -m latest-lpae -k none -d none -s 95
1.43 +pyra $pyra+lc15 -r $pyraos
1.44 +pyra-$lxde $pyra+lc15 -r $lxde
1.45 +pyra-4gb $pyra+lc15-4gb -r $pyraos
1.46 +lc15 -f fat -s 5 -b Letux-Cortex-15/latest -k latest -d latest $lxde -k none -d none -s 95
1.47 +lc15-4.9 -f fat -s 5 -b Letux-Cortex-15-4.9/latest -k latest -d latest $lxde -k none -d none -s 95
1.48 +lc15-4gb -f fat -s 5 -b Letux-Cortex-15-4GB/latest -k latest-lpae -d latest-lpae $lxde -k none -d none -m latest-lpae -s 95
1.49 +lc15evm -f fat -s 5 -b Letux-Cortex-15-EVM/latest -k latest -d latest $lxde -k none -d none -s 95
1.50 +lc15evm-4gb -f fat -s 5 -b Letux-Cortex-15-EVM-4GB/latest -k latest -d latest $lxde -k none -d none -s 95
1.51 +gta15 -f fat -s 5 -b GTA15/latest -k latest -d latest $lxde -k none -d none -s 95
1.52 +gta15-4gb -f fat -s 5 -b GTA15-4GB/latest -k latest -d latest $lxde -k none -d none -s 95
1.53 +pyraphone $gta15
1.54 +
1.55 +# for Pandora, a single partition image can boot
1.56 +openpandora $lxde -b OpenPandora/latest
1.57 +pandora $openpandora
1.58 +
1.59 +# Udoo Neo needs a pseudo-single -partition but SPL and u-boot must be copied by dd
1.60 +udoo-neo $lxde -p 2 -dd Udoo-Neo/latest/SPL -p 138 -dd Udoo-Neo/latest/u-boot.img \
1.61 + -p 2048 -bboot Udoo-Neo/latest -kboot latest -dboot latest -m latest
1.62 +
1.63 +# Raspi 3B+ needs special setup with bootloader and boot plus rootfs partitions
1.64 +raspi3b+ -f fat -s 5 -I -x https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin \
1.65 + -x https://github.com/raspberrypi/firmware/raw/master/boot/fixup.dat \
1.66 + -x https://github.com/raspberrypi/firmware/raw/master/boot/start.elf \
1.67 + -x http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/config.txt \
1.68 + -x http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/cmdline.txt \
1.69 + -k http://download.goldelico.com/letux-kernel/latest/zImage -d latest $lxde -k none -d none -m latest -s 95
1.70 +
1.71 +# we must make sure that we load the mipsel variants and not armel/armhf
1.72 +lenny400 -A mipsel -f fat -s 2 -k http://download.goldelico.com/letux-400/20110208-lenny400/uImage \
1.73 + -f ext -r http://download.goldelico.com/letux-400/20110208-lenny400/bootstrapped-rootfs.tbz \
1.74 + -c http://download.goldelico.com/letux-400/20110208-lenny400/config.tgz \
1.75 + -m http://download.goldelico.com/letux-400/20110208-lenny400/modules.tgz
1.76 +mipsbook-400 -A mipsel -f fat -s 2 -k latest-l400 -d latest-l400 -f ext \
1.77 + -r http://download.goldelico.com/letux-400/20110208-lenny400/bootstrapped-rootfs.tbz \
1.78 + -c http://download.goldelico.com/letux-400/20110208-lenny400/config.tgz \
1.79 + -m latest-l400
1.80 +mipsbook $mipsbook-400
1.81 +letux-400 $mipsbook-400
1.82 +
1.83 +# CI20 needs a pseudo-single -partition but SPL and u-boot must be copied by dd
1.84 +# see https://elinux.org/CI20_Dev_Zone#Making_a_bootable_SD_card_from_sources
1.85 +ci20 -A mipsel $lxde -p 1 -dd CI20/latest/u-boot-spl.bin -p 28 -dd CI20/latest/u-boot.img \
1.86 + -p 4096 -bboot CI20/latest -kboot latest-l400 -dboot latest-l400 -m latest-l400
1.87 +
1.88 +# Kobo / Tolino 3 needs a pseudo-single -partition but SPL and u-boot must be copied by dd
1.89 +kobo-clara $lxde -p 2 -dd Kobo/latest/SPL -p 138 -dd Kobo/latest/u-boot.img -p 2048 -bboot Kobo/latest -kboot latest -dboot latest -m latest
1.90 +tolino-shine3 $kobo-clara
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/makesd-expand-def Thu May 23 00:49:30 2019 +0200
2.3 @@ -0,0 +1,157 @@
2.4 +#!/bin/sh
2.5 +
2.6 +# Search for a definition in the definitions file, expanding it to the recorded
2.7 +# value, recursively expanding any definition references.
2.8 +
2.9 +PROGNAME=`basename "$0"`
2.10 +THISDIR=`dirname "$0"`
2.11 +
2.12 +DEFSFILE="makesd-defs"
2.13 +DEFSPATH="$THISDIR/$DEFSFILE"
2.14 +
2.15 +
2.16 +
2.17 +# Test for options.
2.18 +
2.19 +if [ "$1" = '--original' ] ; then
2.20 + FLAT=$1
2.21 + shift 1
2.22 +else
2.23 + FLAT=
2.24 +fi
2.25 +
2.26 +# Obtain the requested definition name.
2.27 +
2.28 +DEF=$1
2.29 +
2.30 +if [ ! "$DEF" ] || [ "$DEF" = '--help' ] ; then
2.31 + cat 1>&2 <<EOF
2.32 +Usage: $PROGNAME <definition name>
2.33 +
2.34 +Search for a definition of the given name in the definitions file:
2.35 +
2.36 +$DEFSPATH
2.37 +
2.38 +If the definition can be found, the value of the definition is emitted and an
2.39 +exit value of 0 returned. Otherwise, no output is produced and an exit value of
2.40 +1 is returned.
2.41 +EOF
2.42 + exit 1
2.43 +fi
2.44 +
2.45 +
2.46 +
2.47 +# lookup <definition name>
2.48 +#
2.49 +# Search for a definition of the given name in the definitions file. Emit the
2.50 +# full definition, incorporating multiple lines if continuation characters are
2.51 +# present.
2.52 +
2.53 +lookup()
2.54 +{
2.55 + local LINENUM
2.56 +
2.57 + # Obtain the line number of the matching definition.
2.58 +
2.59 + LINENUM=`grep -h -n "^$1\s" "$DEFSPATH" | cut -d: -f1`
2.60 +
2.61 + if [ "$LINENUM" ] ; then
2.62 +
2.63 + # Read from the definition line. Line continuations are observed.
2.64 +
2.65 + tail -n "+$LINENUM" "$DEFSPATH" | if read LINE ; then
2.66 + echo "$LINE"
2.67 + break
2.68 + fi
2.69 + fi
2.70 +}
2.71 +
2.72 +# match <string> <pattern>
2.73 +#
2.74 +# Attempt to match pattern in string, emitting the string if successful.
2.75 +
2.76 +match()
2.77 +{
2.78 + if `echo "$1" | grep -q "$2"` ; then
2.79 + echo "$1"
2.80 + return 0
2.81 + else
2.82 + return 1
2.83 + fi
2.84 +}
2.85 +
2.86 +# defname <prefixed name>
2.87 +#
2.88 +# Return the actual definition name from the given prefixed name.
2.89 +
2.90 +defname()
2.91 +{
2.92 + echo "$1" | sed 's/^\$//'
2.93 +}
2.94 +
2.95 +# expand <definition name>
2.96 +#
2.97 +# Expand the given definition name to its value, recursively expanding any
2.98 +# definition names found in the value text.
2.99 +
2.100 +expand()
2.101 +{
2.102 + local FOUND VALUE
2.103 +
2.104 + FOUND=
2.105 + VALUE=
2.106 +
2.107 + for WORD in `lookup "$1"`; do
2.108 + if [ ! "$FOUND" ] ; then
2.109 + FOUND=$WORD
2.110 + continue
2.111 + fi
2.112 +
2.113 + # Prevent recursive expansion if flat mode is selected.
2.114 +
2.115 + if [ ! "$FLAT" ] ; then
2.116 +
2.117 + # Identify definition names by looking for a $ prefix.
2.118 +
2.119 + DEFNAME=`match "$WORD" '^\\$'`
2.120 +
2.121 + # Attempt to expand definition names.
2.122 +
2.123 + if [ "$DEFNAME" ] ; then
2.124 + DEFNAME=`defname "$DEFNAME"`
2.125 + EXPANDED=`expand "$DEFNAME"`
2.126 +
2.127 + if [ "$EXPANDED" ] ; then
2.128 + WORD=$EXPANDED
2.129 + fi
2.130 + fi
2.131 + fi
2.132 +
2.133 + # Incorporate expansions into the final value.
2.134 +
2.135 + if [ ! "$VALUE" ] ; then
2.136 + VALUE=$WORD
2.137 + else
2.138 + VALUE="$VALUE $WORD"
2.139 + fi
2.140 + done
2.141 +
2.142 + # Show the expanded definition value.
2.143 +
2.144 + echo "$VALUE"
2.145 +
2.146 + # Return a result value of 0 if successful, 1 otherwise.
2.147 +
2.148 + if [ "$VALUE" ] ; then
2.149 + return 0
2.150 + else
2.151 + return 1
2.152 + fi
2.153 +}
2.154 +
2.155 +
2.156 +
2.157 +# Expand the definition and return the result code.
2.158 +
2.159 +expand "$DEF"
2.160 +exit $?