dtc: add device tree compiler on aarch64

u-boot for nanopi r2s (rockchip rk3328) need dtc to build the image
so this adds dtc as build dependency for u-boot

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2021-10-03 07:30:57 +00:00
parent 577c7c09fa
commit 4c59cad1c0
4 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#bin/convert-dtsv0
#bin/dtc
#bin/dtdiff
#bin/fdtdump
#bin/fdtget
#bin/fdtoverlay
#bin/fdtput
#include
#include/fdt.h
#include/libfdt.h
#include/libfdt_env.h
#lib/libfdt-1.6.1.so
#lib/libfdt.a
#lib/libfdt.so
#lib/libfdt.so.1
#lib/python3.8
#lib/python3.8/site-packages
#lib/python3.8/site-packages/_libfdt.cpython-38-aarch64-linux-gnu.so
#lib/python3.8/site-packages/libfdt-1.6.1-py3.8.egg-info
#lib/python3.8/site-packages/libfdt.py

81
lfs/dtc Normal file
View File

@@ -0,0 +1,81 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.6.1
THISAPP = dtc-$(VER)
DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
SUP_ARCH = aarch64
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 709888bac3aad657e6020d0e491fc0ba
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dtc/dtc-1.6.1-disable_Werror.patch
cd $(DIR_APP) && make HOME= $(MAKETUNING)
cd $(DIR_APP) && make HOME= install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -1515,6 +1515,7 @@ buildipfire() {
lfsmake2 powertop
lfsmake2 parted
lfsmake2 swig
lfsmake2 dtc
lfsmake2 u-boot
lfsmake2 u-boot-friendlyarm
lfsmake2 wireless-regdb

View File

@@ -0,0 +1,12 @@
diff -Naur dtc-1.6.1.org/Makefile dtc-1.6.1/Makefile
--- dtc-1.6.1.org/Makefile 2021-06-08 07:00:49.000000000 +0000
+++ dtc-1.6.1/Makefile 2021-10-01 07:57:58.344551140 +0000
@@ -23,7 +23,7 @@
CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
+CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) $(EXTRA_CFLAGS)
BISON = bison
LEX = flex