kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Gidi Gal <gidi.gal.linux@gmail.com>
To: kernelnewbies@kernelnewbies.org
Cc: bernd@petrovitsch.priv.at, valdis.kletnieks@vt.edu,
	"Bjørn Mork" <bjorn@mork.no>
Subject: Re: How to switch between installed kernel and developed kernel
Date: Mon, 22 Mar 2021 19:53:19 +0200	[thread overview]
Message-ID: <CAB+0Von7LOo69XOGYX7THCB6LvmjYmv5CBcETCK3-egavHbccg@mail.gmail.com> (raw)
In-Reply-To: <87zgyvtkd8.fsf@miraculix.mork.no>


[-- Attachment #1.1: Type: text/plain, Size: 5493 bytes --]

I am grateful for your replies, Brend, Valdis and Bjørn.

I did some backups, decided for now to try and run my kernel on my native
Linux, until I prepare a VM for testing.
I tried to install my kernel. The output showed some errors (I copied the
install log at the bottom of this email). I think these errors led to an
"invalid signature" error later on when I rebooted my machine.
I would be grateful if you could take a look and comment about possible
solutions. Regarding my CONFIG_LOCALVERSION, it is set as follows:
CONFIG_LOCALVERSION="-GIDI_DEV"

Here is the installation output (if there's a different preferable way to
attach such info, please let me know) :
gidi@gidi-Precision-3510:~/git/kernels/staging$ sudo make modules_install
install
[sudo] password for gidi:
  INSTALL arch/x86/crypto/aesni-intel.ko
...
  INSTALL sound/soundcore.ko
  DEPMOD  5.12.0-rc3-GIDI_DEV+
sh ./arch/x86/boot/install.sh 5.12.0-rc3-GIDI_DEV+ arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal
5.12.0-rc3-GIDI_DEV+ /boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
run-parts: executing /etc/kernel/postinst.d/dkms 5.12.0-rc3-GIDI_DEV+
/boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
 * dkms: running auto installation service for kernel 5.12.0-rc3-GIDI_DEV+

      [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools
5.12.0-rc3-GIDI_DEV+ /boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
update-initramfs: Generating /boot/initrd.img-5.12.0-rc3-GIDI_DEV+
dpkg: warning: version '5.12.0-rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0-rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for
module amdgpu
...
W: Possible missing firmware /lib/firmware/i915/dg1_dmc_ver2_02.bin for
module i915
dpkg: warning: version '5.12.0-rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0-rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
run-parts: executing /etc/kernel/postinst.d/pm-utils 5.12.0-rc3-GIDI_DEV+
/boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
run-parts: executing /etc/kernel/postinst.d/zz-update-grub
5.12.0-rc3-GIDI_DEV+ /boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+~old' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+' has bad syntax: invalid
character in revision number
Found linux image: /boot/vmlinuz-5.12.0-rc3-GIDI_DEV+
Found initrd image: /boot/initrd.img-5.12.0-rc3-GIDI_DEV+
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+~old' has bad syntax: invalid
character in revision number
dpkg: warning: version '5.12.0~rc3-GIDI_DEV+~old' has bad syntax: invalid
character in revision number
Found linux image: /boot/vmlinuz-5.12.0-rc3-GIDI_DEV+.old
Found initrd image: /boot/initrd.img-5.12.0-rc3-GIDI_DEV+
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Adding boot menu entry for UEFI Firmware Settings
done

Thanks,
Gidi


On Mon, Mar 22, 2021 at 2:59 PM Bjørn Mork <bjorn@mork.no> wrote:

> Gidi Gal <gidi.gal.linux@gmail.com> writes:
>
> > I am new to kernel development, currently working on
> > https://kernelnewbies.org/FirstKernelPatch. I reached the step "Install
> > your changes" in "Modifying a driver on native Linux". I would like to
> > separate my developed kernel and my installed kernel and to switch
> between
> > the two in order to test my changes. I am not sure that my tutorial
> > explains how to do that. If you have a link that proposes a workflow for
> > this request (or if my tutorial does explain this workflow and I'm
> missing
> > the exact paragraph that does that) please let me know.
>
> The answer depends on your choice of bootloader, distro etc.
>
> But one way to do this is to build a native kernel package for your
> distro and simply install that like any other package. So instead of
>
>  make -j2; sudo make modules_install install
>
> you'll do somethong like (or maybe give a more explicit version than '*')
>
>  make -j2 bindeb-pkg; sudo dpkg -i ../linux-image-*.deb
>
> or similare with "binrpm-pkg" for the RPM based distros.
>
> With this you'll end up with your testing kernel as an additional choice
> in the bootloader menu, keeping all your previously installed kernels as
> alternatives.
>
> Note that this way of testing is quite slow since you'll rebuild
> everythng and reboot a bare metal machine.  There are easier ways to
> test many kernel changes, like rebuilding only one module and load it in
> your running kernel. And there is of course always a very real risk of
> crashing, and possibly thrashing too...  So if you can, you might want
> to run test your kernels on a virtual machine, or some other test
> machine, instead of your development machine.
>
>
> Bjørn
>

[-- Attachment #1.2: Type: text/html, Size: 8440 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2021-03-22 17:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 12:11 How to switch between installed kernel and developed kernel Gidi Gal
2021-03-22 12:30 ` Bernd Petrovitsch
2021-03-22 12:57 ` Valdis Klētnieks
2021-03-22 12:59 ` Bjørn Mork
2021-03-22 17:53   ` Gidi Gal [this message]
2021-03-22 21:18     ` Aruna Hewapathirane
2021-03-22 21:19       ` Aruna Hewapathirane
2021-03-22 22:01         ` Gidi Gal
2021-03-23  1:17           ` Valdis Klētnieks
2021-03-23  4:29             ` Aruna Hewapathirane
2021-03-23 15:06               ` Valdis Klētnieks
2021-03-23 15:16                 ` Aruna Hewapathirane
2021-03-23 15:11               ` Gidi Gal
     [not found]               ` <CAB+0Vomu+EaW8N6VNMFcZBB29MxnYYvD=1bF98Tf+1YgwaRi2Q@mail.gmail.com>
2021-03-23 15:05                 ` Valdis Klētnieks
2021-03-23 15:23                 ` Aruna Hewapathirane
2021-03-23  8:53 ` Ahmad Fatoum
2021-03-25 15:42   ` jim.cromie

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=CAB+0Von7LOo69XOGYX7THCB6LvmjYmv5CBcETCK3-egavHbccg@mail.gmail.com \
    --to=gidi.gal.linux@gmail.com \
    --cc=bernd@petrovitsch.priv.at \
    --cc=bjorn@mork.no \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=valdis.kletnieks@vt.edu \
    /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;
as well as URLs for NNTP newsgroup(s).