home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   linux.debian.kernel      Debian kernel discussions      2,884 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,766 of 2,884   
   Mark Glines to All   
   Bug#1080340: initramfs-tools does not us   
   27 Nov 25 00:00:01   
   
   XPost: linux.debian.bugs.dist   
   From: mark@glines.org   
      
   Hi,   
      
   I found that the hook is also necessary on the t14s.  However, I needed to   
   tweak it slightly.   
      
   My devicetree (from kernel 6.18-rc7) has a couple of firmware-files entries   
   with 2 filenames, like this:   
      
                   remoteproc@6800000 {   
                           compatible = "qcom,x1e80100-adsp-pas";   
   [...]   
                           status = "okay";   
                           firmware-name = "qcom/x1e80100/LENOVO/21   
   1/qcadsp8380.mbn", "qcom/x1e80100/LENOVO/21N1/adsp_dtbs.elf";   
      
   sysfs represents it as a file containing two null-terminated strings:   
      
   # hexdump -C /sys/firmware/devicetree/base/soc\@0/remoteproc\@68   
   0000/firmware-name   
   00000000  71 63 6f 6d 2f 78 31 65  38 30 31 30 30 2f 4c 45  |qcom/x1e80100/LE|   
   00000010  4e 4f 56 4f 2f 32 31 4e  31 2f 71 63 61 64 73 70  |NOVO/21N1/qcadsp|   
   00000020  38 33 38 30 2e 6d 62 6e  00 71 63 6f 6d 2f 78 31  |8380.mbn.qcom/x1|   
   00000030  65 38 30 31 30 30 2f 4c  45 4e 4f 56 4f 2f 32 31  |e80100/LENOVO/21|   
   00000040  4e 31 2f 61 64 73 70 5f  64 74 62 73 2e 65 6c 66  |N1/adsp_dtbs.elf|   
   00000050  00                                                |.|   
      
   Using "cat" dropped the null, causing the two paths to be concatenated   
   together.   
   Ultimately, it produced a warning for the nonexistent file   
   "qcom/x1e80100/LENOVO/21N1/qcadsp8380.mbnqcom/x1e80100/LENOVO/21   
   1/adsp_dtbs.elf".   
      
   I changed the script's loop to use "strings", instead of "cat":   
      
   for node in $(find /sys/firmware/devicetree -name firmware-name); do   
     for firmware in $(strings "${node}"); do   
       if ! add_firmware "${firmware}"; then   
         echo "W: Possible missing firmware /lib/firmware/${firmware}   
         found in devicetree" >&2   
       fi   
     done   
   done   
      
   And now it works great.   
      
   Thanks,   
   Mark   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca