diff options
| author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-03-25 15:47:54 +0000 |
|---|---|---|
| committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-03-25 15:47:54 +0000 |
| commit | 85e3e7265be8389f65c52f4585ad9b4667c96dc2 (patch) | |
| tree | b10bfe0154668dbf0a322f7a379bab1f549da6db | |
| parent | c6422207156a33edaf2d8dd72a37ef2d7ce7e966 (diff) | |
| download | openembedded-core-85e3e7265be8389f65c52f4585ad9b4667c96dc2.tar.gz openembedded-core-85e3e7265be8389f65c52f4585ad9b4667c96dc2.tar.bz2 openembedded-core-85e3e7265be8389f65c52f4585ad9b4667c96dc2.zip | |
u-boot-mkimage-native: use 1.3.2 version instead of Openmoko patched version
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4114 311d38ba-8fff-0310-9ca6-ca027cbcb966
63 files changed, 38 insertions, 26672 deletions
diff --git a/meta/packages/uboot/files/fix-arm920t-eabi.patch b/meta/packages/uboot/files/fix-arm920t-eabi.patch index 9896388c8f..69cb75891d 100644 --- a/meta/packages/uboot/files/fix-arm920t-eabi.patch +++ b/meta/packages/uboot/files/fix-arm920t-eabi.patch @@ -1,6 +1,19 @@ ---- /tmp/config.mk 2007-02-14 17:23:15.000000000 +0100 -+++ git/cpu/arm920t/config.mk 2007-02-14 17:23:38.475251000 +0100 -@@ -30,5 +30,5 @@ +--- + cpu/arm920t/config.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- u-boot-1.3.2.orig/cpu/arm920t/config.mk ++++ u-boot-1.3.2/cpu/arm920t/config.mk +@@ -22,13 +22,13 @@ + # + + PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \ + -msoft-float + +-PLATFORM_CPPFLAGS += -march=armv4 ++#PLATFORM_CPPFLAGS += -march=armv4 + # ========================================================================= + # # Supply options according to compiler version # # ========================================================================= diff --git a/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb b/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb new file mode 100644 index 0000000000..38dd700d08 --- /dev/null +++ b/meta/packages/uboot/u-boot-mkimage-native_1.3.2.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "U-boot bootloader mkimage tool" +LICENSE = "GPL" +SECTION = "bootloader" + +SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ + file://fix-arm920t-eabi.patch;patch=1" + +S = "${WORKDIR}/u-boot-${PV}" + +inherit native + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" + +do_compile () { + oe_runmake smdk2410_config + oe_runmake tools +} + +do_stage () { + install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage + ln -sf ${STAGING_BINDIR_NATIVE}/uboot-mkimage ${STAGING_BINDIR_NATIVE}/mkimage +} diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch deleted file mode 100644 index d7a2a872e5..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-create-optional.patch +++ /dev/null @@ -1,52 +0,0 @@ -This patch makes creation of the BBT optional for the s3c24x0 platform. -It adds: - -- a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT -- one user of this flag, namely s3c24x0 - -Experimental. - -- Werner Almesberger <werner@openmoko.org> - - -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:29.000000000 +0100 -+++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:54.000000000 +0100 -@@ -169,7 +169,7 @@ - - nand->eccmode = NAND_ECC_SOFT; - #ifdef CONFIG_S3C2410_NAND_BBT -- nand->options = NAND_USE_FLASH_BBT; -+ nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; - #else - nand->options = 0; - #endif -Index: u-boot/drivers/nand/nand_bbt.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:36.000000000 +0100 -+++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 -@@ -678,7 +678,8 @@ - } - create: - /* Create the bad block table by scanning the device ? */ -- if (!(td->options & NAND_BBT_CREATE)) -+ if (!(td->options & NAND_BBT_CREATE) || -+ (this->options & NAND_DONT_CREATE_BBT)) - continue; - - /* Create the table in memory by scanning the chip(s) */ -Index: u-boot/include/linux/mtd/nand.h -=================================================================== ---- u-boot.orig/include/linux/mtd/nand.h 2007-02-16 23:53:08.000000000 +0100 -+++ u-boot/include/linux/mtd/nand.h 2007-02-16 23:53:54.000000000 +0100 -@@ -187,7 +187,8 @@ - * This can only work if we have the ecc bytes directly behind the - * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ - #define NAND_HWECC_SYNDROME 0x00020000 -- -+/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */ -+#define NAND_DONT_CREATE_BBT 0x00040000 - - /* Options set by nand scan */ - /* Nand scan has allocated oob_buf */ diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-scan-second.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-scan-second.patch deleted file mode 100644 index 37b2807908..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/bbt-scan-second.patch +++ /dev/null @@ -1,69 +0,0 @@ -Scan also the second OOB page for bad block information. - -board/neo1973/gta01/nand.c (board_nand_init): added board-specific badblock - pattern which sets NAND_BBT_SCAN2NDPAGE -drivers/nand/nand_base.c (nand_block_bad): also consider the second page in a - block if NAND_BBT_SCAN2NDPAGE is set - -- Werner Almesberger <werner@openmoko.org> - -Index: u-boot/board/neo1973/gta01/nand.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/nand.c -+++ u-boot/board/neo1973/gta01/nand.c -@@ -113,9 +113,23 @@ - } - - -+/* Derived from drivers/nand/nand_bbt.c:smallpage_flashbased */ -+ -+static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; -+ -+static struct nand_bbt_descr badblock_pattern = { -+ .options = -+ NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES | NAND_BBT_SCAN2NDPAGE, -+ .offs = 5, -+ .len = 1, -+ .pattern = scan_ff_pattern -+}; -+ -+ - int board_nand_init(struct nand_chip *nand) - { - nand->read_otp = samsung_nand_read_otp; - nand->write_otp = samsung_nand_write_otp; -+ nand->badblock_pattern = &badblock_pattern; - return s3c24x0_nand_init(nand); - } -Index: u-boot/drivers/nand/nand_base.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_base.c -+++ u-boot/drivers/nand/nand_base.c -@@ -421,7 +421,7 @@ - * - * Check, if the block is bad. - */ --static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) -+static int nand_block_bad_page(struct mtd_info *mtd, loff_t ofs, int getchip) - { - int page, chipnr, res = 0; - struct nand_chip *this = mtd->priv; -@@ -460,6 +460,18 @@ - return res; - } - -+static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ if (nand_block_bad_page(mtd, ofs, getchip)) -+ return 1; -+ if (this->badblock_pattern->options & NAND_BBT_SCAN2NDPAGE && -+ nand_block_bad_page(mtd, ofs+(1 << this->page_shift), getchip)) -+ return 1; -+ return 0; -+} -+ - /** - * nand_default_block_markbad - [DEFAULT] mark a block bad - * @mtd: MTD device structure diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-and-nand.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-and-nand.patch deleted file mode 100644 index fa0de39ab7..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-and-nand.patch +++ /dev/null @@ -1,98 +0,0 @@ -Auto-detect whether we're booting from RAM or NAND, and act accordingly. This -allows us to use the same u-boot binary for all boot modes. - -include/configs/neo1973.h: introduced new config option - CONFIG_LL_INIT_NAND_ONLY to perform low-level initialization only when - booting from NAND -include/configs/neo1973.h: got rid of BUILD_FOR_RAM -cpu/arm920t/start.S: detect if we need to boot from NAND at run time (i.e., if - we're running at address 0) - -- Werner Almesberger <werner@openmoko.org> - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -157,18 +157,26 @@ - str r1, [r0] - #endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ - -- /* -- * we do sys-critical inits only at reboot, -- * not when booting from ram! -- */ - #ifndef CONFIG_SKIP_LOWLEVEL_INIT -+#ifndef CONFIG_LL_INIT_NAND_ONLY - bl cpu_init_crit - #endif -+#endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT --#ifndef CONFIG_S3C2410_NAND_BOOT --relocate: /* relocate U-Boot to RAM */ - adr r0, _start /* r0 <- current position of code */ -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+ /* are we running from NAND ? */ -+#define BWSCON 0x48000000 -+ ldr r1, =BWSCON /* Z = CPU booted from NAND */ -+ ldr r1, [r1] -+ tst r1, #6 /* BWSCON[2:1] = OM[1:0] */ -+ teqeq r0, #0 /* Z &= running at address 0 */ -+ beq nand_load -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -+ -+relocate: /* relocate U-Boot to RAM */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ - cmp r0, r1 /* don't reloc during debug */ - beq done_relocate -@@ -188,10 +196,13 @@ - ldr pc, _done_relocate /* jump to relocated code */ - _done_relocate: - .word done_relocate --done_relocate: --#else /* NAND_BOOT */ --relocate: --copy_myself: -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+nand_load: -+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) -+ bl cpu_init_crit -+#endif -+ - /* mov r10, lr */ - - @ reset NAND -@@ -275,7 +286,8 @@ - #endif - 1: b 1b - done_nand_read: --#endif /* NAND_BOOT */ -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -+done_relocate: - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -26,14 +26,10 @@ - #ifndef __CONFIG_H - #define __CONFIG_H - --#if defined(BUILD_FOR_RAM) --/* If we want to start u-boot from inside RAM */ --#define CONFIG_SKIP_LOWLEVEL_INIT 1 --#else --/* we want to start u-boot directly from within NAND flash */ -+/* we want to be able to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY - #define CONFIG_S3C2410_NAND_BOOT 1 - #define CONFIG_S3C2410_NAND_SKIP_BAD 1 --#endif - - #define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ - diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-reloc.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-reloc.patch deleted file mode 100644 index 53a3e05c67..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-from-ram-reloc.patch +++ /dev/null @@ -1,62 +0,0 @@ -This patch allows us to boot from anywhere in RAM. It mainly sets the stage -for later patches. The only real changes here is the better handling of already -cached code (e.g., if we were started by a previous instance of u-boot), and -that we drop CONFIG_SKIP_RELOCATE_UBOOT from neo1973.h - -cpu/arm920t/start.S: if not relocating, instead of going straight to - stack_setup, jump to done_relocate, which may perform other setup tasks -cpu/arm920t/start.S: after relocating, flush the cache and jump to the new code -include/configs/neo1973.h: remove CONFIG_SKIP_RELOCATE_UBOOT - -- Werner Almesberger <werner@openmoko.org> - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -171,7 +171,7 @@ relocate: /* relocate U-Boot to RAM - adr r0, _start /* r0 <- current position of code */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ - cmp r0, r1 /* don't reloc during debug */ -- beq stack_setup -+ beq done_relocate - - ldr r2, _armboot_start - ldr r3, _bss_start -@@ -181,8 +181,14 @@ relocate: /* relocate U-Boot to RAM - copy_loop: - ldmia r0!, {r3-r10} /* copy from source address [r0] */ - stmia r1!, {r3-r10} /* copy to target address [r1] */ -- cmp r0, r2 /* until source end addreee [r2] */ -+ cmp r0, r2 /* until source end address [r2] */ - ble copy_loop -+ mov r0, #0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c7, c7, 0 -+ ldr pc, _done_relocate /* jump to relocated code */ -+_done_relocate: -+ .word done_relocate -+done_relocate: - #else /* NAND_BOOT */ - relocate: - copy_myself: -@@ -270,7 +276,7 @@ notmatch: - 1: b 1b - done_nand_read: - #endif /* NAND_BOOT */ --#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ -+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ - stack_setup: -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -28,7 +28,6 @@ - - #if defined(BUILD_FOR_RAM) - /* If we want to start u-boot from inside RAM */ --#define CONFIG_SKIP_RELOCATE_UBOOT 1 - #define CONFIG_SKIP_LOWLEVEL_INIT 1 - #else - /* we want to start u-boot directly from within NAND flash */ diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-menu.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-menu.patch deleted file mode 100644 index 352967ae06..0000000000 --- a/meta/packages/uboot/u-boot-mkimage-openmoko-native/boot-menu.patch +++ /dev/null @@ -1,769 +0,0 @@ -board/neo1973/bootmenu.c: simple configurable boot menu -board/neo1973/neo1973.c (neo1973_new_second): return 1 if a new second has - started since the last call -board/neo1973/neo1973.c (neo1973_on_key_pressed): return 1 if the $POWER key is - pressed -board/neo1973/neo1973.c (board_late_init): make use of neo1973_new_second and - neo1973_on_key_pressed -board/neo1973/neo1973.h: added function prototypes -u-boot/board/neo1973/neo1973.c (board_late_init): enter the boot menu when - "AUX" was pressed at least half the time -u-boot/board/neo1973/neo1973.c (board_late_init): minor code cleanup -u-boot/common/console.c, include/console.h: added "console_poll_hook" to be - called when waiting for console in put in "getc" and "tstc" -board/neo1973/neo1973.c (board_late_init): poll for the boot menu also on RAM - boot, reset, or unknown cause -board/neo1973/neo1973.c (board_late_init): don't look for the power key if - woken up by the charger -board/neo1973/neo1973.h, board/neo1973/neo1973.c, board/neo1973/bootmenu.c: - renamed neo1973_911_key_pressed to neo1973_aux_key_pressed - -- Werner Almesberger <werner@openmoko.org> - -Index: u-boot/board/neo1973/common/bootmenu.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/bootmenu.c -@@ -0,0 +1,120 @@ -+/* -+ * bootmenu.c - Boot menu -+ * -+ * Copyright (C) 2006-2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger <werner@openmoko.org> -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. |
