Browse Source

Corrects an issue with the variable MODE not being recognized.

master
freesource 22 years ago
parent
commit
19e2a7e0f8
  1. 11
      Makefile.pkg

11
Makefile.pkg

@ -28,7 +28,8 @@ GENEXT2_DIR=$(BASE_DIR)/genext2fs
# skas-or-tt .. MODE is automatically figured out, and added as an # skas-or-tt .. MODE is automatically figured out, and added as an
# uml-options for CLI. # uml-options for CLI.
SKAS_OR_TT_DIR=$(BASE_DIR)/skas-or-tt SKAS_OR_TT_DIR=$(BASE_DIR)/skas-or-tt
MODE=tt # Seems some versions of bash don't like the variable changed on the fly
#MODE=tt
# Utilities # Utilities
UTILITIES=uml_utilities_$(UTIL_VER).tar.bz2 UTILITIES=uml_utilities_$(UTIL_VER).tar.bz2
@ -44,7 +45,7 @@ skas-or-tt:
$(MAKE) -C $(SKAS_OR_TT_DIR); \ $(MAKE) -C $(SKAS_OR_TT_DIR); \
strip -s $(SKAS_OR_TT_DIR)/skas-or-tt; \ strip -s $(SKAS_OR_TT_DIR)/skas-or-tt; \
fi; fi;
perl -e 'open(IT,"skas-or-tt/skas-or-tt|") or die "Trouble opening skas-or-tt/skas-or-tt\n"; while (<IT>) { if (!m,not found$$,) { $$it = "skas"; } else { $$it = "tt"; } } system "perl -pi.bak -e \"s/MODE=tt\\n/MODE=skas\\n/\" Makefile" if $$it eq "skas"; system "perl -pi.bak -e \"s/MODE=skas\\n/MODE=tt\\n/\" Makefile" if $$it eq "tt"; ' perl -e 'open(IT,"skas-or-tt/skas-or-tt|") or die "Trouble opening skas-or-tt/skas-or-tt\n"; while (<IT>) { if (!m,not found$$,) { $$it = "skas"; } else { $$it = "tt"; } } system "perl -pi.bak -e \"s/MODE\\n/skas\\n/g\" Makefile" if $$it eq "skas"; system "perl -pi.bak -e \"s/MODE\\n/tt\\n/g\" Makefile" if $$it eq "tt"; '
sources: sources:
@ -106,18 +107,18 @@ kernel:
root_fs_helper: skas-or-tt genext2fs root_fs_helper: skas-or-tt genext2fs
@if [ ! -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \ @if [ ! -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \
perl -I . ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command "genext2fs -z -r0" --genext2fs-dir genext2fs/ --uml-options mode=$(MODE); \ perl -I . ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command "genext2fs -z -r0" --genext2fs-dir genext2fs/ --uml-options mode=MODE; \
cp -fa $(TMP)/root_fs_helper $(ROOT_FS_DIR) ; \ cp -fa $(TMP)/root_fs_helper $(ROOT_FS_DIR) ; \
fi; fi;
@if [ -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \ @if [ -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \
perl -I. ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command mkcramfs --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --uml-options mode=$(MODE); \ perl -I. ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command mkcramfs --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --uml-options mode=MODE; \
cp -fa $(TMP)/root_fs_helper_cramfs $(ROOT_FS_DIR)/root_fs_helper; \ cp -fa $(TMP)/root_fs_helper_cramfs $(ROOT_FS_DIR)/root_fs_helper; \
fi; fi;
initrd: modules root_fs_helper initrd: modules root_fs_helper
@if [ ! -f $(ROOT_FS_DIR)/Initrd.gz ] ; then \ @if [ ! -f $(ROOT_FS_DIR)/Initrd.gz ] ; then \
perl -I. ./gbootroot --home . --template Initrd.yard --root-filename Initrd --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --filesystem-size 4096 --uml-options mode=$(MODE); \ perl -I. ./gbootroot --home . --template Initrd.yard --root-filename Initrd --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --filesystem-size 4096 --uml-options mode=MODE; \
gzip -c9 $(TMP)/Initrd > $(ROOT_FS_DIR)/Initrd.gz; \ gzip -c9 $(TMP)/Initrd > $(ROOT_FS_DIR)/Initrd.gz; \
fi; fi;

Loading…
Cancel
Save