kopia lustrzana https://github.com/OpenRTX/OpenRTX
Replaced bin2sgl linux binary with a version statically linked with the libc, added missing wrap and flash commands for DM-1801
rodzic
1f56018e52
commit
8accc3b8b6
88
meson.build
88
meson.build
|
@ -556,60 +556,82 @@ dfu_util = find_program('dfu-util', required:false, d
|
|||
foreach t : targets
|
||||
|
||||
name = 'openrtx_'+t['name']
|
||||
exe = executable(name, kwargs:t['opts'])
|
||||
exe = executable(name, kwargs:t['opts'])
|
||||
|
||||
if t['flashable']
|
||||
|
||||
bin = custom_target(name+'_bin',
|
||||
output : name+'_bin',
|
||||
input : exe,
|
||||
command : [objcopy, '-O', 'binary', '@INPUT@', '@OUTPUT@'])
|
||||
output : name+'_bin',
|
||||
input : exe,
|
||||
command : [objcopy, '-O', 'binary', '@INPUT@', '@OUTPUT@'])
|
||||
|
||||
# Handle GD77 custom wrapping and flashing tools
|
||||
if name == 'openrtx_gd77'
|
||||
|
||||
if build_machine.system() == 'linux'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_wrap.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl,
|
||||
'-f', '@INPUT@',
|
||||
'&&', 'mv', '@INPUT@.sgl', '@OUTPUT@'])
|
||||
elif build_machine.system() == 'windows'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_bin.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl, '@INPUT@'])
|
||||
endif
|
||||
if build_machine.system() == 'linux'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_wrap.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl, '-f', '@INPUT@', '&&',
|
||||
'mv', '@INPUT@.sgl', '@OUTPUT@'])
|
||||
elif build_machine.system() == 'windows'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_bin.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl, '@INPUT@'])
|
||||
endif
|
||||
|
||||
custom_target(name+'_flash',
|
||||
input : wrap,
|
||||
output : name+'_flash',
|
||||
command : [gd77_loader, '-f', '@INPUT@'])
|
||||
input : wrap,
|
||||
output : name+'_flash',
|
||||
command : [gd77_loader, '-f', '@INPUT@'])
|
||||
|
||||
# Handle DM1801 custom wrapping and flashing tools
|
||||
elif name == 'openrtx_dm1801'
|
||||
|
||||
if build_machine.system() == 'linux'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_wrap.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl, '-f', '@INPUT@',
|
||||
'-m', 'DM-1801', '&&', 'mv',
|
||||
'@INPUT@.sgl', '@OUTPUT@'])
|
||||
elif build_machine.system() == 'windows'
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_bin.sgl',
|
||||
input : bin,
|
||||
command : [bin2sgl, '@INPUT@', '-m DM-1801'])
|
||||
endif
|
||||
|
||||
custom_target(name+'_flash',
|
||||
input : wrap,
|
||||
output : name+'_flash',
|
||||
command : [gd77_loader, '-f', '@INPUT@', '-m', 'DM-1801',])
|
||||
|
||||
# Module17 also uses dfu-tool for flashing
|
||||
elif name == 'openrtx_mod17'
|
||||
|
||||
custom_target(name+'_flash',
|
||||
input : bin,
|
||||
output : name+'_flash',
|
||||
command : [dfu_util, '-d', '0483:df11', '-a', '0', '-D', '@INPUT@', '-s', '0x08000000'])
|
||||
input : bin,
|
||||
output : name+'_flash',
|
||||
command : [dfu_util, '-d', '0483:df11', '-a', '0',
|
||||
'-D', '@INPUT@', '-s', '0x08000000'])
|
||||
|
||||
else
|
||||
|
||||
wrap = custom_target(name+'_wrap',
|
||||
output : name+'_wrap',
|
||||
input : bin,
|
||||
command : [radio_tool,
|
||||
'--wrap',
|
||||
'-o', '@OUTPUT@',
|
||||
'-r', t['wrap'],
|
||||
'-s', t['load_addr']+':@INPUT@'])
|
||||
output : name+'_wrap',
|
||||
input : bin,
|
||||
command : [radio_tool,
|
||||
'--wrap',
|
||||
'-o', '@OUTPUT@',
|
||||
'-r', t['wrap'],
|
||||
'-s', t['load_addr']+':@INPUT@'])
|
||||
|
||||
custom_target(name+'_flash',
|
||||
input : wrap,
|
||||
output : name+'_flash',
|
||||
command : [radio_tool, '-d', '0', '-f', '-i', '@INPUT@'])
|
||||
input : wrap,
|
||||
output : name+'_flash',
|
||||
command : [radio_tool, '-d', '0', '-f', '-i', '@INPUT@'])
|
||||
|
||||
endif
|
||||
|
||||
|
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue