vboot: Build vboot related code as a separate source class.

The vboot code is not universally used, and has external dependencies.

This change also lumps all the storage related board functions into vboot.
They were almost all vboot related to begin with and so generally belong there,
with the single exception of the netboot parameters. More work should be done
in the future to separate out the netboot storage and to refactor the layout
drivers so that the netboot parameters are separate and not lumped in with
vboot.

Change-Id: I39271fcdccd7505ee94ea06c2bd06081ee205e49
diff --git a/src/drivers/board/auron/Makefile.inc b/src/drivers/board/auron/Makefile.inc
index a9ace4a..c606033 100644
--- a/src/drivers/board/auron/Makefile.inc
+++ b/src/drivers/board/auron/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/auron/board.c b/src/drivers/board/auron/board.c
index f698974..ae0f4cc 100644
--- a/src/drivers/board/auron/board.c
+++ b/src/drivers/board/auron/board.c
@@ -33,29 +33,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/auron/vboot.c b/src/drivers/board/auron/vboot.c
new file mode 100644
index 0000000..ac553a9
--- /dev/null
+++ b/src/drivers/board/auron/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/bayleybay/Makefile.inc b/src/drivers/board/bayleybay/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/bayleybay/Makefile.inc
+++ b/src/drivers/board/bayleybay/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/bayleybay/board.c b/src/drivers/board/bayleybay/board.c
index 328f80c..312c3f8 100644
--- a/src/drivers/board/bayleybay/board.c
+++ b/src/drivers/board/bayleybay/board.c
@@ -32,20 +32,12 @@
 #include "drivers/gpio/gpio.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/uart/8250.h"
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/bayleybay/vboot.c b/src/drivers/board/bayleybay/vboot.c
new file mode 100644
index 0000000..26d741d
--- /dev/null
+++ b/src/drivers/board/bayleybay/vboot.c
@@ -0,0 +1,35 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/board.h b/src/drivers/board/board.h
index 7bbd372..ebe504a 100644
--- a/src/drivers/board/board.h
+++ b/src/drivers/board/board.h
@@ -26,7 +26,6 @@
 #include "drivers/display/display.h"
 #include "drivers/keyboard/keyboard.h"
 #include "drivers/power/power.h"
-#include "drivers/storage/storage.h"
 #include "drivers/uart/uart.h"
 
 /*
@@ -72,12 +71,6 @@
  * if not, and a -1 if there was an error retrieving or calculating the flags
  * value.
  */
-// Whether write protect was enabled at boot time.
-int board_flag_write_protect(void);
-// Whether recovery mode was requested.
-int board_flag_recovery(void);
-// Whether developer mode was requested/enabled.
-int board_flag_developer_mode(void);
 // Whether video option ROMs have been loaded.
 int board_flag_option_roms_loaded(void);
 // If the "lid" is open on a laptop like device.
@@ -85,68 +78,5 @@
 // If the power button (or equivalent) is pressed, and the user is requesting
 // a shutdown.
 int board_flag_power(void);
-// Whether the EC is running the RW portion of its firmware.
-int board_flag_ec_in_rw(void);
-
-/*
- * This group of functions return storage objects which provide access to
- * different bits of information which are needed during boot. These might
- * be additional pieces of firmware, or blocks of data like the GBB which
- * firmware acts on. The storage objects should be combined together to
- * abstract away the actual media storing the data, and any data structures
- * which map out the media into smaller components.
- */
-
-StorageOps *board_storage_ec_a(int devidx);
-StorageOps *board_storage_ec_b(int devidx);
-StorageOps *board_storage_ec_hash_a(int devidx);
-StorageOps *board_storage_ec_hash_b(int devidx);
-StorageOps *board_storage_fwid_rwa(void);
-StorageOps *board_storage_fwid_rwb(void);
-StorageOps *board_storage_fwid_ro(void);
-StorageOps *board_storage_gbb(void);
-StorageOps *board_storage_legacy(void);
-StorageOps *board_storage_main_fw_a(void);
-StorageOps *board_storage_main_fw_b(void);
-StorageOps *board_storage_nv_scratch(void);
-StorageOps *board_storage_vblock_a(void);
-StorageOps *board_storage_vblock_b(void);
-StorageOps *board_storage_vboot_nvstorage(void);
-StorageOps *board_storage_verified_a(void);
-StorageOps *board_storage_verified_b(void);
-
-int board_storage_locale_count(uint32_t *count);
-typedef enum {
-	IMAGE_ARROW_LEFT,
-	IMAGE_ARROW_RIGHT,
-	IMAGE_BAD_SD,
-	IMAGE_BAD_USB,
-	IMAGE_CHROME_LOGO,
-	IMAGE_DEV_MODE,
-	IMAGE_DIVIDER_TOP,
-	IMAGE_DIVIDER_BOTTOM,
-	IMAGE_FOR_HELP_LEFT,
-	IMAGE_ICON_VERIFICATION_OFF,
-	IMAGE_ICON_VERIFICATION_ON,
-	IMAGE_ICON_WARNING,
-	IMAGE_INSERT,
-	IMAGE_LANGUAGE,
-	IMAGE_MODEL,
-	IMAGE_OS_BROKEN,
-	IMAGE_REBOOT_ERASE,
-	IMAGE_REMOVE,
-	IMAGE_REMOVE_DEVICES,
-	IMAGE_TO_DEV,
-	IMAGE_TO_NORM,
-	IMAGE_UPDATE,
-	IMAGE_URL,
-	IMAGE_VERIFICIATION_OFF,
-	IMAGE_VERIFICATION_ON,
-	IMAGE_YUCK,
-	IMAGE_MAX_INDEX,
-} BoardImageIdx;
-StorageOps *board_storage_image(BoardImageIdx idx);
-StorageOps *board_storage_image_locale(uint32_t locale, BoardImageIdx idx);
-StorageOps *board_storage_glyph(char c);
 
 #endif /* __BOARD_BOARD_H__ */
diff --git a/src/drivers/board/bolt/Makefile.inc b/src/drivers/board/bolt/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/bolt/Makefile.inc
+++ b/src/drivers/board/bolt/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/bolt/board.c b/src/drivers/board/bolt/board.c
index b4d8fef..c59881f 100644
--- a/src/drivers/board/bolt/board.c
+++ b/src/drivers/board/bolt/board.c
@@ -33,29 +33,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(25)->ops)
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/bolt/vboot.c b/src/drivers/board/bolt/vboot.c
new file mode 100644
index 0000000..44e754f
--- /dev/null
+++ b/src/drivers/board/bolt/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(25)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/daisy/Makefile.inc b/src/drivers/board/daisy/Makefile.inc
index 6fee79d..83ca8d5 100644
--- a/src/drivers/board/daisy/Makefile.inc
+++ b/src/drivers/board/daisy/Makefile.inc
@@ -18,3 +18,4 @@
 depthcharge-y += board.c
 coreboot_handoff-y += coreboot.c
 depthcharge-y += i2c_arb.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/daisy/board.c b/src/drivers/board/daisy/board.c
index 304a256..b1edcca 100644
--- a/src/drivers/board/daisy/board.c
+++ b/src/drivers/board/daisy/board.c
@@ -28,6 +28,7 @@
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/daisy/coreboot.h"
+#include "drivers/board/daisy/daisy.h"
 #include "drivers/board/daisy/i2c_arb.h"
 #include "drivers/bus/i2c/s3c24x0.h"
 #include "drivers/bus/i2s/exynos5/exynos5.h"
@@ -43,12 +44,10 @@
 #include "drivers/gpio/gpio.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/exynos.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98095.h"
 #include "drivers/sound/route.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/s5p.h"
@@ -57,20 +56,14 @@
 
 PRIV_DYN(lid_gpio, &new_exynos5250_gpio_input(GPIO_X, 3, 5)->ops)
 PRIV_DYN(power_gpio, &new_exynos5250_gpio_input(GPIO_X, 1, 3)->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_exynos5250_gpio_input(GPIO_D, 1, 7)->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 PRIV_DYN(spi1, &new_exynos5_spi(0x12d30000)->ops);
 
-PRIV_DYN(flash, &new_spi_flash(get_spi1())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_spi1())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/daisy/daisy.h b/src/drivers/board/daisy/daisy.h
new file mode 100644
index 0000000..9102587
--- /dev/null
+++ b/src/drivers/board/daisy/daisy.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_DAISY_DAISY_H__
+#define __DRIVERS_BOARD_DAISY_DAISY_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_DAISY_DAISY_H__ */
diff --git a/src/drivers/board/daisy/vboot.c b/src/drivers/board/daisy/vboot.c
new file mode 100644
index 0000000..5fd9420
--- /dev/null
+++ b/src/drivers/board/daisy/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/daisy/daisy.h"
+#include "drivers/gpio/exynos5250.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_exynos5250_gpio_input(GPIO_D, 1, 7)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/falco/Makefile.inc b/src/drivers/board/falco/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/falco/Makefile.inc
+++ b/src/drivers/board/falco/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/falco/board.c b/src/drivers/board/falco/board.c
index f6ecab9..74c38f9 100644
--- a/src/drivers/board/falco/board.c
+++ b/src/drivers/board/falco/board.c
@@ -33,29 +33,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/falco/vboot.c b/src/drivers/board/falco/vboot.c
new file mode 100644
index 0000000..1153a2e
--- /dev/null
+++ b/src/drivers/board/falco/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/foster/Makefile.inc b/src/drivers/board/foster/Makefile.inc
index 58ee9fe..a50d9df 100644
--- a/src/drivers/board/foster/Makefile.inc
+++ b/src/drivers/board/foster/Makefile.inc
@@ -19,3 +19,4 @@
 coreboot_handoff-y += coreboot.c
 depthcharge-y += keyboard.c
 depthcharge-y += panel.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/foster/board.c b/src/drivers/board/foster/board.c
index 4f05a23..837b390 100644
--- a/src/drivers/board/foster/board.c
+++ b/src/drivers/board/foster/board.c
@@ -31,6 +31,7 @@
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/foster/coreboot.h"
+#include "drivers/board/foster/foster.h"
 #include "drivers/board/foster/panel.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/spi/tegra.h"
@@ -45,13 +46,11 @@
 #include "drivers/gpio/tegra.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/pseudo/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/power/max77620.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/rt5677.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -99,14 +98,10 @@
 
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(X, 5))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 // Lid always open for now.
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -124,8 +119,7 @@
 PRIV_DYN(qspi, &new_tegra_spi(0x70410000, get_dma_controller(),
 			      APBDMA_SLAVE_HSI)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_qspi())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops);
