From 9563e248b7846efaf2ad2143c37a493da698d4a0 Mon Sep 17 00:00:00 2001 From: Miguel Bernal Marin Date: Thu, 24 May 2018 03:16:57 -0500 Subject: [PATCH] samples: move samples to specifi platform diretory Move the platform apl-mrb samples to devicemodel samples directory. Add the install target to the missing samples files and re-organize the samples directory structure to have nuc and apl-mrb samples. Suggested-by: Arzhan Kinzhalin Signed-off-by: Miguel Bernal Marin --- devicemodel/Makefile | 15 +++++++++------ .../samples}/apl-mrb/launch_uos.sh | 0 .../samples}/apl-mrb/sos_bootargs_debug.txt | 0 .../samples}/apl-mrb/sos_bootargs_release.txt | 0 devicemodel/samples/{ => nuc}/bridge.sh | 0 devicemodel/samples/{ => nuc}/launch_uos.sh | 0 doc/getting_started/index.rst | 10 +++++----- hypervisor/bsp/uefi/efi/Makefile | 3 +-- 8 files changed, 15 insertions(+), 13 deletions(-) rename {platform => devicemodel/samples}/apl-mrb/launch_uos.sh (100%) rename {platform => devicemodel/samples}/apl-mrb/sos_bootargs_debug.txt (100%) rename {platform => devicemodel/samples}/apl-mrb/sos_bootargs_release.txt (100%) rename devicemodel/samples/{ => nuc}/bridge.sh (100%) rename devicemodel/samples/{ => nuc}/launch_uos.sh (100%) diff --git a/devicemodel/Makefile b/devicemodel/Makefile index d4f635358..9bb408886 100644 --- a/devicemodel/Makefile +++ b/devicemodel/Makefile @@ -114,7 +114,8 @@ DISTCLEAN_OBJS := $(shell find $(BASEDIR) -name '*.o') PROGRAM := acrn-dm -SAMPLES := $(wildcard samples/*) +SAMPLES_NUC := $(wildcard samples/nuc/*) +SAMPLES_MRB := $(wildcard samples/apl-mrb/*) all: include/version.h $(PROGRAM) @echo -n "" @@ -157,9 +158,11 @@ $(DM_OBJDIR)/%.o: %.c $(HEADERS) [ ! -e $@ ] && mkdir -p $(dir $@); \ $(CC) $(CFLAGS) -c $< -o $@ -install: $(DM_OBJDIR)/$(PROGRAM) install-samples - install -D $(DM_OBJDIR)/$(PROGRAM) $(DESTDIR)/usr/bin/$(PROGRAM) +install: $(DM_OBJDIR)/$(PROGRAM) install-samples-nuc install-samples-mrb + install -D --mode=0755 $(DM_OBJDIR)/$(PROGRAM) $(DESTDIR)/usr/bin/$(PROGRAM) -install-samples: $(SAMPLES) - install -d $(DESTDIR)/usr/share/acrn/demo - install -t $(DESTDIR)/usr/share/acrn/demo $^ +install-samples-nuc: $(SAMPLES_NUC) + install -D -t $(DESTDIR)/usr/share/acrn/samples/nuc $^ + +install-samples-mrb: $(SAMPLES_MRB) + install -D -t $(DESTDIR)/usr/share/acrn/samples/apl-mrb $^ diff --git a/platform/apl-mrb/launch_uos.sh b/devicemodel/samples/apl-mrb/launch_uos.sh similarity index 100% rename from platform/apl-mrb/launch_uos.sh rename to devicemodel/samples/apl-mrb/launch_uos.sh diff --git a/platform/apl-mrb/sos_bootargs_debug.txt b/devicemodel/samples/apl-mrb/sos_bootargs_debug.txt similarity index 100% rename from platform/apl-mrb/sos_bootargs_debug.txt rename to devicemodel/samples/apl-mrb/sos_bootargs_debug.txt diff --git a/platform/apl-mrb/sos_bootargs_release.txt b/devicemodel/samples/apl-mrb/sos_bootargs_release.txt similarity index 100% rename from platform/apl-mrb/sos_bootargs_release.txt rename to devicemodel/samples/apl-mrb/sos_bootargs_release.txt diff --git a/devicemodel/samples/bridge.sh b/devicemodel/samples/nuc/bridge.sh similarity index 100% rename from devicemodel/samples/bridge.sh rename to devicemodel/samples/nuc/bridge.sh diff --git a/devicemodel/samples/launch_uos.sh b/devicemodel/samples/nuc/launch_uos.sh similarity index 100% rename from devicemodel/samples/launch_uos.sh rename to devicemodel/samples/nuc/launch_uos.sh diff --git a/doc/getting_started/index.rst b/doc/getting_started/index.rst index d312fe979..5c48c1f1e 100644 --- a/doc/getting_started/index.rst +++ b/doc/getting_started/index.rst @@ -176,7 +176,7 @@ partition. Follow these steps: .. code-block:: none - # cp /usr/share/acrn/demo/acrn.conf /mnt/loader/entries/ + # cp /usr/share/acrn/samples/nuc/acrn.conf /mnt/loader/entries/ You will need to edit this file to adjust the kernel version (``linux`` section) and also insert the ``PARTUUID`` of your ``/dev/sda3`` partition @@ -232,12 +232,12 @@ folder) as shown here: :caption: devicemodel/samples/bridge.sh :language: bash -By default, the script is located in the ``/usr/share/acrn/demo/`` +By default, the script is located in the ``/usr/share/acrn/samples/nuc/`` directory. Run it to create a network bridge: .. code-block:: none - # cd /usr/share/acrn/demo/ + # cd /usr/share/acrn/samples/nuc/ # ./bridge.sh # cd @@ -295,12 +295,12 @@ Set up Reference UOS name on the second line highlighted (check the exact name to be used using: ``ls /usr/lib/kernel/org.clearlinux*-standard*``). - By default, the script is located in the ``/usr/share/acrn/demo/`` + By default, the script is located in the ``/usr/share/acrn/samples/nuc/`` directory. You can edit it there, and then run it to launch the User OS: .. code-block:: none - # cd /usr/share/acrn/demo/ + # cd /usr/share/acrn/samples/nuc/ # ./launch_uos.sh #. At this point, you've successfully booted the ACRN hypervisor, diff --git a/hypervisor/bsp/uefi/efi/Makefile b/hypervisor/bsp/uefi/efi/Makefile index 882cbe3e4..12f6d8045 100644 --- a/hypervisor/bsp/uefi/efi/Makefile +++ b/hypervisor/bsp/uefi/efi/Makefile @@ -102,8 +102,7 @@ $(EFI_OBJDIR)/boot.so: $(ACRN_OBJS) $(FS) $(LD) $(LDFLAGS) -o $@ $^ -lgnuefi -lefi $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) install-conf: $(CONF_FILE) - install -d $(DESTDIR)/usr/share/acrn/demo - install -t $(DESTDIR)/usr/share/acrn/demo -m 644 $^ + install -D --mode=0644 $^ $(DESTDIR)/usr/share/acrn/samples/nuc/acrn.conf clean: rm -f $(BOOT) $(HV_OBJDIR)/$(HV_FILE).efi $(EFI_OBJDIR)/boot.so $(ACRN_OBJS) $(FS)