Add maemo-kexec helper scripts for booting maemo from openwrt on the Nokia n810.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@22641 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2010-08-14 14:44:50 +00:00
parent 2bbf22e692
commit 50556d4010
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,15 @@
config MAEMO_KEXEC_KERNEL_PATH
string
prompt "Path to the Maemo kernel image"
default "PLEASE_CONFIGURE_MAEMO_ZIMAGE"
depends on PACKAGE_maemo-kexec
help
Defines the path to the Maemo kernel zImage.
The image can be extracted from the Fiasco firmware image.
Use the proprietary flasher to extract the image. The
opensource tool "0xFFFF" is not able to extract the zImage correctly.
The zImage defined here will be included in the OpenWrt rootfs
for kexec-ing of the Maemo operating system. The Maemo rootfs
has to be installed on the n810's "rootfs" MTD partition (MTD4).

View File

@ -0,0 +1,46 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=maemo-kexec
PKG_VERSION:=0.1
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/maemo-kexec
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_omap24xx +kexec-tools
TITLE:=Kexec Maemo from OpenWRT
MENU:=1
endef
define Package/maemo-kexec/description
Kexec Maemo from OpenWRT.
The Maemo kernel image must be provided and the Maemo rootfs
must be in the rootfs MTD partition.
endef
define Package/maemo-kexec/config
source "$(SOURCE)/Config.in"
endef
define Build/Compile
endef
define Package/maemo-kexec/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/boot
$(INSTALL_BIN) ./files/sbin/boot-maemo $(1)/sbin/
# --- COPYING MAEMO zImage ---
# If this fails, please check CONFIG_MAEMO_KEXEC_KERNEL_PATH
$(INSTALL_DATA) $(CONFIG_MAEMO_KEXEC_KERNEL_PATH) $(1)/boot/maemo.zImage
endef
$(eval $(call BuildPackage,maemo-kexec))

View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
/usr/sbin/kexec --load /boot/maemo.zImage --append "root=1f03 rootfstype=jffs2 ro console=tty0 console=ttyMTD5"
/usr/sbin/kexec --exec