+PUB_DYN(_flash, &new_spi_flash(get_qspi())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/foster/foster.h b/src/drivers/board/foster/foster.h
new file mode 100644
index 0000000..9f0ec68
--- /dev/null
+++ b/src/drivers/board/foster/foster.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_FOSTER_FOSTER_H__
+#define __DRIVERS_BOARD_FOSTER_FOSTER_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_FOSTER_FOSTER_H__ */
diff --git a/src/drivers/board/foster/vboot.c b/src/drivers/board/foster/vboot.c
new file mode 100644
index 0000000..60e6806
--- /dev/null
+++ b/src/drivers/board/foster/vboot.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/foster/foster.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops);
diff --git a/src/drivers/board/glados/Makefile.inc b/src/drivers/board/glados/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/glados/Makefile.inc
+++ b/src/drivers/board/glados/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/glados/board.c b/src/drivers/board/glados/board.c
index 44ffa87..b7b1798 100644
--- a/src/drivers/board/glados/board.c
+++ b/src/drivers/board/glados/board.c
@@ -40,12 +40,10 @@
 #include "drivers/gpio/skylake.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/gpio_pdm.h"
 #include "drivers/sound/route.h"
 #include "drivers/sound/ssm4567.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -60,17 +58,9 @@
 #define EMMC_CLOCK_MAX		200000000
 #define SD_CLOCK_MAX		52000000
 
-PRIV_DYN(ec_in_rw_gpio, &new_skylake_gpio_input(GPP_C6)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage());
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/glados/vboot.c b/src/drivers/board/glados/vboot.c
new file mode 100644
index 0000000..89b4460
--- /dev/null
+++ b/src/drivers/board/glados/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2015 Google Inc.
+ * Copyright (C) 2015 Intel Corporation
+ *
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/skylake.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_skylake_gpio_input(GPP_C6)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage());
diff --git a/src/drivers/board/jecht/Makefile.inc b/src/drivers/board/jecht/Makefile.inc
index a9ace4a..c606033 100644
--- a/src/drivers/board/jecht/Makefile.inc
+++ b/src/drivers/board/jecht/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/jecht/board.c b/src/drivers/board/jecht/board.c
index 1d15c8f..108bc33 100644
--- a/src/drivers/board/jecht/board.c
+++ b/src/drivers/board/jecht/board.c
@@ -32,29 +32,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/pcat_beep.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(recovery_gpio, &new_lp_pch_gpio_input(12)->ops)
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, !gpio_get(get_recovery_gpio()))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/jecht/vboot.c b/src/drivers/board/jecht/vboot.c
new file mode 100644
index 0000000..8ee908e
--- /dev/null
+++ b/src/drivers/board/jecht/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(recovery_gpio, &new_lp_pch_gpio_input(12)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, !gpio_get(get_recovery_gpio()))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/link/Makefile.inc b/src/drivers/board/link/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/link/Makefile.inc
+++ b/src/drivers/board/link/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/link/board.c b/src/drivers/board/link/board.c
index 0b698ff..c59881f 100644
--- a/src/drivers/board/link/board.c
+++ b/src/drivers/board/link/board.c
@@ -33,29 +33,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/pantherpoint.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_pantherpoint_gpio_input(0, 21)->ops)
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/link/vboot.c b/src/drivers/board/link/vboot.c
new file mode 100644
index 0000000..44eb739
--- /dev/null
+++ b/src/drivers/board/link/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/pantherpoint.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_pantherpoint_gpio_input(0, 21)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/nyan/Makefile.inc b/src/drivers/board/nyan/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/nyan/Makefile.inc
+++ b/src/drivers/board/nyan/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/nyan/board.c b/src/drivers/board/nyan/board.c
index b131043..5ed9190 100644
--- a/src/drivers/board/nyan/board.c
+++ b/src/drivers/board/nyan/board.c
@@ -32,6 +32,7 @@
 #include "drivers/blockdev/tegra_mmc.h"
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan/nyan.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/i2s/tegra/tegra.h"
 #include "drivers/bus/spi/tegra.h"
@@ -46,11 +47,9 @@
 #include "drivers/gpio/tegra.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/power/as3722.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/tpm/slb9635_i2c.h"
@@ -144,15 +143,10 @@
 
 PRIV_DYN(lid_gpio, &new_tegra_gpio_input(GPIO(R, 4))->ops)
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(Q, 0))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -170,8 +164,7 @@
 PRIV_DYN(spi4, &new_tegra_spi(0x7000da00, get_dma_controller(),
 			      APBDMA_SLAVE_SL2B4)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi4())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops);
+PUB_DYN(_flash, &new_spi_flash(get_spi4())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/nyan/nyan.h b/src/drivers/board/nyan/nyan.h
new file mode 100644
index 0000000..113b548
--- /dev/null
+++ b/src/drivers/board/nyan/nyan.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_NYAN_NYAN_H__
+#define __DRIVERS_BOARD_NYAN_NYAN_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_NYAN_NYAN_H__ */
diff --git a/src/drivers/board/nyan/vboot.c b/src/drivers/board/nyan/vboot.c
new file mode 100644
index 0000000..8d097a1
--- /dev/null
+++ b/src/drivers/board/nyan/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan/nyan.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/tegra.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops);
diff --git a/src/drivers/board/nyan_big/Makefile.inc b/src/drivers/board/nyan_big/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/nyan_big/Makefile.inc
+++ b/src/drivers/board/nyan_big/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/nyan_big/board.c b/src/drivers/board/nyan_big/board.c
index ff810b7..f77e209 100644
--- a/src/drivers/board/nyan_big/board.c
+++ b/src/drivers/board/nyan_big/board.c
@@ -34,6 +34,7 @@
 #include "drivers/blockdev/tegra_mmc.h"
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan_big/nyan_big.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/i2s/tegra/tegra.h"
 #include "drivers/bus/spi/tegra.h"
@@ -48,11 +49,9 @@
 #include "drivers/gpio/tegra.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/power/as3722.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/tpm/slb9635_i2c.h"
@@ -123,15 +122,10 @@
 
 PRIV_DYN(lid_gpio, &new_tegra_gpio_input(GPIO(R, 4))->ops)
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(Q, 0))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -149,8 +143,7 @@
 PRIV_DYN(spi4, &new_tegra_spi(0x7000da00, get_dma_controller(),
 			      APBDMA_SLAVE_SL2B4)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi4())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops);
+PUB_DYN(_flash, &new_spi_flash(get_spi4())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/nyan_big/nyan_big.h b/src/drivers/board/nyan_big/nyan_big.h
new file mode 100644
index 0000000..962d801
--- /dev/null
+++ b/src/drivers/board/nyan_big/nyan_big.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_NYAN_BIG_NYAN_BIG_H__
+#define __DRIVERS_BOARD_NYAN_BIG_NYAN_BIG_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_NYAN_BIG_NYAN_BIG_H__ */
diff --git a/src/drivers/board/nyan_big/vboot.c b/src/drivers/board/nyan_big/vboot.c
new file mode 100644
index 0000000..22edb45
--- /dev/null
+++ b/src/drivers/board/nyan_big/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan_big/nyan_big.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/tegra.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops);
diff --git a/src/drivers/board/nyan_blaze/Makefile.inc b/src/drivers/board/nyan_blaze/Makefile.inc
index a9ace4a..c606033 100644
--- a/src/drivers/board/nyan_blaze/Makefile.inc
+++ b/src/drivers/board/nyan_blaze/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/nyan_blaze/board.c b/src/drivers/board/nyan_blaze/board.c
index d13178e..d092f2c 100644
--- a/src/drivers/board/nyan_blaze/board.c
+++ b/src/drivers/board/nyan_blaze/board.c
@@ -34,6 +34,7 @@
 #include "drivers/blockdev/tegra_mmc.h"
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan_blaze/nyan_blaze.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/i2s/tegra/tegra.h"
 #include "drivers/bus/spi/tegra.h"
@@ -48,11 +49,9 @@
 #include "drivers/gpio/tegra.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/power/as3722.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/tpm/slb9635_i2c.h"
@@ -123,15 +122,10 @@
 
 PRIV_DYN(lid_gpio, &new_tegra_gpio_input(GPIO(R, 4))->ops)
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(Q, 0))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -149,8 +143,7 @@
 PRIV_DYN(spi4, &new_tegra_spi(0x7000da00, get_dma_controller(),
 			      APBDMA_SLAVE_SL2B4)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi4())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops);
+PUB_DYN(_flash, &new_spi_flash(get_spi4())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/nyan_blaze/nyan_blaze.h b/src/drivers/board/nyan_blaze/nyan_blaze.h
new file mode 100644
index 0000000..036b2dc
--- /dev/null
+++ b/src/drivers/board/nyan_blaze/nyan_blaze.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_NYAN_BLAZE_NYAN_BLAZE_H__
+#define __DRIVERS_BOARD_NYAN_BLAZE_NYAN_BLAZE_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_NYAN_BLAZE_NYAN_BLAZE_H__ */
diff --git a/src/drivers/board/nyan_blaze/vboot.c b/src/drivers/board/nyan_blaze/vboot.c
new file mode 100644
index 0000000..210d52b
--- /dev/null
+++ b/src/drivers/board/nyan_blaze/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/nyan_blaze/nyan_blaze.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/tegra.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops);
diff --git a/src/drivers/board/panther/Makefile.inc b/src/drivers/board/panther/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/panther/Makefile.inc
+++ b/src/drivers/board/panther/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/panther/board.c b/src/drivers/board/panther/board.c
index 1806ae5..076faae 100644
--- a/src/drivers/board/panther/board.c
+++ b/src/drivers/board/panther/board.c
@@ -32,27 +32,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/pcat_beep.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&new_lp_pch_gpio_input(12)->ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/panther/vboot.c b/src/drivers/board/panther/vboot.c
new file mode 100644
index 0000000..37b851b
--- /dev/null
+++ b/src/drivers/board/panther/vboot.c
@@ -0,0 +1,36 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&new_lp_pch_gpio_input(12)->ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/peach_pit/Makefile.inc b/src/drivers/board/peach_pit/Makefile.inc
index 6e1d128..13ceb73 100644
--- a/src/drivers/board/peach_pit/Makefile.inc
+++ b/src/drivers/board/peach_pit/Makefile.inc
@@ -17,3 +17,4 @@
 
 depthcharge-y += board.c
 coreboot_handoff-y += coreboot.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/peach_pit/board.c b/src/drivers/board/peach_pit/board.c
index d434a53..4cf510c 100644
--- a/src/drivers/board/peach_pit/board.c
+++ b/src/drivers/board/peach_pit/board.c
@@ -27,6 +27,7 @@
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/peach_pit/coreboot.h"
+#include "drivers/board/peach_pit/peach_pit.h"
 #include "drivers/bus/i2c/exynos5_usi.h"
 #include "drivers/bus/i2s/exynos5/exynos5.h"
 #include "drivers/bus/spi/exynos5.h"
@@ -41,33 +42,25 @@
 #include "drivers/gpio/gpio.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/exynos.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/route.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/s5p.h"
 
 PRIV_DYN(lid_gpio, &new_exynos5420_gpio_input(GPIO_X, 3, 4)->ops)
 PRIV_DYN(power_gpio, &new_exynos5420_gpio_input(GPIO_X, 1, 2)->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_exynos5420_gpio_input(GPIO_X, 2, 3)->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 PRIV_DYN(spi1, &new_exynos5_spi(0x12d30000)->ops)
 PRIV_DYN(spi2, &new_exynos5_spi(0x12d40000)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi1())->ops);
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops);
+PUB_DYN(_flash, &new_spi_flash(get_spi1())->ops);
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/peach_pit/peach_pit.h b/src/drivers/board/peach_pit/peach_pit.h
new file mode 100644
index 0000000..f99e728
--- /dev/null
+++ b/src/drivers/board/peach_pit/peach_pit.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_PEACH_PIT_PEACH_PIT_H__
+#define __DRIVERS_BOARD_PEACH_PIT_PEACH_PIT_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_PEACH_PIT_PEACH_PIT_H__ */
diff --git a/src/drivers/board/peach_pit/vboot.c b/src/drivers/board/peach_pit/vboot.c
new file mode 100644
index 0000000..1e09a51
--- /dev/null
+++ b/src/drivers/board/peach_pit/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/peach_pit/peach_pit.h"
+#include "drivers/gpio/exynos5420.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_exynos5420_gpio_input(GPIO_X, 2, 3)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops);
diff --git a/src/drivers/board/peppy/Makefile.inc b/src/drivers/board/peppy/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/peppy/Makefile.inc
+++ b/src/drivers/board/peppy/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/peppy/board.c b/src/drivers/board/peppy/board.c
index f6ecab9..a6bda6c 100644
--- a/src/drivers/board/peppy/board.c
+++ b/src/drivers/board/peppy/board.c
@@ -36,26 +36,16 @@
 #include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/peppy/vboot.c b/src/drivers/board/peppy/vboot.c
new file mode 100644
index 0000000..1153a2e
--- /dev/null
+++ b/src/drivers/board/peppy/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/qemu-x86/Makefile.inc b/src/drivers/board/qemu-x86/Makefile.inc
index a9ace4a..c606033 100644
--- a/src/drivers/board/qemu-x86/Makefile.inc
+++ b/src/drivers/board/qemu-x86/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/qemu-x86/board.c b/src/drivers/board/qemu-x86/board.c
index 60b09e2..eb986e6 100644
--- a/src/drivers/board/qemu-x86/board.c
+++ b/src/drivers/board/qemu-x86/board.c
@@ -23,9 +23,7 @@
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/dcdir.h"
 #include "drivers/power/pch.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/uart/8250.h"
 
 PUB_STAT(power, &pch_power_ops);
@@ -35,12 +33,6 @@
 PUB_ARR(trusted_keyboards, &new_ps2_keyboard()->ops)
 PUB_ARR(untrusted_keyboards, (KeyboardOps *)NULL)
 
-PUB_DYN(_dcdir_storage, new_x86_flash_storage())
-
-PUB_STAT(flag_write_protect, 1)
-PUB_STAT(flag_recovery, 0)
-PUB_STAT(flag_developer_mode, 1)
 PUB_STAT(flag_option_roms_loaded, 0)
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, 0)
-PUB_STAT(flag_ec_in_rw, 0)
diff --git a/src/drivers/board/qemu-x86/vboot.c b/src/drivers/board/qemu-x86/vboot.c
new file mode 100644
index 0000000..f74e476
--- /dev/null
+++ b/src/drivers/board/qemu-x86/vboot.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/layout/dcdir.h"
+#include "drivers/storage/x86_flash.h"
+
+PUB_STAT(flag_write_protect, 1)
+PUB_STAT(flag_recovery, 0)
+PUB_STAT(flag_developer_mode, 1)
+PUB_STAT(flag_ec_in_rw, 0)
+
+PUB_DYN(_dcdir_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/rambi/Makefile.inc b/src/drivers/board/rambi/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/rambi/Makefile.inc
+++ b/src/drivers/board/rambi/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/rambi/board.c b/src/drivers/board/rambi/board.c
index 1a95f3a..afa67c6 100644
--- a/src/drivers/board/rambi/board.c
+++ b/src/drivers/board/rambi/board.c
@@ -35,16 +35,13 @@
 #include "drivers/display/framebuffer.h"
 #include "drivers/ec/cros/lpc.h"
 #include "drivers/framebuffer/fwdb.h"
-#include "drivers/gpio/baytrail.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/uart/8250.h"
 
@@ -58,18 +55,9 @@
 static const int emmc_clock_max = 200 * 1000 * 1000;
 static const int sd_clock_max = 52 * 1000 * 1000;
 
-// ECRW GPIO: SCGPIO59
-PRIV_DYN(ec_in_rw_gpio, &new_baytrail_gpio_input(59 / 32, 59 % 32)->ops)
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/rambi/vboot.c b/src/drivers/board/rambi/vboot.c
new file mode 100644
index 0000000..09492cb
--- /dev/null
+++ b/src/drivers/board/rambi/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/baytrail.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+// ECRW GPIO: SCGPIO59
+PRIV_DYN(ec_in_rw_gpio, &new_baytrail_gpio_input(59 / 32, 59 % 32)->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/rush/Makefile.inc b/src/drivers/board/rush/Makefile.inc
index 17eabc4..a471037 100644
--- a/src/drivers/board/rush/Makefile.inc
+++ b/src/drivers/board/rush/Makefile.inc
@@ -18,3 +18,4 @@
 depthcharge-y += board.c
 coreboot_handoff-y += coreboot.c
 depthcharge-y += panel.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/rush/board.c b/src/drivers/board/rush/board.c
index 8eb215a..1a344d4 100644
--- a/src/drivers/board/rush/board.c
+++ b/src/drivers/board/rush/board.c
@@ -35,6 +35,7 @@
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/rush/coreboot.h"
 #include "drivers/board/rush/panel.h"
+#include "drivers/board/rush/rush.h"
 #include "drivers/bus/spi/tegra.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/usb/usb.h"
@@ -54,7 +55,6 @@
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -146,13 +146,9 @@
 PRIV_DYN(backlight_vdd_enable, &new_tegra_gpio_output(GPIO(P, 2))->ops)
 PRIV_DYN(backlight_enable, &new_tegra_gpio_output(GPIO(H, 2))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -172,8 +168,7 @@
 PRIV_DYN(spi4, &new_tegra_spi(0x7000da00, get_dma_controller(),
 			      APBDMA_SLAVE_SL2B4)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi4())->ops)
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_spi4())->ops)
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/rush/rush.h b/src/drivers/board/rush/rush.h
new file mode 100644
index 0000000..a353ce7
--- /dev/null
+++ b/src/drivers/board/rush/rush.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_RUSH_RUSH_H__
+#define __DRIVERS_BOARD_RUSH_RUSH_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_RUSH_RUSH_H__ */
diff --git a/src/drivers/board/rush/vboot.c b/src/drivers/board/rush/vboot.c
new file mode 100644
index 0000000..defa484
--- /dev/null
+++ b/src/drivers/board/rush/vboot.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/rush/rush.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/storage/flash.h"
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/rush_ryu/Makefile.inc b/src/drivers/board/rush_ryu/Makefile.inc
index 58ee9fe..a50d9df 100644
--- a/src/drivers/board/rush_ryu/Makefile.inc
+++ b/src/drivers/board/rush_ryu/Makefile.inc
@@ -19,3 +19,4 @@
 coreboot_handoff-y += coreboot.c
 depthcharge-y += keyboard.c
 depthcharge-y += panel.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/rush_ryu/board.c b/src/drivers/board/rush_ryu/board.c
