OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../mkinitramfs/find_template.in
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # find the image
  15. #
  16. initrd_img="$base/config/$config/initrd.img"
  17. if [ -s "$initrd_img" ]; then
  18. # explicit overwrite
  19. echo_status "mkinitramfs: Using given ${mkinitramfs_tpl#$base/}."
  20. elif [ -z "$SDECFG_PKG_MKINITRAMFS_TPL" ]; then
  21. initrd_img=
  22. else
  23. # wanted initramfs config
  24. x="$base/config/$SDECFG_PKG_MKINITRAMFS_TPL/config"
  25. if [ ! -s "$x" ]; then
  26. echo_error "mkinitramfs: '$SDECFG_PKG_MKINITRAMFS_TPL' config not found."
  27. initrd_img=
  28. else
  29. x=$(grep SDECFG_ID= "$x" | cut -d"'" -f2)
  30. if [ -d "$base/loop/build" ]; then
  31. initrd_img="$base/loop/build/$x/TOOLCHAIN/initrd.img"
  32. else
  33. initrd_img="$base/build/$x/TOOLCHAIN/initrd.img"
  34. fi
  35. if [ -s "$initrd_img" ]; then
  36. echo_status "mkinitramfs: Using $SDECFG_PKG_MKINITRAMFS_TPL's initrd.img"
  37. else
  38. echo_error "mkinitramfs: '$SDECFG_PKG_MKINITRAMFS_TPL' doesn't contain an initrd.img"
  39. initrd_img=
  40. fi
  41. fi
  42. fi