|
7 | 7 | echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
|
8 | 8 | echo "BuildArch can be: arm(default), armel, arm64, x86"
|
9 | 9 | echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
|
10 |
| - echo " for FreeBSD can be: freebsd11 or freebsd12." |
| 10 | + echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13" |
11 | 11 | echo " for illumos can be: illumos."
|
12 |
| - echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD" |
| 12 | + echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" |
13 | 13 | echo "--skipunmount - optional, will skip the unmount of rootfs folder."
|
14 | 14 | echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
|
15 | 15 | exit 1
|
@@ -60,13 +60,15 @@ __AlpinePackages+=" krb5-dev"
|
60 | 60 | __AlpinePackages+=" openssl-dev"
|
61 | 61 | __AlpinePackages+=" zlib-dev"
|
62 | 62 |
|
63 |
| -__FreeBSDBase="12.1-RELEASE" |
| 63 | +__FreeBSDBase="12.2-RELEASE" |
64 | 64 | __FreeBSDPkg="1.12.0"
|
| 65 | +__FreeBSDABI="12" |
65 | 66 | __FreeBSDPackages="libunwind"
|
66 | 67 | __FreeBSDPackages+=" icu"
|
67 | 68 | __FreeBSDPackages+=" libinotify"
|
68 | 69 | __FreeBSDPackages+=" lttng-ust"
|
69 | 70 | __FreeBSDPackages+=" krb5"
|
| 71 | +__FreeBSDPackages+=" terminfo-db" |
70 | 72 |
|
71 | 73 | __IllumosPackages="icu-64.2nb2"
|
72 | 74 | __IllumosPackages+=" mit-krb5-1.16.2nb4"
|
@@ -208,12 +210,20 @@ while :; do
|
208 | 210 | ;;
|
209 | 211 | freebsd11)
|
210 | 212 | __FreeBSDBase="11.3-RELEASE"
|
| 213 | + __FreeBSDABI="11" |
211 | 214 | ;&
|
212 | 215 | freebsd12)
|
213 | 216 | __CodeName=freebsd
|
214 | 217 | __BuildArch=x64
|
215 | 218 | __SkipUnmount=1
|
216 | 219 | ;;
|
| 220 | + freebsd13) |
| 221 | + __CodeName=freebsd |
| 222 | + __FreeBSDBase="13.0-RELEASE" |
| 223 | + __FreeBSDABI="13" |
| 224 | + __BuildArch=x64 |
| 225 | + __SkipUnmount=1 |
| 226 | + ;; |
217 | 227 | illumos)
|
218 | 228 | __CodeName=illumos
|
219 | 229 | __BuildArch=x64
|
@@ -291,17 +301,17 @@ if [[ "$__CodeName" == "alpine" ]]; then
|
291 | 301 | rm -r $__ApkToolsDir
|
292 | 302 | elif [[ "$__CodeName" == "freebsd" ]]; then
|
293 | 303 | mkdir -p $__RootfsDir/usr/local/etc
|
| 304 | + JOBS="$(getconf _NPROCESSORS_ONLN)" |
294 | 305 | wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
|
295 |
| - # For now, ask for 11 ABI even on 12. This can be revisited later. |
296 |
| - echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf |
| 306 | + echo "ABI = \"FreeBSD:${__FreeBSDABI}:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf |
297 | 307 | echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf
|
298 | 308 | mkdir -p $__RootfsDir/tmp
|
299 | 309 | # get and build package manager
|
300 | 310 | wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf -
|
301 | 311 | cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
|
302 | 312 | # needed for install to succeed
|
303 | 313 | mkdir -p $__RootfsDir/host/etc
|
304 |
| - ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install |
| 314 | + ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make -j "$JOBS" && make install |
305 | 315 | rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
|
306 | 316 | # install packages we need.
|
307 | 317 | INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
|
|
0 commit comments