| File: meta/singularity/Makefile | |
|---|---|
| base-0 | patch-1 |
| Line 2 | Line 2 |
| GARVERSION = 2.1 CATEGORIES = meta # MASTER_SITES = | GARVERSION = 2.1 CATEGORIES = meta # MASTER_SITES = |
| DISTFILES := init | DISTFILES = init devices.cmd builder |
| LICENSE = GPL2 MAINTAINER = Seth Schoen <schoen@loyalty.org> | LICENSE = GPL2 MAINTAINER = Seth Schoen <schoen@loyalty.org> |
| Line 16 | Line 16 |
| # block size for cloop BLOCKSIZE ?= 65536 | # block size for cloop BLOCKSIZE ?= 65536 |
| # Dependencies are of the form categorydir/packagedir # LIBDEPS are for libraries, and DEPENDS are for everything else LIBDEPS = BUILDDEPS = fs/genromfs kernel/cloop-bin | # block size for ext2 EXT2BLOCKSIZE ?= 2048 SOURCE_LANGUAGES = BUILDDEPS += $(if $(filter cloop,$($(GARNAME)_FORMAT)),fs/genromfs kernel/cloop-bin,) BUILDDEPS += $(if $(filter romfs,$($(GARNAME)_FORMAT)),fs/genromfs,) BUILDDEPS += $(if $(filter ext2,$($(GARNAME)_FORMAT)),fs/e2fsprogs kernel/user-mode-linux,) |
| IMGDEPS = singularity | IMGDEPS = singularity |
| singularity_DEPENDS = $(if $(LNX_FLAVOR),meta/$(LNX_FLAVOR)-contents,) $(shell grep -v ^\; singularity-contents) | singularity_DEPENDS = $(if $(LNX_FLAVOR),meta/$(LNX_FLAVOR)-contents,) |
| ROMFS = $(WORKDIR)/romfs SINGULARITY = $(WORKDIR)/singularity | ROMFS = $(WORKDIR)/romfs SINGULARITY = $(WORKDIR)/singularity |
| Line 32 | Line 35 |
| KEEPTERMINFO = E/Eterm a/ansi c/color_xterm e/eterm k/kterm l/linux* n/nxterm* p/pcansi r/rxvt* s/screen* v/vt* x/xterm* # CONFIGURE_SCRIPTS = $(WORKSRC)/configure | KEEPTERMINFO = E/Eterm a/ansi c/color_xterm e/eterm k/kterm l/linux* n/nxterm* p/pcansi r/rxvt* s/screen* v/vt* x/xterm* # CONFIGURE_SCRIPTS = $(WORKSRC)/configure |
| BUILD_SCRIPTS = custom | BUILD_SCRIPTS = custom $($(GARNAME)_FORMAT) |
| INSTALL_SCRIPTS = custom # This should go before any hand-made rules. | INSTALL_SCRIPTS = custom # This should go before any hand-made rules. |
| GAR_EXTRA_CONF += kernel/linux/package-api.mk | GAR_EXTRA_CONF += kernel/linux/package-api.mk meta/lnx-$(LNX_FLAVOR)/package-api.mk |
| include ../../gar.mk $(GARNAME)_PRUNE_SCRIPTS += $(addprefix delete-$(WORKSRC),$($(GARNAME)_PRUNE_PATHS)) | include ../../gar.mk $(GARNAME)_PRUNE_SCRIPTS += $(addprefix delete-$(WORKSRC),$($(GARNAME)_PRUNE_PATHS)) |
| Line 71 | Line 74 |
| $(MAKECOOKIE) build-custom: make-tree-small | $(MAKECOOKIE) build-custom: make-tree-small |
| /sbin/depmod -a -r -b $(WORKSRC) -F $(singularity_DESTDIR)/boot/System.map $(KERNEL_FULL_VERSION) | test ! -f $(singularity_DESTDIR)/boot/System.map || /sbin/depmod -a -r -b $(WORKSRC) -F $(singularity_DESTDIR)/boot/System.map $(KERNEL_FULL_VERSION) |
| /sbin/ldconfig -r $(WORKSRC) mkdir -p $(WORKSRC)/proc $(WORKSRC)/tmp $(WORKSRC)/dev $(WORKSRC)/initrd mkdir -p $(WORKSRC)/home $(WORKSRC)/mnt/rw | /sbin/ldconfig -r $(WORKSRC) mkdir -p $(WORKSRC)/proc $(WORKSRC)/tmp $(WORKSRC)/dev $(WORKSRC)/initrd mkdir -p $(WORKSRC)/home $(WORKSRC)/mnt/rw |
| Line 82 | Line 85 |
| # XXX: will romfs support file modes at all? cp -a $(WORKDIR)/init $(WORKSRC)/sbin/singularity-init test -f $(WORKSRC)/sbin/init || ln -s singularity-init $(WORKSRC)/sbin/init | # XXX: will romfs support file modes at all? cp -a $(WORKDIR)/init $(WORKSRC)/sbin/singularity-init test -f $(WORKSRC)/sbin/init || ln -s singularity-init $(WORKSRC)/sbin/init |
| echo $(GARVERSION) > $(WORKSRC)/etc/bbc-release | echo $(LNX_VERSION) > $(WORKSRC)/etc/lnx-release |
| # Create an mtab ln -sf /proc/mounts $(WORKSRC)/etc/mtab # Create a utmp and wtmp | # Create an mtab ln -sf /proc/mounts $(WORKSRC)/etc/mtab # Create a utmp and wtmp |
| Line 103 | Line 106 |
| mv $(WORKSRC)/tmp $(WORKSRC)/tmp.ro ln -sf /mnt/rw/tmp $(WORKSRC)/tmp ln -sf /mnt/rw/local $(WORKSRC)/local | mv $(WORKSRC)/tmp $(WORKSRC)/tmp.ro ln -sf /mnt/rw/tmp $(WORKSRC)/tmp ln -sf /mnt/rw/local $(WORKSRC)/local |
| $(MAKECOOKIE) build-cloop: | |
| # we have duplicates of items on the cdrom and lnx.img ln -sf /mnt/media/cloop.o $(WORKSRC)/boot/cloop.o ln -sf /mnt/lnx.img/linux $(WORKSRC)/boot/bzImage | # we have duplicates of items on the cdrom and lnx.img ln -sf /mnt/media/cloop.o $(WORKSRC)/boot/cloop.o ln -sf /mnt/lnx.img/linux $(WORKSRC)/boot/bzImage |
| Line 112 | Line 118 |
| create_compressed_fs $(ROMFS) $(BLOCKSIZE) > $(SINGULARITY) $(MAKECOOKIE) | create_compressed_fs $(ROMFS) $(BLOCKSIZE) > $(SINGULARITY) $(MAKECOOKIE) |
| build-romfs: genromfs -d $(WORKSRC) -f $(SINGULARITY) $(MAKECOOKIE) build-ext2: dd if=/dev/zero of=$(SINGULARITY) bs=1280 count=$$(du -ks $(WORKSRC) | cut -f1) mkdir $(WORKDIR)/mnt $(build_DESTDIR)$(build_bindir)/linux con=null con0=fd:0,fd:1 root=/dev/root rootflags=/ rootfstype=hostfs init=$(CURDIR)/$(WORKDIR)/builder ubdb=$(SINGULARITY) devfs=mount $(CURDIR)/$(WORKSRC) $(CURDIR)/$(WORKDIR)/mnt $(MAKECOOKIE) | |
| install-custom: install -D $(SINGULARITY) $(DESTDIR)/$(GARNAME) touch $(DESTDIR)/$(GARNAME) | install-custom: install -D $(SINGULARITY) $(DESTDIR)/$(GARNAME) touch $(DESTDIR)/$(GARNAME) |