Changeset 573 for soft


Ignore:
Timestamp:
May 19, 2015, 3:52:07 PM (10 years ago)
Author:
alain
Message:

Introducing the home directory to store "output files".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/Makefile

    r571 r573  
    162162DISK_IMAGE  := hdd/virt_hdd.dmg
    163163
    164 all: map.bin                         \
     164all: $(DISK_IMAGE)                   \
     165     map.bin                         \
    165166     hard_config.h                   \
    166167     giet_vsegs.ld                   \
     
    178179     build/classif/classif.elf       \
    179180     build/coproc/coproc.elf         \
    180      $(DISK_IMAGE)                   
    181          
    182 ### Copy always all files into disk image
    183         mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel
    184         mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display
    185         mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello
    186         mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd
    187         mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router
    188         mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone
    189         mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife
    190         mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort
    191         mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose
    192         mcopy -o -i $(DISK_IMAGE) build/convol/convol.elf ::/build/convol
    193         mcopy -o -i $(DISK_IMAGE) build/classif/classif.elf ::/build/classif
    194         mcopy -o -i $(DISK_IMAGE) build/coproc/coproc.elf ::/build/coproc
     181
     182         mdir -/ -b -i $(DISK_IMAGE) ::/
     183
     184### copy the files generated by the virtual prototype on
     185### the virtual disk "home" directory to the giet_vm home directory
     186extract:
     187        mcopy -o -i $(DISK_IMAGE) ::/home .
     188
     189### Disk image generation (no files in this step)
     190### This requires the generic LINUX/MacOS script "create_dmg" script
     191### written by C.Fuguet. (should be installed in GIET-VM root directory).
     192### create the three build / misc / home directories
     193### store the images files into misc
     194$(DISK_IMAGE):
     195        ./create_dmg create $(basename $(DISK_IMAGE))
     196        dd if=$(DISK_IMAGE) of=temp.dmg count=65536
     197        mv temp.dmg $(DISK_IMAGE)
     198        mmd -o -i $(DISK_IMAGE) ::/build
     199        mmd -o -i $(DISK_IMAGE) ::/misc
     200        mmd -o -i $(DISK_IMAGE) ::/home
    195201        mcopy -o -i $(DISK_IMAGE) applications/transpose/images.raw ::/misc
    196202        mcopy -o -i $(DISK_IMAGE) applications/convol/philips_image.raw ::/misc
    197203        mcopy -o -i $(DISK_IMAGE) applications/display/lena.raw ::/misc
    198         mcopy -o -i $(DISK_IMAGE) map.bin ::/
    199 ### Copy bootloader into sector 2 of disk image
    200         dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc
    201 ### Checking root directory
    202         mdir -/ -b -i $(DISK_IMAGE) ::/
    203 
    204 ### Disk image generation (no files in this step)
    205 ### This requires the generic LINUX/MacOS script "create_dmg" script
    206 ### written by C.Fuguet. (should be installed in GIET-VM root directory).
    207 $(DISK_IMAGE):
    208         ./create_dmg create $(basename $(DISK_IMAGE))
    209         mmd -o -i $(DISK_IMAGE) ::/build
    210         mmd -o -i $(DISK_IMAGE) ::/build/kernel
    211         mmd -o -i $(DISK_IMAGE) ::/build/display
    212         mmd -o -i $(DISK_IMAGE) ::/build/hello
    213         mmd -o -i $(DISK_IMAGE) ::/build/pgcd 
    214         mmd -o -i $(DISK_IMAGE) ::/build/router
    215         mmd -o -i $(DISK_IMAGE) ::/build/dhrystone
    216         mmd -o -i $(DISK_IMAGE) ::/build/gameoflife
    217         mmd -o -i $(DISK_IMAGE) ::/build/sort 
    218         mmd -o -i $(DISK_IMAGE) ::/build/transpose
    219         mmd -o -i $(DISK_IMAGE) ::/build/convol
    220         mmd -o -i $(DISK_IMAGE) ::/build/classif
    221         mmd -o -i $(DISK_IMAGE) ::/build/coproc
    222         mmd -o -i $(DISK_IMAGE) ::/misc
    223         dd if=$(DISK_IMAGE) of=temp.dmg count=65536
    224         mv temp.dmg $(DISK_IMAGE)
    225204
    226205### mapping generation: map.bin / map.xml / hard_config.h / giet_vsegs.ld
     
    236215                       --$(APP)           \
    237216                       --xml=.
     217        mcopy -o -i $(DISK_IMAGE) map.bin ::/
    238218
    239219### drivers compilation
     
    385365########################
    386366### boot compilation
     367### Copy bootloader into sector 2 of disk image
    387368build/boot:
    388369        mkdir $@
     
    393374        $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) -Lbuild/drivers -ldrivers 
    394375        $(DU) -D $@ > $@.txt
     376        dd if=$@ of=$(DISK_IMAGE) seek=2 conv=notrunc
    395377
    396378build/boot/boot.o: giet_boot/boot.c          \
     
    412394                         build/drivers/libdrivers.a
    413395        $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) -Lbuild/drivers -ldrivers   
    414         $(DU) -D $@ > $@.txt
     396        $(DU) -D $@ > $@.txt   
     397        mmd -o -i $(DISK_IMAGE) ::/build/kernel || true
     398        mcopy -o -i $(DISK_IMAGE) $@ ::/build/kernel
    415399
    416400build/kernel/%.o: giet_kernel/%.c    \
     
    473457        $(LD) -o $@ -T applications/display/display.ld $(DISPLAY_OBJS)
    474458        $(DU) -D $@ > $@.txt
     459        mmd -o -i $(DISK_IMAGE) ::/build/display || true
     460        mcopy -o -i $(DISK_IMAGE) $@ ::/build/display
    475461
    476462build/display/main.o: applications/display/main.c
     
    482468        $(LD) -o $@ -T applications/router/router.ld $(ROUTER_OBJS)
    483469        $(DU) -D $@ > $@.txt
     470        mmd -o -i $(DISK_IMAGE) ::/build/router || true
     471        mcopy -o -i $(DISK_IMAGE) $@ ::/build/router
    484472
    485473build/router/main.o: applications/router/main.c
     
    491479        $(LD) -o $@ -T applications/hello/hello.ld $(HELLO_OBJS)
    492480        $(DU) -D $@ > $@.txt
     481        mmd -o -i $(DISK_IMAGE) ::/build/hello || true
     482        mcopy -o -i $(DISK_IMAGE) $@ ::/build/hello
    493483
    494484build/hello/main.o: applications/hello/main.c
     
    500490        $(LD) -o $@ -T applications/pgcd/pgcd.ld $(PGCD_OBJS)
    501491        $(DU) -D $@ > $@.txt
     492        mmd -o -i $(DISK_IMAGE) ::/build/pgcd || true
     493        mcopy -o -i $(DISK_IMAGE) $@ ::/build/pgcd
    502494
    503495build/pgcd/main.o: applications/pgcd/main.c
     
    509501        $(LD) -o $@ -T applications/gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS)
    510502        $(DU) -D $@ > $@.txt
     503        mmd -o -i $(DISK_IMAGE) ::/build/gameoflife || true
     504        mcopy -o -i $(DISK_IMAGE) $@ ::/build/gameoflife
    511505
    512506build/gameoflife/main.o: applications/gameoflife/main.c
     
    518512        $(LD) -o $@ -T applications/dhrystone/dhrystone.ld $(DHRYSTONE_OBJS)
    519513        $(DU) -D $@ > $@.txt
     514        mmd -o -i $(DISK_IMAGE) ::/build/dhrystone || true
     515        mcopy -o -i $(DISK_IMAGE) $@ ::/build/dhrystone
    520516
    521517build/dhrystone/dhry_1.o: applications/dhrystone/dhry_1.c
     
    530526        $(LD) -o $@ -T applications/sort/sort.ld $(SORT_OBJS)
    531527        $(DU) -D $@ > $@.txt
     528        mmd -o -i $(DISK_IMAGE) ::/build/sort || true
     529        mcopy -o -i $(DISK_IMAGE) $@ ::/build/sort
    532530
    533531build/sort/main.o: applications/sort/main.c
     
    539537        $(LD) -o $@ -T applications/transpose/transpose.ld $(TRANSPOSE_OBJS)
    540538        $(DU) -D $@ > $@.txt
     539        mmd -o -i $(DISK_IMAGE) ::/build/transpose || true
     540        mcopy -o -i $(DISK_IMAGE) $@ ::/build/transpose
    541541
    542542build/transpose/main.o: applications/transpose/main.c
     
    548548        $(LD) -o $@ -T applications/convol/convol.ld $(CONVOL_OBJS)
    549549        $(DU) -D $@ > $@.txt
     550        mmd -o -i $(DISK_IMAGE) ::/build/convol || true
     551        mcopy -o -i $(DISK_IMAGE) $@ ::/build/convol
    550552
    551553build/convol/main.o: applications/convol/main.c
     
    557559        $(LD) -o $@ -T applications/classif/classif.ld $(CLASSIF_OBJS)
    558560        $(DU) -D $@ > $@.txt
     561        mmd -o -i $(DISK_IMAGE) ::/build/classif || true
     562        mcopy -o -i $(DISK_IMAGE) $@ ::/build/classif
    559563
    560564build/classif/main.o: applications/classif/main.c
     
    566570        $(LD) -o $@ -T applications/coproc/coproc.ld $(COPROC_OBJS)
    567571        $(DU) -D $@ > $@.txt
     572        mmd -o -i $(DISK_IMAGE) ::/build/coproc || true
     573        mcopy -o -i $(DISK_IMAGE) $@ ::/build/coproc
    568574
    569575build/coproc/main.o: applications/coproc/main.c
     
    593599        rm -rf build/classif/*
    594600        rm -rf build/coproc/*
    595         rm -rf $(DISK_IMAGE)
Note: See TracChangeset for help on using the changeset viewer.