mirror of the now-defunct rocklinux.org
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.

55 lines
1.3 KiB

  1. #!/bin/bash
  2. mainfunction="bootloader_mainfunction"
  3. bootloader_mainfunction ()
  4. {
  5. if [ "$ROCK_BUILD_TARGET" != 1 ] ; then
  6. echo "$xpkg can only be built with ./scripts/Build-Target!"
  7. false
  8. fi
  9. rootdir="$root"
  10. build_rock="$root/ROCK"
  11. disksdir="$build_rock/target"
  12. tmpdir="$( mktemp -d )" ; mkdir -p "$tmpdir"
  13. pkg_suffix=.no_binpkg
  14. if [ "$ROCKCFG_CREATE_TARBZ2" == 1 ] ; then
  15. pkg_suffix='.tar.bz2'
  16. install_pkg() { eval tar $taropt $1 || true ; }
  17. elif [ "$ROCKCFG_CREATE_GEM" == 1 ] ; then
  18. pkg_suffix='.gem'
  19. install_pkg() { eval mine -if -R . $1 || true ; }
  20. fi
  21. if [ "$ROCKCFG_PKGFILE_VER" == 1 ] ; then
  22. pkg_suffix='-$pkg_ver-$pkg_extraver'$pkg_suffix
  23. fi
  24. cd $disksdir
  25. rm -rf boot/ ; mkdir -p boot
  26. # Provide at least the kernel and initrd image in the boot/ directory of the
  27. # ISO image, useful for direct booting with qemu.
  28. cp -a $rootdir/boot/* boot/
  29. rm -f boot/{initrd.img,kconfig,System.map}*
  30. ln $ROCKCFG_PKG_1ST_STAGE_INITRD.gz boot/
  31. if [ -f $confdir/$arch/build.sh ]; then
  32. . $confdir/$arch/build.sh
  33. fi
  34. echo "Creating ISO filesystem description."
  35. rm -rf isofs; mkdir -p isofs
  36. echo "Creating isofs directory.."
  37. ln 2nd_stage.tar.gz 2nd_stage_small.tar.gz isofs/
  38. echo "Creating isofs.txt file .."
  39. cat > $build_rock/isofs_bootdisk.txt <<- EOT
  40. DISK1 $disksdir/boot/ boot/
  41. DISK1 $disksdir/isofs/ ${ROCKCFG_SHORTID}/
  42. EOT
  43. rm -rf "$tmpdir"
  44. }