GNU Linux-libre 4.19.306-gnu1 scripts
[releases.git] / deblob-4.19
index 770eff24a56d1eabe945bf20243711d788a2a777..62a48dd90ecd84240e82064601203b92a8a80472 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-#    Copyright (C) 2008-2018 Alexandre Oliva <lxoliva@fsfla.org>
+#    Copyright (C) 2008-2021 Alexandre Oliva <lxoliva@fsfla.org>
 #    Copyright (C) 2008 Jeff Moe
 #    Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
 #
@@ -48,7 +48,7 @@
 
 # For each kver release, start extra with an empty string, then count
 # from 1 if changes are needed that require rebuilding the tarball.
-kver=4.19 extra=
+kver=4.19 extra=1
 
 case $1 in
 --force)
@@ -125,7 +125,7 @@ clean_blob () {
     else
       die failed removing blobs from $name
     fi
-    check_changed $name && echo $name: removed blobs
+    check_changed $name && echo $name: removed blobs or mentions thereof
   else
     clean_file $1
   fi
@@ -408,6 +408,12 @@ What is GNU Linux-libre?\
   contribution to the entire system, so its mascot deserves more\
   promotion.  See our web page for their images.\
   http://linux-libre.fsfla.org/\
+\
+  If you are the author of an awesome program and want to join us in\
+  writing Free (libre) Software, please consider making it an official\
+  GNU program and become a GNU Maintainer.  You can find instructions\
+  on how to do so at https://www.gnu.org/help/evaluation.  We look\
+  forward to hacking with you! :)\
 
 ' Documentation/admin-guide/README.rst 'added blurb about GNU Linux-libre'
 
@@ -431,9 +437,12 @@ clean_sed '
 s,git://git\..*torvalds/linux\.git,/*(DEBLOBBED)*/,
 ' scripts/package/mkdebian 'upstream development repo'
 
-clean_sed '
-s,Name: kernel,&-libre,
-' scripts/package/mkspec 'package name'
+# The tarball name and its expansion do not include -libre.
+# We could change KERNELPATH and keep this, but what else would break?
+# Enabling this would require the other commented-out mkspec bits below.
+# clean_sed '
+# s,Name: kernel,&-libre,
+# ' scripts/package/mkspec 'package name'
 
 clean_sed '
 s,The Linux,The GNU Linux-libre,
@@ -447,13 +456,22 @@ clean_sed '
 s,https\?://www\.kernel\.org,https://linux-libre.fsfla.org,
 ' scripts/package/mkspec 'home page'
 
+# clean_sed '
+# s,\(%description\) -n kernel-,\1 ,
+# ' scripts/package/mkspec '-libre subpackages'
+
+# clean_sed '
+# /Provides: kernel-/{p;s,kernel-,&libre-,;}
+# ' scripts/package/mkspec '-libre provides'
+
+# As with rpms, we leave the package name as kernel.
 clean_sed '
-s,\(%description\) -n kernel-,\1 ,
-' scripts/package/mkspec '-libre subpackages'
+s,The upstream Linux kernel,The GNU Linux-libre kernel,
+' scripts/package/snapcraft.template 'description'
 
 clean_sed '
-/Provides: kernel-/{p;s,kernel-,&libre-,;}
-' scripts/package/mkspec '-libre provides'
+s,Linux kernel,GNU Linux-libre,
+' scripts/package/snapcraft.template 'summary'
 
 # Add reject_firmware and maybe_reject_firmware
 grep -q _LINUX_LIBRE_FIRMWARE_H include/linux/firmware.h ||
@@ -468,7 +486,7 @@ clean_sed '$i\
 static inline int\
 is_nonfree_firmware(const char *name)\
 {\
-  return strstr(name, NONFREE_FIRMWARE) != 0;\
+       return strstr(name, NONFREE_FIRMWARE) != 0;\
 }\
 \
 static inline int\
@@ -484,6 +502,7 @@ firmware_reject_nowarn(const struct firmware **fw,\
 {\
        const struct firmware *xfw = NULL;\
        int retval, retval0 = -ENOENT;\
+       if (fw) *fw = xfw;\
        retval = firmware_request_nowarn(&xfw, NONFREE_FIRMWARE, device);\
        if (!retval) {\
                release_firmware(xfw);\
@@ -518,6 +537,7 @@ reject_firmware_direct(const struct firmware **fw,\
 {\
        const struct firmware *xfw = NULL;\
        int retval, retval0;\
+       if (fw) *fw = xfw;\
        retval0 = report_missing_free_firmware(dev_name(device), NULL);\
        retval = request_firmware_direct(&xfw, NONFREE_FIRMWARE, device);\
        if (!retval) {\
@@ -558,6 +578,7 @@ reject_firmware_into_buf(const struct firmware **firmware_p, const char *name,\
 {\
        const struct firmware *xfw = NULL;\
        int retval, retval0;\
+       if (firmware_p) *firmware_p = xfw;\
        retval0 = report_missing_free_firmware(dev_name(device), NULL);\
        retval = request_firmware_into_buf(&xfw, NONFREE_FIRMWARE, device, buf, size);\
        if (!retval) {\
@@ -611,23 +632,41 @@ s,\(timeout = \)\(firmware_loading_timeout()\),\1is_nonfree_firmware(name) ? 1 :
 announce MICROCODE_AMD - "AMD microcode patch loading support"
 reject_firmware arch/x86/kernel/cpu/microcode/amd.c
 clean_blob arch/x86/kernel/cpu/microcode/amd.c
