From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Cc: saul.wold@intel.com
Subject: [PATCH V3 0/1] kernel-grub.bbclass: add a method to install/update for bzImage
Date: Fri, 18 Oct 2013 10:45:34 +0800 [thread overview]
Message-ID: <cover.1382063996.git.hongxu.jia@windriver.com> (raw)
Change in V3:
- Don't check for '$D' to be empty to support cross-install/cross-upgrade
situation;
- Use $grubcfg instead of hardcoded '/boot/grub/*';
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.
9. It works for dep and ipk.
//Hongxu
The following changes since commit 529bf977e956175bd8405ebffc88194192e44740:
update-rcd.bbclass: fix host/target test (2013-10-16 14:51:07 +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: add a method to install/update for bzImage
meta/classes/kernel-grub.bbclass | 90 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
create mode 100644 meta/classes/kernel-grub.bbclass
--
1.8.1.2
next reply other threads:[~2013-10-18 2:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 2:45 Hongxu Jia [this message]
2013-10-18 2:45 ` [PATCH 1/1] kernel-grub.bbclass: add a method to install/update for bzImage Hongxu Jia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1382063996.git.hongxu.jia@windriver.com \
--to=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=saul.wold@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox