GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — elks/image/Make.image at master · ghaerr/elks Expand file tree/ Copy pathMake.imageMore file actions 165 lines (141 loc) · 4.82 KB / Copy pathMake.imageFile metadata and controls165 lines (141 loc) · 4.82 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 # Makefile for ELKS images # include selected config file for image instructions include $(CONFIG) include Make.defs #VERBOSE=-v # Determine what to build for 'image' target TARGETS = ifdef CONFIG_IMG_BOOT TARGETS += $(FD_MINIX_BOOT) $(FD_FAT_BOOT) $(ELKS_DIR)/arch/i86/boot/Image endif ifdef CONFIG_IMG_MINIX TARGETS += template minixfs endif ifdef CONFIG_IMG_FAT TARGETS += template fatfs endif ifdef CONFIG_IMG_ROM TARGETS += template romfs ifdef CONFIG_ARCH_SWAN TARGETS += swanrom endif endif .PHONY: image $(TARGETS) image: $(TARGETS) copyminix: minixfs copyfat: fatfs copyrom: romfs # Populate template for filesystem genfs template: -rm -rf $(DESTDIR) cp -a $(TEMPLATE_DIR) $(DESTDIR) -chmod 777 $(DESTDIR)/tmp find $(DESTDIR) -name .keep -delete $(MAKE) -C $(ELKSCMD_DIR) -f Make.install install "CONFIG=$(CONFIG)" -chmod 1755 $(DESTDIR)/bin/romprg ifdef CONFIG_APPS_360K -rm $(DESTDIR)/etc/hosts -rm $(DESTDIR)/etc/net.cfg -rm $(DESTDIR)/etc/sashrc -rm $(DESTDIR)/bin/net -rm $(DESTDIR)/bin/setup endif ifdef CONFIG_APPS_COMPRESS awk /`echo ":nocomp" | tr -d ' '`/{print} $(TOPDIR)/elkscmd/Applications | sed '/^#/d' | sed 's#.*/##g' | cut -d" " -f 1 | sed 's#\(^.*\)#/\1/d#' > Nocomp ls $(DESTDIR)/bin | sed -f Nocomp > Filelist cd $(DESTDIR)/bin; xargs -P $$(getconf _NPROCESSORS_ONLN) -n1 elks-compress < $(TOPDIR)/image/Filelist rm -f Nocomp Filelist endif $(MAKE) -C $(BOOTBLOCKS_DIR) bash -c "./ver.pl $(ELKS_DIR)/Makefile-rules > $(DESTDIR)/etc/issue" #git log --abbrev-commit | head -1 | sed 's/commit/ELKS built from commit/' > $(DESTDIR)/etc/motd ifdef CONFIG_IMG_BOOT install $(ELKS_DIR)/arch/i86/boot/Image $(DESTDIR)/linux endif ifdef CONFIG_TIME_TZ echo 'if test "$$TZ" = ""; then export' "TZ=$(CONFIG_TIME_TZ); fi" >> $(DESTDIR)/etc/profile endif ifdef CONFIG_TIME_RTC_LOCALTIME sed -e 's/clock -s -u/clock -s/' < $(DESTDIR)/etc/rc.sys > tmp mv tmp $(DESTDIR)/etc/rc.sys endif # Create MINIX filesystem from template # Create bootable ELKS MINIX disk image: # Select tagged files into filelist # Create empty filesystem # Add tagged files into filesystem (regular, directories, links) # Create special files in /dev # Write boot sector (and modify BPB (not completed)) # Check image integrity # Print filesystem used inode and block count minixfs: template rm -f $(TARGET_FILE) mfs $(VERBOSE) $(TARGET_FILE) mkfs $(MINIX_MKFSOPTS) ifndef CONFIG_SYS_NO_BININIT mfs -v $(TARGET_FILE) addfs Image.all $(DESTDIR) endif # rm -f Filelist # for f in $$(cd $(DESTDIR); find * -name '*'); do \ # echo $$f >> FileList; \ # done # mfs $(VERBOSE) $(TARGET_FILE) addfs Filelist $(DESTDIR) mfs $(VERBOSE) $(TARGET_FILE) genfs -a $(MINIX_MKFSOPTS) $(DESTDIR) # mfs $(VERBOSE) $(TARGET_FILE) genfs $(MINIX_MKFSOPTS) $(DESTDIR) ifdef CONFIG_IMG_DEV # command to make char/block devices in image (no sudo required) $(MAKE) -f Make.devices "MKDEV=mfs $(TARGET_FILE) mknod" endif ifdef CONFIG_IMG_BOOT setboot $(TARGET_FILE) $(BPB) $(FD_MINIX_BOOT) endif mfsck -fv $(TARGET_FILE) mfs $(TARGET_FILE) stat # Create FAT filesystem from template # Create bootable ELKS MSDOS disk image: # Select tagged files into filelist # Create empty filesystem # Create \linux as first directory entry # Add tagged files into filesystem (regular, directories, links) # Filename case is preserved # Note: filenames larger than 8.3 will create VFAT LFN entries # Write boot sector and modify ELKS PB # all mtools commands require image file # -i image image filename fatfs: template rm -f $(TARGET_FILE) dd if=/dev/zero of=$(TARGET_FILE) bs=1024 count=$(TARGET_BLKS) mformat -V mformat -i $(TARGET_FILE) $(FAT_MKFSOPTS) # Linux has to be the first file for the boot sector loader rm -f linux; touch linux mcopy -i $(TARGET_FILE) $(CPFS_OPTS) linux ::/linux rm linux ifdef CONFIG_IMG_DEV # Device folder has to be first or second for the 'fake dev' to work mmd -i $(TARGET_FILE) ::/dev endif for f in $$(cd $(DESTDIR); find * -name '*'); do \ if [ -d $(DESTDIR)/$$f -a "$$f" != "dev" ]; then mmd -D o -i $(TARGET_FILE) ::$$f || exit 1; fi; \ if [ -f $(DESTDIR)/$$f ]; then mcopy -i $(TARGET_FILE) $(FAT_COPYOPTS) $(DESTDIR)/$$f ::$$f || exit 1; fi; \ done # Protect contiguous /linux by marking as RO, System and Hidden mattrib -i $(TARGET_FILE) +r +s +h ::/linux # Read boot sector, skip FAT BPB, set ELKS PB sectors/heads and write boot ifdef CONFIG_IMG_BOOT ifdef CONFIG_IMG_FD1232 setboot $(TARGET_FILE) -K -F $(BPB) $(FD_FAT_BOOT) else setboot $(TARGET_FILE) -F $(BPB) $(FD_FAT_BOOT) endif endif # Create ROM filesystem from template romfs: template -rm -f romfs.devices $(MAKE) -f Make.devices "MKDEV=echo >> romfs.devices" mkromfs -d romfs.devices $(DESTDIR) -rm -f romfs.devices swanrom: rm -f $(TARGET_FILE) cat $(IMG_DIR)/romfs.bin > $(TARGET_FILE) truncate -s $(TARGET_ROMFS_BYTES) $(TARGET_FILE) cat $(ELKS_DIR)/arch/i86/boot/Image >> $(TARGET_FILE) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |