summaryrefslogtreecommitdiff
path: root/target/foxg20
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-02-23 22:28:04 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-02-23 22:28:04 +0100
commit86d7ffda38b870dc96035feb4788ae1589aab11c (patch)
treef059bcc2b8a26525e791c12e3ea4f28d0bd77822 /target/foxg20
parent488a2ab4bcb764ee9f4c50cbe31627b6e0c7d881 (diff)
optimize foxg20 target
- make cfgfs work, a small busybox fdisk patch needed - make adkinstall and adkupdate work
Diffstat (limited to 'target/foxg20')
-rw-r--r--target/foxg20/Makefile14
-rw-r--r--target/foxg20/patches/foxg20.patch47
2 files changed, 49 insertions, 12 deletions
diff --git a/target/foxg20/Makefile b/target/foxg20/Makefile
index e4349d7c1..5e5e05316 100644
--- a/target/foxg20/Makefile
+++ b/target/foxg20/Makefile
@@ -10,13 +10,17 @@ include $(TOPDIR)/mk/image.mk
LOADADDR:= 0x20008000
kernel-install:
- gzip -v9 < $(LINUX_DIR)/arch/arm/boot/Image > ${BUILD_DIR}/Image.gz
+ gzip -9 < $(LINUX_DIR)/arch/arm/boot/Image > ${BUILD_DIR}/Image.gz
mkimage -A arm -O linux -T kernel -C gzip \
-a ${LOADADDR} -e ${LOADADDR} -d ${BUILD_DIR}/Image.gz \
- -n foxg20 $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
+ -n foxg20 $(TARGET_DIR)/boot/uImage $(MAKE_TRACE)
+ @cp $(TARGET_DIR)/boot/uImage \
+ $(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel
ifeq ($(FS),nfsroot)
imageinstall: ${BIN_DIR}/${ROOTFSUSERTARBALL}
+ @cp $(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel \
+ $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
@echo
@echo 'Type dhcp via u-boot prompt to load kernel'
@echo 'After that type bootm to load the kernel'
@@ -24,10 +28,10 @@ imageinstall: ${BIN_DIR}/${ROOTFSUSERTARBALL}
endif
ifeq ($(FS),ext2-block)
-imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
+imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@echo
- @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
- @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSUSERTARBALL)"
+ @echo "The RootFS tarball is:"
+ @echo "$(BIN_DIR)/$(ROOTFSUSERTARBALL)"
@echo 'Before booting from MicroSD card you need to set following u-boot environment variables:'
@echo "setenv bootcmd 'mmc init; sleep 1; fatload mmc 0 0x22000000 uimage; bootm 0x22000000'"
@echo
diff --git a/target/foxg20/patches/foxg20.patch b/target/foxg20/patches/foxg20.patch
index 31cc30371..bda411c98 100644
--- a/target/foxg20/patches/foxg20.patch
+++ b/target/foxg20/patches/foxg20.patch
@@ -1,6 +1,18 @@
+diff -Nur linux-2.6.32.2.orig/arch/arm/include/asm/setup.h linux-2.6.32.2/arch/arm/include/asm/setup.h
+--- linux-2.6.32.2.orig/arch/arm/include/asm/setup.h 2009-12-18 23:27:07.000000000 +0100
++++ linux-2.6.32.2/arch/arm/include/asm/setup.h 2010-02-23 21:40:33.000000000 +0100
+@@ -18,6 +18,8 @@
+
+ #define COMMAND_LINE_SIZE 1024
+
++const char *get_system_type(void);
++
+ /* The list ends with an ATAG_NONE node. */
+ #define ATAG_NONE 0x00000000
+
diff -Nur linux-2.6.32.2.orig/arch/arm/Kconfig linux-2.6.32.2/arch/arm/Kconfig
--- linux-2.6.32.2.orig/arch/arm/Kconfig 2009-12-18 23:27:07.000000000 +0100
-+++ linux-2.6.32.2/arch/arm/Kconfig 2010-02-17 19:41:01.000000000 +0100
++++ linux-2.6.32.2/arch/arm/Kconfig 2010-02-23 21:18:53.000000000 +0100
@@ -18,6 +18,9 @@
select HAVE_KRETPROBES if (HAVE_KPROBES)
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
@@ -11,9 +23,25 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/Kconfig linux-2.6.32.2/arch/arm/Kconfig
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
+diff -Nur linux-2.6.32.2.orig/arch/arm/kernel/setup.c linux-2.6.32.2/arch/arm/kernel/setup.c
+--- linux-2.6.32.2.orig/arch/arm/kernel/setup.c 2009-12-18 23:27:07.000000000 +0100
++++ linux-2.6.32.2/arch/arm/kernel/setup.c 2010-02-23 21:29:01.000000000 +0100
+@@ -806,8 +806,12 @@
+
+ static int c_show(struct seq_file *m, void *v)
+ {
++ unsigned long n = (unsigned long) v - 1;
+ int i;
+
++ if (n == 0)
++ seq_printf(m, "system type\t\t: %s\n", get_system_type());
++
+ seq_printf(m, "Processor\t: %s rev %d (%s)\n",
+ cpu_name, read_cpuid_id() & 15, elf_platform);
+
diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6.32.2/arch/arm/mach-at91/at91sam9260_devices.c
--- linux-2.6.32.2.orig/arch/arm/mach-at91/at91sam9260_devices.c 2009-12-18 23:27:07.000000000 +0100
-+++ linux-2.6.32.2/arch/arm/mach-at91/at91sam9260_devices.c 2010-02-17 19:41:01.000000000 +0100
++++ linux-2.6.32.2/arch/arm/mach-at91/at91sam9260_devices.c 2010-02-23 21:18:53.000000000 +0100
@@ -454,7 +454,15 @@
.sda_is_open_drain = 1,
.scl_pin = AT91_PIN_PA24,
@@ -32,8 +60,8 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6
static struct platform_device at91sam9260_twi_device = {
diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c linux-2.6.32.2/arch/arm/mach-at91/board-foxg20.c
--- linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.32.2/arch/arm/mach-at91/board-foxg20.c 2010-02-17 19:41:01.000000000 +0100
-@@ -0,0 +1,371 @@
++++ linux-2.6.32.2/arch/arm/mach-at91/board-foxg20.c 2010-02-23 21:33:34.000000000 +0100
+@@ -0,0 +1,376 @@
+/*
+ * Copyright (C) 2005 SAN People
+ * Copyright (C) 2008 Atmel
@@ -100,6 +128,11 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c linux-2.6.32.2/a
+/* #define FOX_USART4 */
+/* #define FOX_USART5 */
+
++const char *get_system_type(void)
++{
++ return "FoxBoard FOXG20";
++}
++
+static void __init foxg20_map_io(void)
+{
+ /* Initialize processor: 18.432 MHz crystal */
@@ -407,7 +440,7 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/board-foxg20.c linux-2.6.32.2/a
+MACHINE_END
diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Kconfig linux-2.6.32.2/arch/arm/mach-at91/Kconfig
--- linux-2.6.32.2.orig/arch/arm/mach-at91/Kconfig 2009-12-18 23:27:07.000000000 +0100
-+++ linux-2.6.32.2/arch/arm/mach-at91/Kconfig 2010-02-17 19:41:01.000000000 +0100
++++ linux-2.6.32.2/arch/arm/mach-at91/Kconfig 2010-02-23 21:18:53.000000000 +0100
@@ -333,6 +333,13 @@
Select this if you are using a Eukrea Electromatique's
CPU9G20 Board <http://www.eukrea.com/>
@@ -440,7 +473,7 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Kconfig linux-2.6.32.2/arch/arm
(8 and 16 bit data bus width).
diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Makefile linux-2.6.32.2/arch/arm/mach-at91/Makefile
--- linux-2.6.32.2.orig/arch/arm/mach-at91/Makefile 2009-12-18 23:27:07.000000000 +0100
-+++ linux-2.6.32.2/arch/arm/mach-at91/Makefile 2010-02-17 19:41:01.000000000 +0100
++++ linux-2.6.32.2/arch/arm/mach-at91/Makefile 2010-02-23 21:18:53.000000000 +0100
@@ -65,6 +65,9 @@
# AT91SAM9G45 board-specific support
obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o
@@ -453,7 +486,7 @@ diff -Nur linux-2.6.32.2.orig/arch/arm/mach-at91/Makefile linux-2.6.32.2/arch/ar
diff -Nur linux-2.6.32.2.orig/drivers/mmc/host/at91_mci.c linux-2.6.32.2/drivers/mmc/host/at91_mci.c
--- linux-2.6.32.2.orig/drivers/mmc/host/at91_mci.c 2009-12-18 23:27:07.000000000 +0100
-+++ linux-2.6.32.2/drivers/mmc/host/at91_mci.c 2010-02-17 19:41:01.000000000 +0100
++++ linux-2.6.32.2/drivers/mmc/host/at91_mci.c 2010-02-23 21:18:53.000000000 +0100
@@ -461,7 +461,7 @@
at91_mci_write(host, AT91_MCI_DTOR, AT91_MCI_DTOMUL_1M | AT91_MCI_DTOCYC);
mr = AT91_MCI_PDCMODE | 0x34a;