summaryrefslogtreecommitdiff
path: root/packages/arm-kernel-shim
diff options
context:
space:
mode:
Diffstat (limited to 'packages/arm-kernel-shim')
-rw-r--r--packages/arm-kernel-shim/arm-kernel-shim_1.2.bb52
-rw-r--r--packages/arm-kernel-shim/arm-kernel-shim_1.3.bb75
-rw-r--r--packages/arm-kernel-shim/files/config-dsmg600.h5
-rw-r--r--packages/arm-kernel-shim/files/config-fsg3.h5
-rw-r--r--packages/arm-kernel-shim/files/config-nas100d.h7
-rw-r--r--packages/arm-kernel-shim/files/config-nslu2.h7
-rw-r--r--packages/arm-kernel-shim/files/disable-commandline.patch28
-rw-r--r--packages/arm-kernel-shim/files/place-boot-section.patch12
8 files changed, 97 insertions, 94 deletions
diff --git a/packages/arm-kernel-shim/arm-kernel-shim_1.2.bb b/packages/arm-kernel-shim/arm-kernel-shim_1.2.bb
deleted file mode 100644
index aa7c7cd64c..0000000000
--- a/packages/arm-kernel-shim/arm-kernel-shim_1.2.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-DESCRIPTION = "ARM Kernel Shim"
-SECTION = ""
-PRIORITY = "optional"
-HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
-LICENSE = "GPL"
-PR = "r1"
-
-COMPATIBLE_MACHINE = "(ixp4xx|nslu2)"
-
-SRC_URI = "ftp://ftp.buici.com/pub/arm/arm-kernel-shim/arm-kernel-shim-${PV}.tar.gz \
- file://place-boot-section.patch;patch=1 \
- file://config-nslu2.h \
- file://config-nas100d.h \
- file://config-dsmg600.h \
- file://config-fsg3.h"
-
-S = ${WORKDIR}/arm-kernel-shim-${PV}
-
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
-
-oe_runmake() {
- mv ${S}/config.h ${S}/config.h.orig
- # NSLU2
- cp ${WORKDIR}/config-nslu2.h ${S}/config.h
- rm -f ${S}/main.o
- oenote make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
- make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
- # NAS100d
- cp ${WORKDIR}/config-nas100d.h ${S}/config.h
- rm -f ${S}/main.o
- oenote make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
- make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
- # DSMG-600
- cp ${WORKDIR}/config-dsmg600.h ${S}/config.h
- rm -f ${S}/main.o
- oenote make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
- make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
- # FSG-3
- cp ${WORKDIR}/config-fsg3.h ${S}/config.h
- rm -f ${S}/main.o
- oenote make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
- make ${PARALLEL_MAKE} TOOLS=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
- mv ${S}/config.h.orig ${S}/config.h
-}
-
-do_populate_staging() {
- install -d ${STAGING_LOADER_DIR}
- cp ${S}/arm-kernel-shim-nslu2.bin ${STAGING_LOADER_DIR}/
- cp ${S}/arm-kernel-shim-nas100d.bin ${STAGING_LOADER_DIR}/
- cp ${S}/arm-kernel-shim-dsmg600.bin ${STAGING_LOADER_DIR}/
- cp ${S}/arm-kernel-shim-fsg3.bin ${STAGING_LOADER_DIR}/
-}
diff --git a/packages/arm-kernel-shim/arm-kernel-shim_1.3.bb b/packages/arm-kernel-shim/arm-kernel-shim_1.3.bb
new file mode 100644
index 0000000000..a4f5f8f7e9
--- /dev/null
+++ b/packages/arm-kernel-shim/arm-kernel-shim_1.3.bb
@@ -0,0 +1,75 @@
+DESCRIPTION = "ARM Kernel Shim"
+SECTION = ""
+PRIORITY = "optional"
+HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
+LICENSE = "GPL"
+PR = "r2"
+
+COMPATIBLE_MACHINE = "(ixp4xx|nslu2)"
+
+SRC_URI = "ftp://ftp.buici.com/pub/arm/arm-kernel-shim/arm-kernel-shim-${PV}.tar.gz \
+ file://config-nslu2.h \
+ file://config-nas100d.h \
+ file://config-dsmg600.h \
+ file://config-fsg3.h"
+
+S = ${WORKDIR}/arm-kernel-shim-${PV}/${PV}
+
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+
+oe_runmake() {
+ mv ${S}/config.h ${S}/config.h.orig
+ # NSLU2
+ if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
+ ${WORKDIR}/config-nslu2.h > ${S}/config.h
+ else
+ sed -e 's|//#define FORCE_LITTLEENDIAN|#define FORCE_LITTLEENDIAN|' \
+ ${WORKDIR}/config-nslu2.h > ${S}/config.h
+ fi
+ rm -f ${S}/main.o
+ oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
+ make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
+ # NAS100d
+ if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
+ ${WORKDIR}/config-nas100d.h > ${S}/config.h
+ else
+ sed -e 's|//#define FORCE_LITTLEENDIAN|#define FORCE_LITTLEENDIAN|' \
+ ${WORKDIR}/config-nas100d.h > ${S}/config.h
+ fi
+ rm -f ${S}/main.o
+ oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
+ make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
+ # DSMG-600
+ if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
+ ${WORKDIR}/config-dsmg600.h > ${S}/config.h
+ else
+ sed -e 's|//#define FORCE_LITTLEENDIAN|#define FORCE_LITTLEENDIAN|' \
+ ${WORKDIR}/config-dsmg600.h > ${S}/config.h
+ fi
+ rm -f ${S}/main.o
+ oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
+ make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
+ # FSG-3
+ if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
+ ${WORKDIR}/config-fsg3.h > ${S}/config.h
+ else
+ sed -e 's|//#define FORCE_LITTLEENDIAN|#define FORCE_LITTLEENDIAN|' \
+ ${WORKDIR}/config-fsg3.h > ${S}/config.h
+ fi
+ rm -f ${S}/main.o
+ oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
+ make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
+ mv ${S}/config.h.orig ${S}/config.h
+}
+
+do_populate_staging() {
+ install -d ${STAGING_LOADER_DIR}
+ cp ${S}/arm-kernel-shim-nslu2.bin ${STAGING_LOADER_DIR}/
+ cp ${S}/arm-kernel-shim-nas100d.bin ${STAGING_LOADER_DIR}/
+ cp ${S}/arm-kernel-shim-dsmg600.bin ${STAGING_LOADER_DIR}/
+ cp ${S}/arm-kernel-shim-fsg3.bin ${STAGING_LOADER_DIR}/
+}
diff --git a/packages/arm-kernel-shim/files/config-dsmg600.h b/packages/arm-kernel-shim/files/config-dsmg600.h
index cd331159e0..56b4035408 100644
--- a/packages/arm-kernel-shim/files/config-dsmg600.h
+++ b/packages/arm-kernel-shim/files/config-dsmg600.h
@@ -27,4 +27,9 @@
#define MACH_TYPE 964
+/* Uncomment one of these if you need to switch the CPU into a
+ specific mode. */
+//#define FORCE_LITTLEENDIAN
+//#define FORCE_BIGENDIAN
+
#endif /* __CONFIG_H__ */
diff --git a/packages/arm-kernel-shim/files/config-fsg3.h b/packages/arm-kernel-shim/files/config-fsg3.h
index e2cdf8abd4..08684d708e 100644
--- a/packages/arm-kernel-shim/files/config-fsg3.h
+++ b/packages/arm-kernel-shim/files/config-fsg3.h
@@ -27,4 +27,9 @@
#define MACH_TYPE 1091
+/* Uncomment one of these if you need to switch the CPU into a
+ specific mode. */
+//#define FORCE_LITTLEENDIAN
+//#define FORCE_BIGENDIAN
+
#endif /* __CONFIG_H__ */
diff --git a/packages/arm-kernel-shim/files/config-nas100d.h b/packages/arm-kernel-shim/files/config-nas100d.h
index 4389644cf0..846161d016 100644
--- a/packages/arm-kernel-shim/files/config-nas100d.h
+++ b/packages/arm-kernel-shim/files/config-nas100d.h
@@ -23,8 +23,13 @@
//#define RAM_BANK1_LENGTH 0x10000000
#define COMMANDLINE\
- "init=/linuxrc root=/dev/mtdblock2 rootfstype=jffs rw noirqdebug console=ttyS0,115200n8"
+ "init=/linuxrc root=/dev/mtdblock2 rootfstype=jffs2 rw noirqdebug console=ttyS0,115200n8"
#define MACH_TYPE 865
+/* Uncomment one of these if you need to switch the CPU into a
+ specific mode. */
+//#define FORCE_LITTLEENDIAN
+//#define FORCE_BIGENDIAN
+
#endif /* __CONFIG_H__ */
diff --git a/packages/arm-kernel-shim/files/config-nslu2.h b/packages/arm-kernel-shim/files/config-nslu2.h
index 2262b57668..d641523841 100644
--- a/packages/arm-kernel-shim/files/config-nslu2.h
+++ b/packages/arm-kernel-shim/files/config-nslu2.h
@@ -23,8 +23,13 @@
//#define RAM_BANK1_LENGTH 0x10000000
#define COMMANDLINE\
- "init=/linuxrc root=/dev/mtdblock4 rootfstype=jffs rw noirqdebug console=ttyS0,115200n8"
+ "init=/linuxrc root=/dev/mtdblock4 rootfstype=jffs2 rw noirqdebug console=ttyS0,115200n8"
#define MACH_TYPE 597
+/* Uncomment one of these if you need to switch the CPU into a
+ specific mode. */
+//#define FORCE_LITTLEENDIAN
+//#define FORCE_BIGENDIAN
+
#endif /* __CONFIG_H__ */
diff --git a/packages/arm-kernel-shim/files/disable-commandline.patch b/packages/arm-kernel-shim/files/disable-commandline.patch
deleted file mode 100644
index d8c59f1a6b..0000000000
--- a/packages/arm-kernel-shim/files/disable-commandline.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- arm-kernel-shim/main.c~ 2006-07-21 11:12:07.000000000 +0930
-+++ arm-kernel-shim/main.c 2007-01-28 11:56:35.000000000 +1030
-@@ -47,7 +47,9 @@
-
- #define NAKED __attribute__((naked))
-
-+#if defined (COMMANDLINE)
- const char __attribute__((section(".rodata"))) cmdline[] = COMMANDLINE;
-+#endif
-
- void NAKED __attribute__((section(".boot"))) boot (u32 r0, u32 r1, u32 r2)
- {
-@@ -82,6 +84,7 @@
- pv += H_SIZE(pv)*4;
- #endif
-
-+#if defined (COMMANDLINE)
- /* Command line */
- H_SIZE(pv) = tag_size(tag_cmdline) + (sizeof (cmdline)+1+3)/4;
- H_TAG(pv) = ATAG_CMDLINE;
-@@ -91,6 +94,7 @@
- P_CMDLINE(pv)->cmdline[i] = cmdline[i];
- }
- pv += H_SIZE(pv)*4;
-+#endif
-
- /* End */
- H_SIZE(pv) = 0;
diff --git a/packages/arm-kernel-shim/files/place-boot-section.patch b/packages/arm-kernel-shim/files/place-boot-section.patch
deleted file mode 100644
index 6e6c9460a5..0000000000
--- a/packages/arm-kernel-shim/files/place-boot-section.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- arm-kernel-shim-1.2/Makefile~ 2007-02-06 16:44:31.000000000 +1030
-+++ arm-kernel-shim-1.2/Makefile 2007-02-06 16:56:12.000000000 +1030
-@@ -9,7 +9,8 @@
- OBJCOPY=$(TOOLS)objcopy
-
- CFLAGS:=-g -Os -nostartfiles -nostdlib
--LDFLAGS:= -g -X -Map shim.map -Ttext 0
-+# LDFLAGS:= -g -X -Map shim.map -Ttext 0
-+LDFLAGS:= -g -X -Map shim.map -Ttext 0 --section-start .boot=1fb
-
- SRCS:= shim.lds main.c
- OBJS:=$(SRCS:.c=.o)