All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] recovery-kernel: recovery kernel build for keystone
@ 2015-03-12  2:23 Sam Nelson
  2015-03-12  2:23 ` [PATCH 2/5] makedumpfile: Add makedumpfile tool Sam Nelson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sam Nelson @ 2015-03-12  2:23 UTC (permalink / raw)
  To: meta-arago

From: Hao Zhang <hzhang@ti.com>

Build recovery kernel image and k2hk-evm dtb image for Keystone II
devices.

Normally when kernel is booted by u-boot,  u-boot takes care to reserve
free memory space in the DTB, which is required for kernel. For recovery
image, user has to add the free space manually using dtc compiler.

Signed-off-by: Hao Zhang <hzhang@ti.com>
---
 .../recovery-kernel/recovery-kernel_1.0.bb         |   39 ++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb

diff --git a/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb b/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb
new file mode 100644
index 0000000..634f7c5
--- /dev/null
+++ b/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Recovery kernel building for Keystone EVM"
+LICENSE = "GPLv2"
+
+PR = "r2"
+EXTRA_OEMAKE += " KALLSYMS_EXTRA_PASS=1"
+DEFAULT_PREFERENCE = "1"
+COMPATIBLE_MACHINE = "keystone"
+BRANCH = "master"
+SRCREV = "9bc93706b37c39c3a95593dc3d56773e9b7425ad"
+SRC_URI = "git://git.ti.com/keystone-linux/linux.git;protocol=git;branch=${BRANCH}"
+S = "${WORKDIR}/git"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+FILES_${PN} += "${bindir}/crashdump"
+LINUX_ZIMAGE = "zImage"
+KERNEL_MACHINE ?= "keystone2_recovery_defconfig"
+KERNEL_DTBTYPE = "k2hk-evm-recovery.dtb"
+CRASHDIR = "crashdump"
+ARCH = "${TARGET_ARCH}"
+CROSS_COMPILE = "${TARGET_PREFIX}"
+
+export ARCH
+export CROSS_COMPILE
+
+do_configure () {
+	make ${KERNEL_MACHINE}
+}
+
+do_compile() {
+	make ${LINUX_ZIMAGE} KALLSYMS_EXTRA_PASS=1
+	make ${KERNEL_DTBTYPE}
+	dtc -I dtb -O dtb -p 2048 -o ${KERNEL_DTBTYPE} arch/arm/boot/dts/${KERNEL_DTBTYPE}
+}
+
+do_install () {
+	install -d ${D}${bindir}/${CRASHDIR}/
+	install ${S}/arch/arm/boot/${LINUX_ZIMAGE} ${D}${bindir}/${CRASHDIR}
+	install ${S}/${KERNEL_DTBTYPE} ${D}${bindir}/${CRASHDIR}
+}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] makedumpfile: Add makedumpfile tool
  2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
@ 2015-03-12  2:23 ` Sam Nelson
  2015-03-12  2:23 ` [PATCH 3/5] packagegroup-arago-tisdk-recoveryfs: Packagegroup for recovery root filesystem Sam Nelson
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Nelson @ 2015-03-12  2:23 UTC (permalink / raw)
  To: meta-arago

From: Hao Zhang <hzhang@ti.com>

- Add makedumpfile tool to shorten the dumpfile of kdump.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
 .../makedumpfile/makedumpfile_1.5.0.bb             |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 meta-arago-extras/recipes-support/makedumpfile/makedumpfile_1.5.0.bb

diff --git a/meta-arago-extras/recipes-support/makedumpfile/makedumpfile_1.5.0.bb b/meta-arago-extras/recipes-support/makedumpfile/makedumpfile_1.5.0.bb
new file mode 100644
index 0000000..59dbaba
--- /dev/null
+++ b/meta-arago-extras/recipes-support/makedumpfile/makedumpfile_1.5.0.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Make dump file utility"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "http://sourceforge.net/projects/makedumpfile/files/makedumpfile/1.5.0/makedumpfile-${PV}.tar.gz;name=makedumpfile"
+
+SRC_URI[makedumpfile.md5sum] = "e22277d77752c71525a79eab148abf55"
+SRC_URI[makedumpfile.sha256sum] = "8a771a22c6ba79dc505e55727f0cfd357ccb3c97defe21cefd5a67b64452fca7"
+
+DEPENDS = "zlib elfutils bzip2"
+
+EXTRA_OEMAKE = "TARGET=${TARGET_ARCH}"
+
+do_install() {
+	install -d ${D}${bindir}/
+	install -c -m 755 ${S}/makedumpfile ${D}${bindir}/
+}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] packagegroup-arago-tisdk-recoveryfs: Packagegroup for recovery root filesystem
  2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
  2015-03-12  2:23 ` [PATCH 2/5] makedumpfile: Add makedumpfile tool Sam Nelson
@ 2015-03-12  2:23 ` Sam Nelson
  2015-03-12  2:23 ` [PATCH 4/5] tisdk-recovery-rootfs-image: Recovery root filesystem image Sam Nelson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Nelson @ 2015-03-12  2:23 UTC (permalink / raw)
  To: meta-arago

