Skip to content

Instantly share code, notes, and snippets.

@franz-josef-kaiser
Last active January 4, 2016 16:53
Show Gist options
  • Save franz-josef-kaiser/002b2f5878091412d975 to your computer and use it in GitHub Desktop.
Save franz-josef-kaiser/002b2f5878091412d975 to your computer and use it in GitHub Desktop.
The original pcDuino update bash / shell script that must be shipped alongside the .img file on your SD card
# File resides in: /home/ubuntu/.arduino15/preferences.txt
# (remove this comment)
board=pcduino
browser=mozilla
browser.linux=mozilla
build.warn_data_percentage=75
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=false
editor.caret.blink=true
editor.divider.size=0
editor.divider.size.windows=2
editor.external=false
editor.font=Monospaced,plain,12
editor.font.macosx=Monaco,plain,10
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=true
editor.keys.alternative_cut_copy_paste.macosx=false
editor.keys.home_and_end_travel_far=false
editor.keys.home_and_end_travel_far.macosx=true
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.tabs.expand=true
editor.tabs.size=2
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.platform.linux=true
export.application.platform.macosx=true
export.application.platform.windows=true
export.application.stop=true
export.delete_target_folder=true
last.screen.height=1080
last.screen.width=1920
last.serial.location=0,0,578,338
last.sketch.count=0
launcher=xdg-open
platform.auto_file_type_associations=true
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=false
run.present.exclusive.macosx=true
run.present.stop.color=#cccccc
run.window.bgcolor=#DFDFDF
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/ttyS1
serial.port.file=ttyS1
serial.stopbits=1
sketchbook.path=/home/ubuntu/Arduino
software=ARDUINO
target_package=arduino
target_platform=pcduino
update.check=true
update.id=2271703357030604358
update.last=1378432900275
upload.using=bootloader
upload.verify=true
#!/usr/bin/env bash
# The original pcDuino /media/${path}/update.sh script
cd `dirname $0`
IMG=pcduino_ubuntu_20131126.img
IMG_SIZE=`du -s $IMG | cut -f1`
BURN_TIME=`expr $IMG_SIZE / 1024 / 3 / 60`
echo -e "\twriting $IMG to nand flash\n"
echo -e "\tit will take about $BURN_TIME minutes to finish..."
time dd if=$IMG of=/dev/nandd bs=4M && sync
if [ $? -eq 0 ]; then
echo "update finished"
killall blink_led.sh
/blink_led.sh 18 1000000 &
/blink_led.sh 19 1000000 &
else
echo "write ubuntu to nand failed"
killall blink_led.sh
/blink_led.sh 18 100000 &
/blink_led.sh 19 100000 &
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment