Building the Linux kernel, adding an additional file to the deb package

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I would like to build this kernel: https://github.com/raspberrypi/linux/tree/rpi-4.14.y-rt



It's the kernel for the raspberry pi. I would like to build the deb packages which can be done with: make deb-pkg.



When installing the resulting packages, a vmlinuz**** file is installed into /boot. The Raspberry Pi needs an .img image tough.



The .img image can be generated using make zImage.



Now I just need to find a way to include the .img in the deb packages.



I think this script is responsible for the deb package creation:
https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb



Here is what I tried:



# ./zImage is the generated .img image
mv ./zImage ./arch/arm/boot/kernel7.img
make deb-pkg


It was completely ignored and not included in the resulting .deb files.



I know I could probably just unpack the deb packages, add the file and pack them again, but I think the other files might not be valid then anymore (the .changes file for instance).







share|improve this question
























    up vote
    0
    down vote

    favorite
    1












    I would like to build this kernel: https://github.com/raspberrypi/linux/tree/rpi-4.14.y-rt



    It's the kernel for the raspberry pi. I would like to build the deb packages which can be done with: make deb-pkg.



    When installing the resulting packages, a vmlinuz**** file is installed into /boot. The Raspberry Pi needs an .img image tough.



    The .img image can be generated using make zImage.



    Now I just need to find a way to include the .img in the deb packages.



    I think this script is responsible for the deb package creation:
    https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb



    Here is what I tried:



    # ./zImage is the generated .img image
    mv ./zImage ./arch/arm/boot/kernel7.img
    make deb-pkg


    It was completely ignored and not included in the resulting .deb files.



    I know I could probably just unpack the deb packages, add the file and pack them again, but I think the other files might not be valid then anymore (the .changes file for instance).







    share|improve this question






















      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I would like to build this kernel: https://github.com/raspberrypi/linux/tree/rpi-4.14.y-rt



      It's the kernel for the raspberry pi. I would like to build the deb packages which can be done with: make deb-pkg.



      When installing the resulting packages, a vmlinuz**** file is installed into /boot. The Raspberry Pi needs an .img image tough.



      The .img image can be generated using make zImage.



      Now I just need to find a way to include the .img in the deb packages.



      I think this script is responsible for the deb package creation:
      https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb



      Here is what I tried:



      # ./zImage is the generated .img image
      mv ./zImage ./arch/arm/boot/kernel7.img
      make deb-pkg


      It was completely ignored and not included in the resulting .deb files.



      I know I could probably just unpack the deb packages, add the file and pack them again, but I think the other files might not be valid then anymore (the .changes file for instance).







      share|improve this question












      I would like to build this kernel: https://github.com/raspberrypi/linux/tree/rpi-4.14.y-rt



      It's the kernel for the raspberry pi. I would like to build the deb packages which can be done with: make deb-pkg.



      When installing the resulting packages, a vmlinuz**** file is installed into /boot. The Raspberry Pi needs an .img image tough.



      The .img image can be generated using make zImage.



      Now I just need to find a way to include the .img in the deb packages.



      I think this script is responsible for the deb package creation:
      https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb



      Here is what I tried:



      # ./zImage is the generated .img image
      mv ./zImage ./arch/arm/boot/kernel7.img
      make deb-pkg


      It was completely ignored and not included in the resulting .deb files.



      I know I could probably just unpack the deb packages, add the file and pack them again, but I think the other files might not be valid then anymore (the .changes file for instance).









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 at 14:26









      Forivin

      178110




      178110




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.



          binary-arch:
          $(MAKE) KDEB_SOURCENAME=$sourcename KDEB_PKGVERSION=$packageversion bindeb-pkg


          So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.






          share|improve this answer




















          • I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
            – Forivin
            Mar 6 at 15:30










          • Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
            – Yurij Goncharuk
            Mar 6 at 16:02











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428522%2fbuilding-the-linux-kernel-adding-an-additional-file-to-the-deb-package%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.



          binary-arch:
          $(MAKE) KDEB_SOURCENAME=$sourcename KDEB_PKGVERSION=$packageversion bindeb-pkg


          So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.






          share|improve this answer




















          • I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
            – Forivin
            Mar 6 at 15:30










          • Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
            – Yurij Goncharuk
            Mar 6 at 16:02















          up vote
          0
          down vote













          'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.



          binary-arch:
          $(MAKE) KDEB_SOURCENAME=$sourcename KDEB_PKGVERSION=$packageversion bindeb-pkg


          So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.






          share|improve this answer




















          • I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
            – Forivin
            Mar 6 at 15:30










          • Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
            – Yurij Goncharuk
            Mar 6 at 16:02













          up vote
          0
          down vote










          up vote
          0
          down vote









          'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.



          binary-arch:
          $(MAKE) KDEB_SOURCENAME=$sourcename KDEB_PKGVERSION=$packageversion bindeb-pkg


          So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.






          share|improve this answer












          'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.



          binary-arch:
          $(MAKE) KDEB_SOURCENAME=$sourcename KDEB_PKGVERSION=$packageversion bindeb-pkg


          So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 6 at 14:57









          Yurij Goncharuk

          2,2582521




          2,2582521











          • I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
            – Forivin
            Mar 6 at 15:30










          • Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
            – Yurij Goncharuk
            Mar 6 at 16:02

















          • I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
            – Forivin
            Mar 6 at 15:30










          • Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
            – Yurij Goncharuk
            Mar 6 at 16:02
















          I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
          – Forivin
          Mar 6 at 15:30




          I found the bindeb-pkg section in this file: github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/… But I don't understand what I would have to add or where I would have to put my files in order to make them appear in the .deb package.
          – Forivin
          Mar 6 at 15:30












          Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
          – Yurij Goncharuk
          Mar 6 at 16:02





          Try to add ' cp "$tmpdir/$installed_image_path" "$tmpdir/$installed_image_path".img ' after line 143 in file github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/….
          – Yurij Goncharuk
          Mar 6 at 16:02













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428522%2fbuilding-the-linux-kernel-adding-an-additional-file-to-the-deb-package%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay