@@ -454,11 +454,11 @@ def download(self):
454454 download_if_missing_3 (self .dist_url (), self .download_local_arch_dir (), ["binary" , "kernel" , file ])
455455 download_if_missing_3 (self .dist_url (), self .download_local_arch_dir (), ["binary" , "gzimg" , "armv7.img.gz" ])
456456 return
457- elif self .arch () == 'hpcmips' :
457+ if self .arch () == 'hpcmips' :
458458 download_if_missing_3 (self .dist_url (), self .download_local_arch_dir (), ["installation" , "netbsd.gz" ])
459- elif self .arch () in ['hpcmips' , 'landisk' ]:
459+ if self .arch () in ['hpcmips' , 'landisk' ]:
460460 download_if_missing_3 (self .dist_url (), self .download_local_arch_dir (), ["binary" , "kernel" , "netbsd-GENERIC.gz" ])
461- elif self .arch () == 'amiga' :
461+ if self .arch () == 'amiga' :
462462 download_if_missing_3 (self .dist_url (), self .download_local_arch_dir (), ["installation" , "miniroot" , "miniroot.fs.gz" ])
463463 i = 0
464464 for floppy in self .potential_floppies ():
@@ -731,7 +731,7 @@ def __init__(self, dist, workdir = None, vmm = None, vmm_args = None,
731731 self .no_install = no_install
732732
733733 self .qemu = arch_qemu_map .get (dist .arch ())
734- if self .qemu is None and not self .dist .arch () in (arch_gxemul_list + arch_simh_list ):
734+ if self .qemu is None and not self .dist .arch () in (arch_gxemul_list + arch_simh_list + arch_uae_list ):
735735 raise RuntimeError ("NetBSD port '%s' is not supported" %
736736 dist .arch ())
737737
@@ -747,6 +747,8 @@ def __init__(self, dist, workdir = None, vmm = None, vmm_args = None,
747747 vmm = 'qemu'
748748 elif self .dist .arch () in arch_simh_list :
749749 vmm = 'simh'
750+ elif self .dist .arch () in arch_uae_list :
751+ vmm = 'uae'
750752 else :
751753 vmm = 'gxemul'
752754
@@ -941,13 +943,14 @@ def start_noemu(self, vmm_args):
941943 return child
942944
943945 def install_amiga (self ):
946+ self .dist .make_iso ()
944947 print "Creating hard disk image..." ,
945948 sys .stdout .flush ()
946- spawn ( 'dd' ,[ 'dd' , 'if=/dev/zero' , 'of=' + self .wd0_path (), 'bs=512' , 'count=2000000' ] )
949+ make_dense_image ( self .wd0_path (), 1024000000 )
947950 print "Creating install image..." ,
948951 sys .stdout .flush ()
949952 wd1_path = os .path .join (self .workdir , 'wd1.img' )
950- spawn ( 'dd' ,[ 'dd' , 'if=/dev/zero' , 'of=' + wd1_path , 'bs=512' , 'count=2000000' ] )
953+ make_dense_image ( wd1_path , 1024000000 )
951954 rdb_conf = os .path .join (self .workdir ,'rdbedit.conf' )
952955 f = open (rdb_conf , 'w+' )
953956 f .write ('c3 7000\n ' + 'p3\n ' + 'nmini\n ' + 'fbootable\n ' + 'o16\n ' + 'tNBR\\ 7\n ' + 'q\n ' +
@@ -961,17 +964,16 @@ def install_amiga(self):
961964 f .seek (0 )
962965 subprocess .Popen (['rdbedit' , '-Fies 2' , self .wd0_path ()], stdin = f )
963966 f .close ()
964- self .dist .make_iso ()
965967 miniroot_fn = os .path .join (self .workdir , 'installation' , 'miniroot' , 'miniroot.fs.gz' )
966968 bootxx = os .path .join (self .workdir , 'bootxx' )
967969 bootblock = os .path .join (self .workdir , 'bootblock' )
968970 if os .path .exists (miniroot_fn ):
969- spawn ('dd' ,['dd' , 'if=' + miniroot_fn , 'of=' + bootxx , 'conv=osync' , 'count=16' ])
971+ os . spawn ('dd' ,['dd' , 'if=' + miniroot_fn , 'of=' + bootxx , 'conv=osync' , 'count=16' ])
970972 open (bootblock , 'w' ).close ()
971973 spawn ('installboot' ,['installboot' , '-m amiga' , '-o command="netbsd -Cc 4000"' , bootblock , bootxx ])
972- spawn ('dd' ,['dd' , 'if=' + bootblock , 'of=' + wd1_path , 'oseek =128' , 'conv=osync,notrunc' ])
973- subprocess .call ('zcat ' + miniroot_fn + ' | dd of=' + self .wd0_path () + ' oseek =144' + ' skip=16' + ' conv=osync,notrunc' , shell = True )
974- spawn ('dd' , ['dd' , 'if=' + self .dist .iso_path , 'of=' + wd1_path , ' oseek =896128' + ' conv=osync,notrunc' , shell = True ])
974+ spawn ('dd' ,['dd' , 'if=' + bootblock , 'of=' + wd1_path , 'seek =128' , 'conv=osync,notrunc' ])
975+ subprocess .call ('zcat ' + miniroot_fn + ' | dd of=' + self .wd0_path () + ' seek =144' + ' skip=16' + ' conv=osync,notrunc' , shell = True )
976+ spawn ('dd' , ['dd' , 'if=' + self .dist .iso_path () , 'of=' + wd1_path , ' seek =896128' + ' conv=osync,notrunc' ])
975977 vmm_args = ['wdcfile=rw,32,16,0,512,' + wd1_path ]
976978 child = self .start_uae (vmm_args )
977979 loop = 0
@@ -1825,6 +1827,8 @@ def start_boot(self, vmm_args = None):
18251827 child = self .start_simh (vmm_args )
18261828 child .expect (">>>" )
18271829 child .send ("boot dua0\r \n " )
1830+ elif self .vmm == 'uae' :
1831+ child = self .start_uae (vmm_args )
18281832 else :
18291833 raise RuntimeError ('unknown vmm %s' % vmm )
18301834 self .child = child
@@ -1882,6 +1886,8 @@ def run_tests(self, timeout = 10800):
18821886 scratch_disk_args = self .gxemul_disk_args (os .path .abspath (scratch_disk_path ))
18831887 elif self .vmm == 'simh' :
18841888 scratch_disk_args = ['set rq1 ra92' , 'attach rq1 ' + scratch_disk_path ]
1889+ elif self .vmm == 'uae' :
1890+ scratch_disk_args = ['wdcfile=rw,32,16,0,512,' + scratch_disk_path ]
18851891 else :
18861892 raise RuntimeError ('unknown vmm' )
18871893
0 commit comments