From: Hao Zhang <hzhang@ti.com>

- The recovery root filesystem includes makedumpfile tool and the script
to call makedumpfile to create dump file from kdump.

Signed-off-by: Hao Zhang <hzhang@ti.com>
---
 .../packagegroup-arago-tisdk-recoveryfs.bb         |   22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-recoveryfs.bb

diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-recoveryfs.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-recoveryfs.bb
new file mode 100644
index 0000000..41842ad
--- /dev/null
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-recoveryfs.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Packagegroup for basic recovery rootfs"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+ARAGO_BASE = "\
+    module-init-tools \
+    mtd-utils \
+    initscript-telnetd \
+    "
+
+# these require meta-openembedded/meta-oe layer
+ARAGO_EXTRA = "\
+    makedumpfile \
+    crash-recovery \
+    "
+
+# minimal set of packages - needed to boot
+RDEPENDS_${PN} = "\
+    ${ARAGO_BASE} \
+    ${ARAGO_EXTRA} \
+    "
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] tisdk-recovery-rootfs-image: Recovery root filesystem image
  2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
  2015-03-12  2:23 ` [PATCH 2/5] makedumpfile: Add makedumpfile tool Sam Nelson
  2015-03-12  2:23 ` [PATCH 3/5] packagegroup-arago-tisdk-recoveryfs: Packagegroup for recovery root filesystem Sam Nelson
@ 2015-03-12  2:23 ` Sam Nelson
  2015-03-12  2:23 ` [PATCH 5/5] crash-recovery: initial script to recover kernel crash Sam Nelson
  2015-03-21  0:10 ` [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Denys Dmytriyenko
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Nelson @ 2015-03-12  2:23 UTC (permalink / raw)
  To: meta-arago

- Root filesystem to be used for crash recovery

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
 .../images/tisdk-recovery-rootfs-image.bb          |   10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 meta-arago-distro/recipes-core/images/tisdk-recovery-rootfs-image.bb

diff --git a/meta-arago-distro/recipes-core/images/tisdk-recovery-rootfs-image.bb b/meta-arago-distro/recipes-core/images/tisdk-recovery-rootfs-image.bb
new file mode 100644
index 0000000..5a1ea0f
--- /dev/null
+++ b/meta-arago-distro/recipes-core/images/tisdk-recovery-rootfs-image.bb
@@ -0,0 +1,10 @@
+# TI SDK recovery filesystem image
+COMPATIBLE_MACHINE = "keystone"
+
+require arago-image.inc
+
+IMAGE_INSTALL += "\
+    packagegroup-arago-tisdk-recoveryfs \
+"
+
+export IMAGE_BASENAME = "tisdk-recoveryfs"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] crash-recovery: initial script to recover kernel crash
  2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
                   ` (2 preceding siblings ...)
  2015-03-12  2:23 ` [PATCH 4/5] tisdk-recovery-rootfs-image: Recovery root filesystem image Sam Nelson
@ 2015-03-12  2:23 ` Sam Nelson
  2015-03-21  0:10 ` [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Denys Dmytriyenko
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Nelson @ 2015-03-12  2:23 UTC (permalink / raw)
  To: meta-arago

From: Hao Zhang <hzhang@ti.com>

- In the case of a kernel crash, the script make the dump file from
kdump and reboot the system.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
---
 .../crash-recover/crash-recovery.bb                |   18 +++++++++++++++
 .../crash-recover/files/recoveryfs.sh              |   24 ++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 meta-arago-extras/recipes-support/crash-recover/crash-recovery.bb
 create mode 100755 meta-arago-extras/recipes-support/crash-recover/files/recoveryfs.sh

diff --git a/meta-arago-extras/recipes-support/crash-recover/crash-recovery.bb b/meta-arago-extras/recipes-support/crash-recover/crash-recovery.bb
new file mode 100644
index 0000000..3ee7cc1
--- /dev/null
+++ b/meta-arago-extras/recipes-support/crash-recover/crash-recovery.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Initscripts for kdump recovery mechanism"
+LICENSE = "BSD-3-Clause"
+
+COMPATIBLE_MACHINE = "keystone"
+LIC_FILES_CHKSUM = "file://recoveryfs.sh;md5=e1cea7fe03a879dfe71592798e89ed0d"
+
+S = "${WORKDIR}"
+SRC_URI = "file://recoveryfs.sh"
+
+INITSCRIPT_NAME = "recoveryfs.sh"
+INITSCRIPT_PARAMS = "defaults 10"
+
+inherit update-rc.d
+
+do_install_append() {
+        install -d ${D}${sysconfdir}/init.d/
+        install -c -m 755 ${WORKDIR}/recoveryfs.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+}
diff --git a/meta-arago-extras/recipes-support/crash-recover/files/recoveryfs.sh b/meta-arago-extras/recipes-support/crash-recover/files/recoveryfs.sh
new file mode 100755
index 0000000..665b95e
--- /dev/null
+++ b/meta-arago-extras/recipes-support/crash-recover/files/recoveryfs.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if [ -f /proc/vmcore ] ; then
+  mkdir -p /mnt/boot2
+  mount -t ubifs /dev/ubi0_2 /mnt/boot2
+  if [ $? -eq 0 ] ; then
+     if [ -f /usr/bin/makedumpfile ] ; then
+       makedumpfile -E -d 31 /proc/vmcore /mnt/boot2/home/root/coredump.elf
+       gzip -c /mnt/boot2/home/root/coredump.elf > \
+           /mnt/boot2/home/root/coredump.elf.gz
+       rm -rf /mnt/boot2/home/root/coredump.elf
+       sync
+       reboot
+     else
+       echo "makedumpfile not found"
+       exit 1
+     fi
+  else
+    echo "mount unsuccessful"
+    exit 1
+  fi
+fi
+
+exit 0
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/5] recovery-kernel: recovery kernel build for keystone
  2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
                   ` (3 preceding siblings ...)
  2015-03-12  2:23 ` [PATCH 5/5] crash-recovery: initial script to recover kernel crash Sam Nelson
@ 2015-03-21  0:10 ` Denys Dmytriyenko
  4 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2015-03-21  0:10 UTC (permalink / raw)
  To: Sam Nelson; +Cc: meta-arago

