blob: a897b6c085fc3c2af4fcbfa288f193d5b8f4ab53 [file] [log] [blame]
/*
* Copyright 2013 Google Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but without any warranty; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include "drivers/net/net.h"
#include "drivers/timer/timer.h"
#include "module/module.h"
#include "module/uefi/fwdb.h"
#include "net/netboot/netboot.h"
#include "net/netboot/params.h"
void module_main(void)
{
static char cmd_line[4096];
srand(timer_raw_value());
if (uefi_prepare_fwdb_file(L"depthcharge\\netboot_params",
"netboot_params") ||
uefi_prepare_fwdb_e820_map() ||
uefi_prepare_fwdb_acpi_rsdp()) {
halt();
}
netboot(cmd_line, sizeof(cmd_line));
}