Changeset 582


Ignore:
Timestamp:
Jul 2, 2015, 2:05:40 PM (9 years ago)
Author:
cfuguet
Message:

Export the MTOOLS_SKIP_CHECK variable to avoid that the mtools perform
sanity checks regarding the compatibility with MS-DOS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/Makefile

    r581 r582  
    2626### partition_begin_lba  = 300
    2727### sector_per_cluster   = 8
    28 ### partition sectors    = 524832 
     28### partition sectors    = 524832
    2929
    3030BUILD_DIRS = boot      \
     
    119119               build/libs/mwmr_channel.o  \
    120120               build/libs/user_lock.o     \
    121                build/libs/stdio.o 
     121               build/libs/stdio.o
    122122
    123123### Objects to be linked for hello.elf
    124124HELLO_OBJS   = build/hello/main.o   \
    125                build/libs/stdio.o         
     125               build/libs/stdio.o
    126126
    127127### Objects to be linked for pgcd.elf
    128128PGCD_OBJS    = build/pgcd/main.o \
    129                build/libs/stdio.o 
     129               build/libs/stdio.o
    130130
    131131### Objects to be linked for game.elf
     
    135135                  build/libs/malloc.o       \
    136136                  build/libs/user_lock.o
    137                  
    138137
    139138### Objects to be linked for dhrystone.elf
     
    145144                 build/libs/user_lock.o   \
    146145                 build/libs/malloc.o
    147        
     146
    148147### Objects to be linked for sort.elf
    149148SORT_OBJS   = build/sort/main.o          \
     
    174173                build/libs/user_barrier.o \
    175174                build/libs/malloc.o       \
    176                 build/libs/user_lock.o 
     175                build/libs/user_lock.o
    177176
    178177### Objects to be linked for coproc.elf
    179178COPROC_OBJS = build/coproc/main.o \
    180               build/libs/stdio.o 
     179              build/libs/stdio.o
    181180
    182181
     
    189188              build/libs/user_barrier.o \
    190189              build/libs/libmath.a
    191              
    192190
    193191CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \
     
    208206
    209207DISK_IMAGE  := hdd/virt_hdd.dmg
     208
     209### All the Mtools commands perform a few sanity checks before going ahead,
     210### to make sure that the disk is indeed an MS-DOS disk. However, the size
     211### of the disk image used by the Giet-VM is not MS-DOS compliant.
     212### Setting this variable prevents these checks.
     213MTOOLS_SKIP_CHECK := 1
    210214
    211215all: build                           \
     
    226230     build/classif/classif.elf       \
    227231     build/coproc/coproc.elf         \
    228      build/ocean/ocean.elf           \
    229232     $(DISK_IMAGE)
     233#    build/ocean/ocean.elf           \
    230234### Copy always all files into disk image
    231235        mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel
     
    241245        mcopy -o -i $(DISK_IMAGE) build/classif/classif.elf ::/build/classif
    242246        mcopy -o -i $(DISK_IMAGE) build/coproc/coproc.elf ::/build/coproc
    243         mcopy -o -i $(DISK_IMAGE) build/ocean/ocean.elf ::/build/ocean
     247#       mcopy -o -i $(DISK_IMAGE) build/ocean/ocean.elf ::/build/ocean
    244248        mcopy -o -i $(DISK_IMAGE) applications/transpose/images.raw ::/misc
    245249        mcopy -o -i $(DISK_IMAGE) applications/convol/philips_image.raw ::/misc
     
    257261
    258262### Disk image generation (no files in this step)
    259 ### This requires the generic LINUX/MacOS script "create_dmg" script 
     263### This requires the generic LINUX/MacOS script "create_dmg" script
    260264### written by C.Fuguet. (should be installed in GIET-VM root directory).
    261265### create the three build / misc / home directories
    262 ### store the images files into misc 
     266### store the images files into misc
    263267$(DISK_IMAGE):
    264268        ./create_dmg create $(basename $(DISK_IMAGE))
     
    441445                     giet_boot/boot.ld       \
    442446                     build/drivers/libdrivers.a | build/boot
    443         $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) -Lbuild/drivers -ldrivers 
     447        $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) -Lbuild/drivers -ldrivers
    444448        $(DU) -D $@ > $@.txt
    445449        dd if=$@ of=$(DISK_IMAGE) seek=2 conv=notrunc
     
    463467                         giet_kernel/kernel.ld \
    464468                         build/drivers/libdrivers.a
    465         $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) -Lbuild/drivers -ldrivers   
    466         $(DU) -D $@ > $@.txt   
     469        $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) -Lbuild/drivers -ldrivers
     470        $(DU) -D $@ > $@.txt
    467471        mmd -o -i $(DISK_IMAGE) ::/build/kernel || true
    468472#       mcopy -o -i $(DISK_IMAGE) $@ ::/build/kernel
     
    470474build/kernel/%.o: giet_kernel/%.c    \
    471475                  hard_config.h      \
    472                   giet_config.h 
     476                  giet_config.h
    473477        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
    474478
    475479build/kernel/%.o: giet_kernel/%.s    \
    476480                  hard_config.h      \
    477                   giet_config.h 
     481                  giet_config.h
    478482        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
    479483
     
    483487                    giet_libs/stdio.h \
    484488                    hard_config.h     \
    485                     giet_config.h 
     489                    giet_config.h
    486490        $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $<
    487491
     
    669673
    670674########################################
    671 ### clean 
     675### clean
    672676clean:
    673         rm -f *.o *.elf *.bin *.txt core 
     677        rm -f *.o *.elf *.bin *.txt core
    674678        rm -f hard_config.h giet_vsegs.ld map.bin map.xml
    675679        rm -rf build/
    676680        cd applications/ocean && $(MAKE) clean
     681
     682clean-disk:
     683        rm -f $(DISK_IMAGE)
Note: See TracChangeset for help on using the changeset viewer.