All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/1] kernel-grub.bbclass: a method to install/update for bzImage
@ 2013-09-18  7:26 Hongxu Jia
  2013-09-18  7:26 ` [PATCH 1/1] " Hongxu Jia
  2013-10-10  2:30 ` [PATCH V2 0/1] " Hongxu Jia
  0 siblings, 2 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-09-18  7:26 UTC (permalink / raw)
  To: openembedded-core

Change in V2: Create a "kernel-grub.bbclass" to do the job which means
              it is disabled by default.

Test Case:
1. Add INHERIT_append = " kernel-grub" to local.conf and build a new kernel
   image rpm package.

2. Prepare a deployed target, and make sure your boot area has enough disk
   space (free space >= 5MB).

3. Download the new kernel image rpm to the target.

4. Before install/update, check boot area and menu
root@qemux86-64:~# ls /boot/
grub        vmlinuz

root@qemux86-64:~# cat /boot/grub/grub.cfg
menuentry "Linux" {
    set root=(hd0,1)
    linux /vmlinuz root=/dev/hdb2  rw  console=tty0  quiet
}

4. Install/update bzImage
root@qemux86-64:~# rpm -i kernel-image-3.10.11-yocto-standard-3.10.12+git0+285f93bf94_702040ac7c-r0.qemux86_64.rpm 
Caution! Update kernel may affect kernel-module!
update-alternatives: Linking //boot/bzImage to bzImage-3.10.11-yocto-standard

5. After install/update, check boot area and menu
root@qemux86-64:~# ls /boot/ -al
drwxr-xr-x    4 root     root          1024 Sep 18 06:58 .
drwxr-xr-x   17 root     root          4096 Sep 18 06:41 ..
lrwxrwxrwx    1 root     root            30 Sep 18 06:58 bzImage -> bzImage-3.10.11-yocto-standard
-rw-r--r--    1 root     root       5601808 Sep 18 06:45 bzImage-3.10.11-yocto-standard
drwxr-xr-x    4 root     root          1024 Sep 18 06:58 grub
-rwxr-x---    1 root     root       5601776 Sep 18 06:38 vmlinuz

root@qemux86-64:~# cat /boot/grub/grub.cfg 
menuentry "Update bzImage-3.10.11-yocto-standard-3.10.12+gitAUTOINC+285f93bf94_702040ac7c" {
    set root=(hd0,1)
    linux /bzImage-3.10.11-yocto-standard root=/dev/hdb2  rw  console=tty0  quiet
}
menuentry "Linux" {
    set root=(hd0,1)
    linux /vmlinuz root=/dev/hdb2  rw  console=tty0  quiet
}


6. Reboot target, 'Update bzImage-3.10.11-yocto-standard-3.10.12+gitAUTOINC+285f93bf94_702040ac7c'
   will be in the boot menu.

7. It supports GRUB 0.97 in which use menu.lst rather than grub.cfg as config
   file.

8. If you install the same rpm more than one time with '--force', there will
   be multiple kernel images in boot area and menu.

//Hongxu

