diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-18 13:21:14 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-18 13:21:14 +0000 |
commit | 656416bc2ee1409492343cde3f27ce717e90fdf7 (patch) | |
tree | 13b6a4458149cd6a4360afb4515b4a9c299d51e3 /ArmPlatformPkg/Bds/Bds.c | |
parent | 326d1df9193fae2be1cce85be9c361eb6eabe182 (diff) | |
download | edk2-656416bc2ee1409492343cde3f27ce717e90fdf7.zip edk2-656416bc2ee1409492343cde3f27ce717e90fdf7.tar.gz edk2-656416bc2ee1409492343cde3f27ce717e90fdf7.tar.bz2 |
ArmPlatformPkg/Bds: Add Linux 'initrd' support to BDS
An 'initrd' file can be specified for a Linux kernel.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12169 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/Bds.c')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 11116ed..a1fa21a 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -203,6 +203,8 @@ DefineDefaultBootEntries ( EFI_STATUS Status; EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol; EFI_DEVICE_PATH* BootDevicePath; + BDS_LOADER_ARGUMENTS BootArguments; + BDS_LOADER_TYPE BootType; // // If Boot Order does not exist then create a default entry @@ -238,11 +240,19 @@ DefineDefaultBootEntries ( // Create the entry is the Default values are correct if (BootDevicePath != NULL) { + BootType = (BDS_LOADER_TYPE)PcdGet32 (PcdDefaultBootType); + + if (BootType == BDS_LOADER_KERNEL_LINUX_ATAG) { + BootArguments.LinuxAtagArguments.CmdLine[0] = '\0'; + AsciiStrnCpy (BootArguments.LinuxAtagArguments.CmdLine,(CHAR8*)PcdGetPtr(PcdDefaultBootArgument),BOOT_DEVICE_OPTION_MAX); + BootArguments.LinuxAtagArguments.InitrdPathList = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultBootInitrdPath)); + } + BootOptionCreate (LOAD_OPTION_ACTIVE | LOAD_OPTION_CATEGORY_BOOT, (CHAR16*)PcdGetPtr(PcdDefaultBootDescription), BootDevicePath, - (BDS_LOADER_TYPE)PcdGet32 (PcdDefaultBootType), - (CHAR8*)PcdGetPtr(PcdDefaultBootArgument), + BootType, + &BootArguments, &BdsLoadOption ); FreePool (BdsLoadOption); |