From 6d0604bf34068a0dad29cf214399139aef085597 Mon Sep 17 00:00:00 2001 From: Brandon Bennett Date: Fri, 28 Jan 2011 13:39:10 -0700 Subject: [PATCH] Add support to mount /boot for systems that have a mountable /boot. This is checked at runtime to see if /boot is a mountable parition (i.e not mtd), if so it adds an entry into /etc/fstab. This will allow us to mount /boot from an edify script and push certain files without completely imaging the parition which can contain other files such as the bootloader (u-boot), and recovery kernel and ramdisks as is the case with the encore (NookColor) Test on NookColor and passion. Correct entry was added to the NC and not added to the passion as expected. Change-Id: I9850dee866b77653bf400bb5193905e55da3f25f --- etc/init.rc | 1 + extendedcommands.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/etc/init.rc b/etc/init.rc index 611f5b4..c258657 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -9,6 +9,7 @@ on init symlink /system/etc /etc + mkdir /boot mkdir /sdcard mkdir /sd-ext mkdir /datadata diff --git a/extendedcommands.c b/extendedcommands.c index 95a5f07..6b2b582 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -986,6 +986,9 @@ void create_fstab() LOGW("Unable to create /etc/fstab!\n"); return; } + Volume *vol = volume_for_path("/boot"); + if (NULL != vol && strcmp(vol->fs_type, "mtd") != 0) + write_fstab_root("/boot", file); write_fstab_root("/cache", file); write_fstab_root("/data", file); if (has_datadata()) {