** Description changed:

- The size of the pi-kernel snap for UC20 is 254Mbytes (compressed) and
+ [ Impact ]
+ 
+ Pi kernel snaps are big in part due to included firmware binaries. A lot
+ of these binaries are not needed/required by the Pi kernel. The size of
+ the snap has a negative impact on boot speed.
+ 
+ [ Fix ]
+ 
+ Parse modinfo data from all modules to determine the list of required
+ firmware files and remove the ones that are not necessary.
+ 
+ [ Test Case ]
+ 
+ On core20 before:
+ $ du -sh /lib/firmware/
+ 602M  /lib/firmware/
+ 
+ And after:
+ $ du -sh /lib/firmware/
+ 58M   /lib/firmware/
+ 
+ [ Where Problems Could Occur ]
+ 
+ We might accidentally drop needed firmware which might render the
+ relevant HW unusable. Firmware load failures should be visible in the
+ kernel log though.
+ 
+ [ Original Description ]
+ 
+ The size of the pi-kernel snap for UC20 is 254Mbytes (compressed) and 
  794Mbytes (uncompressed).
  
  569Mbyte of this is caused by FW
  
  140Mbyte -> Netronome SmartNIC
  
  Removing unreferenced FW and/or reducing number of drivers & their FW
  has exponential reduction of disk space usage.
  
  Additionally, downloaded image will be smaller; and storing 3x kernel
  snaps for upgrades will be smaller.
  
  Even more, snap seeding will be faster, so boot time will be faster.
  
  So it will be a nice gain in multiple aspects: download image, boot
  image, upgrade image, reboot image, start using image.
  
- stulluk ~/tmp $  ls -lah pi-kernel_353.snap 
+ stulluk ~/tmp $  ls -lah pi-kernel_353.snap
  -rw------- 1 stulluk stulluk 254M Kas  8 13:57 pi-kernel_353.snap
  stulluk ~/tmp $  cd pikern/
  stulluk ~/tmp/pikern $  du -sh
  794M  .
  stulluk ~/tmp/pikern $  cd firmware/
  stulluk ~/tmp/pikern/firmware $  du --block-size=MiB --max-depth=1 . | sort 
-rn
  569MiB        .
  140MiB        ./netronome
  40MiB ./amdgpu
  34MiB ./intel
  25MiB ./liquidio
  24MiB ./qcom
  20MiB ./qed
  19MiB ./brcm
  12MiB ./mellanox
  12MiB ./dpaa2
  12MiB ./ath10k
  ...

** Also affects: linux-raspi (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Description changed:

  [ Impact ]
  
  Pi kernel snaps are big in part due to included firmware binaries. A lot
  of these binaries are not needed/required by the Pi kernel. The size of
  the snap has a negative impact on boot speed.
  
  [ Fix ]
  
  Parse modinfo data from all modules to determine the list of required
- firmware files and remove the ones that are not necessary.
+ firmware files and remove the ones that are not necessary during snap
+ build time.
  
  [ Test Case ]
  
  On core20 before:
  $ du -sh /lib/firmware/
  602M  /lib/firmware/
  
  And after:
  $ du -sh /lib/firmware/
  58M   /lib/firmware/
  
  [ Where Problems Could Occur ]
  
  We might accidentally drop needed firmware which might render the
  relevant HW unusable. Firmware load failures should be visible in the
  kernel log though.
  
  [ Original Description ]
  
- The size of the pi-kernel snap for UC20 is 254Mbytes (compressed) and 
+ The size of the pi-kernel snap for UC20 is 254Mbytes (compressed) and
  794Mbytes (uncompressed).
  
  569Mbyte of this is caused by FW
  
  140Mbyte -> Netronome SmartNIC
  
  Removing unreferenced FW and/or reducing number of drivers & their FW
  has exponential reduction of disk space usage.
  
  Additionally, downloaded image will be smaller; and storing 3x kernel
  snaps for upgrades will be smaller.
  
  Even more, snap seeding will be faster, so boot time will be faster.
  
  So it will be a nice gain in multiple aspects: download image, boot
  image, upgrade image, reboot image, start using image.
  
  stulluk ~/tmp $  ls -lah pi-kernel_353.snap
  -rw------- 1 stulluk stulluk 254M Kas  8 13:57 pi-kernel_353.snap
  stulluk ~/tmp $  cd pikern/
  stulluk ~/tmp/pikern $  du -sh
  794M  .
  stulluk ~/tmp/pikern $  cd firmware/
  stulluk ~/tmp/pikern/firmware $  du --block-size=MiB --max-depth=1 . | sort 
-rn
  569MiB        .
  140MiB        ./netronome
  40MiB ./amdgpu
  34MiB ./intel
  25MiB ./liquidio
  24MiB ./qcom
  20MiB ./qed
  19MiB ./brcm
  12MiB ./mellanox
  12MiB ./dpaa2
  12MiB ./ath10k
  ...

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

Title:
  Ucore kernel snap size: netronome smartnic fw

Status in linux-raspi package in Ubuntu:
  New
Status in linux-raspi source package in Focal:
  New

Bug description:
  [ Impact ]

  Pi kernel snaps are big in part due to included firmware binaries. A
  lot of these binaries are not needed/required by the Pi kernel. The
  size of the snap has a negative impact on boot speed.

  [ Fix ]

  Parse modinfo data from all modules to determine the list of required
  firmware files and remove the ones that are not necessary during snap
  build time.

  [ Test Case ]

  On core20 before:
  $ du -sh /lib/firmware/
  602M  /lib/firmware/

  And after:
  $ du -sh /lib/firmware/
  58M   /lib/firmware/

  [ Where Problems Could Occur ]

  We might accidentally drop needed firmware which might render the
  relevant HW unusable. Firmware load failures should be visible in the
  kernel log though.

  [ Original Description ]

  The size of the pi-kernel snap for UC20 is 254Mbytes (compressed) and
  794Mbytes (uncompressed).

  569Mbyte of this is caused by FW

  140Mbyte -> Netronome SmartNIC

  Removing unreferenced FW and/or reducing number of drivers & their FW
  has exponential reduction of disk space usage.

  Additionally, downloaded image will be smaller; and storing 3x kernel
  snaps for upgrades will be smaller.

  Even more, snap seeding will be faster, so boot time will be faster.

  So it will be a nice gain in multiple aspects: download image, boot
  image, upgrade image, reboot image, start using image.

  stulluk ~/tmp $  ls -lah pi-kernel_353.snap
  -rw------- 1 stulluk stulluk 254M Kas  8 13:57 pi-kernel_353.snap
  stulluk ~/tmp $  cd pikern/
  stulluk ~/tmp/pikern $  du -sh
  794M  .
  stulluk ~/tmp/pikern $  cd firmware/
  stulluk ~/tmp/pikern/firmware $  du --block-size=MiB --max-depth=1 . | sort 
-rn
  569MiB        .
  140MiB        ./netronome
  40MiB ./amdgpu
  34MiB ./intel
  25MiB ./liquidio
  24MiB ./qcom
  20MiB ./qed
  19MiB ./brcm
  12MiB ./mellanox
  12MiB ./dpaa2
  12MiB ./ath10k
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1951422/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to