Index: head/sys/conf/Makefile.arm =================================================================== --- head/sys/conf/Makefile.arm (revision 366598) +++ head/sys/conf/Makefile.arm (revision 366599) @@ -1,105 +1,108 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # $FreeBSD$ # # Makefile for FreeBSD # # This makefile is constructed from a machine description: # config machineid # Most changes should be made in the machine description # /sys/arm/conf/``machineid'' # after which you should do # config machineid # Generic makefile changes should be made in # /sys/conf/Makefile.arm # after which config should be rerun for all machines. # # Which version of config(8) is required. %VERSREQ= 600013 STD8X16FONT?= iso .if !defined(S) .if exists(./@/.) S= ./@ .else S= ../../.. .endif .endif .include "$S/conf/kern.pre.mk" INCLUDES+= -I$S/contrib/libfdt -I$S/gnu/dts/include +LINUX_DTS_VERSION!= make -C $S/gnu/dts/ -V LINUX_DTS_VERSION +CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" + .if !defined(DEBUG) && !defined(PROFLEVEL) STRIP_FLAGS = -S .endif # We don't support gcc's thump interwork stuff, so disable it CFLAGS.gcc += -mno-thumb-interwork # We generally don't want fpu instructions in the kernel. CFLAGS.clang += -mfpu=none .if !empty(DDB_ENABLED) CFLAGS += -funwind-tables .endif # "makeoptions KERNVIRTADDR=" is now optional, supply the default value. .if empty(KERNVIRTADDR) KERNVIRTADDR= 0xc0000000 .endif # Use a custom SYSTEM_LD command to generate the elf kernel, so we can # set the text segment start address, and also strip the "arm mapping # symbols" which have names like $a.0 and $d.2; see the document # "ELF for the ARM architecture" for more info on the mapping symbols. SYSTEM_LD= \ ${SYSTEM_LD_BASECMD} \ --defsym='text_start=kernbase + SIZEOF_HEADERS' \ -o ${.TARGET} ${SYSTEM_OBJS} vers.o; \ $(OBJCOPY) \ --wildcard \ --strip-symbol='$$[adt]*' \ ${.TARGET} # Generate the .bin (no elf headers) kernel as an extra build output. # We must relink to generate the .bin kernel, because without headers the # location of everything changes. We also strip the ARM marker symbols. KERNEL_EXTRA+= ${KERNEL_KO}.bin KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin ${KERNEL_KO}.bin: ${SYSTEM_DEP} vers.o @echo "linking ${.TARGET}" @${SYSTEM_LD_BASECMD} \ --defsym='text_start=kernbase' \ -o ${.TARGET} ${SYSTEM_OBJS} vers.o ${SIZE} ${.TARGET} @${OBJCOPY} \ --wildcard \ --strip-symbol='$$[adt]*' \ --output-target=binary \ ${.TARGET} @chmod 755 ${.TARGET} # hack because genassym.c includes sys/bus.h which includes these. genassym.o: bus_if.h device_if.h %BEFORE_DEPEND %OBJS %FILES.c %FILES.s %FILES.m %CLEAN CLEAN+= ${KERNEL_KO}.bin %RULES .include "$S/conf/kern.post.mk" Index: head/sys/dts/freebsd-compatible.dts =================================================================== --- head/sys/dts/freebsd-compatible.dts (nonexistent) +++ head/sys/dts/freebsd-compatible.dts (revision 366599) @@ -0,0 +1,3 @@ +/ { + freebsd,dts-version = LINUX_DTS_VERSION; +}; Property changes on: head/sys/dts/freebsd-compatible.dts ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/gnu/dts/Makefile =================================================================== --- head/sys/gnu/dts/Makefile (nonexistent) +++ head/sys/gnu/dts/Makefile (revision 366599) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +LINUX_DTS_VERSION=5.8 Property changes on: head/sys/gnu/dts/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/tools/fdt/make_dtb.sh =================================================================== --- head/sys/tools/fdt/make_dtb.sh (revision 366598) +++ head/sys/tools/fdt/make_dtb.sh (revision 366599) @@ -1,28 +1,30 @@ #!/bin/sh # # $FreeBSD$ # Script generates dtb file ($3) from dts source ($2) in build tree S ($1) S=$1 dts="$2" dtb_path=$3 if [ -z "$dts" ]; then echo "No DTS specified" exit 1 fi if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi : "${DTC:=dtc}" : "${ECHO:=echo}" : "${CPP:=cpp}" +LINUX_DTS_VERSION=$(make -C $S/gnu/dts -V LINUX_DTS_VERSION) + for d in ${dts}; do dtb="${dtb_path}/$(basename "$d" .dts).dtb" ${ECHO} "converting $d -> $dtb" - ${CPP} -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" /dev/null | + ${CPP} -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null | ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" -i "$S/gnu/dts/" done