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: 553b26f
...
head fork: m-labs/scripts
compare: 4242fec
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
8 build
@@ -19,8 +19,8 @@ get-feeds-revision() {
echo "prepare, mkdir ..."
-mv ${IMAGES_DIR} ${IMAGES_DIR}.backup
mkdir -p ${IMAGES_DIR}
+rm -f ${IMAGES_DIR}/*
echo "update git ..."
@@ -33,7 +33,7 @@ get-feeds-revision ${MILKYMIST_GIT_DIR}/milkymist.git
get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-milkymist.git
get-feeds-revision ${MILKYMIST_GIT_DIR}/mtk.git
get-feeds-revision ${MILKYMIST_GIT_DIR}/liboscparse.git
-get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-yaffs2-old.git
+get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git
get-feeds-revision ${MILKYMIST_GIT_DIR}/flickernoise.git
get-feeds-revision ${MILKYMIST_GIT_DIR}/autotest-m1.git
get-feeds-revision .
@@ -70,8 +70,8 @@ echo "build data patitions ..."
mkdir -p data.flash5/patchpool
find ${MILKYMIST_GIT_DIR}/flickernoise.git/patches -name "*.fnp" -exec cp {} ./data.flash5/patchpool \;
-make -C ${MILKYMIST_GIT_DIR}/rtems-yaffs2-old.git/utils mm-mkyaffs2image
-${MILKYMIST_GIT_DIR}/rtems-yaffs2-old.git/utils/mm-mkyaffs2image data.flash5 ${IMAGES_DIR}/data.flash5.bin convert
+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
chmod 644 ${IMAGES_DIR}/data.flash5.bin
echo "generate md5sum ..."
View
0  flash_jtag.sh → scripts/flash_jtag.sh
File renamed without changes
View
0  format_memcard.sh → scripts/format_memcard.sh
File renamed without changes
View
0  read_flash_m1.sh → scripts/read_flash_m1.sh
File renamed without changes
View
0  reflash_m1.sh → scripts/reflash_m1.sh
File renamed without changes
View
115 scripts/reflash_m1_rc3.sh
@@ -0,0 +1,115 @@
+#!/bin/bash
+
+###################################################################
+__VERSION__="2011-08-12"
+echo "Version of me: ${__VERSION__}"
+echo "File name: $0"
+
+WORKING_DIR=".."
+
+STANDBY="standby.fpg"
+SOC_RESCUE="soc-rescue.fpg"
+SPLASH_RESCUE="splash-rescue.raw"
+SOC="soc.fpg"
+BIOS="bios.bin"
+SPLASH="splash.raw"
+FLICKERNOISE="flickernoise.fbi"
+DATA="data.flash5.bin"
+
+FJMEM="fjmem.bit"
+
+MAC_DIR="BIOSMAC"
+BIOS_RESCUE="bios-rescue-without-CRC.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 ${MAC_DIR}
+
+dd if=${BIOS_RESCUE} of=${MAC_DIR}/${HEAD_TMP} bs=8 count=28
+dd if=${BIOS_RESCUE} of=${MAC_DIR}/${REMAIN_TMP} bs=8 skip=29
+
+printf "\\x$(printf "%x" 0x10)" > ${MAC_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0xe2)" >> ${MAC_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0xd5)" >> ${MAC_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x00)" >> ${MAC_DIR}/${MAC_TMP}
+
+printf "\\x$(printf "%x" 0x$1)" >> ${MAC_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x$2)" >> ${MAC_DIR}/${MAC_TMP}
+
+printf "\\x$(printf "%x" 0x00)" >> ${MAC_DIR}/${MAC_TMP}
+printf "\\x$(printf "%x" 0x00)" >> ${MAC_DIR}/${MAC_TMP}
+
+cat ${MAC_DIR}/${HEAD_TMP} \
+ ${MAC_DIR}/${MAC_TMP} \
+ ${MAC_DIR}/${REMAIN_TMP} \
+ > ${MAC_DIR}/${BIOS_RESCUE_MAC}
+
+mkmmimg ${MAC_DIR}/${BIOS_RESCUE_MAC} write
+
+###################################################################
+#UrJtag option, if you don't want verify, enable the next line
+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 ${FJMEM}
+initbus fjmem opcode=000010
+frequency 6000000
+detectflash 0
+endian big
+
+eraseflash 0x000000 256
+
+flashmem 0x000000 ${WORKING_DIR}/${STANDBY} ${NOVERIFY}
+
+flashmem 0x0A0000 ${WORKING_DIR}/${SOC_RESCUE} ${NOVERIFY}
+flashmem 0x240000 ${WORKING_DIR}/${SPLASH_RESCUE} ${NOVERIFY}
+flashmem 0x2E0000 ${WORKING_DIR}/${FLICKERNOISE} ${NOVERIFY}
+
+flashmem 0x6E0000 ${WORKING_DIR}/${SOC} ${NOVERIFY}
+flashmem 0x860000 ${WORKING_DIR}/${BIOS} ${NOVERIFY}
+flashmem 0x880000 ${WORKING_DIR}/${SPLASH} ${NOVERIFY}
+flashmem 0x920000 ${WORKING_DIR}/${FLICKERNOISE} ${NOVERIFY}
+
+flashmem 0x220000 ${MAC_DIR}/${BIOS_RESCUE_MAC} ${NOVERIFY}
+
+flashmem 0xD20000 ${DATA} ${NOVERIFY}
+
+pld reconfigure
+EOF
+
+jtag ${BATCH_FILE}
+if [ "$?" == "0" ]; then
+ rm -f ${BATCH_FILE}
+
+ echo "-------------------------------------------------------------"
+ echo "Your m1 was successfully reflashed. To boot the new software,"
+ echo "Please now press the middle button of your Milkymist One."
+ echo "-------------------------------------------------------------"
+else
+ echo "there are errors when running jtag."
+fi
+
+
+#ChangeLog
+# __VERSION__="2011-07-15"
+# * First Version
+
+# __VERSION__="2011-08-12"
+# * erase whole flash before wirte anything
View
0  flash_mac_bios.sh → scripts/reflash_mac_bios.sh
File renamed without changes

No commit comments for this range

Something went wrong with that request. Please try again.