@@ -441,7 +441,7 @@ def get_v2_model(self, kconfig_dir):
441
441
442
442
with open (kconfig_defconfig_file , 'w' ) as fp :
443
443
for board in v2_boards :
444
- fp .write ('osource "' + os . path . join ( board .dir , 'Kconfig.defconfig' ) + '"\n ' )
444
+ fp .write ('osource "' + ( Path ( board .dir ) / 'Kconfig.defconfig' ). as_posix ( ) + '"\n ' )
445
445
446
446
with open (kconfig_boards_file , 'w' ) as fp :
447
447
for board in v2_boards :
@@ -452,12 +452,16 @@ def get_v2_model(self, kconfig_dir):
452
452
board_str = 'BOARD_' + re .sub (r"[^a-zA-Z0-9_]" , "_" , identifier ).upper ()
453
453
fp .write ('config ' + board_str + '\n ' )
454
454
fp .write ('\t bool\n ' )
455
- fp .write ('source "' + os .path .join (board .dir , 'Kconfig.' ) + board .name + '"\n \n ' )
455
+ fp .write (
456
+ 'source "' + (Path (board .dir ) / ('Kconfig.' + board .name )).as_posix () + '"\n \n '
457
+ )
456
458
457
459
with open (kconfig_file , 'w' ) as fp :
458
- fp .write ('osource "' + os .path .join (kconfig_dir , 'boards' , 'Kconfig.syms.v1' ) + '"\n ' )
460
+ fp .write (
461
+ 'osource "' + (Path (kconfig_dir ) / 'boards' / 'Kconfig.syms.v1' ).as_posix () + '"\n '
462
+ )
459
463
for board in v2_boards :
460
- fp .write ('osource "' + os . path . join ( board .dir , 'Kconfig' ) + '"\n ' )
464
+ fp .write ('osource "' + ( Path ( board .dir ) / 'Kconfig' ). as_posix ( ) + '"\n ' )
461
465
462
466
kconfig_defconfig_file = os .path .join (kconfig_dir , 'soc' , 'Kconfig.defconfig' )
463
467
kconfig_soc_file = os .path .join (kconfig_dir , 'soc' , 'Kconfig.soc' )
@@ -469,15 +473,15 @@ def get_v2_model(self, kconfig_dir):
469
473
soc_folders = {soc .folder for soc in v2_systems .get_socs ()}
470
474
with open (kconfig_defconfig_file , 'w' ) as fp :
471
475
for folder in soc_folders :
472
- fp .write ('osource "' + os . path . join ( folder , 'Kconfig.defconfig' ) + '"\n ' )
476
+ fp .write ('osource "' + ( Path ( folder ) / 'Kconfig.defconfig' ). as_posix ( ) + '"\n ' )
473
477
474
478
with open (kconfig_soc_file , 'w' ) as fp :
475
479
for folder in soc_folders :
476
- fp .write ('source "' + os . path . join ( folder , 'Kconfig.soc' ) + '"\n ' )
480
+ fp .write ('source "' + ( Path ( folder ) / 'Kconfig.soc' ). as_posix ( ) + '"\n ' )
477
481
478
482
with open (kconfig_file , 'w' ) as fp :
479
483
for folder in soc_folders :
480
- fp .write ('source "' + os . path . join ( folder , 'Kconfig' ) + '"\n ' )
484
+ fp .write ('source "' + ( Path ( folder ) / 'Kconfig' ). as_posix ( ) + '"\n ' )
481
485
482
486
kconfig_file = os .path .join (kconfig_dir , 'arch' , 'Kconfig' )
483
487
@@ -486,7 +490,7 @@ def get_v2_model(self, kconfig_dir):
486
490
487
491
with open (kconfig_file , 'w' ) as fp :
488
492
for arch in v2_archs ['archs' ]:
489
- fp .write ('source "' + os . path . join ( arch ['path' ], 'Kconfig' ) + '"\n ' )
493
+ fp .write ('source "' + ( Path ( arch ['path' ]) / 'Kconfig' ). as_posix ( ) + '"\n ' )
490
494
491
495
def parse_kconfig (self , filename = "Kconfig" , hwm = None ):
492
496
"""
0 commit comments