+if grep -q -i zenbleed.*microcode arch/x86/kernel/cpu/amd.c; then
+  clean_blob arch/x86/kernel/cpu/amd.c
+fi
 clean_kconfig arch/x86/Kconfig MICROCODE_AMD
 clean_mk CONFIG_MICROCODE_AMD arch/x86/kernel/cpu/microcode/Makefile
 
 announce MICROCODE_INTEL - "Intel microcode patch loading support"
 reject_firmware arch/x86/kernel/cpu/microcode/intel.c
 clean_blob arch/x86/kernel/cpu/microcode/intel.c
-clean_blob arch/x86/events/intel/core.c
 clean_kconfig arch/x86/Kconfig MICROCODE_INTEL
 clean_mk CONFIG_MICROCODE_INTEL arch/x86/kernel/cpu/microcode/Makefile
 
 announce MICROCODE - "CPU microcode loading support"
 clean_blob Documentation/x86/microcode.txt
-clean_blob arch/x86/kernel/apic/apic.c
-clean_blob drivers/hwmon/coretemp.c
 clean_kconfig arch/x86/Kconfig MICROCODE
 clean_mk CONFIG_MICROCODE arch/x86/kernel/cpu/Makefile
 
+# Do no recommend non-Free microcode update.
+announce X86_LOCAL_APIC - Undocumented
+clean_blob arch/x86/kernel/apic/apic.c
+clean_kconfig arch/x86/Kconfig X86_LOCAL_APIC
+clean_mk CONFIG_X86_LOCAL_APIC arch/x86/kernel/apic/Makefile
+
+# Do no recommend non-Free microcode update.
+announce CPU_SUP_INTEL - "Support Intel processors"
+clean_blob arch/x86/events/intel/core.c
+clean_kconfig arch/x86/Kconfig.cpu CPU_SUP_INTEL
+clean_mk CONFIG_CPU_SUP_INTEL arch/x86/events/intel/Makefile
+
+# Do no recommend non-Free microcode update.
+announce SENSORS_CORETEMP - "Intel Core/Core2/Atom temperature sensor"
+clean_blob drivers/hwmon/coretemp.c
+clean_kconfig drivers/hwmon/Kconfig SENSORS_CORETEMP
+clean_mk CONFIG_SENSORS_CORETEMP drivers/hwmon/Makefile
+
 # arm
 
 announce IXP4XX_NPE - "IXP4xx Network Processor Engine support"
@@ -655,6 +694,22 @@ clean_blob arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
 clean_kconfig arch/arm/mach-sunxi/Kconfig MACH_SUN8I
 clean_mk CONFIG_MACH_SUN8I arch/arm/boot/dts/Makefile
 
+# ppc
+
+announce UCODE_PATCH - "ppc microcode"
+clean_blob arch/powerpc/sysdev/micropatch.c
+clean_kconfig arch/powerpc/platforms/8xx/Kconfig UCODE_PATCH
+clean_mk CONFIG_UCODE_PATCH arch/powerpc/sysdev/Makefile
+
+announce USB_SOF_UCODE_PATCH - "USB SOF patch"
+clean_kconfig arch/powerpc/platforms/8xx/Kconfig USB_SOF_UCODE_PATCH
+
+announce I2C_SPI_UCODE_PATCH - "I2C/SPI relocation patch"
+clean_kconfig arch/powerpc/platforms/8xx/Kconfig I2C_SPI_UCODE_PATCH
+
+announce I2C_SPI_SMC1_UCODE_PATCH - "I2C/SPI/SMC1 relocation patch"
+clean_kconfig arch/powerpc/platforms/8xx/Kconfig I2C_SPI_SMC1_UCODE_PATCH
+
 #######
 # ATM #
 #######
@@ -798,7 +853,7 @@ clean_blob drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
 clean_kconfig drivers/gpu/drm/amd/amdgpu/Kconfig DRM_AMDGPU_CIK
 clean_mk CONFIG_DRM_AMDGPU_CIK drivers/gpu/drm/amd/amdgpu/Makefile
 
-announce DRM_AMDGPU_SI - "Enable amdgpu support for CIK parts"
+announce DRM_AMDGPU_SI - "Enable amdgpu support for SI parts"
 reject_firmware drivers/gpu/drm/amd/amdgpu/si_dpm.c
 clean_blob drivers/gpu/drm/amd/amdgpu/si_dpm.c
 reject_firmware drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -1506,6 +1561,11 @@ clean_blob drivers/media/i2c/s5k5baf.c
 clean_kconfig drivers/media/i2c/Kconfig VIDEO_S5K5BAF
 clean_mk CONFIG_VIDEO_S5K5BAF drivers/media/i2c/Makefile
 
