summaryrefslogtreecommitdiff
path: root/libre-testing/uboot4extlinux-sunxi/PKGBUILD
blob: 77d7897ac0951173cfccb76f8949ecfa16d2f487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# U-Boot: sunXi
# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
# Contributor: Jacob 'KREYREN' Hrbek <kreyren+parabola@fsfe.org>


# NOTE: This PKGBUILD can build bootloaders for both aarch64 and armv7h systems.
#       Currently there is no armv7h->aarch64 cross-compiler (#3334);
#       and there is no aarch64 system.
#       Consequently, only x86_64 builders will package all bootloaders.
#       armv7h and aarch64 builders will package only their native bootloaders.
#       The x86_64 build uses a metedata hack, to package for multiple arches at once.
# NOTE: The x86_64 build is fastest and most convenient; but remember to rename the
#       source package manually before running librerelease, if publishing to Parabola:
#         $ src_pkg=$(ls *.src.tar.gz) ; mv ${src_pkg} ${src_pkg%-*}-any.src.tar.gz ;


# To add a new board (that uses an Allwinner System On a Chip) you need:
# - The package name. Example: uboot4extlinux-a20-olinuxino_micro
# - The u-boot configuration. Example: A20-OLinuXino_MICRO_defconfig
# - The name of the board(s). Example: A20 OLinuXino Micro
#   A single package / u-boot configuration sometimes support multiple
#   boards and the configuration name doesn't always have the boards names
#   in it. Example: uboot4extlinux-am335x_bone supports various BeagleBones,
#   the AM335x GP EVM and the EVM SK all in one u-boot binary and package.
# - If relevant, the packages it replaces, if there are older u-boot packages
#   also supporting that board. Example:uboot-a20-olinuxino-micro
#
# Ideally we'd like to enable people to only add these 4 variables in this
# package to add a new board. These 4 variables could go in something like
# a CVS file that is parsed, but that would require to be able to dynamically
# define packages, but even if eval package_{$_pkgname}() { [...] } works,
# it doesn't make that package function visible to makepkg.
#
# Because of that, contributors wanting to add new boards will have to search
# for example of the information mentioned above and add it in the PKGBUILD
# for their boards.
#
# After adding a new board in this PKGBUILD, to get the board officially
# supported by Parabola.you also need to create a page for it in the
# Parabola wiki for that board and update the ARM installation guide to
# point to it when relevant. Examples of that are available for other
# boards in the ARM installation guide.


# We have a ${pkgver}-${pkgrel} like: '2021.07-r1.parabola3'.
# All of the individual components are needed:
# - '2021.07' corresponds to the upstream u-boot version. It is needed
#   to know which u-boot version source code is used.
# - 'r1' corresponds to the u-boot-libre revision. Without that, it would
#   be impossible to fix bugs inside the u-boot-libre deblob script.
# - .parabola3 is the Parabola package revision. Without that, it would
#   be impossible to fix bugs inside this PKGBUILD.
# As for the '-r1', it cannot go inside pkgver, becasue pkgver is not
# allowed to contain hyphens. So it is in pkgrel instead.
_uboot_ver=2021.07 # version of the upstream u-boot source code
_uboot_ver=2023.01 # FIXME: non-FSDG - The current libreboot uboot depends on 'python2'
_ubootlibre_rev=r1 # revision of the u-boot-libre deblob script
_upstream_name=u-boot-libre
_upstream_name=${_upstream_name/-libre/} # FIXME: non-FSDG - The current libreboot uboot depends on 'python2'

pkgbase=uboot4extlinux-sunxi
pkgname=(${pkgbase})
pkgver=${_uboot_ver}
pkgrel=${_ubootlibre_rev}.parabola1
arch=(aarch64 armv7h x86_64)
url=https://libreboot.org/docs/maintain/#resourcesscriptsbuildreleaseu-boot-libre
url=http://www.denx.de/wiki/U-Boot/WebHome # FIXME: non-FSDG - The current libreboot uboot depends on 'python2'
license=(GPL)

makedepends=(bc dtc python python-setuptools swig)
makedepends_aarch64+=(or1k-elf-gcc)
makedepends_x86_64+=(aarch64-linux-gnu-gcc arm-none-eabi-gcc or1k-elf-gcc)

