https://www.Exploitee.rs/index.php?title=Patch_for_Beagle_Bone_Black_eMMC_to_dump_boot_partions&feed=atom&action=history
Patch for Beagle Bone Black eMMC to dump boot partions - Revision history
2024-03-28T15:28:25Z
Revision history for this page on the wiki
MediaWiki 1.37.2
https://www.Exploitee.rs/index.php?title=Patch_for_Beagle_Bone_Black_eMMC_to_dump_boot_partions&diff=3036&oldid=prev
Zenofex: Created page with "Category:Generic == About == The patch below is intended to assist in dumping the boot partitions from a connected eMMC flash by patching the kernel provided with the Bea..."
2021-03-21T21:45:15Z
<p>Created page with "<a href="/index.php?title=Category:Generic&action=edit&redlink=1" class="new" title="Category:Generic (page does not exist)">Category:Generic</a> == About == The patch below is intended to assist in dumping the boot partitions from a connected eMMC flash by patching the kernel provided with the Bea..."</p>
<p><b>New page</b></p><div>[[Category:Generic]]<br />
<br />
== About ==<br />
The patch below is intended to assist in dumping the boot partitions from a connected eMMC flash by patching the kernel provided with the Beagle Bone Black.<br />
<br />
<pre><br />
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c<br />
index aaed768..732e6e5 100644<br />
--- a/drivers/mmc/core/core.c<br />
+++ b/drivers/mmc/core/core.c<br />
@@ -889,7 +889,9 @@ void mmc_set_chip_select(struct mmc_host *host, int mode)<br />
*/<br />
static void __mmc_set_clock(struct mmc_host *host, unsigned int hz)<br />
{<br />
- WARN_ON(hz < host->f_min);<br />
+ //maximus64 WARN_ON(hz < host->f_min);<br />
+ if (hz < host->f_min)<br />
+ hz = host->f_min; <br />
<br />
if (hz > host->f_max)<br />
hz = host->f_max;<br />
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c<br />
index 2743b7d..e53d19d 100644<br />
--- a/drivers/mmc/core/mmc.c<br />
+++ b/drivers/mmc/core/mmc.c<br />
@@ -1028,7 +1028,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,<br />
/*<br />
* Activate high speed (if supported)<br />
*/<br />
- if (card->ext_csd.hs_max_dtr != 0) {<br />
+ //maximus64 if (card->ext_csd.hs_max_dtr != 0) {<br />
+ if (0) {<br />
err = 0;<br />
if (card->ext_csd.hs_max_dtr > 52000000 &&<br />
host->caps2 & MMC_CAP2_HS200)<br />
@@ -1077,7 +1078,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,<br />
/*<br />
* Indicate DDR mode (if supported).<br />
*/<br />
- if (mmc_card_highspeed(card)) {<br />
+ //maximus64 if (mmc_card_highspeed(card)) {<br />
+ if (0) {<br />
if ((card->ext_csd.card_type & EXT_CSD_CARD_TYPE_DDR_1_8V)<br />
&& ((host->caps & (MMC_CAP_1_8V_DDR |<br />
MMC_CAP_UHS_DDR50))<br />
@@ -1093,7 +1095,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,<br />
/*<br />
* Indicate HS200 SDR mode (if supported).<br />
*/<br />
- if (mmc_card_hs200(card)) {<br />
+ //maximus64 if (mmc_card_hs200(card)) {<br />
+ if (0) {<br />
u32 ext_csd_bits;<br />
u32 bus_width = card->host->ios.bus_width;<br />
<br />
@@ -1133,9 +1136,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,<br />
/*<br />
* Activate wide bus and DDR (if supported).<br />
*/<br />
- if (!mmc_card_hs200(card) &&<br />
- (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&<br />
- (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {<br />
+ //maximus64 if (!mmc_card_hs200(card) &&<br />
+ // (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&<br />
+ // (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {<br />
+ if (0) {<br />
static unsigned ext_csd_bits[][2] = {<br />
{ EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 },<br />
{ EXT_CSD_BUS_WIDTH_4, EXT_CSD_DDR_BUS_WIDTH_4 },<br />
@@ -1235,7 +1239,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,<br />
/*<br />
* Enable HPI feature (if supported)<br />
*/<br />
- if (card->ext_csd.hpi) {<br />
+ //maximus64 if (card->ext_csd.hpi) {<br />
+ if (0) {<br />
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,<br />
EXT_CSD_HPI_MGMT, 1,<br />
card->ext_csd.generic_cmd6_time);<br />
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c<br />
index 74972c2..8a9f5ff 100644<br />
--- a/drivers/mmc/core/sd.c<br />
+++ b/drivers/mmc/core/sd.c<br />
@@ -617,9 +617,10 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card)<br />
}<br />
<br />
/* Set 4-bit bus width */<br />
- if ((card->host->caps & MMC_CAP_4_BIT_DATA) &&<br />
- (card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {<br />
- err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);<br />
+ //if ((card->host->caps & MMC_CAP_4_BIT_DATA) &&<br />
+ // (card-> if (err)<br />
goto out;<br />
<br />
@@ -987,10 +988,11 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,<br />
<br />
/*<br />
* Switch to wider bus (if supported).<br />
- */<br />
- if ((host->caps & MMC_CAP_4_BIT_DATA) &&<br />
- (card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {<br />
- err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);<br />
+ */ <br />
+ //if ((host->caps & MMC_CAP_4_BIT_DATA) &&<br />
+ // (card->scr.bus_widths & <br />
<br />
</pre></div>
Zenofex