aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/apex
diff options
context:
space:
mode:
Diffstat (limited to 'package/boot/apex')
-rw-r--r--package/boot/apex/Makefile62
-rw-r--r--package/boot/apex/patches/001-compile_fix.patch20
-rw-r--r--package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch23
-rw-r--r--package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch23
-rw-r--r--package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch23
-rw-r--r--package/boot/apex/patches/150-limit_ram_to_64mb.patch22
-rw-r--r--package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch20
7 files changed, 193 insertions, 0 deletions
diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile
new file mode 100644
index 0000000..f154f96
--- /dev/null
+++ b/package/boot/apex/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2006-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=apex
+PKG_VERSION:=1.6.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
+PKG_MD5SUM:=9606cf2e3fd2c9a86fe0b61388509a30
+PKG_TARGETS:=bin
+
+include $(INCLUDE_DIR)/package.mk
+
+export GCC_HONOUR_COPTS=s
+
+define Package/apex
+ SECTION:=boot
+ CATEGORY:=Boot Loaders
+ DEPENDS:=@TARGET_ixp4xx
+ DEFAULT:=y
+ TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others
+ URL:=http://wiki.buici.com/wiki/Apex_Bootloader
+endef
+
+define build_apex
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ ARCH=arm \
+ $(1)_config
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ KBUILD_HAVE_NLS=no \
+ ARCH=arm \
+ clean all
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin
+endef
+
+define Build/Compile
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/out
+ $(call build_apex,slugos-nslu2-armeb,nslu2-armeb)
+ $(call build_apex,slugos-nslu2-16mb-armeb,nslu2-16mb-armeb)
+ $(call build_apex,slugos-fsg3-armeb,fsg3-armeb)
+ $(call build_apex,slugos-nas100d-armeb,nas100d-armeb)
+endef
+
+define Package/apex/install
+ $(INSTALL_DIR) $(STAGING_DIR)/apex
+ $(CP) $(PKG_BUILD_DIR)/out/*.bin $(1)/
+endef
+
+define Build/InstallDev
+ $(CP) $(PKG_BUILD_DIR)/out/*.bin $(KERNEL_BUILD_DIR)
+endef
+
+$(eval $(call BuildPackage,apex))
diff --git a/package/boot/apex/patches/001-compile_fix.patch b/package/boot/apex/patches/001-compile_fix.patch
new file mode 100644
index 0000000..8a25de6
--- /dev/null
+++ b/package/boot/apex/patches/001-compile_fix.patch
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -444,7 +444,7 @@ ifeq ($(config-targets),1)
+ include $(srctree)/src/arch-$(SRCARCH)/Makefile
+ export KBUILD_DEFCONFIG
+
+-config %config: scripts_basic outputmakefile FORCE
++%config: scripts_basic outputmakefile FORCE
+ $(Q)mkdir -p include/linux include/config
+ $(Q)$(MAKE) $(build)=scripts/kconfig $@
+
+@@ -1585,7 +1585,7 @@ endif
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+
+ # Modules
+-/ %/: prepare scripts FORCE
++%/: prepare scripts FORCE
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir)
diff --git a/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch b/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch
new file mode 100644
index 0000000..d598ff3
--- /dev/null
+++ b/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch
@@ -0,0 +1,23 @@
+--- a/src/mach-ixp42x/slugos-nslu2-armeb_config
++++ b/src/mach-ixp42x/slugos-nslu2-armeb_config
+@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
+ #
+ # General Setup
+ #
+-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2 (bigendian)"
++CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (8MiB Flash)"
+ CONFIG_CROSS_COMPILE=""
+ CONFIG_AEABI=y
+ # CONFIG_DRIVER_LONG_LONG_SIZE is not set
+@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
+ # Overrides
+ #
+ CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
+-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
+-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
+ # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
+ CONFIG_USES_NOR_BOOTFLASH=y
diff --git a/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch b/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch
new file mode 100644
index 0000000..5e7ecee
--- /dev/null
+++ b/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch
@@ -0,0 +1,23 @@
+--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
++++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
+@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
+ #
+ # General Setup
+ #
+-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (16MiB Flash)"
++CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (16MiB Flash)"
+ CONFIG_CROSS_COMPILE=""
+ CONFIG_AEABI=y
+ # CONFIG_DRIVER_LONG_LONG_SIZE is not set
+@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
+ # Overrides
+ #
+ CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
+-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
+-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
+ # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
+ CONFIG_USES_NOR_BOOTFLASH=y
diff --git a/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch b/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch
new file mode 100644
index 0000000..fc0e8b9
--- /dev/null
+++ b/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch
@@ -0,0 +1,23 @@
+--- a/src/mach-ixp42x/slugos-fsg3-armeb_config
++++ b/src/mach-ixp42x/slugos-fsg3-armeb_config
+@@ -17,7 +17,7 @@ CONFIG_EXPERIMENTAL=y
+ #
+ # General Setup
+ #
+-CONFIG_TARGET_DESCRIPTION="SlugOS FSG3/BE"
++CONFIG_TARGET_DESCRIPTION="OpenWrt FSG3"
+ CONFIG_CROSS_COMPILE=""
+ CONFIG_AEABI=y
+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+@@ -148,9 +148,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
+ # Overrides
+ #
+ CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
+-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200"
++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
+-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/sda2 rootdelay=10 console=ttyS0,115200"
++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock2 rootfstype=squashfs console=ttyS0,115200 init=/etc/preinit noinitrd"
+ # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
+ # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
+ CONFIG_USES_NOR_BOOTFLASH=y
diff --git a/package/boot/apex/patches/150-limit_ram_to_64mb.patch b/package/boot/apex/patches/150-limit_ram_to_64mb.patch
new file mode 100644
index 0000000..3e17816
--- /dev/null
+++ b/package/boot/apex/patches/150-limit_ram_to_64mb.patch
@@ -0,0 +1,22 @@
+--- a/src/mach-ixp42x/slugos-nslu2-armeb_config
++++ b/src/mach-ixp42x/slugos-nslu2-armeb_config
+@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10
+ CONFIG_ENV_STARTUP_KERNEL_COPY=y
+ # CONFIG_ENV_REGION_KERNEL_SWAP is not set
+ CONFIG_ENV_STARTUP_PREFIX_P=y
+-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m"
++CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m"
+
+ #
+ # Regions
+--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
++++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
+@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10
+ CONFIG_ENV_STARTUP_KERNEL_COPY=y
+ # CONFIG_ENV_REGION_KERNEL_SWAP is not set
+ CONFIG_ENV_STARTUP_PREFIX_P=y
+-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m"
++CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m"
+
+ #
+ # Regions
diff --git a/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch b/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch
new file mode 100644
index 0000000..e190964
--- /dev/null
+++ b/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch
@@ -0,0 +1,20 @@
+--- a/src/mach-ixp42x/slugos-nas100d-armeb_config
++++ b/src/mach-ixp42x/slugos-nas100d-armeb_config
+@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
+ #
+ # General Setup
+ #
+-CONFIG_TARGET_DESCRIPTION="SlugOS NAS100D/BE"
++CONFIG_TARGET_DESCRIPTION="OpenWrt NAS100D"
+ CONFIG_CROSS_COMPILE=""
+ CONFIG_AEABI=y
+ # CONFIG_DRIVER_LONG_LONG_SIZE is not set
+@@ -158,7 +158,7 @@ CONFIG_ENV_REGION_KERNEL="fis://kernel"
+ # Overrides
+ #
+ CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
+-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
+ # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
+ CONFIG_USES_NOR_BOOTFLASH=y
+ CONFIG_RELOCATE_SIMPLE=y