_tfa_ver=2.8
_crust_ver=0.5
_mirror=https://mirrors.mit.edu/libreboot # use a mirror per libreboot's request
source=(${_mirror}/${_upstream_name}/${_uboot_ver}-${_ubootlibre_rev}/${_upstream_name}-${_uboot_ver}-${_ubootlibre_rev}.tar)
source=(ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2{,.sig} # FIXME: non-FSDG - The current libreboot uboot depends on 'python2'
        https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-${_tfa_ver}.tar.gz
        crust-${_crust_ver}.tar.gz::https://github.com/crust-firmware/crust/archive/refs/tags/v${_crust_ver}.tar.gz)
source+=(extlinux.conf
         ${pkgbase}.hook.in
         install-uboot4extlinux.sh.in
         generate-${pkgbase}-install-text.sh)

# TODO: the libreboot uboot source-ball checksum doesn't correspond to the one in
#       tests/u-boot-libre.sha512. This means that the tarball is not
#       reproducible yet. According to diffoscope, the only changes so
#       far seems to be some permissions changes:
#       │ -drwxr-xr-x [...]     0 1969-12-31 23:00:00.000000 u-boot-libre-2021.07-r1/
#       │ +drwxrwxr-x [...]     0 1969-12-31 23:00:00.000000 u-boot-libre-2021.07-r1/
#       │ --rw-r--r-- [...] 16576 1969-12-31 23:00:00.000000 u-boot-libre-2021.07-r1/.azure-pipelines.yml
#       │ +-rw-rw-r-- [...] 16576 1969-12-31 23:00:00.000000 u-boot-libre-2021.07-r1/.azure-pipelines.yml
#       I've not checked if some files were added or not but at least it shows
#       only diffs like the one above, and it doesn't show any file content diff.
# TODO: Check the signatures of the released files, not just the content
# TODO: We also need to look into drivers/dma/MCD_tasks.c. The debian
#       version of u-boot removes it. It's some data that looks like
#       code, so while there is a valid license, we might lack
#       corresponding source code if it's really some code. The debian
#       commits might have more information about it.
sha256sums=('69423bad380f89a0916636e89e6dcbd2e4512d584308d922d1039d1e4331950f'
            'SKIP'
            'df4e0f3803479df0ea4cbf3330b59731bc2efc2112c951f9adb3685229163af9'
            '8b23b2649bbd19dfb84ae00b2419539b8236c6ae9a380beff7dffafd3f41f31b')
sha256sums+=('490d231b23ed369f1515a5da07fca54d8626c97c5883c9748711078b2c518705'
             '8442c9b3f4203a867a0682527d166635b48990fd24f333cf1a5ba16243cbd3fc'
             '664b85d31da6c181f8b65800936ec48acb4176e0c475fb1767bdb628b2b7fc63'
             'e930fd3c819740364ec173bf477b26ae710f4f2186915e9a1099af69b751d328')
sha256sums+=('736a2c43df14e630a531f82b151ef8bdf70af81c84eb97247a11a411748038be')
validpgpkeys=('1A3C7F70E08FAB1707809BBF147C39FF9634B72C') # Thomas Rini


# armv7h boards
_32bit_pkgnames=(uboot4extlinux-a10-olinuxino-lime
                 uboot4extlinux-a10s-olinuxino-m
                 uboot4extlinux-a13-olinuxino
                 uboot4extlinux-a13-olinuxinom
                 uboot4extlinux-a20-olinuxino-lime
                 uboot4extlinux-a20-olinuxino-lime2
                 uboot4extlinux-a20-olinuxino-lime2-emmc
                 uboot4extlinux-a20-olinuxino_micro
                 uboot4extlinux-bananapi
                 uboot4extlinux-bananapro
                 uboot4extlinux-chip
                 uboot4extlinux-cubieboard
                 uboot4extlinux-cubieboard2
                 uboot4extlinux-cubietruck
                 uboot4extlinux-linksprite_pcduino
                 uboot4extlinux-linksprite_pcduino3
                 uboot4extlinux-linksprite_pcduino3_nano
                 uboot4extlinux-orangepi_2
                 uboot4extlinux-orangepi_one
                 uboot4extlinux-orangepi_pc
                 uboot4extlinux-orangepi_plus)
_32bit_defconfigs=(A10-OLinuXino-Lime_defconfig
                   A10s-OLinuXino-M_defconfig
                   A13-OLinuXino_defconfig
                   A13-OLinuXinoM_defconfig
                   A20-OLinuXino-Lime_defconfig
                   A20-OLinuXino-Lime2_defconfig
                   A20-OLinuXino-Lime2-eMMC_defconfig
                   A20-OLinuXino_MICRO_defconfig
                   Bananapi_defconfig
                   Bananapro_defconfig
                   CHIP_defconfig
                   Cubieboard_defconfig
                   Cubieboard2_defconfig
                   Cubietruck_defconfig
                   Linksprite_pcDuino_defconfig
                   Linksprite_pcDuino3_defconfig
                   Linksprite_pcDuino3_Nano_defconfig
                   orangepi_2_defconfig
                   orangepi_one_defconfig
                   orangepi_pc_defconfig
                   orangepi_plus_defconfig)
# aarch64 boards
_64bit_pkgnames=(uboot4extlinux-teres_i)
_64bit_defconfigs=(teres_i_defconfig)

# DEBUG: build only one package per-arch
# _pkg=orangepi_plus ; _32bit_defconfigs=(${_pkg}_defconfig) ; _32bit_pkgnames=(uboot4extlinux-${_pkg}) ;
# _32bit_defconfigs=() ; _32bit_pkgnames=() ; # DEBUG: build only aarch64 bootloaders

# allow native compiling and cross-compiling from x86_64
case "$CARCH" in
  aarch64) pkgname+=( ${_64bit_pkgnames[*]} ) _32bit_defconfigs=() ;; # package only aarch64 bootloaders
  armv7h ) pkgname+=( ${_32bit_pkgnames[*]} ) _64bit_defconfigs=() ;; # package only armv7h bootloaders
  x86_64 ) pkgname+=( ${_32bit_pkgnames[*]} )
           pkgname+=( ${_64bit_pkgnames[*]} )                      ;; # package all bootloaders