index e422534..be179af 100644
--- a/src/drivers/board/rush_ryu/board.c
+++ b/src/drivers/board/rush_ryu/board.c
@@ -31,6 +31,7 @@
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/rush_ryu/coreboot.h"
 #include "drivers/board/rush_ryu/panel.h"
+#include "drivers/board/rush_ryu/rush_ryu.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/spi/tegra.h"
 #include "drivers/bus/usb/usb.h"
@@ -44,13 +45,11 @@
 #include "drivers/gpio/tegra.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/pseudo/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/power/tps65913.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/rt5677.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -100,17 +99,12 @@
 PRIV_DYN(reset_gpio_n, new_gpio_not(get_reset_gpio()))
 
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(Q, 0))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 // Lid always open for now.
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, (get_sysinfo()->board_id >= 2) ^
 		      gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -128,8 +122,7 @@
 PRIV_DYN(spi4, &new_tegra_spi(0x7000da00, get_dma_controller(),
 			      APBDMA_SLAVE_SL2B4)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi4())->ops)
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_spi4())->ops)
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/rush_ryu/rush_ryu.h b/src/drivers/board/rush_ryu/rush_ryu.h
new file mode 100644
index 0000000..872ad80
--- /dev/null
+++ b/src/drivers/board/rush_ryu/rush_ryu.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_RUSH_RYU_RUSH_RYU_H__
+#define __DRIVERS_BOARD_RUSH_RYU_RUSH_RYU_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_RUSH_RYU_RUSH_RYU_H__ */
diff --git a/src/drivers/board/rush_ryu/vboot.c b/src/drivers/board/rush_ryu/vboot.c
new file mode 100644
index 0000000..b5a0174
--- /dev/null
+++ b/src/drivers/board/rush_ryu/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2014 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/rush_ryu/rush_ryu.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/tegra.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(U, 4))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/samus/Makefile.inc b/src/drivers/board/samus/Makefile.inc
index 5d3215f..44bdbda 100644
--- a/src/drivers/board/samus/Makefile.inc
+++ b/src/drivers/board/samus/Makefile.inc
@@ -22,6 +22,8 @@
 
 coreboot_handoff-y += coreboot.c
 
+vboot-y += vboot.c
+
 board_obj := $(curobjdir)
 
 $(call add_spd_file,6,$(board_obj)/spd/samsung_4.spd)
diff --git a/src/drivers/board/samus/board.c b/src/drivers/board/samus/board.c
index fddcc21..30aa2f1 100644
--- a/src/drivers/board/samus/board.c
+++ b/src/drivers/board/samus/board.c
@@ -43,29 +43,19 @@
 #include "drivers/ec/cros/lpc.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
-#include "drivers/layout/dcdir.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/route.h"
 #include "drivers/sound/rt5677.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(25)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 // Put device in D0 state.
 static void device_enable(int sio_index)
@@ -104,10 +94,6 @@
 		&broadwell_alc5677_settings);
 }
 
-PRIV_DYN(flash, new_x86_flash_storage())
-PUB_STAT(_coreboot_storage, get_flash())
-PUB_STAT(_dcdir_storage, get_flash())
-
 PUB_DYN(_framebuffer, new_intel_i915_framebuffer(PCI_DEV(0, 2, 0)))
 PUB_DYN(display, &new_fb_display(&board__framebuffer()->ops,
 				 &board__panel()->ops)->ops)
diff --git a/src/drivers/board/samus/vboot.c b/src/drivers/board/samus/vboot.c
new file mode 100644
index 0000000..b5dff3a
--- /dev/null
+++ b/src/drivers/board/samus/vboot.c
@@ -0,0 +1,45 @@
+/*
+ * 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 <pci.h>
+#include <stdint.h>
+#include <sysinfo.h>
+
+#include "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/layout/dcdir.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(25)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PRIV_DYN(flash, new_x86_flash_storage())
+PUB_STAT(_coreboot_storage, get_flash())
+PUB_STAT(_dcdir_storage, get_flash())
diff --git a/src/drivers/board/slippy/Makefile.inc b/src/drivers/board/slippy/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/slippy/Makefile.inc
+++ b/src/drivers/board/slippy/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/slippy/board.c b/src/drivers/board/slippy/board.c
index f6ecab9..74c38f9 100644
--- a/src/drivers/board/slippy/board.c
+++ b/src/drivers/board/slippy/board.c
@@ -33,29 +33,18 @@
 #include "drivers/framebuffer/fwdb.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
-#include "drivers/gpio/lynxpoint_lp.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/hda_codec.h"
 #include "drivers/sound/sound.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
 
-PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
-
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/slippy/vboot.c b/src/drivers/board/slippy/vboot.c
new file mode 100644
index 0000000..1153a2e
--- /dev/null
+++ b/src/drivers/board/slippy/vboot.c
@@ -0,0 +1,38 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_lp_pch_gpio_input(14)->ops);
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/smaug/Makefile.inc b/src/drivers/board/smaug/Makefile.inc
index 4f0615a..001a14f 100644
--- a/src/drivers/board/smaug/Makefile.inc
+++ b/src/drivers/board/smaug/Makefile.inc
@@ -19,3 +19,4 @@
 coreboot_handoff-y += coreboot.c
 depthcharge-y += emc.c
 depthcharge-y += panel.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/smaug/board.c b/src/drivers/board/smaug/board.c
index b836581..03a3177 100644
--- a/src/drivers/board/smaug/board.c
+++ b/src/drivers/board/smaug/board.c
@@ -31,6 +31,7 @@
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/smaug/coreboot.h"
 #include "drivers/board/smaug/panel.h"
+#include "drivers/board/smaug/smaug.h"
 #include "drivers/bus/i2c/tegra.h"
 #include "drivers/bus/spi/tegra.h"
 #include "drivers/bus/usb/usb.h"
@@ -43,13 +44,11 @@
 #include "drivers/gpio/gpio.h"
 #include "drivers/gpio/tegra210.h"
 #include "drivers/keyboard/dynamic.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/power/max77620.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/rt5677.h"
 #include "drivers/sound/tegra_ahub.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -128,16 +127,11 @@
 PRIV_DYN(pmic, &new_max77620_pmic(get_pwr_i2c(), 0x3c)->ops)
 
 PRIV_DYN(power_gpio, &new_tegra_gpio_input(GPIO(X, 5))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(E, 3))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 // Lid always open for now.
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 static TegraApbDmaController *build_dma_controller(void)
 {
@@ -155,8 +149,7 @@
 PRIV_DYN(qspi, &new_tegra_spi(0x70410000, get_dma_controller(),
 			      APBDMA_SLAVE_QSPI)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_qspi())->ops)
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_qspi())->ops)
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/smaug/smaug.h b/src/drivers/board/smaug/smaug.h
new file mode 100644
index 0000000..d8cac89
--- /dev/null
+++ b/src/drivers/board/smaug/smaug.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_SMAUG_SMAUG_H__
+#define __DRIVERS_BOARD_SMAUG_SMAUG_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_SMAUG_SMAUG_H__ */
diff --git a/src/drivers/board/smaug/vboot.c b/src/drivers/board/smaug/vboot.c
new file mode 100644
index 0000000..be047ff
--- /dev/null
+++ b/src/drivers/board/smaug/vboot.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2015 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/smaug/smaug.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/tegra210.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_tegra_gpio_input(GPIO(E, 3))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/strago/Makefile.inc b/src/drivers/board/strago/Makefile.inc
index ea37540..3faa251 100644
--- a/src/drivers/board/strago/Makefile.inc
+++ b/src/drivers/board/strago/Makefile.inc
@@ -16,3 +16,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/strago/board.c b/src/drivers/board/strago/board.c
index bd2be7a..bc3b3db 100755
--- a/src/drivers/board/strago/board.c
+++ b/src/drivers/board/strago/board.c
@@ -34,16 +34,13 @@
 #include "drivers/display/framebuffer.h"
 #include "drivers/ec/cros/lpc.h"
 #include "drivers/framebuffer/fwdb.h"
-#include "drivers/gpio/baytrail.h"
 #include "drivers/gpio/fwdb.h"
 #include "drivers/gpio/gpio.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/ps2.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/pch.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/max98090.h"
-#include "drivers/storage/x86_flash.h"
 #include "drivers/bus/usb/usb.h"
 #include "drivers/tpm/lpc.h"
 #include "drivers/uart/8250.h"
