1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-04-20 19:53:43 +00:00

u-boot 2011.12: switch beagleboard to ext4 to match beaglebone

Also add patch to increase ext2 read speed.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
This commit is contained in:
Koen Kooi
2012-05-01 21:06:52 +02:00
committed by Denys Dmytriyenko
parent f0e2305c7e
commit 07913cca6c
4 changed files with 2483 additions and 1 deletions

View File

@@ -0,0 +1,74 @@
From e4181abd88a932bc38054af05d39a633656caefa Mon Sep 17 00:00:00 2001
From: "u-boot@lakedaemon.net" <u-boot@lakedaemon.net>
Date: Wed, 28 Mar 2012 04:37:11 +0000
Subject: [PATCH 11/13] ext2load: increase read speed
This patch dramatically drops the amount of time u-boot needs to read a
file from an ext2 partition. On a typical 2 to 5 MB file (kernels and
initrds) it goes from tens of seconds to a couple seconds.
All we are doing here is grouping contiguous blocks into one read.
Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC)
with three different files. sha1sums were calculated in Linux
userspace, and then confirmed after ext2load.
Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
---
fs/ext2/ext2fs.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c
index e119e13..8531db5 100644
--- a/fs/ext2/ext2fs.c
+++ b/fs/ext2/ext2fs.c
@@ -414,7 +414,6 @@ int ext2fs_read_file
if (blknr < 0) {
return (-1);
}
- blknr = blknr << log2blocksize;
/* Last block. */
if (i == blockcnt - 1) {
@@ -432,6 +431,29 @@ int ext2fs_read_file
blockend -= skipfirst;
}
+ /* grab middle blocks in one go */
+ if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) {
+ int oldblk = blknr;
+ int blocknxt;
+ while (i < blockcnt - 1) {
+ blocknxt = ext2fs_read_block(node, i + 1);
+ if (blocknxt == (oldblk + 1)) {
+ oldblk = blocknxt;
+ i++;
+ } else {
+ blocknxt = ext2fs_read_block(node, i);
+ break;
+ }
+ }
+
+ if (oldblk == blknr)
+ blockend = blocksize;
+ else
+ blockend = (1 + blocknxt - blknr) * blocksize;
+ }
+
+ blknr = blknr << log2blocksize;
+
/* If the block number is 0 this block is not stored on disk but
is zero filled instead. */
if (blknr) {
@@ -444,7 +466,7 @@ int ext2fs_read_file
} else {
memset (buf, 0, blocksize - skipfirst);
}
- buf += blocksize - skipfirst;
+ buf += blockend - skipfirst;
}
return (len);
}
--
1.7.10

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
From f5b19d6609a540a9eafa60dad902e7416df57771 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Mon, 30 Apr 2012 11:10:07 +0200
Subject: [PATCH 13/13] beagleboard: switch mmcroots to ext4
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
include/configs/omap3_beagle.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 65ab8ee..3157d47 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -140,6 +140,7 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_EXT2 /* EXT2 Support */
+#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FAT /* FAT support */
#define CONFIG_CMD_JFFS2 /* JFFS2 Support */
#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
@@ -222,7 +223,7 @@
"defaultdisplay=dvi\0" \
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 ro\0" \
- "mmcrootfstype=ext3 rootwait\0" \
+ "mmcrootfstype=ext4 rootwait\0" \
"nandroot=ubi0:rootfs ubi.mtd=4\0" \
"nandrootfstype=ubifs\0" \
"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \
@@ -265,7 +266,7 @@
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
- "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \
+ "loaduimage=ext4load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
--
1.7.10

View File

@@ -6,7 +6,7 @@ UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
UBOOT_SYMLINK = "u-boot-${MACHINE}.img"
PV = "2011.12"
PR = "r7"
PR = "r8"
# No patches for other machines yet
COMPATIBLE_MACHINE = "(beagleboard|pandaboard|hawkboard|am3517-evm|am37x-evm|omap3evm)"
@@ -30,6 +30,9 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
${CACHEFIX} \
file://2011.12/0009-Beagleboard-Correct-memory-size-on-rev-C4.patch \
file://2011.12/0010-OMAP3-Correct-get_sdr_cs_offset-mask.patch \
file://2011.12/0011-ext2load-increase-read-speed.patch \
file://2011.12/0012-ext4fs-ls-load-support.patch \
file://2011.12/0013-beagleboard-switch-mmcroots-to-ext4.patch \
${FWENV} \
"