Skip to content

Commit

Permalink
Fix string escaping in build script
Browse files Browse the repository at this point in the history
  • Loading branch information
pingswept committed Apr 22, 2011
1 parent cb26f04 commit d9cc284
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gen-rascal-binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
serial = s[i][2]
hostname = 'rascal' + serial[2:6].lstrip('0')

config_text ="""#define CONFIG_RASCAL_BOOTARGS "console=ttyS0,115200 ip=::::{0}:: pwhash={1}"
#define CONFIG_RASCAL_ETHADDR {2}""".format(hostname, pwhash, mac)
bootargs ='\'#define CONFIG_RASCAL_BOOTARGS "console=ttyS0,115200 ip=::::{0}:: pwhash={1}"\''.format(hostname, pwhash)
ethaddr = '#define CONFIG_RASCAL_ETHADDR {0}'.format(mac)

commands = [
'cp include/configs/rascal.h rascal.h.orig',
'echo "' + config_text + '" >> include/configs/rascal.h',
'echo ' + bootargs + ' >> include/configs/rascal.h',
'echo ' + ethaddr + ' >> include/configs/rascal.h',
'make distclean; make rascal_config; make all',
'cp u-boot.bin ../u-boot-{0}'.format(serial.lower()),
'cp rascal.h.orig include/configs/rascal.h',
Expand Down

0 comments on commit d9cc284

Please sign in to comment.