@@ -58,15 +55,9 @@
 static const int emmc_clock_max = 200 * 1000 * 1000;
 static const int sd_clock_max = 52 * 1000 * 1000;
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(&fwdb_gpio_lidsw.ops))
 PUB_STAT(flag_power, gpio_get(&fwdb_gpio_pwrsw.ops))
-PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
-
-PUB_DYN(_coreboot_storage, new_x86_flash_storage())
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/strago/vboot.c b/src/drivers/board/strago/vboot.c
new file mode 100755
index 0000000..26d741d
--- /dev/null
+++ b/src/drivers/board/strago/vboot.c
@@ -0,0 +1,35 @@
+/*
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/x86_flash.h"
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(&fwdb_gpio_ecinrw.ops))
+
+PUB_DYN(_coreboot_storage, new_x86_flash_storage())
diff --git a/src/drivers/board/uefi/Makefile.inc b/src/drivers/board/uefi/Makefile.inc
index 597802c..f17accc 100644
--- a/src/drivers/board/uefi/Makefile.inc
+++ b/src/drivers/board/uefi/Makefile.inc
@@ -19,3 +19,4 @@
 BUILD_IMAGE_PATH_EXTRAS += $(board_blob_dir)
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/uefi/board.c b/src/drivers/board/uefi/board.c
index f45edca..d2b415b 100644
--- a/src/drivers/board/uefi/board.c
+++ b/src/drivers/board/uefi/board.c
@@ -20,9 +20,6 @@
  * MA 02111-1307 USA
  */
 
-#include <stdint.h>
-#include <vboot_api.h>
-
 #include "base/init_funcs.h"
 #include "base/list.h"
 #include "boot/magenta.h"
@@ -32,25 +29,16 @@
 #include "drivers/display/framebuffer.h"
 #include "drivers/framebuffer/uefi.h"
 #include "drivers/keyboard/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/uefi.h"
 #include "drivers/storage/fwdb.h"
-#include "drivers/storage/uefi_nv.h"
 
 // Force these to acceptable values for now.
-PUB_STAT(flag_write_protect, 1)
-PUB_STAT(flag_recovery, 0)
-PUB_STAT(flag_developer_mode, 1)
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, 0)
 
 PUB_ARR(trusted_keyboards, (KeyboardOps *)NULL)
 PUB_ARR(untrusted_keyboards, (KeyboardOps *)NULL)
 
-PUB_DYN(_uefi_ro_storage, new_fwdb_ro_storage("uefi_ro_image"))
-PUB_DYN(_uefi_rw_a_storage, new_fwdb_ro_storage("uefi_rw_a_image"))
-PUB_DYN(_uefi_rw_b_storage, new_fwdb_ro_storage("uefi_rw_b_image"))
-
 PRIV_DYN(netboot_params_storage, new_fwdb_ro_storage("netboot_params"));
 
 StorageOps *netboot_params_storage(void)
@@ -58,9 +46,6 @@
 	return &get_netboot_params_storage()->ops;
 }
 
-PUB_DYN(storage_vboot_nvstorage,
-	&new_uefi_nv_storage(VBNV_BLOCK_SIZE, L"vboot_nv_storage", NULL)->ops)
-
 PUB_STAT(power, &uefi_power_ops)
 
 PRIV_DYN(framebuffer, new_uefi_framebuffer())
diff --git a/src/drivers/board/uefi/vboot.c b/src/drivers/board/uefi/vboot.c
new file mode 100644
index 0000000..39adb97
--- /dev/null
+++ b/src/drivers/board/uefi/vboot.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 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 <vboot_api.h>
+
+#include "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/keyboard/keyboard.h"
+#include "drivers/storage/fwdb.h"
+#include "drivers/storage/uefi_nv.h"
+
+// Force these to acceptable values for now.
+PUB_STAT(flag_write_protect, 1)
+PUB_STAT(flag_recovery, 0)
+PUB_STAT(flag_developer_mode, 1)
+
+PUB_DYN(_uefi_ro_storage, new_fwdb_ro_storage("uefi_ro_image"))
+PUB_DYN(_uefi_rw_a_storage, new_fwdb_ro_storage("uefi_rw_a_image"))
+PUB_DYN(_uefi_rw_b_storage, new_fwdb_ro_storage("uefi_rw_b_image"))
+
+PUB_DYN(storage_vboot_nvstorage,
+	&new_uefi_nv_storage(VBNV_BLOCK_SIZE, L"vboot_nv_storage", NULL)->ops)
diff --git a/src/drivers/board/veyron/Makefile.inc b/src/drivers/board/veyron/Makefile.inc
index de76c3e..01d9ef2 100644
--- a/src/drivers/board/veyron/Makefile.inc
+++ b/src/drivers/board/veyron/Makefile.inc
@@ -18,3 +18,4 @@
 
 depthcharge-y += board.c
 coreboot_handoff-y += coreboot.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/veyron/board.c b/src/drivers/board/veyron/board.c
index ee97119..16a5d09 100644
--- a/src/drivers/board/veyron/board.c
+++ b/src/drivers/board/veyron/board.c
@@ -28,6 +28,7 @@
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/board/veyron/coreboot.h"
+#include "drivers/board/veyron/veyron.h"
 #include "drivers/bus/i2c/rockchip.h"
 #include "drivers/bus/i2s/rockchip.h"
 #include "drivers/bus/spi/rockchip.h"
@@ -41,13 +42,11 @@
 #include "drivers/gpio/rockchip.h"
 #include "drivers/keyboard/dynamic.h"
 #include "drivers/keyboard/mkbp/keyboard.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/power/rk808.h"
 #include "drivers/sound/i2s.h"
 #include "drivers/sound/route.h"
 #include "drivers/sound/max98090.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -62,21 +61,15 @@
 
 PRIV_DYN(lid_gpio, &new_rk_gpio_input(GPIO(0, A, 6))->ops)
 PRIV_DYN(power_gpio, &new_rk_gpio_input(GPIO(0, A, 5))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_rk_gpio_input(GPIO(0, A, 7))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 PUB_STAT(flag_lid_open, gpio_get(get_lid_gpio()))
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 PRIV_DYN(spi0, &new_rockchip_spi(0xff110000)->ops)
 PRIV_DYN(spi2, &new_rockchip_spi(0xff130000)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi2())->ops)
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_spi2())->ops)
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/veyron/vboot.c b/src/drivers/board/veyron/vboot.c
new file mode 100644
index 0000000..42bde7d
--- /dev/null
+++ b/src/drivers/board/veyron/vboot.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2014 Rockchip Electronics Co., Ltd.
+ *
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/veyron/veyron.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/rockchip.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(ec_in_rw_gpio, &new_rk_gpio_input(GPIO(0, A, 7))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, gpio_get(&fwdb_gpio_recsw.ops))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/veyron/veyron.h b/src/drivers/board/veyron/veyron.h
new file mode 100644
index 0000000..51be776
--- /dev/null
+++ b/src/drivers/board/veyron/veyron.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_VEYRON_VEYRON_H__
+#define __DRIVERS_BOARD_VEYRON_VEYRON_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_VEYRON_VEYRON_H__ */
diff --git a/src/drivers/board/veyron_rialto/Makefile.inc b/src/drivers/board/veyron_rialto/Makefile.inc
index dd36ecc..e463dd3 100644
--- a/src/drivers/board/veyron_rialto/Makefile.inc
+++ b/src/drivers/board/veyron_rialto/Makefile.inc
@@ -17,3 +17,4 @@
 ##
 
 depthcharge-y += board.c
+vboot-y += vboot.c
diff --git a/src/drivers/board/veyron_rialto/board.c b/src/drivers/board/veyron_rialto/board.c
index 3caaaf1..62612d6 100644
--- a/src/drivers/board/veyron_rialto/board.c
+++ b/src/drivers/board/veyron_rialto/board.c
@@ -29,6 +29,7 @@
 #include "drivers/blockdev/rk_mmc.h"
 #include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
+#include "drivers/board/veyron_rialto/veyron_rialto.h"
 #include "drivers/bus/i2c/rockchip.h"
 #include "drivers/bus/i2s/rockchip.h"
 #include "drivers/bus/spi/rockchip.h"
@@ -38,10 +39,8 @@
 #include "drivers/gpio/gpio.h"
 #include "drivers/gpio/rockchip.h"
 #include "drivers/keyboard/dynamic.h"
-#include "drivers/layout/coreboot.h"
 #include "drivers/power/gpio_reset.h"
 #include "drivers/power/rk808.h"
-#include "drivers/storage/flash.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
 #include "drivers/uart/8250.h"
@@ -141,24 +140,17 @@
 
 PRIV_DYN(pmic, &new_rk808_pmic(get_i2c0(), 0x1b)->ops)
 
-PRIV_DYN(recovery_gpio, &new_rk_gpio_input(GPIO(7, B, 1))->ops)
 PRIV_DYN(power_gpio, &new_rk_gpio_input(GPIO(0, A, 5))->ops)
-PRIV_DYN(ec_in_rw_gpio, &new_rk_gpio_input(GPIO(0, A, 7))->ops)
 PRIV_DYN(reset_gpio, &new_rk_gpio_output(GPIO(0, B, 5))->ops)
 
-PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
-PUB_STAT(flag_recovery, !gpio_get(get_recovery_gpio()))
-PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
 PUB_STAT(flag_option_roms_loaded, gpio_get(&fwdb_gpio_oprom.ops))
 // Lid always open for now.
 PUB_STAT(flag_lid_open, 1)
 PUB_STAT(flag_power, !gpio_get(get_power_gpio()))
-PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
 
 PRIV_DYN(spi2, &new_rockchip_spi(0xff130000)->ops)
 
-PRIV_DYN(flash, &new_spi_flash(get_spi2())->ops)
-PUB_DYN(_coreboot_storage, &new_flash_storage(get_flash())->ops)
+PUB_DYN(_flash, &new_spi_flash(get_spi2())->ops)
 
 static int board_setup(void)
 {
diff --git a/src/drivers/board/veyron_rialto/vboot.c b/src/drivers/board/veyron_rialto/vboot.c
new file mode 100644
index 0000000..aad2aa2
--- /dev/null
+++ b/src/drivers/board/veyron_rialto/vboot.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2014 Rockchip Electronics Co., Ltd.
+ *
+ * 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 "drivers/board/board.h"
+#include "drivers/board/board_helpers.h"
+#include "drivers/board/veyron_rialto/veyron_rialto.h"
+#include "drivers/gpio/fwdb.h"
+#include "drivers/gpio/gpio.h"
+#include "drivers/gpio/rockchip.h"
+#include "drivers/layout/coreboot.h"
+#include "drivers/storage/flash.h"
+
+PRIV_DYN(recovery_gpio, &new_rk_gpio_input(GPIO(7, B, 1))->ops)
+PRIV_DYN(ec_in_rw_gpio, &new_rk_gpio_input(GPIO(0, A, 7))->ops)
+
+PUB_STAT(flag_write_protect, gpio_get(&fwdb_gpio_wpsw.ops))
+PUB_STAT(flag_recovery, !gpio_get(get_recovery_gpio()))
+PUB_STAT(flag_developer_mode, gpio_get(&fwdb_gpio_devsw.ops))
+PUB_STAT(flag_ec_in_rw, gpio_get(get_ec_in_rw_gpio()))
+
+PUB_DYN(_coreboot_storage, &new_flash_storage(board__flash())->ops)
diff --git a/src/drivers/board/veyron_rialto/veyron_rialto.h b/src/drivers/board/veyron_rialto/veyron_rialto.h
new file mode 100644
index 0000000..cbe458f
--- /dev/null
+++ b/src/drivers/board/veyron_rialto/veyron_rialto.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __DRIVERS_BOARD_VEYRON_RIALTO_VEYRON_RIALTO_H__
+#define __DRIVERS_BOARD_VEYRON_RIALTO_VEYRON_RIALTO_H__
+
+#include "drivers/flash/flash.h"
+
+FlashOps *board__flash(void);
+
+#endif /* __DRIVERS_BOARD_VEYRON_RIALTO_VEYRON_RIALTO_H__ */
diff --git a/src/drivers/layout/Makefile.inc b/src/drivers/layout/Makefile.inc
index ab2cd14..ffb6526 100644
--- a/src/drivers/layout/Makefile.inc
+++ b/src/drivers/layout/Makefile.inc
@@ -15,6 +15,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-depthcharge-$(CONFIG_DRIVER_LAYOUT_COREBOOT) += coreboot.c
-depthcharge-$(CONFIG_DRIVER_LAYOUT_DCDIR) += dcdir.c
-depthcharge-$(CONFIG_DRIVER_LAYOUT_UEFI) += uefi.c
+vboot-$(CONFIG_DRIVER_LAYOUT_COREBOOT) += coreboot.c
+vboot-$(CONFIG_DRIVER_LAYOUT_DCDIR) += dcdir.c
+vboot-$(CONFIG_DRIVER_LAYOUT_UEFI) += uefi.c
diff --git a/src/drivers/layout/coreboot.c b/src/drivers/layout/coreboot.c
index 97928f1..dfb9862 100644
--- a/src/drivers/layout/coreboot.c
+++ b/src/drivers/layout/coreboot.c
@@ -27,13 +27,13 @@
 #include "base/cbfs/cbfs.h"
 #include "base/die.h"
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/layout/coreboot.h"
 #include "drivers/storage/cbfs.h"
 #include "drivers/storage/fmap.h"
 #include "drivers/storage/section_index.h"
 #include "net/netboot/params.h"
+#include "vboot/board.h"
 
 PRIV_DYN(fmap_media, new_fmap_storage_media(board__coreboot_storage(),
 					    CONFIG_FMAP_OFFSET))
diff --git a/src/drivers/layout/dcdir.c b/src/drivers/layout/dcdir.c
index 1526dd4..41f3c67 100644
--- a/src/drivers/layout/dcdir.c
+++ b/src/drivers/layout/dcdir.c
@@ -25,10 +25,10 @@
 #include "base/algorithm.h"
 #include "base/die.h"
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/layout/dcdir.h"
 #include "drivers/storage/dcdir.h"
+#include "vboot/board.h"
 
 PRIV_DYN(root, new_dcdir_storage_root(board__dcdir_storage(), 6 * 1024 * 1024))
   PRIV_DYN(rw, new_dcdir_storage_dir(&get_root()->ops, "RW"))
diff --git a/src/drivers/layout/uefi.c b/src/drivers/layout/uefi.c
index 763fd05..8e018e7 100644
--- a/src/drivers/layout/uefi.c
+++ b/src/drivers/layout/uefi.c
@@ -22,10 +22,10 @@
 
 #include <stdio.h>
 
-#include "drivers/board/board.h"
 #include "drivers/board/board_helpers.h"
 #include "drivers/layout/uefi.h"
 #include "drivers/storage/dcdir.h"
+#include "vboot/board.h"
 
 PRIV_DYN(ro, new_dcdir_storage_root(board__uefi_ro_storage(), 0))
   PRIV_DYN(ro_fwid, new_dcdir_storage(&get_ro()->ops, "FWID"))
diff --git a/src/module/Makefile.inc b/src/module/Makefile.inc
index 1762f49..5f9e067 100644
--- a/src/module/Makefile.inc
+++ b/src/module/Makefile.inc
@@ -70,7 +70,8 @@
 
 DONT_GC_NETBOOT = -Wl,-u,netboot_entry
 
-COMMON_OBJECTS = $(depthcharge-objs) $(VB_LIB) $(libc-objs)
+COMMON_OBJECTS = $(depthcharge-objs) $(libc-objs)
+VBOOT_OBJECTS = $(vboot-objs) $(VB_LIB)
 
 NET_OBJECTS = $(netboot-objs) $(net-objs) $(uip-objs)
 DEV_OBJECTS = $(NET_OBJECTS) $(dev-objs) $(gdb-objs)
diff --git a/src/module/cb/Makefile.inc b/src/module/cb/Makefile.inc
index 48c6ed6..05a05d6 100644
--- a/src/module/cb/Makefile.inc
+++ b/src/module/cb/Makefile.inc
@@ -37,7 +37,8 @@
 module-y += cb_payload
 mod-cb_payload-title = "unified payload"
 mod-cb_payload-y += payload.c $(CB_ARCH_CODE-y)
-mod-cb_payload-libs += $(COMMON_OBJECTS) $(coreboot_handoff-objs)
+mod-cb_payload-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS)
+mod-cb_payload-libs += $(coreboot_handoff-objs)
 
 module-y += cb_dev
 mod-cb_dev-title = "developer payload"
@@ -48,7 +49,8 @@
 module-y += cb_readonly
 mod-cb_readonly-title = "read only payload"
 mod-cb_readonly-y += readonly.c $(CB_ARCH_CODE-y)
-mod-cb_readonly-libs += $(COMMON_OBJECTS) $(coreboot_handoff-objs) $(TRAMP_KS)
+mod-cb_readonly-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS)
+mod-cb_readonly-libs += $(coreboot_handoff-objs) $(TRAMP_KS)
 
 module-y += cb_dev_ro
 mod-cb_dev_ro-title = "read only developer payload"
@@ -60,7 +62,8 @@
 module-y += cb_readwrite
 mod-cb_readwrite-title = "read/write payload"
 mod-cb_readwrite-y += readwrite.c $(CB_ARCH_CODE-y)
-mod-cb_readwrite-libs += $(COMMON_OBJECTS) $(module_handoff-objs)
+mod-cb_readwrite-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS)
+mod-cb_readwrite-libs += $(module_handoff-objs)
 
 module-y += cb_dev_rw
 mod-cb_dev_rw-title = "read/write developer payload"
@@ -71,5 +74,5 @@
 module-y += cb_netboot
 mod-cb_netboot-title = "netboot payload"
 mod-cb_netboot-y += ../netboot.c
-mod-cb_netboot-libs += $(COMMON_OBJECTS) $(NET_OBJECTS)
+mod-cb_netboot-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS) $(NET_OBJECTS)
 mod-cb_netboot-libs += $(coreboot_handoff-objs)
diff --git a/src/module/cb/readonly.c b/src/module/cb/readonly.c
index c660118..0f7d040 100644
--- a/src/module/cb/readonly.c
+++ b/src/module/cb/readonly.c
@@ -23,8 +23,8 @@
 #include <stdlib.h>
 
 #include "base/timestamp.h"
-#include "drivers/board/board.h"
 #include "module/module.h"
+#include "vboot/board.h"
 #include "vboot/stages.h"
 #include "vboot/util/commonparams.h"
 
diff --git a/src/module/fsp/v1_1/Makefile.inc b/src/module/fsp/v1_1/Makefile.inc
index bfd7bfb..24613ca 100644
--- a/src/module/fsp/v1_1/Makefile.inc
+++ b/src/module/fsp/v1_1/Makefile.inc
@@ -28,4 +28,5 @@
 module-y += fsp_v1_1_fw_sel
 mod-fsp_v1_1_fw_sel-title = "fsp v1.1 firmware selection"
 mod-fsp_v1_1_fw_sel-y += fw_sel.c
