Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag

COMPONENT_TARGETS = $(HARDWARE_NOARCH)


include ../../../build-system/constants.mk


url         = $(DOWNLOAD_SERVER)/sources/GNU/grub

versions    = 2.06
pkgname     = grub
suffix      = tar.xz

tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
sha1s       = $(addsuffix .sha1sum, $(tarballs))

patches     = $(CURDIR)/patches/grub-2.06-initrd-names.patch
patches    += $(CURDIR)/patches/grub-2.06-dejavu-sans.patch
patches    += $(CURDIR)/patches/grub-2.06-align-struct.patch
patches    += $(CURDIR)/patches/grub-2.06-fonts-ttf.patch
patches    += $(CURDIR)/patches/grub-2.06-no-efi.patch
patches    += $(CURDIR)/patches/grub-2.06-gensyminfo.patch
patches    += $(CURDIR)/patches/grub-2.06-modinfo.patch
patches    += $(CURDIR)/patches/grub-2.06-normal-welcome.patch
patches    += $(CURDIR)/patches/grub-2.06-riscv-image-header.patch
patches    += $(CURDIR)/patches/grub-2.06-riscv-linux-loader.patch
patches    += $(CURDIR)/patches/grub-2.06-riscv-relocation.patch

.NOTPARALLEL: $(patches)


BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)


include ../../../build-system/core.mk


.PHONY: download_clean


$(tarballs):
	@echo -e "\n======= Downloading source tarballs =======" ; \
	 for tarball in $(tarballs) ; do \
	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
	 done ; wait

$(sha1s): $(tarballs)
	@for sha in $@ ; do \
	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
	   touch $$sha ; \
	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
	   sha1sum --check $$sha ; ret="$$?" ; \
	   if [ "$$ret" == "1" ]; then \
	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
	     exit 1 ; \
	   fi ; \
	 done

$(patches): $(sha1s)
	@echo -e "\n======= Create Patches =======\n" ; \
	 ( cd create-2.06-initrd-names-patch       ; ./create.patch.sh ) ; \
	 ( cd create-2.06-dejavu-sans-patch        ; ./create.patch.sh ) ; \
	 ( cd create-2.06-align-struct-patch       ; ./create.patch.sh ) ; \
	 ( cd create-2.06-fonts-ttf-patch          ; ./create.patch.sh ) ; \
	 ( cd create-2.06-no-efi-patch             ; ./create.patch.sh ) ; \
	 ( cd create-2.06-gensyminfo-patch         ; ./create.patch.sh ) ; \
	 ( cd create-2.06-modinfo-patch            ; ./create.patch.sh ) ; \
	 ( cd create-2.06-normal-welcome-patch     ; ./create.patch.sh ) ; \
	 ( cd create-2.06-riscv-image-header-patch ; ./create.patch.sh ) ; \
	 ( cd create-2.06-riscv-linux-loader-patch ; ./create.patch.sh ) ; \
	 ( cd create-2.06-riscv-relocation-patch   ; ./create.patch.sh ) ; \
	 echo -e "\n"

download_clean:
	@rm -f $(tarballs) $(sha1s) $(patches)