make-c201-kernel.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. ## Copyright (C) 2016 Kevin Bloom <kdb4@openmailbox.org>
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #
  17. # Commentary:
  18. #
  19. # This script will take the hastle out of creating your own kernel to boot on
  20. # the C201. Keep in mind that you will need to modify this script for whatever
  21. # version you wish to use.
  22. #
  23. # NOTE: If you uncomment the last command, make sure you put in the correct
  24. # kernel partition for whatever device you're using.
  25. # Generate the new image
  26. mkimage -D "-I dts -O dtb -p 2048" -f kernel.its kernel.itb
  27. # Sign the new image and apply the necessary parameters
  28. vbutil_kernel --pack newkernel \
  29. --keyblock kernel.keyblock \
  30. --version 1 \
  31. --signprivate kernel_data_key.vbprivk \
  32. --bootloader config.txt --config config.txt \
  33. --vmlinuz kernel.itb --arch arm
  34. # Flash to kernel partition
  35. # dd if=newkernel of=/dev/sda1
  36. # Verfify that it's correct
  37. # vbutil_kernel --verify /dev/sda1