VirtualBox

Changeset 101633 in vbox for trunk


Ignore:
Timestamp:
Oct 27, 2023 3:11:34 PM (15 months ago)
Author:
vboxsync
Message:

Main/Unattended: Support debian arm64 (tested with Debian 11 netinst) images, bugref:10516

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/ostypes.h

    r101572 r101633  
    141141    VBOXOSTYPE_Debian12_arm64   = 0x5530a,
    142142    VBOXOSTYPE_Debian_latest_x64 = VBOXOSTYPE_Debian12_x64,
     143    VBOXOSTYPE_Debian_latest_arm64 = VBOXOSTYPE_Debian12_arm64,
    143144    VBOXOSTYPE_OpenSUSE         = 0x56000,
    144145    VBOXOSTYPE_OpenSUSE_x64     = 0x56100,
     
    228229    VBOXOSTYPE_Ubuntu23_arm64   = 0x5C317,
    229230    VBOXOSTYPE_Ubuntu_latest_x64 = VBOXOSTYPE_Ubuntu23_x64,
     231    VBOXOSTYPE_Ubuntu_latest_arm64 = VBOXOSTYPE_Ubuntu23_arm64,
    230232    VBOXOSTYPE_Xandros          = 0x5D000,
    231233    VBOXOSTYPE_Xandros_x64      = 0x5D100,
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r101424 r101633  
    20552055                        else if (pNtHdrs->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64)
    20562056                            mEnmOsType = (VBOXOSTYPE)((mEnmOsType & ~VBOXOSTYPE_ArchitectureMask) | VBOXOSTYPE_x64);
     2057                        else if (pNtHdrs->FileHeader.Machine == IMAGE_FILE_MACHINE_ARM64)
     2058                            mEnmOsType = (VBOXOSTYPE)((mEnmOsType & ~VBOXOSTYPE_ArchitectureMask) | VBOXOSTYPE_arm64);
    20572059                        else
    20582060                            AssertFailed();
     
    26322634
    26332635    /* We don't support guest OSes w/ EFI, as that requires UDF remastering support we don't have yet. */
    2634     if (osHint & VBOXOSHINT_EFI)
     2636    if (   (osHint & VBOXOSHINT_EFI)
     2637        && (enmIsoOSType & VBOXOSTYPE_ArchitectureMask) != VBOXOSTYPE_arm64)
    26352638        return setError(E_FAIL, tr("The detected guest OS type requires EFI to boot and therefore is not supported yet"));
    26362639
     
    39493952        return S_OK;
    39503953
    3951     /* For now we don't support unattended installation for ARM guests. */
    3952     const VBOXOSTYPE enmArchitectureMasked = (VBOXOSTYPE)(mEnmOsType & VBOXOSTYPE_ArchitectureMask);
    3953     if (   enmArchitectureMasked == VBOXOSTYPE_arm32
    3954         || enmArchitectureMasked == VBOXOSTYPE_arm64)
    3955         return S_OK;
    3956 
    39573954    const VBOXOSTYPE enmOsTypeMasked = (VBOXOSTYPE)(mEnmOsType & VBOXOSTYPE_OsTypeMask);
    39583955
  • trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp

    r101351 r101633  
    7878    else
    7979    {
    80         if (enmDetectedOSType >= VBOXOSTYPE_Debian && enmDetectedOSType <= VBOXOSTYPE_Debian_latest_x64)
     80        if (   enmDetectedOSType >= VBOXOSTYPE_Debian
     81            && (   enmDetectedOSType <= VBOXOSTYPE_Debian_latest_x64
     82                || enmDetectedOSType <= VBOXOSTYPE_Debian_latest_arm64))
    8183            pUinstaller = new UnattendedDebianInstaller(pParent);
    8284        else if (enmDetectedOSType >= VBOXOSTYPE_Ubuntu && enmDetectedOSType <= VBOXOSTYPE_Ubuntu_latest_x64)
     
    12871289        /* Set timeouts to 4 seconds. */
    12881290        std::vector<size_t> vecLineNumbers = pEditor->findTemplate("set timeout", RTCString::CaseInsensitive);
    1289         for (size_t i = 0; i < vecLineNumbers.size(); ++i)
    1290             if (pEditor->getContentOfLine(vecLineNumbers[i]).startsWithWord("set timeout", RTCString::CaseInsensitive))
    1291             {
    1292                 HRESULT hrc = pEditor->setContentOfLine(vecLineNumbers.at(i), "set timeout=4");
    1293                 if (FAILED(hrc))
    1294                     return hrc;
    1295             }
     1291        if (vecLineNumbers.size() > 0)
     1292        {
     1293            for (size_t i = 0; i < vecLineNumbers.size(); ++i)
     1294                if (pEditor->getContentOfLine(vecLineNumbers[i]).startsWithWord("set timeout", RTCString::CaseInsensitive))
     1295                {
     1296                    HRESULT hrc = pEditor->setContentOfLine(vecLineNumbers.at(i), "set timeout=4");
     1297                    if (FAILED(hrc))
     1298                        return hrc;
     1299                }
     1300        }
     1301        else
     1302        {
     1303            /* Append timeout if not set (happens with arm64 iso images at least). */
     1304            HRESULT hrc = pEditor->appendLine("set timeout=4");
     1305            if (FAILED(hrc))
     1306                return hrc;
     1307        }
    12961308
    12971309        /* Modify kernel lines assuming that they starts with 'linux' keyword and 2nd word is the kernel command.*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette