* RFC : mmc : boot partition is set as a read-write.
@ 2011-09-19 3:10 NamJae Jeon
2011-09-19 3:32 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: NamJae Jeon @ 2011-09-19 3:10 UTC (permalink / raw)
To: Chris Ball, Linus Walleij, linux-mmc; +Cc: linux-kernel
mmc : boot partition is set as a read-write.
There is a case that user directly update boot partition through mmcblk0boot0,1.
However, the current boot partition is set as a read-only.
I suggest that boot partition is set as a read-write if there is no
reason that it should be read-only.
static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md)
{
int ret = 0;
if (!mmc_card_mmc(card))
return 0;
if (card->ext_csd.boot_size) {
ret = mmc_blk_alloc_part(card, md, EXT_CSD_PART_CONFIG_ACC_BOOT0,
card->ext_csd.boot_size >> 9,
false,
"boot0");
if (ret)
return ret;
ret = mmc_blk_alloc_part(card, md, EXT_CSD_PART_CONFIG_ACC_BOOT1,
card->ext_csd.boot_size >> 9,
false,
"boot1");
if (ret)
return ret;
}
}
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC : mmc : boot partition is set as a read-write.
2011-09-19 3:10 RFC : mmc : boot partition is set as a read-write NamJae Jeon
@ 2011-09-19 3:32 ` Chris Ball
2011-09-19 3:56 ` NamJae Jeon
0 siblings, 1 reply; 3+ messages in thread
From: Chris Ball @ 2011-09-19 3:32 UTC (permalink / raw)
To: NamJae Jeon; +Cc: Linus Walleij, linux-mmc, linux-kernel
Hi,
On Sun, Sep 18 2011, NamJae Jeon wrote:
> mmc : boot partition is set as a read-write.
>
> There is a case that user directly update boot partition through mmcblk0boot0,1.
> However, the current boot partition is set as a read-only.
> I suggest that boot partition is set as a read-write if there is no
> reason that it should be read-only.
There is a reason.
Documentation/mmc/mmc-dev-parts.txt:
MMC Boot Partitions
===================
Read and write access is provided to the two MMC boot partitions. Due to
the sensitive nature of the boot partition contents, which often store
a bootloader or bootloader configuration tables crucial to booting the
platform, write access is disabled by default to reduce the chance of
accidental bricking.
To enable write access to /dev/mmcblkXbootY, disable the forced read-only
access with:
echo 0 > /sys/block/mmcblkXbootY/force_ro
==
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC : mmc : boot partition is set as a read-write.
2011-09-19 3:32 ` Chris Ball
@ 2011-09-19 3:56 ` NamJae Jeon
0 siblings, 0 replies; 3+ messages in thread
From: NamJae Jeon @ 2011-09-19 3:56 UTC (permalink / raw)
To: Chris Ball; +Cc: Linus Walleij, linux-mmc, linux-kernel
2011/9/19 Chris Ball <cjb@laptop.org>:
> Hi,
>
> On Sun, Sep 18 2011, NamJae Jeon wrote:
>> mmc : boot partition is set as a read-write.
>>
>> There is a case that user directly update boot partition through mmcblk0boot0,1.
>> However, the current boot partition is set as a read-only.
>> I suggest that boot partition is set as a read-write if there is no
>> reason that it should be read-only.
>
> There is a reason.
>
> Documentation/mmc/mmc-dev-parts.txt:
>
> MMC Boot Partitions
> ===================
>
> Read and write access is provided to the two MMC boot partitions. Due to
> the sensitive nature of the boot partition contents, which often store
> a bootloader or bootloader configuration tables crucial to booting the
> platform, write access is disabled by default to reduce the chance of
> accidental bricking.
>
> To enable write access to /dev/mmcblkXbootY, disable the forced read-only
> access with:
>
> echo 0 > /sys/block/mmcblkXbootY/force_ro
>
> ==
> - Chris.
> --
> Chris Ball <cjb@laptop.org> <http://printf.net/>
> One Laptop Per Child
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Hi. Chris.
There is the way you are.
Thanks a lot.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-19 3:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 3:10 RFC : mmc : boot partition is set as a read-write NamJae Jeon
2011-09-19 3:32 ` Chris Ball
2011-09-19 3:56 ` NamJae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox