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.

48 lines
1.2 KiB

  1. #!/bin/bash
  2. disksdir="$root/ROCK/target-finish"
  3. # datadir is relative to $base.
  4. datadir="build/${ROCKCFG_ID}/ROCK/target-finish"
  5. mainfunction="bootloader_mainfunction"
  6. bootloader_mainfunction ()
  7. {
  8. if [ "$ROCK_BUILD_TARGET" != 1 ] ; then
  9. echo "$xpkg can only be built with ./scripts/Build-Target!"
  10. false
  11. fi
  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 $root/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 isofs_bootdisk.txt file .."
  35. cat > $root/ROCK/isofs_bootdisk.txt <<- EOT
  36. DISK1 $datadir/boot/ boot/
  37. EOT
  38. rm -rf "$tmpdir"
  39. }