summaryrefslogtreecommitdiff
path: root/distrib/armv7
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-30 17:46:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-30 17:46:07 +0000
commitd3aa0d760e1ed38557b0c9da42407fc9ad97d828 (patch)
tree2dec49beadb3ffe5f5334cd98424fbbab5ba000e /distrib/armv7
parent7f1a8bec460a41a172fb21ffab33697ce8395c12 (diff)
Every Makefile on every architecture had deviated in unique ways.
Eliminate many more differences. When it makes sense, build bsd.rd and miniroot/ramdisk.fs and cd.iso in the same directory. More steps coming after this..
Diffstat (limited to 'distrib/armv7')
-rw-r--r--distrib/armv7/miniroot/Makefile.inc2
-rw-r--r--distrib/armv7/ramdisk/Makefile69
-rw-r--r--distrib/armv7/ramdisk/Makefile.inc4
-rw-r--r--distrib/armv7/ramdisk/list8
4 files changed, 30 insertions, 53 deletions
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index 1f211a40696..efb49489804 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -88,5 +88,3 @@ install:
.endif
.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
-.include <bsd.own.mk>
diff --git a/distrib/armv7/ramdisk/Makefile b/distrib/armv7/ramdisk/Makefile
index 9a20809c130..bb1dd938225 100644
--- a/distrib/armv7/ramdisk/Makefile
+++ b/distrib/armv7/ramdisk/Makefile
@@ -1,78 +1,55 @@
-# $OpenBSD: Makefile,v 1.23 2019/04/29 15:56:25 deraadt Exp $
-
-IMAGE= mr.fs
-CRUNCHCONF?= instbin.conf
-CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf
-LISTS= ${.CURDIR}/list
-UTILS?= ${.CURDIR}/../../miniroot
+# $OpenBSD: Makefile,v 1.24 2019/04/30 17:46:03 deraadt Exp $
MTREE= ${UTILS}/mtree.conf
-DISKTYPE= rdroot
-MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096
+LISTS= ${.CURDIR}/list
+UTILS= ${.CURDIR}/../../miniroot
-DIRS=\
- am335x \
- cubie \
- cubox \
- nitrogen \
- panda \
- wandboard
+MRDISKTYPE= rdroot
+MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
-.ifndef DESTDIR
-all ${IMAGE}:
- @echo setenv DESTDIR before making a ramdisk!
- @false
-.else
+all: bsd.rd
-ALLBSD= bsd
-ALLBSDRD= bsd.rd
-all: ${ALLBSDRD}
+bsd.rd: mr.fs bsd
+ cp bsd bsd.rd
+ rdsetroot bsd.rd mr.fs
bsd:
cd ${.CURDIR}/../../../sys/arch/armv7/compile/RAMDISK && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
cp -p ${.CURDIR}/../../../sys/arch/armv7/compile/RAMDISK/obj/bsd bsd
-bsd.rd: ${IMAGE} bsd
- cp bsd bsd.rd
- rdsetroot bsd.rd ${IMAGE}
-${IMAGE}: instbin
+mr.fs: instbin
rm -rf $@.d
install -d -o root -g wheel $@.d
-.for DIR in ${DIRS}
- mkdir -p $@.d/usr/mdec/${DIR}
-.endfor
mtree -def ${MTREE} -p $@.d -u
CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \
TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \
sh ${UTILS}/runlist.sh ${LISTS}
rm $@.d/instbin
- makefs ${MAKEFSARGS_RD} $@ $@.d
-
-.endif
+ makefs ${MRMAKEFSARGS} $@ $@.d
-instbin.mk instbin.cache instbin.c: ${CRUNCHCONF}
- crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+instbin.mk instbin.cache instbin.c: instbin.conf
+ crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
+ -c instbin.c -e instbin -m instbin.mk instbin.conf
instbin: instbin.mk instbin.cache instbin.c
${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all
-${CRUNCHCONF}: ${LISTS}
+instbin.conf: ${LISTS}
awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf
-clean cleandir:
- /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \
- lib*.a lib*.olist instbin.map *.o *.lo *.c ${ALLBSD} ${ALLBSDRD}
- rm -f instbin.conf
- rm -rf cd-dir ${IMAGE}.d
-
.ifdef RELEASEDIR
install:
- cp ${ALLBSDRD} ${RELEASEDIR}
- cd ${RELEASEDIR} && chmod a+r ${ALLBSDRD}
+ cp bsd.rd ${RELEASEDIR}/bsd.rd
+ chmod a+r ${RELEASEDIR}/bsd.rd
.endif # RELEASEDIR
+clean cleandir:
+ /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \
+ lib*.a lib*.olist instbin.map *.o *.lo *.c
+ rm -f instbin.conf
+ rm -rf cd-dir mr.fs.d
+
.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
diff --git a/distrib/armv7/ramdisk/Makefile.inc b/distrib/armv7/ramdisk/Makefile.inc
deleted file mode 100644
index 4b23e5f9958..00000000000
--- a/distrib/armv7/ramdisk/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2013/09/04 20:00:23 patrick Exp $
-
-CRUNCHGENOPTS= -E
-
diff --git a/distrib/armv7/ramdisk/list b/distrib/armv7/ramdisk/list
index cc266188df9..a1545cba5c7 100644
--- a/distrib/armv7/ramdisk/list
+++ b/distrib/armv7/ramdisk/list
@@ -1,4 +1,4 @@
-# $OpenBSD: list,v 1.39 2019/04/29 01:48:39 deraadt Exp $
+# $OpenBSD: list,v 1.40 2019/04/30 17:46:03 deraadt Exp $
SRCDIRS distrib/special
@@ -120,6 +120,7 @@ SYMLINK install.sub install
SYMLINK install.sub upgrade
# u-boot and dtbs
+MKDIR usr/mdec/am335x
COPY /usr/local/share/u-boot/am335x_evm/MLO usr/mdec/am335x/MLO
COPY /usr/local/share/u-boot/am335x_evm/u-boot.img usr/mdec/am335x/u-boot.img
COPY /usr/local/share/dtb/arm/am335x-bone.dtb usr/mdec/am335x/am335x-bone.dtb
@@ -133,9 +134,11 @@ COPY /usr/local/share/dtb/arm/am335x-evm.dtb usr/mdec/am335x/am335x-evm.dtb
COPY /usr/local/share/dtb/arm/am335x-evmsk.dtb usr/mdec/am335x/am335x-evmsk.dtb
COPY /usr/local/share/dtb/arm/am335x-icev2.dtb usr/mdec/am335x/am335x-icev2.dtb
+MKDIR usr/mdec/cubie
COPY /usr/local/share/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin usr/mdec/cubie/u-boot-sunxi-with-spl.bin
COPY /usr/local/share/dtb/arm/sun7i-a20-cubieboard2.dtb usr/mdec/cubie/sun7i-a20-cubieboard2.dtb
+MKDIR usr/mdec/panda
COPY /usr/local/share/u-boot/omap4_panda/MLO usr/mdec/panda/MLO
COPY /usr/local/share/u-boot/omap4_panda/u-boot.img usr/mdec/panda/u-boot.img
COPY /usr/local/share/dtb/arm/omap4-duovero-parlor.dtb usr/mdec/panda/omap4-duovero-parlor.dtb
@@ -144,6 +147,7 @@ COPY /usr/local/share/dtb/arm/omap4-panda-es.dtb usr/mdec/panda/omap4-panda-es.d
COPY /usr/local/share/dtb/arm/omap4-panda.dtb usr/mdec/panda/omap4-panda.dtb
COPY /usr/local/share/dtb/arm/omap4-sdp.dtb usr/mdec/panda/omap4-sdp.dtb
+MKDIR usr/mdec/cubox
COPY /usr/local/share/u-boot/mx6cuboxi/SPL usr/mdec/cubox/SPL
COPY /usr/local/share/u-boot/mx6cuboxi/u-boot.img usr/mdec/cubox/u-boot.img
COPY /usr/local/share/dtb/arm/imx6dl-cubox-i.dtb usr/mdec/cubox/imx6dl-cubox-i.dtb
@@ -165,12 +169,14 @@ COPY /usr/local/share/dtb/arm/imx6q-hummingboard2.dtb usr/mdec/cubox/imx6q-hummi
COPY /usr/local/share/dtb/arm/imx6q-hummingboard2-emmc-som-v15.dtb usr/mdec/cubox/imx6q-hummingboard2-emmc-som-v15.dtb
COPY /usr/local/share/dtb/arm/imx6q-hummingboard2-som-v15.dtb usr/mdec/cubox/imx6q-hummingboard2-som-v15.dtb
+MKDIR usr/mdec/nitrogen
COPY /usr/local/share/dtb/arm/imx6dl-nitrogen6x.dtb usr/mdec/nitrogen/imx6dl-nitrogen6x.dtb
COPY /usr/local/share/dtb/arm/imx6dl-sabrelite.dtb usr/mdec/nitrogen/imx6dl-sabrelite.dtb
COPY /usr/local/share/dtb/arm/imx6q-nitrogen6_max.dtb usr/mdec/nitrogen/imx6q-nitrogen6_max.dtb
COPY /usr/local/share/dtb/arm/imx6q-nitrogen6x.dtb usr/mdec/nitrogen/imx6q-nitrogen6x.dtb
COPY /usr/local/share/dtb/arm/imx6q-sabrelite.dtb usr/mdec/nitrogen/imx6q-sabrelite.dtb
+MKDIR usr/mdec/wandboard
COPY /usr/local/share/u-boot/wandboard/SPL usr/mdec/wandboard/SPL
COPY /usr/local/share/u-boot/wandboard/u-boot.img usr/mdec/wandboard/u-boot.img
COPY /usr/local/share/dtb/arm/imx6dl-wandboard.dtb usr/mdec/wandboard/imx6dl-wandboard.dtb