maemo-kexec: Automatically download kernel

git-svn-id: svn://svn.openwrt.org/openwrt/packages@23021 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2010-09-11 18:43:14 +00:00
parent 61ca941c37
commit 82b77c0fc0
2 changed files with 26 additions and 10 deletions

View File

@ -1,8 +1,13 @@
config MAEMO_KEXEC_DOWNLOAD_KERNEL
bool "Download latest Maemo kernel"
default y
depends on PACKAGE_maemo-kexec
config MAEMO_KEXEC_KERNEL_PATH config MAEMO_KEXEC_KERNEL_PATH
string string
prompt "Path to the Maemo kernel image" prompt "Path to the Maemo kernel image"
default "PLEASE_CONFIGURE_MAEMO_ZIMAGE" default "PLEASE_CONFIGURE_MAEMO_ZIMAGE"
depends on PACKAGE_maemo-kexec depends on PACKAGE_maemo-kexec && !MAEMO_KEXEC_DOWNLOAD_KERNEL
help help
Defines the path to the Maemo kernel zImage. Defines the path to the Maemo kernel zImage.

View File

@ -8,9 +8,18 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=maemo-kexec PKG_NAME:=maemo-kexec
PKG_VERSION:=0.1 PKG_VERSION:=1.0
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=maemo-rx44-2008.43-7.kernel
PKG_SOURCE_URL:=http://bu3sch.de/misc/
PKG_MD5SUM:=3cbf571c0618bfe20a69babab6b33bea
UNPACK_CMD=$(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/
PKG_CONFIG_DEPENDS:= \
CONFIG_MAEMO_KEXEC_DOWNLOAD_KERNEL \
CONFIG_MAEMO_KEXEC_KERNEL_PATH
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/maemo-kexec define Package/maemo-kexec
@ -18,29 +27,31 @@ define Package/maemo-kexec
CATEGORY:=Utilities CATEGORY:=Utilities
DEPENDS:=@TARGET_omap24xx +kexec-tools DEPENDS:=@TARGET_omap24xx +kexec-tools
TITLE:=Kexec Maemo from OpenWRT TITLE:=Kexec Maemo from OpenWRT
MENU:=1
endef endef
define Package/maemo-kexec/description define Package/maemo-kexec/description
Kexec Maemo from OpenWRT. Kexec Maemo from OpenWRT.
The Maemo kernel image must be provided and the Maemo rootfs The Maemo rootfs must be in the rootfs MTD partition.
must be in the rootfs MTD partition.
endef endef
define Package/maemo-kexec/config define Package/maemo-kexec/config
source "$(SOURCE)/Config.in" source "$(SOURCE)/Config.in"
endef endef
define Build/Configure
endef
define Build/Compile define Build/Compile
endef endef
MAEMO_KRNL_SRC:=$(if $(CONFIG_MAEMO_KEXEC_DOWNLOAD_KERNEL),\
$(PKG_BUILD_DIR)/$(PKG_SOURCE),\
$(CONFIG_MAEMO_KEXEC_KERNEL_PATH))
define Package/maemo-kexec/install define Package/maemo-kexec/install
$(INSTALL_DIR) $(1)/sbin $(INSTALL_DIR) $(1)/boot $(1)/sbin
$(INSTALL_DIR) $(1)/boot
$(INSTALL_BIN) ./files/sbin/boot-maemo $(1)/sbin/ $(INSTALL_BIN) ./files/sbin/boot-maemo $(1)/sbin/
# --- COPYING MAEMO zImage --- $(INSTALL_DATA) $(MAEMO_KRNL_SRC) $(1)/boot/maemo.zImage
# If this fails, please check CONFIG_MAEMO_KEXEC_KERNEL_PATH
$(INSTALL_DATA) $(CONFIG_MAEMO_KEXEC_KERNEL_PATH) $(1)/boot/maemo.zImage
endef endef
$(eval $(call BuildPackage,maemo-kexec)) $(eval $(call BuildPackage,maemo-kexec))