adjust further for GNU Linux-libre 6.7.11-gnu
[releases.git] / deblob-4.14
index bb76d7ce5a5c2d42779375303ab029244d6c9353..d37177aef24dc568935210ea51771bcdad4e060b 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-#    Copyright (C) 2008-2017 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.14 extra=
+kver=4.14 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
@@ -387,6 +387,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'
 
@@ -403,7 +409,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\
@@ -411,18 +417,20 @@ report_missing_free_firmware(const char *name, const char *what)\
 {\
        printk(KERN_ERR "%s: Missing Free %s (non-Free firmware loading is disabled)\\n", name,\
               what ? what : "firmware");\
-       return -EINVAL;\
+       return -ENOENT;\
 }\
 static inline int\
 reject_firmware(const struct firmware **fw,\
                const char *name, struct device *device)\
 {\
        const struct firmware *xfw = NULL;\
-       int retval;\
-       report_missing_free_firmware(dev_name(device), NULL);\
+       int retval, retval0;\
+       retval0 = report_missing_free_firmware(dev_name(device), NULL);\
        retval = request_firmware(&xfw, NONFREE_FIRMWARE, device);\
-       if (!retval)\
+       if (!retval) {\
                release_firmware(xfw);\
+               retval = retval0;\
+       }\
        return -EINVAL;\
 }\
 static inline int\
@@ -439,17 +447,15 @@ reject_firmware_direct(const struct firmware **fw,\
                const char *name, struct device *device)\
 {\
        const struct firmware *xfw = NULL;\
-       int retval;\
-       report_missing_free_firmware(dev_name(device), 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)\
+       if (!retval) {\
                release_firmware(xfw);\
-       return -EINVAL;\
-}\
-static inline void\
-discard_rejected_firmware(const struct firmware *fw, void *context)\
-{\
-       release_firmware(fw);\
+               retval = retval0;\
+       }\
+       return retval;\
 }\
 static inline int\
 reject_firmware_nowait(struct module *module, int uevent,\
@@ -458,14 +464,10 @@ reject_firmware_nowait(struct module *module, int uevent,\
                       void (*cont)(const struct firmware *fw,\
                                    void *context))\
 {\
-       int retval;\
        report_missing_free_firmware(dev_name(device), NULL);\
-       retval = request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,\
-                                        device, gfp, NULL,\
-                                        discard_rejected_firmware);\
-       if (retval)\
-               return retval;\
-       return -EINVAL;\
+       /* We assume NONFREE_FIRMWARE will not be found; how could it?  */\
+       return request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,\
+                                      device, gfp, context, cont);\
 }\
 static inline int\
 maybe_reject_firmware_nowait(struct module *module, int uevent,\
@@ -486,12 +488,15 @@ reject_firmware_into_buf(const struct firmware **firmware_p, const char *name,\
                         struct device *device, void *buf, size_t size)\
 {\
        const struct firmware *xfw = NULL;\
-       int retval;\
-       report_missing_free_firmware(dev_name(device), 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)\
+       if (!retval) {\
                release_firmware(xfw);\
-       return -EINVAL;\
+               retval = retval0;\
+       }\
+       return retval;\
 }\
 static inline int\
 maybe_reject_firmware_into_buf(const struct firmware **firmware_p, const char *name,\
@@ -515,7 +520,7 @@ static inline int\
 maybe_reject_ihex_firmware(const struct firmware **fw,\
                           const char *name, struct device *device)\
 {\
-       if (strstr (name, NONFREE_FIRMWARE))\
+       if (is_nonfree_firmware(name))\
                return reject_firmware(fw, name, device);\
        else\
                return request_ihex_firmware(fw, name, device);\
@@ -552,6 +557,24 @@ clean_blob Documentation/x86/microcode.txt
 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"
@@ -579,6 +602,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 #
 #######
@@ -714,7 +753,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
@@ -1285,11 +1324,6 @@ clean_blob drivers/staging/media/atomisp/i2c/ap1302.c
 clean_kconfig drivers/staging/media/atomisp/i2c/Kconfig VIDEO_AP1302
 clean_mk CONFIG_VIDEO_AP1302 drivers/staging/media/atomisp/i2c/Makefile
 
-announce VIDEO_MSRLIST_HELPER - "Helper library to load, parse and apply large register lists."
-reject_firmware drivers/staging/media/atomisp/i2c/libmsrlisthelper.c
-clean_kconfig drivers/staging/media/atomisp/i2c/Kconfig VIDEO_MSRLIST_HELPER
-clean_mk CONFIG_VIDEO_MSRLIST_HELPER drivers/staging/media/atomisp/i2c/Makefile
-
 announce VIDEO_ATOMISP - "Intel Atom Image Signal Processor Driver"
 reject_firmware drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
 clean_blob drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
@@ -1434,6 +1468,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
@@ -2717,6 +2756,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
 
@@ -2895,6 +2935,11 @@ maybe_reject_firmware drivers/remoteproc/remoteproc_core.c
 clean_kconfig drivers/remoteproc/Kconfig REMOTEPROC
 clean_mk CONFIG_REMOTEPROC drivers/remoteproc/Makefile
 
+announce KEYSTONE_REMOTEPROC - "Keystone Remoteproc support"
+clean_blob drivers/remoteproc/keystone_remoteproc.c
+clean_kconfig drivers/remoteproc/Kconfig KEYSTONE_REMOTEPROC
+clean_mk CONFIG_KEYSTONE_REMOTEPROC drivers/remoteproc/Makefile
+
 announce WKUP_M3_RPROC - "AMx3xx Wakeup M3 remoteproc support"
 clean_blob Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt
 clean_blob arch/arm/boot/dts/am33xx.dtsi
@@ -2913,7 +2958,7 @@ clean_blob drivers/remoteproc/qcom_q6v5_pil.c
 clean_kconfig drivers/remoteproc/Kconfig QCOM_Q6V5_PIL
 clean_mk CONFIG_QCOM_Q6V5_PIL 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
@@ -3044,7 +3089,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
 
@@ -3095,11 +3140,7 @@ clean_blob sound/pci/rme9652/hdsp.c
 clean_kconfig sound/pci/Kconfig SND_HDSP
 clean_mk CONFIG_SND_HDSP sound/pci/rme9652/Makefile
 
-announce SND_AICA - "Dreamcast Yamaha AICA sound"
-reject_firmware sound/sh/aica.c
-clean_blob sound/sh/aica.c
-clean_kconfig sound/sh/Kconfig SND_AICA
-clean_mk CONFIG_SND_AICA sound/sh/Makefile
+# SND_AICA is no longer disabled, its firmware is Free Software.
 
 announce SND_MSND_PINNACLE - "Support for Turtle Beach MultiSound Pinnacle"
 clean_blob sound/isa/msnd/msnd_pinnacle.h
@@ -3361,6 +3402,15 @@ clean_sed s,usb8388,whatever,g drivers/base/Kconfig 'removed blob name'
 
 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