2014-01-29 22:22:37 +01:00
|
|
|
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
|
|
|
|
index 2922816..39a94ad 100644
|
|
|
|
--- a/arch/arm/cpu/armv7/omap3/board.c
|
|
|
|
+++ b/arch/arm/cpu/armv7/omap3/board.c
|
|
|
|
@@ -61,6 +61,8 @@ u32 omap3_boot_device = BOOT_DEVICE_NAND;
|
|
|
|
/* auto boot mode detection is not possible for OMAP3 - hard code */
|
|
|
|
u32 spl_boot_mode(void)
|
|
|
|
{
|
|
|
|
+ return MMCSD_MODE_FAT;
|
|
|
|
+
|
|
|
|
switch (spl_boot_device()) {
|
|
|
|
case BOOT_DEVICE_MMC2:
|
|
|
|
return MMCSD_MODE_RAW;
|
|
|
|
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
|
|
|
|
index fc2f226..fc60e98 100644
|
|
|
|
--- a/common/spl/spl_mmc.c
|
|
|
|
+++ b/common/spl/spl_mmc.c
|
2013-12-22 19:38:12 +01:00
|
|
|
@@ -11,6 +11,7 @@
|
|
|
|
#include <asm/u-boot.h>
|
|
|
|
#include <mmc.h>
|
|
|
|
#include <fat.h>
|
|
|
|
+#include <ext4fs.h>
|
|
|
|
#include <version.h>
|
|
|
|
#include <image.h>
|
|
|
|
|
2014-01-29 22:22:37 +01:00
|
|
|
@@ -70,6 +71,58 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
|
2013-12-22 19:38:12 +01:00
|
|
|
#endif
|
2012-07-24 16:16:40 +02:00
|
|
|
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
#ifdef CONFIG_SPL_FAT_SUPPORT
|
2013-12-22 19:38:12 +01:00
|
|
|
+static int mmc_load_image_ext2(struct mmc *mmc, const char *filename)
|
2012-07-24 16:16:40 +02:00
|
|
|
+{
|
|
|
|
+ s32 err;
|
|
|
|
+ struct image_header *header;
|
|
|
|
+ int filelen;
|
2013-03-21 10:51:13 +01:00
|
|
|
+ disk_partition_t part_info = {};
|
2012-07-24 16:16:40 +02:00
|
|
|
+
|
|
|
|
+ header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
|
|
|
|
+ sizeof(struct image_header));
|
|
|
|
+
|
2013-03-21 10:51:13 +01:00
|
|
|
+ if (get_partition_info(&mmc->block_dev,
|
|
|
|
+ CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION, &part_info)) {
|
|
|
|
+ printf("spl: no partition table found\n");
|
2013-12-22 19:38:12 +01:00
|
|
|
+ goto end;
|
2013-03-21 10:51:13 +01:00
|
|
|
+ }
|
|
|
|
+
|
2013-12-22 19:38:12 +01:00
|
|
|
+ ext4fs_set_blk_dev(&mmc->block_dev, &part_info);
|
|
|
|
+// err = ext4fs_set_blk_dev(&mmc->block_dev, &part_info);
|
|
|
|
+// if (!err) {
|
|
|
|
+// printf("spl: ext4fs register err - %d\n", err);
|
|
|
|
+// goto end;
|
|
|
|
+// }
|
2012-07-24 16:16:40 +02:00
|
|
|
+
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
+ err = ext4fs_mount(0);
|
2012-07-24 16:16:40 +02:00
|
|
|
+ if (!err) {
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
+ printf("spl: ext4fs mount err - %d\n", err);
|
2013-12-22 19:38:12 +01:00
|
|
|
+ goto end;
|
2012-07-24 16:16:40 +02:00
|
|
|
+ }
|
|
|
|
+
|
2013-12-22 19:38:12 +01:00
|
|
|
+ filelen = err = ext4fs_open(filename);
|
2012-07-24 16:16:40 +02:00
|
|
|
+ if (err < 0) {
|
2013-12-22 19:38:12 +01:00
|
|
|
+ puts("spl: ext4fs_open failed\n");
|
2012-07-24 16:16:40 +02:00
|
|
|
+ goto end;
|
|
|
|
+ }
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
+ err = ext4fs_read((u8 *)header, sizeof(struct image_header));
|
2012-07-24 16:16:40 +02:00
|
|
|
+ if (err <= 0) {
|
2013-12-22 19:38:12 +01:00
|
|
|
+ puts("spl: ext4fs_read failed\n");
|
2012-07-24 16:16:40 +02:00
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ spl_parse_image_header(header);
|
|
|
|
+
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
+ err = ext4fs_read((u8 *)spl_image.load_addr, filelen);
|
2012-07-24 16:16:40 +02:00
|
|
|
+
|
|
|
|
+end:
|
|
|
|
+ if (err <= 0) {
|
|
|
|
+ printf("spl: error reading image %s, err - %d\n",
|
2013-12-22 19:38:12 +01:00
|
|
|
+ filename, err);
|
2012-07-24 16:16:40 +02:00
|
|
|
+ }
|
2013-12-22 19:38:12 +01:00
|
|
|
+ return (err <= 0);
|
2012-07-24 16:16:40 +02:00
|
|
|
+}
|
|
|
|
+
|
2013-12-22 19:38:12 +01:00
|
|
|
static int mmc_load_image_fat(struct mmc *mmc, const char *filename)
|
2012-07-24 16:16:40 +02:00
|
|
|
{
|
2013-12-22 19:38:12 +01:00
|
|
|
int err;
|
2014-01-29 22:22:37 +01:00
|
|
|
@@ -141,7 +194,9 @@ void spl_mmc_load_image(void)
|
|
|
|
hang();
|
2013-12-22 19:38:12 +01:00
|
|
|
}
|
|
|
|
|
2014-01-29 22:22:37 +01:00
|
|
|
- boot_mode = spl_boot_mode();
|
|
|
|
+// boot_mode = spl_boot_mode();
|
2013-12-22 19:38:12 +01:00
|
|
|
+ boot_mode = MMCSD_MODE_FAT; /* Fix OMAP4 boot */
|
2014-01-29 22:22:37 +01:00
|
|
|
+
|
2013-12-22 19:38:12 +01:00
|
|
|
if (boot_mode == MMCSD_MODE_RAW) {
|
|
|
|
debug("boot mode - RAW\n");
|
|
|
|
#ifdef CONFIG_SPL_OS_BOOT
|
|
|
|
@@ -153,19 +208,20 @@ void spl_mmc_load_image(void)
|
2012-07-24 16:16:40 +02:00
|
|
|
} else if (boot_mode == MMCSD_MODE_FAT) {
|
|
|
|
debug("boot mode - FAT\n");
|
2013-12-22 19:38:12 +01:00
|
|
|
|
|
|
|
- err = fat_register_device(&mmc->block_dev,
|
|
|
|
- CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION);
|
|
|
|
- if (err) {
|
|
|
|
+// err = fat_register_device(&mmc->block_dev,
|
|
|
|
+// CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION);
|
|
|
|
+// if (err) {
|
|
|
|
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
|
|
|
|
- printf("spl: fat register err - %d\n", err);
|
|
|
|
+// printf("spl: fat register err - %d\n", err);
|
|
|
|
#endif
|
|
|
|
- hang();
|
|
|
|
- }
|
|
|
|
+// hang();
|
|
|
|
+// }
|
|
|
|
|
|
|
|
#ifdef CONFIG_SPL_OS_BOOT
|
|
|
|
if (spl_start_uboot() || mmc_load_image_fat_os(mmc))
|
|
|
|
#endif
|
|
|
|
- err = mmc_load_image_fat(mmc, CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME);
|
|
|
|
+// err = mmc_load_image_fat(mmc, CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME);
|
2014-01-08 20:09:39 +01:00
|
|
|
+ err = mmc_load_image_ext2(mmc, "u-boot.bin"); /* We use u-boot.bin file on first partition */
|
Accepting request 146560 from Base:System
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
- update to 2012.10:
- refresh patches 0006-ARMV7-hardfp-build-fix.patch, mlo-ext2.patch,
loadaddr-defaults.patch, mx53loco-bootscr.patch
- add sdhc-1.patch, sdhc-2.patch, sdhc-3.patch:
* backport upstream sdhc fixes
OBS-URL: https://build.opensuse.org/request/show/146560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=8
2012-12-28 22:50:19 +01:00
|
|
|
#endif
|
2012-07-24 16:16:40 +02:00
|
|
|
} else {
|
2013-12-22 19:38:12 +01:00
|
|
|
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
|
2014-01-29 22:22:37 +01:00
|
|
|
diff --git a/fs/Makefile b/fs/Makefile
|
|
|
|
index 34dc035..a09ada5 100644
|
|
|
|
--- a/fs/Makefile
|
|
|
|
+++ b/fs/Makefile
|
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
|
|
ifdef CONFIG_SPL_BUILD
|
|
|
|
obj-$(CONFIG_SPL_FAT_SUPPORT) += fat/
|
|
|
|
+obj-$(CONFIG_SPL_FAT_SUPPORT) += ext4/
|
|
|
|
else
|
|
|
|
obj-y += fs.o
|
|
|
|
|
|
|
|
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
|
|
|
|
index c58bc91..7ecae0c 100644
|
|
|
|
--- a/include/configs/omap3_beagle.h
|
|
|
|
+++ b/include/configs/omap3_beagle.h
|
2013-12-22 19:38:12 +01:00
|
|
|
@@ -40,6 +40,7 @@
|
2013-04-17 09:25:52 +02:00
|
|
|
|
|
|
|
#define CONFIG_OF_LIBFDT
|
|
|
|
#define CONFIG_CMD_BOOTZ
|
2013-12-22 19:38:12 +01:00
|
|
|
+#define CONFIG_SUPPORT_RAW_INITRD /* bootz raw initrd support */
|
2013-04-17 09:25:52 +02:00
|
|
|
|
|
|
|
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
|
|
|
|
#define CONFIG_SETUP_MEMORY_TAGS 1
|
2014-01-29 22:22:37 +01:00
|
|
|
@@ -250,7 +251,7 @@
|
2013-12-22 19:38:12 +01:00
|
|
|
"if test $fdtfile = undefined; then " \
|
|
|
|
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
2012-07-24 16:16:40 +02:00
|
|
|
"bootenv=uEnv.txt\0" \
|
|
|
|
- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
2013-12-22 19:38:12 +01:00
|
|
|
+ "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
2012-07-24 16:16:40 +02:00
|
|
|
"importbootenv=echo Importing environment from mmc ...; " \
|
|
|
|
"env import -t $loadaddr $filesize\0" \
|
|
|
|
"ramargs=setenv bootargs console=${console} " \
|
2014-01-29 22:22:37 +01:00
|
|
|
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
|
|
|
|
index d099bfd..24b2ceb 100644
|
|
|
|
--- a/include/configs/omap4_common.h
|
|
|
|
+++ b/include/configs/omap4_common.h
|
|
|
|
@@ -104,10 +104,10 @@
|
2012-07-24 16:16:40 +02:00
|
|
|
"vram=${vram} " \
|
|
|
|
"root=${mmcroot} " \
|
|
|
|
"rootfstype=${mmcrootfstype}\0" \
|
|
|
|
- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
2014-01-08 20:09:39 +01:00
|
|
|
+ "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
2012-07-24 16:16:40 +02:00
|
|
|
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
|
|
|
"source ${loadaddr}\0" \
|
2013-04-17 09:25:52 +02:00
|
|
|
- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
|
2013-12-22 19:38:12 +01:00
|
|
|
+ "loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
|
2013-04-17 09:25:52 +02:00
|
|
|
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
|
|
|
|
"env import -t ${loadaddr} ${filesize}\0" \
|
Accepting request 174405 from Base:System
- add support for cubieboard, hyundaia7hd, melea1000
- update to 2013.04
* no upstream changelog available
- remove dead u-boot-raspberrypi* (actually called rpib now)
- add rpib variant
- add support for cubieboard, hyundaia7hd, melea1000
- update to 2013.04
* no upstream changelog available
- remove dead u-boot-raspberrypi* (actually called rpib now)
- add rpib variant
- add support for cubieboard, hyundaia7hd, melea1000
- update to 2013.04
* no upstream changelog available
- remove dead u-boot-raspberrypi* (actually called rpib now)
- add rpib variant
- add support for cubieboard, hyundaia7hd, melea1000
- update to 2013.04
* no upstream changelog available
- remove dead u-boot-raspberrypi* (actually called rpib now)
- add rpib variant
- add support for cubieboard, hyundaia7hd, melea1000
OBS-URL: https://build.opensuse.org/request/show/174405
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=13
2013-05-07 07:38:13 +02:00
|
|
|
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|