esac

# Byte-offset at which to install the bootloader
BOOTLOADER_BYTE_OFFSET=8192


## helpers ##

_get_target_name() # (defconfig)
{
  local defconfig=${1/_defconfig/} ; printf ${defconfig,,} ;
}

_get_target_destdir() # (defconfig)
{
  local defconfig=$1
  local target_name=$(_get_target_name ${defconfig})

  # NOTE: this path is relative to "${srcdir}"/${_upstream_name}-${_uboot_ver}/
  printf "build/uboot4extlinux-${target_name}"
}

_for_each_defconfig() # (fn_name action_msg defconfigs*)
{
  local fn_name=$1
  local action_msg=$2
  local defconfigs=( ${*:3} )
  local defconfig
  local target_n=0
  local target_name

  for defconfig in ${defconfigs[*]}
  do  target_n=$(( _target_n + 1 ))
      target_name="$(_get_target_name ${defconfig})"

      echo "  -> ${action_msg} target (${target_n} of ${#defconfigs[*]}): ${target_name}"
      ${fn_name} ${defconfig}
  done
}

_build_A64_firmware()
{
  ## compile trusted-firmware-a ##

  local tfa_srcdir="${srcdir}"/trusted-firmware-a-${_tfa_ver}
  local tfa_outdir="${tfa_srcdir}"/build/sun50i_a64/release/

  cd "${tfa_srcdir}"

  echo "  -> Building trusted-firmware-a"
  make PLAT=sun50i_a64
  cp "${tfa_outdir}"/bl31/bl31.elf "${srcdir}"/${_upstream_name}-${_uboot_ver}

  export BL31="${tfa_outdir}"/bl31.bin


  ## compile crust ##

  local crust_srcdir="${srcdir}"/crust-${_crust_ver}
  local crust_outdir="${crust_srcdir}"/build/scp

  export ARCH=or1k
  export CROSS_COMPILE=or1k-elf-

  cd "${crust_srcdir}"
  echo "  -> Building crust"
  make pine64_plus_defconfig # yes, this is for generic A64
  make scp

  export SCP="${crust_outdir}"/scp.bin
#   export SCP=/dev/null # disable crust (if necessary)
  export ARCH=arm
  export CROSS_COMPILE=aarch64-linux-gnu-
}

_build_uboot_target() # (defconfig)
{
  local defconfig=$1
  local destdir="$(   _get_target_destdir ${defconfig})"
  local target_name=$(_get_target_name    ${defconfig})


  ## compile uboot ##

  cd "${srcdir}"/${_upstream_name}-${_uboot_ver}

  echo "  -> Building ${_upstream_name}"
  make distclean
  make "${defconfig}"

  echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config

  make EXTRAVERSION="-${_ubootlibre_rev/r/}"

  echo "  -> Installing ${target_name} to ${destdir}"
  install -d ${destdir}
  mv -f u-boot-sunxi-with-spl.bin "${destdir}"
}