+announce VIDEO_VS6624 - "ST VS6624 sensor support"
+clean_blob drivers/media/i2c/vs6624.c
+clean_kconfig drivers/media/i2c/Kconfig VIDEO_VS6624
+clean_mk CONFIG_VIDEO_VS6624 drivers/media/i2c/Makefile
+
 announce VIDEO_SAMSUNG_S5P_MFC - "Samsung S5P MFC 5.1 Video Codec"
 reject_firmware drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
 clean_blob drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1689,8 +1749,13 @@ clean_kconfig drivers/net/ethernet/qlogic/Kconfig QLCNIC
 clean_mk CONFIG_QLCNIC drivers/net/ethernet/qlogic/qlcnic/Makefile
 
 announce R8169 - "Realtek 8169 gigabit ethernet support"
-reject_firmware drivers/net/ethernet/realtek/r8169.c
-clean_blob drivers/net/ethernet/realtek/r8169.c
+if test -f drivers/net/ethernet/realtek/r8169_main.c; then
+  reject_firmware drivers/net/ethernet/realtek/r8169_main.c
+  clean_blob drivers/net/ethernet/realtek/r8169_main.c
+else
+  reject_firmware drivers/net/ethernet/realtek/r8169.c
+  clean_blob drivers/net/ethernet/realtek/r8169.c
+fi
 clean_kconfig drivers/net/ethernet/realtek/Kconfig R8169
 clean_mk CONFIG_R8169 drivers/net/ethernet/realtek/Makefile
 
@@ -1879,7 +1944,11 @@ clean_mk CONFIG_BRCMSMAC drivers/net/wireless/broadcom/brcm80211/Makefile
 
 announce BRCMFMAC - "Broadcom IEEE802.11n embedded FullMAC WLAN driver"
 reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
-reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+if grep -q firmware_request_nowarn drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c; then
+  reject_firmware_nowarn drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+else
+  reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+fi
 clean_blob drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
 clean_blob drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
 clean_kconfig drivers/net/wireless/broadcom/brcm80211/Kconfig BRCMFMAC
@@ -2813,6 +2882,7 @@ announce SCSI_LPFC - "Emulex LightPulse Fibre Channel Support"
 # this is the hardware or the software inducing to the installation of
 # non-Free firmware.
 reject_firmware drivers/scsi/lpfc/lpfc_init.c
+clean_blob drivers/scsi/lpfc/lpfc_init.c
 clean_kconfig drivers/scsi/Kconfig SCSI_LPFC
 clean_mk CONFIG_SCSI_LPFC drivers/scsi/lpfc/Makefile
 
@@ -3007,7 +3077,7 @@ clean_blob drivers/remoteproc/qcom_q6v5_wcss.c
 clean_kconfig drivers/remoteproc/Kconfig QCOM_Q6V5_WCSS
 clean_mk CONFIG_QCOM_Q6V5_WCSS drivers/remoteproc/Makefile
 
-announce QCOM_WCNSS_PIL - "Qualcomm WCNSS Peripherial Image Loader"
+announce QCOM_WCNSS_PIL - "Qualcomm WCNSS Peripheral Image Loader"
 clean_blob drivers/remoteproc/qcom_wcnss.c
 clean_kconfig drivers/remoteproc/Kconfig QCOM_WCNSS_PIL
 clean_mk CONFIG_QCOM_WCNSS_PIL drivers/remoteproc/Makefile
@@ -3138,7 +3208,7 @@ clean_blob sound/pci/echoaudio/mona.c
 clean_kconfig sound/pci/Kconfig SND_MONA
 clean_mk CONFIG_SND_MONA sound/pci/echoaudio/Makefile
 
-announce SND_'<(Echoaudio)>' - "(Echoaudio) all of the above "
+announce SND_'<(Echoaudio)>' - "(Echoaudio) all of the above"
 reject_firmware sound/pci/echoaudio/echoaudio.c
 clean_blob sound/pci/echoaudio/echoaudio.c
 
@@ -3417,6 +3487,15 @@ clean_sed s,usb8388,whatever,g drivers/base/firmware_loader/Kconfig 'removed blo
 
 if $errors; then
   echo errors above were ignored because of --force >&2
+else
+  echo cleaning up has completed successfully, without verification >&2
+  # Verification is largely manual, comparing the changes with
+  # those of a previous known (presumed) good version, e.g.
+  # git merge the previous known good version onto the current base
+  # version, and then git diff with this cleaned-up version.
+  # Creating a tarball of this version, named linux-*.*.tar,
+  # and running deblob-check on it may also help catch cleaning-up
+  # errors: .../deblob-check --use-awk -B linux-*.*.tar.
 fi
 
 exit 0