The following changes since commit 825cfeb2e6777a55077ecff32d5b2c0e3da13ae8:

  bitbake: usermanual.xml: Two new sections added to BitBake "Description" (2013-09-17 22:27:56 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/update-bzimage
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/update-bzimage

Hongxu Jia (1):
  kernel-grub.bbclass: a method to install/update for bzImage

 meta/classes/kernel-grub.bbclass | 79 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 meta/classes/kernel-grub.bbclass

-- 
1.8.1.2



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

* [PATCH 1/1] kernel-grub.bbclass: a method to install/update for bzImage
  2013-09-18  7:26 [PATCH V2 0/1] kernel-grub.bbclass: a method to install/update for bzImage Hongxu Jia
@ 2013-09-18  7:26 ` Hongxu Jia
  2013-10-16 17:54   ` Saul Wold
  2013-10-10  2:30 ` [PATCH V2 0/1] " Hongxu Jia
  1 sibling, 1 reply; 5+ messages in thread
From: Hongxu Jia @ 2013-09-18  7:26 UTC (permalink / raw)
  To: openembedded-core

While installing a rpm to update kernel on a deployed target, it will update
the boot area and the boot menu with the kernel as the priority but allow
you to fall back to the original kernel as well.

- In kernel-image's preinstall scriptlet, it backs up original kernel to avoid
  probable confliction with the new one.
- In kernel-image's postinstall scriptlet, it modify grub's config file to
  updates the new kernel as the boot priority.

[YOCTO #4104]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes/kernel-grub.bbclass | 79 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 meta/classes/kernel-grub.bbclass

diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
new file mode 100644
index 0000000..21fcabe
--- /dev/null
+++ b/meta/classes/kernel-grub.bbclass
@@ -0,0 +1,79 @@
+#
+# While installing a rpm to update kernel on a deployed target, it will update
+# the boot area and the boot menu with the kernel as the priority but allow
+# you to fall back to the original kernel as well.
+#
+# - In kernel-image's preinstall scriptlet, it backs up original kernel to avoid
+#   probable confliction with the new one.
+#
+# - In kernel-image's postinstall scriptlet, it modify grub's config file to
+#   updates the new kernel as the boot priority.
+#
+
+pkg_preinst_kernel-image_append () {
+	if [ -z "$D" ]; then
+		# Parsing confliction
+		[ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
+		[ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
+		if [ -n "$grubcfg" ]; then
+			# Dereference symlink to avoid confliction with new kernel name.
+			if grep -q "/${KERNEL_IMAGETYPE} root=" $grubcfg; then
+				kimage=`realpath /boot/${KERNEL_IMAGETYPE}`;
+				sed -i "s#${KERNEL_IMAGETYPE} root=#${kimage##*/} root=#" $grubcfg
+			fi
+
+			# Rename old kernel if it conflicts with new kernel name.
+			if grep -q "/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=" $grubcfg; then
+				timestamp=`date +%s`
+				kimage="/boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-$timestamp-back"
+				sed -i "s#${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#${kimage##*/} root=#" $grubcfg
+				mv /boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} $kimage
+			fi
+		fi
+	fi
+}
+
+pkg_postinst_kernel-image_prepend () {
+	get_new_grub_cfg() {
+		title="Update ${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-${PV}"
+		if [ -f /boot/grub/grub.cfg ]; then
+			rootfs=`grep " *linux [^ ].* root=" /boot/grub/grub.cfg -m 1 | \
+				 sed "s# *linux [^ ].* root=#    linux /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
+
+			echo "menuentry \"$title\" {"
+			echo "    set root=(hd0,1)"
+			echo "$rootfs"
+			echo "}"
+		elif [ -f /boot/grub/menu.list ] ; then
+			rootfs=`grep "kernel [^ ].* root=" /boot/grub/menu.list -m 1 | \
+				 sed "s#kernel [^ ].* root=#kernel /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
+
+			echo "default 0"
+			echo "timeout 30"
+			echo "title $title"
+			echo "root  (hd0,0)"
+			echo "$rootfs"
+		fi
+	}
+
+	get_old_grub_cfg() {
+		if [ -f /boot/grub/grub.cfg ]; then
+			cat /boot/grub/grub.cfg
+		elif [ -f /boot/grub/menu.list ] ; then
+			cat /boot/grub/menu.list | sed -e '/^default/d' -e '/^timeout/d'
+		fi
+	}
+
+	if [ -z "$D" ]; then
+		[ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
+		[ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
+		if [ -n "$grubcfg" ]; then
+			grubcfgtmp="$grubcfg.tmp"
+			get_new_grub_cfg  > $grubcfgtmp
+			get_old_grub_cfg >> $grubcfgtmp
+			mv $grubcfgtmp $grubcfg
+			echo "Caution! Update kernel may affect kernel-module!"
+		fi
+	fi
+}
+
-- 
1.8.1.2



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

* Re: [PATCH V2 0/1] kernel-grub.bbclass: a method to install/update for bzImage
  2013-09-18  7:26 [PATCH V2 0/1] kernel-grub.bbclass: a method to install/update for bzImage Hongxu Jia
  2013-09-18  7:26 ` [PATCH 1/1] " Hongxu Jia
@ 2013-10-10  2:30 ` Hongxu Jia
  1 sibling, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-10-10  2:30 UTC (permalink / raw)
  To: openembedded-core

Ping

//Hongxu

On 09/18/2013 03:26 PM, Hongxu Jia wrote:
> Change in V2: Create a "kernel-grub.bbclass" to do the job which means
>                it is disabled by default.
>
> Test Case:
> 1. Add INHERIT_append = " kernel-grub" to local.conf and build a new kernel
>     image rpm package.
>
> 2. Prepare a deployed target, and make sure your boot area has enough disk
>     space (free space >= 5MB).
>
> 3. Download the new kernel image rpm to the target.
>
> 4. Before install/update, check boot area and menu
> root@qemux86-64:~# ls /boot/
> grub        vmlinuz
>
> root@qemux86-64:~# cat /boot/grub/grub.cfg
> menuentry "Linux" {
>      set root=(hd0,1)
>      linux /vmlinuz root=/dev/hdb2  rw  console=tty0  quiet
> }
>
> 4. Install/update bzImage
> root@qemux86-64:~# rpm -i kernel-image-3.10.11-yocto-standard-3.10.12+git0+285f93bf94_702040ac7c-r0.qemux86_64.rpm
> Caution! Update kernel may affect kernel-module!
> update-alternatives: Linking //boot/bzImage to bzImage-3.10.11-yocto-standard
>
> 5. After install/update, check boot area and menu
> root@qemux86-64:~# ls /boot/ -al
> drwxr-xr-x    4 root     root          1024 Sep 18 06:58 .
> drwxr-xr-x   17 root     root          4096 Sep 18 06:41 ..
> lrwxrwxrwx    1 root     root            30 Sep 18 06:58 bzImage -> bzImage-3.10.11-yocto-standard
> -rw-r--r--    1 root     root       5601808 Sep 18 06:45 bzImage-3.10.11-yocto-standard
> drwxr-xr-x    4 root     root          1024 Sep 18 06:58 grub
> -rwxr-x---    1 root     root       5601776 Sep 18 06:38 vmlinuz
>
> root@qemux86-64:~# cat /boot/grub/grub.cfg
> menuentry "Update bzImage-3.10.11-yocto-standard-3.10.12+gitAUTOINC+285f93bf94_702040ac7c" {
>      set root=(hd0,1)
>      linux /bzImage-3.10.11-yocto-standard root=/dev/hdb2  rw  console=tty0  quiet
> }
> menuentry "Linux" {
>      set root=(hd0,1)
>      linux /vmlinuz root=/dev/hdb2  rw  console=tty0  quiet
> }
>
>
> 6. Reboot target, 'Update bzImage-3.10.11-yocto-standard-3.10.12+gitAUTOINC+285f93bf94_702040ac7c'
>     will be in the boot menu.
>
> 7. It supports GRUB 0.97 in which use menu.lst rather than grub.cfg as config
>     file.
>
> 8. If you install the same rpm more than one time with '--force', there will
>     be multiple kernel images in boot area and menu.
>
> //Hongxu
>
> The following changes since commit 825cfeb2e6777a55077ecff32d5b2c0e3da13ae8:
>
>    bitbake: usermanual.xml: Two new sections added to BitBake "Description" (2013-09-17 22:27:56 +0100)
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib hongxu/update-bzimage
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/update-bzimage
>
> Hongxu Jia (1):
>    kernel-grub.bbclass: a method to install/update for bzImage
>
>   meta/classes/kernel-grub.bbclass | 79 ++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 79 insertions(+)
>   create mode 100644 meta/classes/kernel-grub.bbclass
>



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

* Re: [PATCH 1/1] kernel-grub.bbclass: a method to install/update for bzImage
  2013-09-18  7:26 ` [PATCH 1/1] " Hongxu Jia
@ 2013-10-16 17:54   ` Saul Wold
  2013-10-18  2:34     ` Hongxu Jia
  0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2013-10-16 17:54 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembedded-core

On 09/18/2013 12:26 AM, Hongxu Jia wrote:
> While installing a rpm to update kernel on a deployed target, it will update
> the boot area and the boot menu with the kernel as the priority but allow
> you to fall back to the original kernel as well.
>
Will this work for deb or ipk?

Sau!

> - In kernel-image's preinstall scriptlet, it backs up original kernel to avoid
>    probable confliction with the new one.
> - In kernel-image's postinstall scriptlet, it modify grub's config file to
>    updates the new kernel as the boot priority.
>
> [YOCTO #4104]
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>   meta/classes/kernel-grub.bbclass | 79 ++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 79 insertions(+)
>   create mode 100644 meta/classes/kernel-grub.bbclass
>
> diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
> new file mode 100644
> index 0000000..21fcabe
> --- /dev/null
> +++ b/meta/classes/kernel-grub.bbclass
> @@ -0,0 +1,79 @@
> +#
> +# While installing a rpm to update kernel on a deployed target, it will update
> +# the boot area and the boot menu with the kernel as the priority but allow
> +# you to fall back to the original kernel as well.
> +#
> +# - In kernel-image's preinstall scriptlet, it backs up original kernel to avoid
> +#   probable confliction with the new one.
> +#
> +# - In kernel-image's postinstall scriptlet, it modify grub's config file to
> +#   updates the new kernel as the boot priority.
> +#
> +
> +pkg_preinst_kernel-image_append () {
> +	if [ -z "$D" ]; then
> +		# Parsing confliction
> +		[ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
> +		[ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
> +		if [ -n "$grubcfg" ]; then
> +			# Dereference symlink to avoid confliction with new kernel name.
> +			if grep -q "/${KERNEL_IMAGETYPE} root=" $grubcfg; then
> +				kimage=`realpath /boot/${KERNEL_IMAGETYPE}`;
> +				sed -i "s#${KERNEL_IMAGETYPE} root=#${kimage##*/} root=#" $grubcfg
> +			fi
> +
> +			# Rename old kernel if it conflicts with new kernel name.
> +			if grep -q "/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=" $grubcfg; then
> +				timestamp=`date +%s`
> +				kimage="/boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-$timestamp-back"
> +				sed -i "s#${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#${kimage##*/} root=#" $grubcfg
> +				mv /boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} $kimage
> +			fi
> +		fi
> +	fi
> +}
> +
> +pkg_postinst_kernel-image_prepend () {
> +	get_new_grub_cfg() {
> +		title="Update ${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-${PV}"
> +		if [ -f /boot/grub/grub.cfg ]; then
> +			rootfs=`grep " *linux [^ ].* root=" /boot/grub/grub.cfg -m 1 | \
> +				 sed "s# *linux [^ ].* root=#    linux /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
> +
> +			echo "menuentry \"$title\" {"
> +			echo "    set root=(hd0,1)"
> +			echo "$rootfs"
> +			echo "}"
> +		elif [ -f /boot/grub/menu.list ] ; then
> +			rootfs=`grep "kernel [^ ].* root=" /boot/grub/menu.list -m 1 | \
> +				 sed "s#kernel [^ ].* root=#kernel /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
> +
> +			echo "default 0"
> +			echo "timeout 30"
> +			echo "title $title"
> +			echo "root  (hd0,0)"
> +			echo "$rootfs"
> +		fi
> +	}
> +
> +	get_old_grub_cfg() {
> +		if [ -f /boot/grub/grub.cfg ]; then
> +			cat /boot/grub/grub.cfg
> +		elif [ -f /boot/grub/menu.list ] ; then
> +			cat /boot/grub/menu.list | sed -e '/^default/d' -e '/^timeout/d'
> +		fi
> +	}
> +
> +	if [ -z "$D" ]; then
> +		[ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
> +		[ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
> +		if [ -n "$grubcfg" ]; then
> +			grubcfgtmp="$grubcfg.tmp"
> +			get_new_grub_cfg  > $grubcfgtmp
> +			get_old_grub_cfg >> $grubcfgtmp
> +			mv $grubcfgtmp $grubcfg
> +			echo "Caution! Update kernel may affect kernel-module!"
> +		fi
> +	fi
> +}
> +
>


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

* Re: [PATCH 1/1] kernel-grub.bbclass: a method to install/update for bzImage
  2013-10-16 17:54   ` Saul Wold
@ 2013-10-18  2:34     ` Hongxu Jia
  0 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-10-18  2:34 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On 10/17/2013 01:54 AM, Saul Wold wrote:
> On 09/18/2013 12:26 AM, Hongxu Jia wrote:
>> While installing a rpm to update kernel on a deployed target, it will 
>> update
>> the boot area and the boot menu with the kernel as the priority but 
>> allow
>> you to fall back to the original kernel as well.
>>
> Will this work for deb or ipk?
>

Yes, I have done the test on target for deb and ipk, both of them worked.

//Hongxu

> Sau!
>
>> - In kernel-image's preinstall scriptlet, it backs up original kernel 
>> to avoid
>>    probable confliction with the new one.
>> - In kernel-image's postinstall scriptlet, it modify grub's config 
>> file to
>>    updates the new kernel as the boot priority.
>>
>> [YOCTO #4104]
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>>   meta/classes/kernel-grub.bbclass | 79 
>> ++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 79 insertions(+)
>>   create mode 100644 meta/classes/kernel-grub.bbclass
>>
>> diff --git a/meta/classes/kernel-grub.bbclass 
>> b/meta/classes/kernel-grub.bbclass
>> new file mode 100644
>> index 0000000..21fcabe
>> --- /dev/null
>> +++ b/meta/classes/kernel-grub.bbclass
>> @@ -0,0 +1,79 @@
>> +#
>> +# While installing a rpm to update kernel on a deployed target, it 
>> will update
>> +# the boot area and the boot menu with the kernel as the priority 
>> but allow
>> +# you to fall back to the original kernel as well.
>> +#
>> +# - In kernel-image's preinstall scriptlet, it backs up original 
>> kernel to avoid
>> +#   probable confliction with the new one.
>> +#
>> +# - In kernel-image's postinstall scriptlet, it modify grub's config 
>> file to
>> +#   updates the new kernel as the boot priority.
>> +#
>> +
>> +pkg_preinst_kernel-image_append () {
>> +    if [ -z "$D" ]; then
>> +        # Parsing confliction
>> +        [ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
>> +        [ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
>> +        if [ -n "$grubcfg" ]; then
>> +            # Dereference symlink to avoid confliction with new 
>> kernel name.
>> +            if grep -q "/${KERNEL_IMAGETYPE} root=" $grubcfg; then
>> +                kimage=`realpath /boot/${KERNEL_IMAGETYPE}`;
>> +                sed -i "s#${KERNEL_IMAGETYPE} root=#${kimage##*/} 
>> root=#" $grubcfg
>> +            fi
>> +
>> +            # Rename old kernel if it conflicts with new kernel name.
>> +            if grep -q "/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} 
>> root=" $grubcfg; then
>> +                timestamp=`date +%s`
>> + kimage="/boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-$timestamp-back"
>> +                sed -i "s#${KERNEL_IMAGETYPE}-${KERNEL_VERSION} 
>> root=#${kimage##*/} root=#" $grubcfg
>> +                mv /boot/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} $kimage
>> +            fi
>> +        fi
>> +    fi
>> +}
>> +
>> +pkg_postinst_kernel-image_prepend () {
>> +    get_new_grub_cfg() {
>> +        title="Update ${KERNEL_IMAGETYPE}-${KERNEL_VERSION}-${PV}"
>> +        if [ -f /boot/grub/grub.cfg ]; then
>> +            rootfs=`grep " *linux [^ ].* root=" /boot/grub/grub.cfg 
>> -m 1 | \
>> +                 sed "s# *linux [^ ].* root=#    linux 
>> /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
>> +
>> +            echo "menuentry \"$title\" {"
>> +            echo "    set root=(hd0,1)"
>> +            echo "$rootfs"
>> +            echo "}"
>> +        elif [ -f /boot/grub/menu.list ] ; then
>> +            rootfs=`grep "kernel [^ ].* root=" /boot/grub/menu.list 
>> -m 1 | \
>> +                 sed "s#kernel [^ ].* root=#kernel 
>> /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} root=#"`
>> +
>> +            echo "default 0"
>> +            echo "timeout 30"
>> +            echo "title $title"
>> +            echo "root  (hd0,0)"
>> +            echo "$rootfs"
>> +        fi
>> +    }
>> +
>> +    get_old_grub_cfg() {
>> +        if [ -f /boot/grub/grub.cfg ]; then
>> +            cat /boot/grub/grub.cfg
>> +        elif [ -f /boot/grub/menu.list ] ; then
>> +            cat /boot/grub/menu.list | sed -e '/^default/d' -e 
>> '/^timeout/d'
>> +        fi
>> +    }
>> +
>> +    if [ -z "$D" ]; then
>> +        [ -f /boot/grub/menu.list ] && grubcfg="/boot/grub/menu.list"
>> +        [ -f /boot/grub/grub.cfg ] && grubcfg="/boot/grub/grub.cfg"
>> +        if [ -n "$grubcfg" ]; then
>> +            grubcfgtmp="$grubcfg.tmp"
>> +            get_new_grub_cfg  > $grubcfgtmp
>> +            get_old_grub_cfg >> $grubcfgtmp
>> +            mv $grubcfgtmp $grubcfg
>> +            echo "Caution! Update kernel may affect kernel-module!"
>> +        fi
>> +    fi
>> +}
>> +
>>



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

end of thread, other threads:[~2013-10-18  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18  7:26 [PATCH V2 0/1] kernel-grub.bbclass: a method to install/update for bzImage Hongxu Jia
2013-09-18  7:26 ` [PATCH 1/1] " Hongxu Jia
2013-10-16 17:54   ` Saul Wold
2013-10-18  2:34     ` Hongxu Jia
2013-10-10  2:30 ` [PATCH V2 0/1] " Hongxu Jia

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.