-mod-fsp_v1_1_fw_sel-libs += $(FSP_V1_1_OBJECTS) $(module_handoff-objs)
+mod-fsp_v1_1_fw_sel-libs += $(FSP_V1_1_OBJECTS) $(VBOOT_OBJECTS)
+mod-fsp_v1_1_fw_sel-libs += $(module_handoff-objs)
diff --git a/src/module/qemu/Makefile.inc b/src/module/qemu/Makefile.inc
index 3b4b813..88fba6d 100644
--- a/src/module/qemu/Makefile.inc
+++ b/src/module/qemu/Makefile.inc
@@ -20,5 +20,6 @@
 module-y += qemu_firmware_select
 mod-qemu_firmware_select-title = "firmware selection"
 mod-qemu_firmware_select-y += firmware_select.c
-mod-qemu_firmware_select-libs += $(COMMON_OBJECTS) $(TRAMPOLINE)
-mod-qemu_firmware_select-libs += $(initial_handoff-objs) $(TRAMP_KS)
+mod-qemu_firmware_select-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS)
+mod-qemu_firmware_select-libs += $(TRAMPOLINE) $(initial_handoff-objs)
+mod-qemu_firmware_select-libs += $(TRAMP_KS)
diff --git a/src/module/qemu/firmware_select.c b/src/module/qemu/firmware_select.c
index 3e2b746..1c8e0e4 100644
--- a/src/module/qemu/firmware_select.c
+++ b/src/module/qemu/firmware_select.c
@@ -22,8 +22,8 @@
 
 #include <stdlib.h>
 
-#include "drivers/board/board.h"
 #include "module/module.h"
+#include "vboot/board.h"
 #include "vboot/stages.h"
 
 void module_main(void)
diff --git a/src/module/uefi/Makefile.inc b/src/module/uefi/Makefile.inc
index e5d4ba1..45b4c13 100644
--- a/src/module/uefi/Makefile.inc
+++ b/src/module/uefi/Makefile.inc
@@ -33,7 +33,7 @@
 module-y += uefi
 mod-uefi-title = "UEFI chain loader"
 mod-uefi-y += uefi.c fwdb.c module.c
-mod-uefi-libs += $(COMMON_OBJECTS) $(uefi_handoff-objs)
+mod-uefi-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS) $(uefi_handoff-objs)
 mod-uefi-libs += $(module_obj)/uefi.ro.bin.o
 mod-uefi-ldopts += -Wl,-znocombreloc -Wl,-Bsymbolic -pie
 mod-uefi-ldopts += -Wl,-Bsymbolic-functions -Wl,--undefined=_entry
@@ -42,7 +42,7 @@
 module-y += uefi_dev
 mod-uefi_dev-title = $(mod-uefi-title)
 mod-uefi_dev-y = $(mod-uefi-y)
-mod-uefi_dev-libs += $(COMMON_OBJECTS) $(uefi_handoff-objs)
+mod-uefi_dev-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS) $(uefi_handoff-objs)
 mod-uefi_dev-libs += $(module_obj)/uefi_dev.ro.bin.o
 mod-uefi_dev-ldopts = $(mod-uefi-ldopts)
 mod-uefi_dev-ldscript = $(mod-uefi-ldscript)
@@ -50,7 +50,8 @@
 module-y += uefi_rw
 mod-uefi_rw-title = "UEFI chain loader RW"
 mod-uefi_rw-y += uefi_rw.c
-mod-uefi_rw-libs += $(COMMON_OBJECTS) $(uefi_module_handoff-objs)
+mod-uefi_rw-libs += $(COMMON_OBJECTS) $(VBOOT_OBJECTS)
+mod-uefi_rw-libs += $(uefi_module_handoff-objs)
 mod-uefi_rw-ldopts = $(mod-uefi-ldopts)
 mod-uefi_rw-ldscript = $(mod-uefi-ldscript)
 
diff --git a/src/module/uefi/uefi.c b/src/module/uefi/uefi.c
index c61fe84..2dfaa4d 100644
--- a/src/module/uefi/uefi.c
+++ b/src/module/uefi/uefi.c
@@ -20,10 +20,10 @@
  * MA 02111-1307 USA
  */
 
-#include "drivers/board/board.h"
 #include "module/module.h"
 #include "module/uefi/fwdb.h"
 #include "module/uefi/module.h"
+#include "vboot/board.h"
 #include "vboot/stages.h"
 
 void module_main(void)
diff --git a/src/vboot/Makefile.inc b/src/vboot/Makefile.inc
index 9b475da..8c4d004 100644
--- a/src/vboot/Makefile.inc
+++ b/src/vboot/Makefile.inc
@@ -15,11 +15,13 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+classes-y += vboot
+
 subdirs-y := callbacks crossystem stages util
 
-depthcharge-y += stages.c
-depthcharge-y += firmware_id.c
-depthcharge-y += vbnv.c
+vboot-y += stages.c
+vboot-y += firmware_id.c
+vboot-y += vbnv.c
 
 VB_LIB = $(obj)/external/vboot/vboot_fw.a
 
diff --git a/src/vboot/board.h b/src/vboot/board.h
new file mode 100644
index 0000000..985a8ca
--- /dev/null
+++ b/src/vboot/board.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2016 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
+ */
+
+#ifndef __VBOOT_BOARD_H__
+#define __VBOOT_BOARD_H__
+
+#include "drivers/storage/storage.h"
+
+// Whether write protect was enabled at boot time.
+int board_flag_write_protect(void);
+// Whether recovery mode was requested.
+int board_flag_recovery(void);
+// Whether developer mode was requested/enabled.
+int board_flag_developer_mode(void);
+// Whether the EC is running the RW portion of its firmware.
+int board_flag_ec_in_rw(void);
+
+/*
+ * This group of functions return storage objects which provide access to
+ * different bits of information which are needed during boot. These might
+ * be additional pieces of firmware, or blocks of data like the GBB which
+ * firmware acts on. The storage objects should be combined together to
+ * abstract away the actual media storing the data, and any data structures
+ * which map out the media into smaller components.
+ */
+
+StorageOps *board_storage_ec_a(int devidx);
+StorageOps *board_storage_ec_b(int devidx);
+StorageOps *board_storage_ec_hash_a(int devidx);
+StorageOps *board_storage_ec_hash_b(int devidx);
+StorageOps *board_storage_fwid_rwa(void);
+StorageOps *board_storage_fwid_rwb(void);
+StorageOps *board_storage_fwid_ro(void);
+StorageOps *board_storage_gbb(void);
+StorageOps *board_storage_legacy(void);
+StorageOps *board_storage_main_fw_a(void);
+StorageOps *board_storage_main_fw_b(void);
+StorageOps *board_storage_nv_scratch(void);
+StorageOps *board_storage_vblock_a(void);
+StorageOps *board_storage_vblock_b(void);
+StorageOps *board_storage_vboot_nvstorage(void);
+StorageOps *board_storage_verified_a(void);
+StorageOps *board_storage_verified_b(void);
+
+int board_storage_locale_count(uint32_t *count);
+typedef enum {
+	IMAGE_ARROW_LEFT,
+	IMAGE_ARROW_RIGHT,
+	IMAGE_BAD_SD,
+	IMAGE_BAD_USB,
+	IMAGE_CHROME_LOGO,
+	IMAGE_DEV_MODE,
+	IMAGE_DIVIDER_TOP,
+	IMAGE_DIVIDER_BOTTOM,
+	IMAGE_FOR_HELP_LEFT,
+	IMAGE_ICON_VERIFICATION_OFF,
+	IMAGE_ICON_VERIFICATION_ON,
+	IMAGE_ICON_WARNING,
+	IMAGE_INSERT,
+	IMAGE_LANGUAGE,
+	IMAGE_MODEL,
+	IMAGE_OS_BROKEN,
+	IMAGE_REBOOT_ERASE,
+	IMAGE_REMOVE,
+	IMAGE_REMOVE_DEVICES,
+	IMAGE_TO_DEV,
+	IMAGE_TO_NORM,
+	IMAGE_UPDATE,
+	IMAGE_URL,
+	IMAGE_VERIFICIATION_OFF,
+	IMAGE_VERIFICATION_ON,
+	IMAGE_YUCK,
+	IMAGE_MAX_INDEX,
+} BoardImageIdx;
+StorageOps *board_storage_image(BoardImageIdx idx);
+StorageOps *board_storage_image_locale(uint32_t locale, BoardImageIdx idx);
+StorageOps *board_storage_glyph(char c);
+
+#endif /* __VBOOT_BOARD_H__ */
diff --git a/src/vboot/callbacks/Makefile.inc b/src/vboot/callbacks/Makefile.inc
index 74fedeb..a4ed7a6 100644
--- a/src/vboot/callbacks/Makefile.inc
+++ b/src/vboot/callbacks/Makefile.inc
@@ -15,32 +15,32 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-depthcharge-y += cgptlib.c
-depthcharge-y += debug.c
-depthcharge-y += disk.c
+vboot-y += cgptlib.c
+vboot-y += debug.c
+vboot-y += disk.c
 ifneq ($(CONFIG_HEADLESS),y)
-depthcharge-y += display.c
+vboot-y += display.c
 else
