Skip to content

Commit 9f68aae

Browse files
committed
adding fdt-tools
1 parent 4b25ce1 commit 9f68aae

11 files changed

+115
-2
lines changed

build/fdt-tools/build.sh

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
15+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
16+
17+
. ../../lib/build.sh
18+
19+
PROG=fdt-tools
20+
# there are no versions/tags, don't add this package to packages.md
21+
# the source is taken from https://github.com/devicetree-org/fdt-tools
22+
# version taken from meson.build
23+
VER=1.7.0
24+
PKG=ooce/developer/fdt-tools
25+
SUMMARY="FDT tools"
26+
DESC="Flattened Device Tree (FDT) tools"
27+
28+
min_rel 151053
29+
30+
forgo_isaexec
31+
set_clangver
32+
set_builddir $PROG-master
33+
34+
TESTSUITE_SED='
35+
1,/run-test/d
36+
/^Full log written to/d
37+
'
38+
39+
pre_configure() {
40+
typeset arch=$1
41+
42+
CONFIGURE_OPTS[$arch]="
43+
--prefix=$PREFIX
44+
--libdir=$PREFIX/${LIBDIRS[$arch]}
45+
"
46+
47+
[ "$arch" = i386 ] && CONFIGURE_OPTS[$arch]+=" -Dtests=false"
48+
LDFLAGS[$arch]+=" -Wl,-R$PREFIX/${LIBDIRS[$arch]}"
49+
50+
! cross_arch $arch && return
51+
52+
CONFIGURE_CMD+=" --cross-file $BLIBDIR/meson-$arch-gcc"
53+
}
54+
55+
init
56+
download_source $PROG $PROG $VER
57+
patch_source
58+
prep_build meson
59+
build
60+
run_testsuite
61+
make_package
62+
clean_up
63+
64+
# Vim hints
65+
# vim:ts=4:sw=4:et:fdm=marker

build/fdt-tools/local.mog

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# This file and its contents are supplied under the terms of the
3+
# Common Development and Distribution License ("CDDL"), version 1.0.
4+
# You may only use this file in accordance with the terms of version
5+
# 1.0 of the CDDL.
6+
#
7+
# A full copy of the text of the CDDL should have accompanied this
8+
# source. A copy of the CDDL is also available via the Internet at
9+
# http://www.illumos.org/license/CDDL.
10+
11+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
12+
13+
license License/gpl-2.0.txt license=GPLv2
14+
license License/bsd-2-clause.txt license=simplified-BSD
15+

build/fdt-tools/patches/series

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests-option.patch
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff -wpruN --no-dereference '--exclude=*.orig' a~/meson.build a/meson.build
2+
--- a~/meson.build 1970-01-01 00:00:00
3+
+++ a/meson.build 1970-01-01 00:00:00
4+
@@ -68,7 +68,7 @@ if get_option('tools')
5+
endif
6+
7+
if not meson.is_cross_build()
8+
- if get_option('tools')
9+
+ if get_option('tools') and get_option('tests')
10+
subdir('tests')
11+
endif
12+
endif
13+
diff -wpruN --no-dereference '--exclude=*.orig' a~/meson_options.txt a/meson_options.txt
14+
--- a~/meson_options.txt 1970-01-01 00:00:00
15+
+++ a/meson_options.txt 1970-01-01 00:00:00
16+
@@ -6,3 +6,5 @@ option('valgrind', type: 'feature', valu
17+
description: 'Valgrind support')
18+
option('static-build', type: 'boolean', value: false,
19+
description: 'Build static binaries')
20+
+option('tests', type: 'boolean', value: true,
21+
+ description: 'Build tests')

build/fdt-tools/testsuite.log

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
Ok: 1
3+
Expected Fail: 0
4+
Fail: 0
5+
Unexpected Pass: 0
6+
Skipped: 0
7+
Timeout: 0
8+

build/meta/aarch64-build-tools.p5m

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set name=pkg.description value="Tools required to cross build OmniOS for aarch64
44

55
depend fmri=ooce/omnios-build-tools type=require
66

7-
depend fmri=developer/dtc type=require
87
depend fmri=ooce/developer/aarch64-gcc14 type=require
98
depend fmri=ooce/developer/aarch64-perl type=require
109
depend fmri=ooce/util/u-boot type=require

build/meta/extra-build-tools.p5m

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set name=pkg.description value="Tools required to build OmniOS extra"
55
depend fmri=ooce/omnios-build-tools type=require
66

77
depend fmri=compress/lz4 type=require
8+
depend fmri=developer/dtc type=require
89
depend fmri=driver/tuntap type=require
910
depend fmri=library/unixodbc type=require
1011
depend fmri=network/socat type=require

doc/baseline

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ extra.omnios ooce/developer/cmake
9292
extra.omnios ooce/developer/cscope
9393
extra.omnios ooce/developer/cunit
9494
extra.omnios ooce/developer/dejagnu
95+
extra.omnios ooce/developer/fdt-tools
9596
extra.omnios ooce/developer/flamegraph
9697
extra.omnios ooce/developer/freepascal
9798
extra.omnios ooce/developer/gdb

doc/baseline.aarch64

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extra.omnios ooce/developer/aarch64-esr-decoder
1616
extra.omnios ooce/developer/autoconf-archive
1717
extra.omnios ooce/developer/cmake
1818
extra.omnios ooce/developer/cunit
19+
extra.omnios ooce/developer/fdt-tools
1920
extra.omnios ooce/developer/git-absorb
2021
extra.omnios ooce/developer/ninja
2122
extra.omnios ooce/developer/protobuf

doc/pkglist.aarch64

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ ooce/driver/fuse
9595
ooce/system/file-system/ntfs-3g
9696
ooce/editor/helix
9797
ooce/developer/aarch64-esr-decoder
98+
ooce/developer/fdt-tools
9899
###############################################################################
99100
.SYSROOT
100101
ooce/audio/flac

lib/meson-aarch64-gcc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
c = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-gcc'
33
cpp = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-g++'
44
ar = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-ar'
5-
pkgconfig = 'pkg-config'
5+
pkg-config = 'pkg-config'
66

77
[host_machine]
88
system = 'sunos'

0 commit comments

Comments
 (0)