_check_uboot_target() # (defconfig)
{
  cd "${srcdir}"/${_upstream_name}-${_uboot_ver}

  local defconfig=$1
  local image=$(_get_target_destdir ${defconfig})/u-boot-sunxi-with-spl.bin
  local image_size=$(du --bytes --apparent-size ${image} | cut -d '	' -f 1)
  local offset=${BOOTLOADER_BYTE_OFFSET}
  local image_end=$(( image_size + offset ))

  # NOTE: This check corresponds to a check in install-uboot4extlinux.sh.in
  if (( ! image_size || image_end >= 1024 * 1024 )) ; then
    echo "Error: ${image} is too large:"
    echo "       offset: ${offset}"
    echo "       size:   ${image_size}"
    echo "       Typically, partitioning tools begin partitioning at 1MiB."
    echo "       Installing ${image} may overwrite an existing partition."

    false # Fail the check
  fi
}

# metedata hack, to package for multiple arches at once
_package_aarch64() { CARCH=armv7h ; _package "${@}" ; } # TODO: CARCH=aarch64 eventually
_package_armv7h()  { CARCH=armv7h ; _package "${@}" ; }
_package() # (pkg_name "board_name")
{
  local pkg_name=$1
  local board_name="$2"
  local lib_dir=/usr/lib/u-boot/${pkg_name}
  local hooks_dir="${pkgdir}"/usr/share/libalpm/hooks
  local docs_dir="${pkgdir}"/usr/share/doc/u-boot/${pkg_name}
  local install_dir="${pkgdir}"${lib_dir}
  local bin_name=u-boot-sunxi-with-spl.bin
  local install_script=install-uboot4extlinux.sh
  local install_text=install-uboot4extlinux.txt

  pkgdesc="U-Boot with Extlinux support for ${board_name}"
  depends=("${pkgbase}=${pkgver}-${pkgrel}")
  depends+=(util-linux) # $install_script needs 'util-linux' for `blkid`

  cd "${srcdir}"/${_upstream_name}-${_uboot_ver}

  # Install the u-boot binary
  install -d "${install_dir}"/
  install -Dm644 build/${pkg_name}/${bin_name} "${install_dir}"

  # Install the u-boot installation script
  sed < "${srcdir}"/${install_script}.in                              \
      > "${install_dir}"/${install_script}                            \
        -e "s|@u_boot_with_spl[@]|${lib_dir}/${bin_name}|g"           \
        -e "s|@u_boot_with_spl_offset[@]|${BOOTLOADER_BYTE_OFFSET}|g"
  chmod +x "${install_dir}"/${install_script}

  # Install what is required for the pacman hook
  install -d "${hooks_dir}"/
  sed < "${srcdir}/"${pkgbase}.hook.in   \
      > "${hooks_dir}"/${pkg_name}.hook  \
        -e "s|@pkgname[@]|${pkg_name}|g"

  # If we install several uboot4extlinux, we need a way to clearly
  # separate each postinstall message. To do that we wrapped the
  # text in an ASCII art square, but doing that is complicated when
  # using sed as the package name as well as the installation script
  # path both have variable length.
  install -d "${docs_dir}"/
  sh "${srcdir}"/generate-${pkgbase}-install-text.sh     \
     ${pkg_name} ${pkgbase} ${lib_dir}/${install_script} \
     > "${docs_dir}"/${install_text}
}


## business ##

prepare()
{
  cd "${srcdir}"/${_upstream_name}-${_uboot_ver}

  # TODO: We need to fix the timestamps upstream to a valid date
  #       (like the first January 1970at 01:00:00 CET) or something derived
  #       from the release version somehow. Else we have the build log spammed
  #       with errors like that:
  #       make: scripts/Makefile.extrawarn: Timestamp out of range;
  #             substituting 1970-01-01 00:59:59.999999999
  # TODO: While we're at it we could export SOURCE_DATE_SPOCH to try to
  #       make the u-boot package reporducible.
  find -print0 | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
}