Well, there are few minor issues with some of the recipes in this patchset, 
but overall is fine.


On Wed, Mar 11, 2015 at 10:23:32PM -0400, Sam Nelson wrote:
> From: Hao Zhang <hzhang@ti.com>
> 
> Build recovery kernel image and k2hk-evm dtb image for Keystone II
> devices.
> 
> Normally when kernel is booted by u-boot,  u-boot takes care to reserve
> free memory space in the DTB, which is required for kernel. For recovery
> image, user has to add the free space manually using dtc compiler.
> 
> Signed-off-by: Hao Zhang <hzhang@ti.com>
> ---
>  .../recovery-kernel/recovery-kernel_1.0.bb         |   39 ++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb
> 
> diff --git a/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb b/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb
> new file mode 100644
> index 0000000..634f7c5
> --- /dev/null
> +++ b/meta-arago-extras/recipes-kernel/recovery-kernel/recovery-kernel_1.0.bb
> @@ -0,0 +1,39 @@
> +DESCRIPTION = "Recovery kernel building for Keystone EVM"
> +LICENSE = "GPLv2"
> +
> +PR = "r2"
> +EXTRA_OEMAKE += " KALLSYMS_EXTRA_PASS=1"
> +DEFAULT_PREFERENCE = "1"
> +COMPATIBLE_MACHINE = "keystone"
> +BRANCH = "master"
> +SRCREV = "9bc93706b37c39c3a95593dc3d56773e9b7425ad"
> +SRC_URI = "git://git.ti.com/keystone-linux/linux.git;protocol=git;branch=${BRANCH}"
> +S = "${WORKDIR}/git"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
> +
> +FILES_${PN} += "${bindir}/crashdump"
> +LINUX_ZIMAGE = "zImage"
> +KERNEL_MACHINE ?= "keystone2_recovery_defconfig"
> +KERNEL_DTBTYPE = "k2hk-evm-recovery.dtb"
> +CRASHDIR = "crashdump"
> +ARCH = "${TARGET_ARCH}"
> +CROSS_COMPILE = "${TARGET_PREFIX}"
> +
> +export ARCH
> +export CROSS_COMPILE
> +
> +do_configure () {
> +	make ${KERNEL_MACHINE}
> +}
> +
> +do_compile() {
> +	make ${LINUX_ZIMAGE} KALLSYMS_EXTRA_PASS=1
> +	make ${KERNEL_DTBTYPE}
> +	dtc -I dtb -O dtb -p 2048 -o ${KERNEL_DTBTYPE} arch/arm/boot/dts/${KERNEL_DTBTYPE}
> +}
> +
> +do_install () {
> +	install -d ${D}${bindir}/${CRASHDIR}/
> +	install ${S}/arch/arm/boot/${LINUX_ZIMAGE} ${D}${bindir}/${CRASHDIR}
> +	install ${S}/${KERNEL_DTBTYPE} ${D}${bindir}/${CRASHDIR}
> +}
> -- 
> 1.7.9.5
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-21  0:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12  2:23 [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Sam Nelson
2015-03-12  2:23 ` [PATCH 2/5] makedumpfile: Add makedumpfile tool Sam Nelson
2015-03-12  2:23 ` [PATCH 3/5] packagegroup-arago-tisdk-recoveryfs: Packagegroup for recovery root filesystem Sam Nelson
2015-03-12  2:23 ` [PATCH 4/5] tisdk-recovery-rootfs-image: Recovery root filesystem image Sam Nelson
2015-03-12  2:23 ` [PATCH 5/5] crash-recovery: initial script to recover kernel crash Sam Nelson
2015-03-21  0:10 ` [PATCH 1/5] recovery-kernel: recovery kernel build for keystone Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.