[Kernel-packages] [Bug 1838429] Re: Kernel snap initrd is missing several fb related kmods

2019-07-30 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-raspi2 in Ubuntu.
https://bugs.launchpad.net/bugs/1838429

Title:
  Kernel snap initrd is missing several fb related kmods

Status in linux package in Ubuntu:
  Incomplete
Status in linux-raspi2 package in Ubuntu:
  New

Bug description:
  Impact:

  Around pi-kernel #23 (and pc-kernel #196), kernel snap's initrd went
  missing all fb kmods - that was workarounded for pi-kernel last week
  by manually adding the modules back in:

  commit edd1f8914fded36d4739fd24cdbdd05c5cf37611
  Author: Paolo Pisati 
  Date:   Tue Jul 23 11:30:49 2019 +0200

  Initrd modules: fbdev/hdmi out support for psplash
  
  BugLink: https://launchpad.net/bugs/1837209

  After more debugging, it turned out that the regression was in fact
  the effect of fixing LP#1561643: initrmafs-tools kept installing fb
  modules even when framebuffer support was not enabled, and kernel snap
  never explicitly enabled framebuffer initramfs-tools script, but still
  came bundled with such kmods.

  Fix:

  In Ubuntu Classic, to bundle fb kmods in initrd, we normally install
  cryptsetup:

  $ cat /usr/share/initramfs-tools/conf-hooks.d/cryptsetup
  ...
  FRAMEBUFFER=y

  But cryptsetup, among other things, adds several initramfs-tools hooks
  and scripts to initrd:

  ...
   scripts
   scripts/local
  +scripts/local-block
  +scripts/local-block/ORDER
  +scripts/local-block/cryptroot
   scripts/ubuntu-core-rootfs
   scripts/functions
  +scripts/init-premount
  +scripts/init-premount/ORDER
  +scripts/init-premount/plymouth
   scripts/ubuntu-core-functions
   scripts/local-premount
   scripts/local-premount/ORDER
  @@ -247,6 +359,10 @@
   scripts/local-premount/fixrtc
   scripts/local-premount/dragonmac
   scripts/local-premount/resume
  +scripts/local-top
  +scripts/local-top/ORDER
  +scripts/local-top/cryptroot
  +scripts/local-top/cryptopensc
   scripts/nfs
   scripts/panic
   scripts/panic/ORDER
  @@ -258,10 +374,13 @@
   scripts/local-bottom
   scripts/local-bottom/ORDER
   scripts/local-bottom/fixrtc-mount
  +scripts/local-bottom/cryptopensc
   scripts/init-top
  ...

  so to avoid any possible regression in kernel snaps and keep the
  changes to a minimum, we avoid installing cryptsetup and just enable
  framebuffer in initramfs-tools/conf-hooks.d (see also the attached
  path):

  --- a/Makefile
  +++ b/Makefile
  @@ -106,6 +106,9 @@ all:
  fi
  $(ENV) chroot chroot apt-get -y update;\
  $(ENV) chroot chroot apt-get -y install initramfs-tools-ubuntu-core 
linux-firmware xz-utils
  +   # enable initramfs-tools framebuffer script (and includes the 
necessary
  +   # kmods to initrd.img)
  +   echo "FRAMEBUFFER=y" > 
chroot/usr/share/initramfs-tools/conf-hooks.d/ubuntu-core-fb
  $(ENV) chroot chroot apt-get -y install $(KERNELDEB) $(PKGS)
  umount chroot/sys
  umount chroot/proc

  How to test:

  A diff between the content of an 'empty initrd' and one that is
  generated after applying the above fix, shows that fb kmods are now
  back:

   lib/modules/4.15.0-1042-raspi2/modules.dep.bin
   lib/modules/4.15.0-1042-raspi2/modules.alias
   lib/modules/4.15.0-1042-raspi2/kernel
  +lib/modules/4.15.0-1042-raspi2/kernel/sound
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/soc
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/soc/snd-soc-core.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/ac97_bus.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-timer.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-pcm-dmaengine.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-pcm.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-compress.ko
   lib/modules/4.15.0-1042-raspi2/kernel/drivers
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/rc
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/rc/rc-core.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/cec
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/cec/cec.ko
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c/busses
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c/busses/i2c-bcm2708.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/vc4
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/vc4/vc4.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/bridge
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/bridge/sii902x.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/bridge/tc358767.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/bridge/sil-sii8620.ko
  

[Kernel-packages] [Bug 1838429] Re: Kernel snap initrd is missing several fb related kmods

