Merge pull request #2142 from Rippanda12/armInstall

partition: Add armInstall
This commit is contained in:
Adriaan de Groot 2023-06-25 22:05:10 +02:00 committed by GitHub
commit f00fa429bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 3 deletions

View File

@ -415,6 +415,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
m_requiredPartitionTableType = CalamaresUtils::getStringList( configurationMap, "requiredPartitionTableType" ); m_requiredPartitionTableType = CalamaresUtils::getStringList( configurationMap, "requiredPartitionTableType" );
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
gs->insert( "armInstall", CalamaresUtils::getBool( configurationMap, "armInstall", false ) );
fillGSConfigurationEFI( gs, configurationMap ); fillGSConfigurationEFI( gs, configurationMap );
fillConfigurationFSTypes( configurationMap ); fillConfigurationFSTypes( configurationMap );
} }

View File

@ -443,7 +443,15 @@ runOsprober( DeviceModel* dm )
bool bool
isEfiSystem() isEfiSystem()
{ {
return QDir( "/sys/firmware/efi/efivars" ).exists(); Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
if ( gs->contains( "armInstall" ) && gs->value( "armInstall" ).toBool() )
{
return true;
}
else
{
return QDir( "/sys/firmware/efi/efivars" ).exists();
}
} }
bool bool

View File

@ -95,8 +95,16 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
// the logical sector size (usually 512B). EFI starts with 2MiB // the logical sector size (usually 512B). EFI starts with 2MiB
// empty and a EFI boot partition, while BIOS starts at // empty and a EFI boot partition, while BIOS starts at
// the 1MiB boundary (usually sector 2048). // the 1MiB boundary (usually sector 2048).
int empty_space_sizeB = isEfi ? 2_MiB : 1_MiB; // ARM empty sectors are 16 MiB in size.
int empty_space_sizeB;
if ( gs->contains( "armInstall" ) && gs->value( "armInstall" ).toBool() )
{
empty_space_sizeB = 16_MiB;
}
else
{
empty_space_sizeB = isEfi ? 2_MiB : 1_MiB;
}
// Since sectors count from 0, if the space is 2048 sectors in size, // Since sectors count from 0, if the space is 2048 sectors in size,
// the first free sector has number 2048 (and there are 2048 sectors // the first free sector has number 2048 (and there are 2048 sectors
// before that one, numbered 0..2047). // before that one, numbered 0..2047).

View File

@ -124,6 +124,13 @@ initialPartitioningChoice: none
# one of the items from the options. # one of the items from the options.
initialSwapChoice: none initialSwapChoice: none
# armInstall
#
# Leaves 16MB empty at the start of a drive when partitioning
# where usually the u-boot loader goes
#
# armInstall: false
# Default partition table type, used when a "erase" disk is made. # Default partition table type, used when a "erase" disk is made.
# #
# When erasing a disk, a new partition table is created on disk. # When erasing a disk, a new partition table is created on disk.

View File

@ -14,6 +14,7 @@ properties:
userSwapChoices: { type: array, items: { type: string, enum: [ none, reuse, small, suspend, file ] } } userSwapChoices: { type: array, items: { type: string, enum: [ none, reuse, small, suspend, file ] } }
# ensureSuspendToDisk: { type: boolean, default: true } # Legacy # ensureSuspendToDisk: { type: boolean, default: true } # Legacy
# neverCreateSwap: { type: boolean, default: false } # Legacy # neverCreateSwap: { type: boolean, default: false } # Legacy
armInstall: { type: boolean, default: false }
allowZfsEncryption: { type: boolean, default: true } allowZfsEncryption: { type: boolean, default: true }
drawNestedPartitions: { type: boolean, default: false } drawNestedPartitions: { type: boolean, default: false }