-depthcharge-y += headless_stub.c
+vboot-y += headless_stub.c
 endif
-depthcharge-y += keyboard.c
-depthcharge-y += legacy.c
-depthcharge-y += load_firmware.c
-depthcharge-y += memory.c
-depthcharge-y += misc.c
-depthcharge-$(CONFIG_NV_STORAGE_CMOS) += nvstorage_cmos.c
-depthcharge-$(CONFIG_NV_STORAGE_CROS_EC) += nvstorage_cros_ec.c
-depthcharge-$(CONFIG_NV_STORAGE_DISK) += nvstorage_disk.c
-depthcharge-$(CONFIG_NV_STORAGE_FAKE) += nvstorage_fake.c
-depthcharge-$(CONFIG_NV_STORAGE_FLASH) += nvstorage_flash.c
-depthcharge-$(CONFIG_NV_STORAGE_GENERIC) += nvstorage.c
-depthcharge-$(CONFIG_NV_STORAGE_UEFI) += nvstorage_uefi.c
-depthcharge-y += switches.c
-depthcharge-y += time.c
-depthcharge-y += tpm.c
+vboot-y += keyboard.c
+vboot-y += legacy.c
+vboot-y += load_firmware.c
+vboot-y += memory.c
+vboot-y += misc.c
+vboot-$(CONFIG_NV_STORAGE_CMOS) += nvstorage_cmos.c
+vboot-$(CONFIG_NV_STORAGE_CROS_EC) += nvstorage_cros_ec.c
+vboot-$(CONFIG_NV_STORAGE_DISK) += nvstorage_disk.c
+vboot-$(CONFIG_NV_STORAGE_FAKE) += nvstorage_fake.c
+vboot-$(CONFIG_NV_STORAGE_FLASH) += nvstorage_flash.c
+vboot-$(CONFIG_NV_STORAGE_GENERIC) += nvstorage.c
+vboot-$(CONFIG_NV_STORAGE_UEFI) += nvstorage_uefi.c
+vboot-y += switches.c
+vboot-y += time.c
+vboot-y += tpm.c
 
 ifeq ($(CONFIG_EC_SOFTWARE_SYNC),y)
-depthcharge-y += ec.c
+vboot-y += ec.c
 else
-depthcharge-y += ec_stub.c
+vboot-y += ec_stub.c
 endif
diff --git a/src/vboot/callbacks/display.c b/src/vboot/callbacks/display.c
index 1bd336b..18947eb 100644
--- a/src/vboot/callbacks/display.c
+++ b/src/vboot/callbacks/display.c
@@ -28,6 +28,7 @@
 #include "drivers/board/board.h"
 #include "drivers/console/display.h"
 #include "drivers/display/display.h"
+#include "vboot/board.h"
 #include "vboot/firmware_id.h"
 #include "vboot/util/commonparams.h"
 
diff --git a/src/vboot/callbacks/ec.c b/src/vboot/callbacks/ec.c
index e2cfd1e..8140133 100644
--- a/src/vboot/callbacks/ec.c
+++ b/src/vboot/callbacks/ec.c
@@ -28,8 +28,8 @@
 #include "base/time.h"
 #include "base/timestamp.h"
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/ec/cros/ec.h"
+#include "vboot/board.h"
 
 int VbExTrustEC(int devidx)
 {
diff --git a/src/vboot/callbacks/legacy.c b/src/vboot/callbacks/legacy.c
index 92aca63..312c99b 100644
--- a/src/vboot/callbacks/legacy.c
+++ b/src/vboot/callbacks/legacy.c
@@ -31,8 +31,8 @@
 #include "base/cleanup.h"
 #include "base/lzma/lzma.h"
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 
 static void load_payload_and_run(struct cbfs_payload *payload);
 
diff --git a/src/vboot/callbacks/load_firmware.c b/src/vboot/callbacks/load_firmware.c
index 22359da..2e25558 100644
--- a/src/vboot/callbacks/load_firmware.c
+++ b/src/vboot/callbacks/load_firmware.c
@@ -27,8 +27,8 @@
 
 #include "base/algorithm.h"
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 
 VbError_t VbExHashFirmwareBody(VbCommonParams *cparams,
 			       uint32_t firmware_index)
diff --git a/src/vboot/callbacks/misc.c b/src/vboot/callbacks/misc.c
index 16edb24..743a54e 100644
--- a/src/vboot/callbacks/misc.c
+++ b/src/vboot/callbacks/misc.c
@@ -27,6 +27,7 @@
 #include "base/lzma/lzma.h"
 #include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 
 uint32_t VbExIsShutdownRequested(void)
 {
diff --git a/src/vboot/callbacks/nvstorage.c b/src/vboot/callbacks/nvstorage.c
index 92ff23a..7bfa8c9 100644
--- a/src/vboot/callbacks/nvstorage.c
+++ b/src/vboot/callbacks/nvstorage.c
@@ -23,8 +23,8 @@
 #include <stdio.h>
 #include <vboot_api.h>
 
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 
 VbError_t VbExNvStorageRead(uint8_t* buf)
 {
diff --git a/src/vboot/callbacks/nvstorage_flash.c b/src/vboot/callbacks/nvstorage_flash.c
index 3c1c9fe..714bf56 100644
--- a/src/vboot/callbacks/nvstorage_flash.c
+++ b/src/vboot/callbacks/nvstorage_flash.c
@@ -22,11 +22,11 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <vboot_api.h>
 
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
-#include "vboot_api.h"
+#include "vboot/board.h"
 
 /*
  * NVRAM storage in flash uses a block of flash memory to represent the NVRAM
diff --git a/src/vboot/callbacks/switches.c b/src/vboot/callbacks/switches.c
index 4a0bc87..bc0d76e 100644
--- a/src/vboot/callbacks/switches.c
+++ b/src/vboot/callbacks/switches.c
@@ -22,7 +22,7 @@
 
 #include <vboot_api.h>
 
-#include "drivers/board/board.h"
+#include "vboot/board.h"
 
 /*
  * Return the state of the switches specified in request_mask.
diff --git a/src/vboot/crossystem/Makefile.inc b/src/vboot/crossystem/Makefile.inc
index 8968e31..cd4a7d2 100644
--- a/src/vboot/crossystem/Makefile.inc
+++ b/src/vboot/crossystem/Makefile.inc
@@ -15,6 +15,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-depthcharge-$(CONFIG_CROSSYSTEM_ACPI) += acpi.c
-depthcharge-$(CONFIG_CROSSYSTEM_FDT) += fdt.c
-depthcharge-$(CONFIG_CROSSYSTEM_STUB) += stub.c
+vboot-$(CONFIG_CROSSYSTEM_ACPI) += acpi.c
+vboot-$(CONFIG_CROSSYSTEM_FDT) += fdt.c
+vboot-$(CONFIG_CROSSYSTEM_STUB) += stub.c
diff --git a/src/vboot/crossystem/acpi.c b/src/vboot/crossystem/acpi.c
index 02204e4..64ca1b4 100644
--- a/src/vboot/crossystem/acpi.c
+++ b/src/vboot/crossystem/acpi.c
@@ -29,7 +29,7 @@
 #include <vboot_struct.h>
 
 #include "base/algorithm.h"
-#include "drivers/board/board.h"
+#include "vboot/board.h"
 #include "vboot/crossystem/crossystem.h"
 #include "vboot/firmware_id.h"
 #include "vboot/util/acpi.h"
diff --git a/src/vboot/firmware_id.c b/src/vboot/firmware_id.c
index dc5bd83..7c4663f 100644
--- a/src/vboot/firmware_id.c
+++ b/src/vboot/firmware_id.c
@@ -24,8 +24,8 @@
 #include <vboot_struct.h>
 
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 #include "vboot/firmware_id.h"
 #include "vboot/util/commonparams.h"
 
diff --git a/src/vboot/stages.c b/src/vboot/stages.c
index 398e2b8..8b940f3 100644
--- a/src/vboot/stages.c
+++ b/src/vboot/stages.c
@@ -36,6 +36,7 @@
 #include "drivers/keyboard/keyboard.h"
 #include "module/module.h"
 #include "module/symbols.h"
+#include "vboot/board.h"
 #include "vboot/stages.h"
 #include "vboot/crossystem/crossystem.h"
 #include "vboot/util/commonparams.h"
diff --git a/src/vboot/util/Makefile.inc b/src/vboot/util/Makefile.inc
index 9579cb0..4567c6a 100644
--- a/src/vboot/util/Makefile.inc
+++ b/src/vboot/util/Makefile.inc
@@ -15,11 +15,11 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-depthcharge-y += commonparams.c
-depthcharge-y += gbb.c
+vboot-y += commonparams.c
+vboot-y += gbb.c
 
 ifeq ($(CONFIG_EC_SOFTWARE_SYNC),y)
-depthcharge-y += ec.c
+vboot-y += ec.c
 else
-depthcharge-y += ec_stub.c
+vboot-y += ec_stub.c
 endif
diff --git a/src/vboot/util/gbb.c b/src/vboot/util/gbb.c
index b9a50cd..a01a9cf 100644
--- a/src/vboot/util/gbb.c
+++ b/src/vboot/util/gbb.c
@@ -26,8 +26,8 @@
 #include <stdlib.h>
 
 #include "base/xalloc.h"
-#include "drivers/board/board.h"
 #include "drivers/storage/storage.h"
+#include "vboot/board.h"
 #include "vboot/util/gbb.h"
 
 const char *gbb_read_hwid(size_t *hwid_size_ptr)