/*++

Copyright (c) 2015 Minoca Corp. All Rights Reserved

Module Name:

    bbone.txt

Abstract:

    This module implements the setup recipe for TI BeagleBone Black.

Author:

    Evan Green 19-Oct-2015

Environment:

    Setup

--*/

DriverFiles += DriverFilesArm;
DriverFiles += [
    "am3eth.drv",
    "am3i2c.drv",
    "am3soc.drv",
    "am3usb.drv",
    "edma3.drv",
    "sdomap4.drv",
    "tps65217.drv",
];

BootDrivers += [
    "am3soc.drv",
    "edma3.drv",
    "sdomap4.drv",
];

BboneFirmwareFiles = [
    "bbonefw",
    "bbonemlo",
];

//
// Copy the firmware to the system partition for recovery if needed.
//

BboneFirmwareSystemCopy = {
    "Destination": SystemDir + "bbone/",
    "Source": SourceDir,
    "SourceVolume": 0,
    "Files": BboneFirmwareFiles
};

//
// Copy the firmware to the boot partition.
//

BboneFirmwareCopy = {
    "Destination": "/bbonefw",
    "Source": SourceDir + "bbonefw",
    "SourceVolume": 0,
};

TotalCopy += [BboneFirmwareSystemCopy];
TotalBootCopy += [BboneFirmwareCopy];

//
// Set the MBR file.
//

BboneMloCopy = {
    "Offset": 0,
    "Source": SourceDir + "bbonemlo",
    "SourceVolume": 0,
};

DiskData["Mbr"] = BboneMloCopy;
DiskData["Format"] = PARTITION_FORMAT_MBR;
BootPartition["Alignment"] = 1 * MEGABYTE;

//
// Set the EFI boot manager name.
//

BootmefiCopy["Destination"] += EFI_DEFAULT_APP_ARM;