2019-07-30 Thread Paolo Pisati
** Patch added: "0001-Enable-initramfs-tools-framebuffer-script.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1838429/+attachment/5280020/+files/0001-Enable-initramfs-tools-framebuffer-script.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1838429

Title:
  Kernel snap initrd is missing several fb related kmods

Status in linux package in Ubuntu:
  New
Status in linux-raspi2 package in Ubuntu:
  New

Bug description:
  Impact:

  Around pi-kernel #23 (and pc-kernel #196), kernel snap's initrd went
  missing all fb kmods - that was workarounded for pi-kernel last week
  by manually adding the modules back in:

  commit edd1f8914fded36d4739fd24cdbdd05c5cf37611
  Author: Paolo Pisati 
  Date:   Tue Jul 23 11:30:49 2019 +0200

  Initrd modules: fbdev/hdmi out support for psplash
  
  BugLink: https://launchpad.net/bugs/1837209

  After more debugging, it turned out that the regression was in fact
  the effect of fixing LP#1561643: initrmafs-tools kept installing fb
  modules even when framebuffer support was not enabled, and kernel snap
  never explicitly enabled framebuffer initramfs-tools script, but still
  came bundled with such kmods.

  Fix:

  In Ubuntu Classic, to bundle fb kmods in initrd, we normally install
  cryptsetup:

  $ cat /usr/share/initramfs-tools/conf-hooks.d/cryptsetup
  ...
  FRAMEBUFFER=y

  But cryptsetup, among other things, adds several initramfs-tools hooks
  and scripts to initrd:

  ...
   scripts
   scripts/local
  +scripts/local-block
  +scripts/local-block/ORDER
  +scripts/local-block/cryptroot
   scripts/ubuntu-core-rootfs
   scripts/functions
  +scripts/init-premount
  +scripts/init-premount/ORDER
  +scripts/init-premount/plymouth
   scripts/ubuntu-core-functions
   scripts/local-premount
   scripts/local-premount/ORDER
  @@ -247,6 +359,10 @@
   scripts/local-premount/fixrtc
   scripts/local-premount/dragonmac
   scripts/local-premount/resume
  +scripts/local-top
  +scripts/local-top/ORDER
  +scripts/local-top/cryptroot
  +scripts/local-top/cryptopensc
   scripts/nfs
   scripts/panic
   scripts/panic/ORDER
  @@ -258,10 +374,13 @@
   scripts/local-bottom
   scripts/local-bottom/ORDER
   scripts/local-bottom/fixrtc-mount
  +scripts/local-bottom/cryptopensc
   scripts/init-top
  ...

  so to avoid any possible regression in kernel snaps and keep the
  changes to a minimum, we avoid installing cryptsetup and just enable
  framebuffer in initramfs-tools/conf-hooks.d (see also the attached
  path):

  --- a/Makefile
  +++ b/Makefile
  @@ -106,6 +106,9 @@ all:
  fi
  $(ENV) chroot chroot apt-get -y update;\
  $(ENV) chroot chroot apt-get -y install initramfs-tools-ubuntu-core 
linux-firmware xz-utils
  +   # enable initramfs-tools framebuffer script (and includes the 
necessary
  +   # kmods to initrd.img)
  +   echo "FRAMEBUFFER=y" > 
chroot/usr/share/initramfs-tools/conf-hooks.d/ubuntu-core-fb
  $(ENV) chroot chroot apt-get -y install $(KERNELDEB) $(PKGS)
  umount chroot/sys
  umount chroot/proc

  How to test:

  A diff between the content of an 'empty initrd' and one that is
  generated after applying the above fix, shows that fb kmods are now
  back:

   lib/modules/4.15.0-1042-raspi2/modules.dep.bin
   lib/modules/4.15.0-1042-raspi2/modules.alias
   lib/modules/4.15.0-1042-raspi2/kernel
  +lib/modules/4.15.0-1042-raspi2/kernel/sound
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/soc
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/soc/snd-soc-core.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/ac97_bus.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-timer.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-pcm-dmaengine.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-pcm.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/sound/core/snd-compress.ko
   lib/modules/4.15.0-1042-raspi2/kernel/drivers
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/rc
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/rc/rc-core.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/cec
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/media/cec/cec.ko
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c/busses
   lib/modules/4.15.0-1042-raspi2/kernel/drivers/i2c/busses/i2c-bcm2708.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/vc4
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/vc4/vc4.ko
  +lib/modules/4.15.0-1042-raspi2/kernel/drivers/gpu/drm/bridge