diff --git a/.gitmodules b/.gitmodules index 959f0e9..addd091 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "lufa-lib"] path = lufa-lib - url = http://github.com/psgroove/lufa-lib.git + url = http://github.com/evilsperm/lufa-lib.git [submodule "PL3"] path = PL3 - url = git://github.com/kakaroto/PL3.git + url = git://github.com/evilsperm/PL3.git diff --git a/Makefile b/Makefile index d25cab3..d378612 100644 --- a/Makefile +++ b/Makefile @@ -113,13 +113,13 @@ FIRMWARE_VERSION = 3_41 ## Minimus v1 #MCU = at90usb162 -#BOARD = MINUMUS +#BOARD = MINIMUS #F_CPU = 16000000 ## Minimus 32 ## It actually is atmega32u2 but at90usb162 is compatible and ## the latest avr-gcc doesn't compile for atmega32u2 -#MCU = at90usb162 +#MCU = atmega32u2 #BOARD = MINIMUS #F_CPU = 16000000 @@ -158,6 +158,35 @@ FIRMWARE_VERSION = 3_41 #BOARD = USBKEY #F_CPU = 8000000 +# ATAVRUSBRF01 +#MCU = at90usb162 +#BOARD = ATAVRUSBRF01 +#F_CPU = 16000000 + +# UDIP8 +#MCU = at90usb162 +#BOARD = UDIP +#F_CPU = 8000000 + +# UDIP16 +#MCU = at90usb162 +#BOARD = UDIP +#F_CPU = 16000000 + +# AVRKEY +#MCU = atmega32u2 +#BOARD = AVRKEY +#F_CPU = 16000000 + +# PS2CHIPER +#MCU = at90usb162 +#BOARD = PS2CHIPER +#F_CPU = 8000000 + +# JMDBU2 +MCU = atmega32u4 +BOARD = JMDBU2 +F_CPU = 8000000 # Input clock frequency. # This will define a symbol, F_CLOCK, in all source code files equal to the diff --git a/PL3 b/PL3 index 74d294f..d5ee025 160000 --- a/PL3 +++ b/PL3 @@ -1 +1 @@ -Subproject commit 74d294fe14610060ddb903a209ecd90b35daf799 +Subproject commit d5ee0257599315d7ff24e08501e827c141d47dd1 diff --git a/build_hex.sh b/build_hex.sh index bc5797d..c39abc0 100755 --- a/build_hex.sh +++ b/build_hex.sh @@ -9,15 +9,12 @@ all_targets="teensy1 teensypp1 teensy2 teensypp2 \ at90usbkey minimus1 minimus32 maximus \ blackcat xplain olimex usbtinymkii \ - bentio" + bentio openkubus atvrusbrf01 udip8 udip16 \ + avrkey ps2chiper jmdbu2" -avr_gcc_ver=`avr-gcc --version | head -n 1 | awk '{print $3}'` -if [[ $avr_gcc_ver < "4.3.5" ]]; then - echo "OpenKubus compilation disabled. You need avr-gcc version 4.3.5 or later." - echo "(You currently have avr-gcc version ${avr_gcc_ver})" -else - all_targets="${all_targets} openkubus" -fi +function is_mcu_supported() { + avr-gcc --target-help | awk '/^Known MCU names:$/,/^$/' | grep -q $1 +} i=1 for target in ${all_targets}; do @@ -61,7 +58,7 @@ board[$minimus1]=MINIMUS mhz_clock[$minimus1]=16 name[$minimus1]="Minimus v1" -mcu[$minimus32]=at90usb162 +mcu[$minimus32]=atmega32u2 board[$minimus32]=MINIMUS mhz_clock[$minimus32]=16 name[$minimus32]="Minimus 32" @@ -101,6 +98,35 @@ board[$openkubus]=USBKEY mhz_clock[$openkubus]=8 name[$openkubus]="OpenKubus" +mcu[$atvrusbrf01]=at90usb162 +board[$atvrusbrf01]=ATAVRUSBRF01 +mhz_clock[$atvrusbrf01]=16 +name[$atvrusbrf01]="ATAVRUSBRF01" + +mcu[$udip8]=at90usb162 +board[$udip8]=UDIP +mhz_clock[$udip8]=8 +name[$udip8]="UDIP8" + +mcu[$udip16]=at90usb162 +board[$udip16]=UDIP +mhz_clock[$udip16]=16 +name[$udip16]="UDIP16" + +mcu[$avrkey]=atmega32u2 +board[$avrkey]=AVRKEY +mhz_clock[$avrkey]=16 +name[$avrkey]="AVRKEY" + +mcu[$ps2chiper]=at90usb162 +board[$ps2chiper]=PS2CHIPER +mhz_clock[$ps2chiper]=8 +name[$ps2chiper]="PS2CHIPER" + +mcu[$jmdbu2]=atmega32u4 +board[$jmdbu2]=JMDBU2 +mhz_clock[$jmdbu2]=8 +name[$jmdbu2]="JMDBU2" while [ "x$1" != "x" ]; do targets="$targets ${1}" @@ -119,7 +145,11 @@ mkdir psgroove_hex $MAKE clean_list > /dev/null for target in ${targets}; do - for firmware in 3.01 3.10 3.15 3.41 ; do + if ! is_mcu_supported "${mcu[${!target}]}"; then + echo "$target compilation skipped. Your avr-gcc does not support ${mcu[${!target}]}." >&2 + continue + fi + for firmware in 3.41 ; do firmware=${firmware/./_} low_board=`echo ${board[${!target}]} | awk '{print tolower($0)}'` filename="psgroove_${low_board}_${mcu[${!target}]}_${mhz_clock[${!target}]}mhz_firmware_${firmware}" diff --git a/descriptor.h b/descriptor.h index 388d35b..0edceb2 100644 --- a/descriptor.h +++ b/descriptor.h @@ -23,8 +23,13 @@ #define default_shellcode shellcode_egghunt #define default_shellcode_macro shellcode_egghunt_macro +/* Select Your Payload */ #define PAYLOAD_FW_DEPENDENT -#define PAYLOAD payload_dev +#define PAYLOAD default_payload +/* #define PAYLOAD payload_dev */ +/* #define PAYLOAD payload_no_unauth_syscall */ +/* #define PAYLOAD payload_dump_elfs */ +/* #define PAYLOAD dump_lv2 */ #if defined (FIRMWARE_3_41) #define FIRMWARE 3_41 diff --git a/lufa-lib b/lufa-lib index 88cdf5e..cc8e5f4 160000 --- a/lufa-lib +++ b/lufa-lib @@ -1 +1 @@ -Subproject commit 88cdf5e08121d6cf6101af35c97933e553134ddb +Subproject commit cc8e5f4cdccbff0441cefcfe9c96131ea2a4d9a3