Changeset 6f99d80 in rtems-tools


Ignore:
Timestamp:
Jun 13, 2019, 8:13:06 AM (4 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
f9e1216
Parents:
48afbab
git-author:
Chris Johns <chrisj@…> (06/13/19 08:13:06)
git-committer:
Chris Johns <chrisj@…> (06/13/19 08:39:02)
Message:

misc/boot-image: Fix Linux bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/tools/boot.py

    r48afbab r6f99d80  
    7474            'k': 1024 }
    7575
    76 def si_units(self, units):
     76def _si_units(units):
    7777    if units not in siunits:
    7878        raise error.general('invalid SI unit: %s' % (units))
     
    489489                #
    490490                log.notice('Format: %s as %s' % (part, self.loader['fs_format']))
    491                 self.format_partition(part, self.loader['fs_format'])
     491                self.format_partition(part,
     492                                      self.loader['fs_format'],
     493                                      self.loader['part_label'])
    492494
    493495                #
     
    561563                                   ptype, plabel, pformat, psize, palign)
    562564
    563     def format_partition(self, device, pformat):
    564         self.host_format_partition(device, pformat)
     565    def format_partition(self, device, pformat, plabel):
     566        self.host_format_partition(device, pformat, plabel)
    565567
    566568    def device_partition(self, device, pindex):
     
    634636        raise error.general('no platform support: host_partition')
    635637
    636     def host_format_partition(self, device, pformat):
     638    def host_format_partition(self, device, pformat, plabel):
    637639        raise error.general('no platform support: host_format_partition')
    638640
     
    681683        return device
    682684
    683     def host_format_partition(self, device, pformat):
     685    def host_format_partition(self, device, pformat, plabel):
    684686        formats = { 'fat16': ('newfs_msdos', '16'),
    685687                    'fat32': ('newfs_msdos', '32') }
     
    728730        self.command('sudo losetup --detach %s' % (device))
    729731
    730     def host_partition(self, image_, device, ptype, pformat, psize, palign):
     732    def host_partition(self, image_, device, ptype, plabel, pformat, psize, palign):
    731733        types = { 'MBR': 'MBR' }
    732734        formats = { 'fat16': '6',
     
    767769        return self.host_image_attach(image_)
    768770
    769     def host_format_partition(self, device, pformat):
     771    def host_format_partition(self, device, pformat, plabel):
    770772        formats = { 'fat16': ('mkfs.fat', '16'),
    771773                    'fat32': ('mkfs.fat', '32') }
    772774        if pformat not in formats:
    773775            raise error.general('unknown format: %s' % (pformat))
    774         self.command('sudo %s -F %s %s' % (formats[pformat][0],
    775                                            formats[pformat][1],
    776                                            device))
     776        self.command('sudo %s -F %s -n %s %s' % (formats[pformat][0],
     777                                                 formats[pformat][1],
     778                                                 plabel,
     779                                                 device))
    777780
    778781    def host_device_partition(self, device, pindex):
     
    849852        return device
    850853
    851     def host_format_partition(self, device, pformat):
     854    def host_format_partition(self, device, pformat, plabel):
    852855        log.output(' * No format stage; done when partitioning')
    853856
Note: See TracChangeset for help on using the changeset viewer.