Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: m-labs/scripts
base: 94a37e0
...
head fork: m-labs/scripts
compare: cff9c93
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Showing with 104 additions and 3 deletions.
  1. +2 −1  build
  2. +3 −2 compile-flickernoise/Makefile
  3. +99 −0 flash_mac_bios.sh
View
3  build
@@ -65,7 +65,8 @@ cp compile-flickernoise/flickernoise.fbi ${IMAGES_DIR}
echo "build data patitions ..."
mkdir -p data.flash5
-find ${MILKYMIST_GIT_DIR}/flickernoise.git/patches -name "*.fnp" -exec cp {} ./data.flash5 \;
+mkdir -p data.flash5/patches
+find ${MILKYMIST_GIT_DIR}/flickernoise.git/patches -name "*.fnp" -exec cp {} ./data.flash5/patches \;
make -C ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils mm-mkyaffs2image
${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils/mm-mkyaffs2image data.flash5 ${IMAGES_DIR}/data.flash5.bin convert
View
5 compile-flickernoise/Makefile
@@ -24,7 +24,7 @@ RTEMS_VERSION=4.11
RTEMS_MAKEFILE_PATH?=/opt/rtems-$(RTEMS_VERSION)/lm32-rtems$(RTEMS_VERSION)/milkymist
ZLIB_VERSION=1.2.5
-LIBPNG_VERSION=1.4.4
+LIBPNG_VERSION=1.5.2
JBIG2DEC_VERSION=0.11
FREETYPE2_VERSION=2.4.4
MUPDF_VERSION=0.8
@@ -79,6 +79,7 @@ $(BUILD_DIR)/zlib: $(DL)/$(ZLIB).ok build_dir/.prepare
$(BUILD_DIR)/libpng: $(DL)/$(LIBPNG).ok build_dir/.prepare
cd $(BUILD_DIR); tar xf ../$(DL)/$(LIBPNG)
(cd $(BUILD_DIR)/libpng-$(LIBPNG_VERSION); $(CONFIGURE_VARS) \
+ CPPFLAGS="-DPNG_NO_FLOATING_ARITHMETIC -DPNG_NO_FLOATING_POINT" \
./configure --disable-shared --prefix=$(RTEMS_MAKEFILE_PATH) \
--host=lm32-rtems4.11; \
make; \
@@ -297,4 +298,4 @@ $(DL)/$(EXPAT).ok:
http://download.sourceforge.net/project/expat/expat/$(EXPAT_VERSION)/expat-$(EXPAT_VERSION).tar.gz
touch $@
clean:
- rm -rf build_dir/*
View
99 flash_mac_bios.sh
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+# version of me
+__VERSION__="2011-05-21"
+
+BASE_URL_HTTP="http://www.milkymist.org/snapshots"
+VERSION="latest"
+WORKING_DIR="${HOME}/.qi/milkymist/bios/${VERSION}"
+
+FJMEM="fjmem.bit"
+BIOS_RESCUE="bios-rescue.bin"
+
+HEAD_TMP="head.tmp"
+MAC_TMP="mac.tmp"
+REMAIN_TMP="remain.tmp"
+BIOS_RESCUE_MAC="bios.$1$2.bin"
+
+###################################################################
+if [ $# != 2 ]; then
+ echo "Usage:"
+ echo " $0" "00" "17"
+ echo " \$1 \$2 is the last two mac address with Hexadecimal"
+ exit 1
+fi
+
+mkdir -p ${WORKING_DIR}
+
+MD5SUMS_SERVER=$(\
+ wget -O - ${BASE_URL_HTTP}/${VERSION}/md5sums 2> /dev/null | \
+ grep -E "(${FJMEM}|${BIOS_RESCUE})" | sort)
+
+if [ "${MD5SUMS_SERVER}" == "" ]; then
+ echo "ERROR: can't fetch files from server"
+ exit 1
+fi
+
+MD5SUMS_LOCAL=$( (cd "${WORKING_DIR}" ; \
+ md5sum --binary ${FJMEM} ${BIOS_RESCUE} 2> /dev/null) | sort )
+
+if [ "${MD5SUMS_SERVER}" == "${MD5SUMS_LOCAL}" ]; then
+ echo "present files are identical to the ones on the server - do not download them again"
+else
+ (cd "${WORKING_DIR}" ; rm -f ${FJMEM} ${BIOS_RESCUE})
+ wget -P "${WORKING_DIR}" "${BASE_URL_HTTP}/${VERSION}/${FJMEM}"
+ wget -P "${WORKING_DIR}" "${BASE_URL_HTTP}/${VERSION}/${BIOS_RESCUE}"
+fi
+
+####################################################
+dd if=${WORKING_DIR}/${BIOS_RESCUE} of=${WORKING_DIR}/${HEAD_TMP} bs=8 count=28
+dd if=${WORKING_DIR}/${BIOS_RESCUE} of=${WORKING_DIR}/${REMAIN_TMP} bs=8 skip=29
+
+printf "\\x$(printf "%x" 0x10)" > ${WORKING_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0xe2)" >> ${WORKING_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0xd5)" >> ${WORKING_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x00)" >> ${WORKING_DIR}/${MAC_TMP}
+
+printf "\\x$(printf "%x" 0x$1)" >> ${WORKING_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x$2)" >> ${WORKING_DIR}/${MAC_TMP}
+
+printf "\\x$(printf "%x" 0x00)" >> ${WORKING_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x00)" >> ${WORKING_DIR}/${MAC_TMP}
+
+cat ${WORKING_DIR}/${HEAD_TMP} \
+ ${WORKING_DIR}/${MAC_TMP} \
+ ${WORKING_DIR}/${REMAIN_TMP} \
+ > ${WORKING_DIR}/${BIOS_RESCUE_MAC}
+
+#UrJtag option ####################################################
+NOVERIFY="noverify"
+
+#UrJtag batch file
+BATCH_FILE=`mktemp`
+cat > ${BATCH_FILE}<<EOF
+cable milkymist
+detect
+instruction CFG_OUT 000100 BYPASS
+instruction CFG_IN 000101 BYPASS
+pld load ${WORKING_DIR}/${FJMEM}
+initbus fjmem opcode=000010
+frequency 6000000
+detectflash 0
+endian big
+
+flashmem 0x220000 ${WORKING_DIR}/${BIOS_RESCUE_MAC} ${NOVERIFY}
+
+pld reconfigure
+EOF
+
+jtag ${BATCH_FILE}
+if [ "$?" == "0" ]; then
+ rm -f ${BATCH_FILE}
+
+ echo "-------------------------------------------------------------"
+ echo "Your bios-rescue with MAC address $1:$2 was successfully reflashed."
+ echo "To boot the new software, Please now press the middle button of your Milkymist One."
+ echo "-------------------------------------------------------------"
+else
+ echo "there are errors when running jtag. "
+fi

No commit comments for this range

Something went wrong with that request. Please try again.