rendered paste body#
# old_revision [9f68e99b72ccd68939ca1cab014d1e79dd390bc4]
#
# delete "packages/kexecboot/files/rootdelay.patch"
#
# add_file "packages/kexecboot/files/rootwait-cmdline.patch"
# content [76e9beb1ca7ae47e537d6b96f3d083434282ea92]
#
# patch "packages/kexecboot/initramfs-kexecboot_1.0.bb"
# from [d3cfea5e56d92934495f6342d176e974b5c9baf3]
# to [f58aa1e35dc4558490844194d8fac54f023eea06]
#
# patch "packages/kexecboot/kexecboot_0.3.bb"
# from [549463678e80781a4efa57e3c566d8668953cb08]
# to [f069f61fd6d1b69a83a4446e84574904259d3e47]
#
# patch "packages/kexecboot/linux-kexecboot-2.6.26/defconfig-akita"
# from [064c36530b213dae882be1b6bb2cbab8615906f8]
# to [00830ed0414849cf715b07e153eb67fac87aef14]
#
# patch "packages/kexecboot/linux-kexecboot-2.6.26/defconfig-c7x0"
# from [9840eec605b360f4cdcf976973331ce274a89b6f]
# to [d15a5f05587c98203f9ee732dd0be56761cf05ee]
#
# patch "packages/kexecboot/linux-kexecboot-2.6.26/defconfig-spitz"
# from [121ce2ca2da79de4072c338f63ad9e345f2674bb]
# to [a02d87cbebf6c43d557d077d9c6f64313fe0fc1b]
#
# patch "packages/kexecboot/linux-kexecboot.inc"
# from [01dd6603a2a2fb2e9c3c56c171153b59ac8ec096]
# to [a89ad49488513d0727cfbf54084432e185f64ae8]
#
============================================================
--- packages/kexecboot/files/rootwait-cmdline.patch 76e9beb1ca7ae47e537d6b96f3d083434282ea92
+++ packages/kexecboot/files/rootwait-cmdline.patch 76e9beb1ca7ae47e537d6b96f3d083434282ea92
@@ -0,0 +1,46 @@
+--- kexecboot.orig/kexecboot.c 2008-08-03 17:08:31.000000000 +0200
++++ kexecboot/kexecboot.c 2008-08-21 23:41:51.000000000 +0200
+@@ -83,11 +83,38 @@
+ //kexec --command-line="CMDLINE" -l /mnt/boot/zImage
+ char command[COMMAND_LINE_SIZE + 60];
+ mount(boot->device, "/mnt", boot->fstype, MS_RDONLY, NULL);
+- if( boot->cmdline )
+- sprintf(command,"/usr/sbin/kexec --command-line=\"%s root=%s rootfstype=%s\" -l %s",
+- boot->cmdline, boot->device, boot->fstype, boot->kernelpath);
+- else
+- sprintf(command,"kexec -l %s", boot->kernelpath);
++
++ /* adding extra_mtdparts */
++ const char *env;
++ char *extra_cmdline;
++
++ env = getenv("EXTRA_CMDLINE");
++ if (env == NULL) {
++ /* Handle error */
++ }
++
++ extra_cmdline = (char *)malloc(strlen(env) + 1);
++ if (extra_cmdline == NULL) {
++ /* Handle error */
++ }
++
++ strcpy(extra_cmdline, env);
++ // do some hacks
++ //strtr(extra_cmdline, '\"', '_');
++
++ if( boot->cmdline ) {
++ sprintf(command,"/usr/sbin/kexec --command-line=\"%s %s root=%s rootfstype=%s rootwait\" -l %s",
++ extra_cmdline, boot->cmdline, boot->device, boot->fstype, boot->kernelpath);
++ }
++ else {
++ if ( strlen(extra_cmdline) > 0 ) {
++ sprintf(command,"/usr/sbin/kexec --command-line=\"%s\" -l %s", extra_cmdline, boot->kernelpath);
++ }
++ else {
++ sprintf(command,"/usr/bin/kexec -l %s", boot->kernelpath);
++ }
++ }
++
+ system(command);
+ // puts(command);
+ umount("/mnt");
============================================================
--- packages/kexecboot/initramfs-kexecboot_1.0.bb d3cfea5e56d92934495f6342d176e974b5c9baf3
+++ packages/kexecboot/initramfs-kexecboot_1.0.bb f58aa1e35dc4558490844194d8fac54f023eea06
@@ -1,16 +1,36 @@ DESCRIPTON = "A init script that mounts
DESCRIPTON = "A init script that mounts a device and kexecs a new kernel from it."
-PR = "r7"
+PR = "r8"
RDEPENDS = "kexecboot klibc-utils-static-mount klibc-utils-static-sh klibc-utils-static-sleep"
-FBANGLE = "270"
+# on c7x0 fbangle 0 is landscape, fbangle 90 is portrait (oriented like service menus)
+FBANGLE = "0"
INPUTDEV = "/dev/event0"
-
do_compile() {
cat > init.sh << EOF
#!/bin/sh
/bin/sleep 3
/bin/mount -t proc proc /proc
+
+# http://bugs.archlinux.org/task/10381?getfile=2128
+
+echo "Reading cmdline\n"
+read CMDLINE </proc/cmdline
+export CMDLINE
+
+export EXTRA_CMDLINE=""
+
+echo "CMDLINE=\${CMDLINE}"
+for cmd in \${CMDLINE}; do
+ echo "cmd=\${cmd}"
+ case "\${cmd}" in
+ \#*) break ;; # ignore if #
+# console=*) EXTRA_CMDLINE="\${EXTRA_CMDLINE} \${cmd}" ;;
+ mtdparts=*) EXTRA_CMDLINE="\${EXTRA_CMDLINE} \${cmd}" ;;
+ esac
+done
+echo "Filtered cmdline:\${EXTRA_CMDLINE}\n"
+
echo "0 4 1 7" > /proc/sys/kernel/printk
/usr/bin/kexecboot -a ${FBANGLE} -i ${INPUTDEV}
EOF
============================================================
--- packages/kexecboot/kexecboot_0.3.bb 549463678e80781a4efa57e3c566d8668953cb08
+++ packages/kexecboot/kexecboot_0.3.bb f069f61fd6d1b69a83a4446e84574904259d3e47
@@ -1,5 +1,5 @@ LICENSE = "GPL"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
DEPENDS = "klibc"
RDEPENDS = "kexec-static"
inherit autotools
@@ -8,7 +8,9 @@ SRC_URI = "http://projects.linuxtogo.org
# ./make-image-header.sh <file>.png HAND
SRC_URI = "http://projects.linuxtogo.org/frs/download.php/221/kexecboot-${PV}.tar.gz \
- file://rootdelay.patch;patch=1"
+ file://rootwait-cmdline.patch;patch=1 \
+ "
+
S = "${WORKDIR}/kexecboot-${PV}"
============================================================
--- packages/kexecboot/linux-kexecboot-2.6.26/defconfig-akita 064c36530b213dae882be1b6bb2cbab8615906f8
+++ packages/kexecboot/linux-kexecboot-2.6.26/defconfig-akita 00830ed0414849cf715b07e153eb67fac87aef14
@@ -53,7 +53,8 @@ CONFIG_SYSFS_DEPRECATED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
-# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
============================================================
--- packages/kexecboot/linux-kexecboot-2.6.26/defconfig-c7x0 9840eec605b360f4cdcf976973331ce274a89b6f
+++ packages/kexecboot/linux-kexecboot-2.6.26/defconfig-c7x0 d15a5f05587c98203f9ee732dd0be56761cf05ee
@@ -53,7 +53,8 @@ CONFIG_SYSFS_DEPRECATED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
-# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
============================================================
--- packages/kexecboot/linux-kexecboot-2.6.26/defconfig-spitz 121ce2ca2da79de4072c338f63ad9e345f2674bb
+++ packages/kexecboot/linux-kexecboot-2.6.26/defconfig-spitz a02d87cbebf6c43d557d077d9c6f64313fe0fc1b
@@ -52,7 +52,8 @@ CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
-# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
============================================================
--- packages/kexecboot/linux-kexecboot.inc 01dd6603a2a2fb2e9c3c56c171153b59ac8ec096
+++ packages/kexecboot/linux-kexecboot.inc a89ad49488513d0727cfbf54084432e185f64ae8
@@ -1,9 +1,13 @@ INITRAMFS_IMAGE = "initramfs-kexecboot-i
DESCRIPTION = "2.6 Linux kexec bootloader for Zaurus devices and iPAQ hx2750."
SECTION = "kernel"
LICENSE = "GPL"
DONT_CHECK_KERNELSIZE = ""
INITRAMFS_IMAGE = "initramfs-kexecboot-image"
+#
+###KERNEL_IMAGETYPE_c7x0="uImage"
+###KERNEL_IMAGETYPE_akita="uImage"
+#
inherit kernel
PACKAGES = ""
PROVIDES = ""