build()
{
  ## build 32-bit targets ##

  # Prepare the 32-bit cross-compilation environment, if needed
  export ARCH=arm ; [[ "${CARCH}" != x86_64 ]] || export CROSS_COMPILE=arm-none-eabi- ;

  unset CFLAGS CXXFLAGS LDFLAGS

  _for_each_defconfig _build_uboot_target "Building 32-bit" ${_32bit_defconfigs[*]}


  ## build 64-bit targets ##

  # Prepare the 64-bit cross-compilation environment, if needed
  export ARCH=arm ; [[ "${CARCH}" != x86_64 ]] || export CROSS_COMPILE=aarch64-linux-gnu- ;

  # both uboot and the 64-bit firmwares FTBS with the default CFLAGS and LDFLAGS
  # * Assembler messages: Error: unrecognized option -march=x86-64
  # * cc1: error: unknown value 'x86-64' for '-march'
  # * cc1: error: '-fcf-protection=full' is not supported for this target
  export CFLAGS='-march=armv8-a -mtune=cortex-a53 -fcf-protection=check'
  # * aarch64-linux-gnu-ld.bfd: unrecognized option '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
  unset LDFLAGS
  # * aarch64-linux-gnu-ld.bfd: warning: bl31.elf has a LOAD segment with RWX permissions
  # * aarch64-linux-gnu-ld.bfd: warning: u-boot-spl has a LOAD segment with RWX permissions
  export LDFLAGS='--no-warn-rwx-segments'

  (( ! ${#_64bit_defconfigs[*]} )) || _build_A64_firmware
  _for_each_defconfig _build_uboot_target "Building 64-bit" ${_64bit_defconfigs[*]}
}

check()
{
  _for_each_defconfig _check_uboot_target "Testing 32-bit" ${_32bit_defconfigs[*]}
  _for_each_defconfig _check_uboot_target "Testing 64-bit" ${_64bit_defconfigs[*]}
}

package_uboot4extlinux-sunxi()
{
  CARCH=any

  pkgdesc="Scripts for managing U-Boot installations for computers with Allwinner System On a Chip"
  depends=(${_upstream_name/u-boot/uboot/}-tools=${_uboot_ver})

  local dest_dir="${pkgdir}"/usr/lib/u-boot/${pkgname}

  # Users are expected to use this as an example for /boot/extlinux/extlinux.conf
  install -d "${dest_dir}"/
  install -Dm644 "${srcdir}"/extlinux.conf "${dest_dir}"/extlinux.conf
}

package_uboot4extlinux-a10-olinuxino-lime() { _package_armv7h ${pkgname} "A10 OLinuXino Lime" ; }

package_uboot4extlinux-a10s-olinuxino-m()
{
  replaces=('uboot4extlinux-a10s-olinuxino-micro')

  _package_armv7h ${pkgname} "A10s OLinuXino Micro"
}

package_uboot4extlinux-a13-olinuxino() { _package_armv7h ${pkgname} "A13 OLinuXino" ; }

package_uboot4extlinux-a13-olinuxinom()
{
  replaces=('uboot4extlinux-a13-olinuxino-micro')

  _package_armv7h ${pkgname} "A13 OLinuXino Micro"
}

package_uboot4extlinux-a20-olinuxino-lime()       { _package_armv7h ${pkgname} "A20 OLinuXino Lime" ; }

package_uboot4extlinux-a20-olinuxino-lime2()      { _package_armv7h ${pkgname} "A20 OLinuXino Lime2" ; }

package_uboot4extlinux-a20-olinuxino-lime2-emmc() { _package_armv7h ${pkgname} "A20 OLinuXino Lime2 with eMMC" ; }

package_uboot4extlinux-a20-olinuxino_micro()
{
  replaces=('uboot-a20-olinuxino-micro')

  _package_armv7h ${pkgname} "A20 OLinuXino Micro"
}

package_uboot4extlinux-bananapi()    { _package_armv7h ${pkgname} "Banana Pi" ; }

package_uboot4extlinux-bananapro()   { _package_armv7h ${pkgname} "Banana Pro" ; }

package_uboot4extlinux-chip()        { _package_armv7h ${pkgname} "C.H.I.P" ; }

package_uboot4extlinux-cubieboard()  { _package_armv7h ${pkgname} "Cubieboard" ; }

package_uboot4extlinux-cubieboard2() { _package_armv7h ${pkgname} "Cubieboard 2" ; }

package_uboot4extlinux-cubietruck()  { _package_armv7h ${pkgname} "Cubietruck" ; }

package_uboot4extlinux-linksprite_pcduino()
{
  replaces=('uboot4extlinux-pcduino')

  _package_armv7h ${pkgname} "pcduino"
}

package_uboot4extlinux-linksprite_pcduino3()
{
  replaces=('uboot4extlinux-pcduino3')

  _package_armv7h ${pkgname} "pcduino3"
}

package_uboot4extlinux-linksprite_pcduino3_nano()
{
  replaces=('uboot4extlinux-pcduino3-nano')

  _package_armv7h ${pkgname} "pcduino3-nano"
}

package_uboot4extlinux-orangepi_2()    { _package_armv7h  ${pkgname} "Orange Pi 2" ; }

package_uboot4extlinux-orangepi_one()  { _package_armv7h  ${pkgname} "Orange Pi One" ; }

package_uboot4extlinux-orangepi_pc()   { _package_armv7h  ${pkgname} "Orange Pi PC" ; }

package_uboot4extlinux-orangepi_plus() { _package_armv7h  ${pkgname} "Orange Pi Plus" ; }

package_uboot4extlinux-teres_i()       { _package_aarch64 ${pkgname} "A64 OLIMEX Teres" ; }