board: amarula: Add A64-Relic support
PATCH v6 1/2 board: amarula: Add A64-Relic support
Add initial support for Amarula A64-Relic board
with below features:
- U-Boot 2018.07
- Linux 4.17.0-rc6
- Default packages from buildroot
---
Changes for v6
- Use 2018.07 u-boot
- Use release tag for linux
- Add command to select u-boot UMS on readme.txt
Changes for v5:
- Rebase to master
- Fix DEVELOPERS file for proper position of amarula_a64_relic_defconfig Changes for v4:
- remove sdcard.img image creation
- on readme 'cd output/images' not output/images
- add 'sudo' for fastboot commands on readme.txt
Changes for v3:
- Use 4.17 kernel headers
- Add wiki link
- Add BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
- Update comments on readme.txt suggested by Thomas
Changes for v2:
- Use mainline U-Boot
- Drop uboot.fragment since the UMS used for developement, so note it on readme.txt how to use.
- format the 'Write eMMC' steps suggested by Arnout.
- fix fastboot steps in readme.txt
- add offset in genimage.cfg for boot partition instead of size
.gitlab-ci.yml | 1 + DEVELOPERS | 1 + board/amarula/a64-relic/extlinux.conf | 4 ++ board/amarula/a64-relic/genimage.cfg | 10 ++++ board/amarula/a64-relic/post-build.sh | 4 ++ board/amarula/a64-relic/readme.txt | 81 +++++++++++++++++++++++++++ configs/amarula_a64_relic_defconfig | 47 ++++++++++++++++ 7 files changed, 148 insertions(+) create mode 100644 board/amarula/a64-relic/extlinux.conf create mode 100644 board/amarula/a64-relic/genimage.cfg create mode 100755 board/amarula/a64-relic/post-build.sh create mode 100644 board/amarula/a64-relic/readme.txt create mode 100644 configs/amarula_a64_relic_defconfig
.gitlab-ci.yml +1 -0
@@ -83,6 +83,7 @@ acmesystems_aria_g25_128mb_defconfig: *defconfig acmesystems_aria_g25_256mb_defconfig: *defconfig acmesystems_arietta_g25_128mb_defconfig: *defconfig acmesystems_arietta_g25_256mb_defconfig: *defconfig +amarula_a64_relic_defconfig: *defconfig amarula_vyasa_rk3288_defconfig: *defconfig arcturus_ucls1012a_defconfig: *defconfig arcturus_ucp1020_defconfig: *defconfig
DEVELOPERS +1 -0
@@ -959,6 +959,7 @@ F: board/orangepi/orangepi-prime/ F: board/orangepi/orangepi-win/ F: board/orangepi/orangepi-zero-plus2/ F: board/pine64/ +F: configs/amarula_a64_relic_defconfig F: configs/amarula_vyasa_rk3288_defconfig F: configs/asus_tinker_rk3288_defconfig F: configs/bananapi_m1_defconfig
board/amarula/a64-relic/extlinux.conf new file +4 -0
@@ -0,0 +1,4 @@ +label linux-4.17.0-rc3 + kernel /Image + devicetree /sun50i-a64-amarula-relic.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p4 rootwait
board/amarula/a64-relic/genimage.cfg new file +10 -0
@@ -0,0 +1,10 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-amarula-relic.dtb", + "extlinux" + } + } + size = 64M +}
board/amarula/a64-relic/post-build.sh new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
board/amarula/a64-relic/readme.txt new file +81 -0
81 lines not on this page · raw message
configs/amarula_a64_relic_defconfig new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH v6 2/2 board: amarula: a64-relic: Add WiFi support
Amarula A64-Relic board has AP6330 WiFi/BT combo, but does not have ethernet port. So it makes sense to enable wireless networking by default:
- add broadcom wireless firmware package to image
- add basic wireless tools to image
- add rootfs overlay with proper NVRAM file for on-board AP6330 chip
- add mdev to image to enable module autoloading
- update readme.txt to test wifi
---
Changes for v6, v5:
- rebase to master
Changes for v4, v3:
- none
Changes for v2:
- drop init scripts for module loading
- add mdev for module autoloading
board/amarula/a64-relic/readme.txt | 9 ++ .../lib/firmware/brcm/brcmfmac4330-sdio.txt | 83 +++++++++++++++++++ configs/amarula_a64_relic_defconfig | 13 +++ 3 files changed, 105 insertions(+) create mode 100644 board/amarula/a64-relic/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt
board/amarula/a64-relic/readme.txt +9 -0
@@ -76,6 +76,15 @@ capability of U-Boot. To achieve this: => mmc dev 1 => ums 0 mmc 1 +WiFi +==== + + # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf + (type password and enter) + # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B + # udhcpc -i wlan0 + # ping google.com + -- Jagan Teki <[email protected]> 29-Jun-2018
board/amarula/a64-relic/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt new file +83 -0
83 lines not on this page · raw message
configs/amarula_a64_relic_defconfig +13 -0
@@ -42,6 +42,19 @@ BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/amarula/a64-relic/genimage.cfg" BR2_ROOTFS_POST_BUILD_SCRIPT="board/amarula/a64-relic/post-build.sh" +BR2_ROOTFS_OVERLAY="board/amarula/a64-relic/rootfs_overlay" + +# wireless firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH v6 1/2 board: amarula: Add A64-Relic support
In reply to Jagan TekiHi Jagan,
Quoted 7 lines · Jagan Teki
Add initial support for Amarula A64-Relic board
with below features:
- U-Boot 2018.07
- Linux 4.17.0-rc6
- Default packages from buildrootSigned-off-by Jagan Teki <[email protected]>
I was about to apply, but U-Boot doesn't seem to build without swig:
PYMOD scripts/dtc/pylibfdt/_libfdt.so
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
make[5]: *** [scripts/dtc/pylibfdt/Makefile:27: scripts/dtc/pylibfdt/_libfdt.so] Error 1
I believe this has been discussed before but I can't find it.
Also (but not needed to fix before acceptance):
[snip]
board/amarula/a64-relic/readme.txt line 61
Quoted 6 lines
+7. Write images from host onto eMMC using fastboot
board/amarula/a64-relic/readme.txt new file +5
-0+ $ cd output/images + $ sudo fastboot -i 0x1f3a flash loader1 sunxi-spl.bin + $ sudo fastboot -i 0x1f3a flash loader2 u-boot.itb + $ sudo fastboot -i 0x1f3a flash esp boot.vfat + $ sudo fastboot -i 0x1f3a flash system rootfs.ext4
Wouldn't it be simpler to have just a single partition that contains the kernel
and device tree in /boot in the ext4 partition? Of course, that requires changing the default U-Boot environment, but it seems to me to be simpler than this dual-partition approach.
Also it isn't clear to me why the extlinux.conf is needed when we're actually
using U-Boot, but I guess there must be a reason for it :-)
Regards,
Arnout
PATCH v6 1/2 board: amarula: Add A64-Relic support
Hello,
Quoted 2 lines · Arnout Vandecappelle
Also it isn't clear to me why the extlinux.conf is needed when we're actually
using U-Boot, but I guess there must be a reason for it :-)
Yes, that's one of the way U-Boot can now be told how to boot. See
http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro;h=f8e9752a0fa4244ef0a6f7ee530b0aa218080cac;hb=HEAD.
Basically, the idea is that U-Boot simply looks at extlinux.conf in various well-defined locations in the root filesystem, and this allows the operating system installed to tell U-Boot how it should be booted.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v6 1/2 board: amarula: Add A64-Relic support
In reply to Arnout VandecappelleHello,
Quoted 9 lines · Arnout Vandecappelle
I was about to apply, but U-Boot doesn't seem to build without swig:
PYMOD
scripts/dtc/pylibfdt/_libfdt.so
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
make[5]: *** [scripts/dtc/pylibfdt/Makefile:27:scripts/dtc/pylibfdt/_libfdt.so] Error 1I believe this has been discussed before but I can't find it.
This can be fixed by enabling BR2_TARGET_UBOOT_NEEDS_PYLIBFDT.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v6 1/2 board: amarula: Add A64-Relic support
In reply to Arnout VandecappelleHi Arnout,
Quoted 2 lines · Arnout Vandecappelle
Also it isn't clear to me why the extlinux.conf is needed when we're actually
using U-Boot, but I guess there must be a reason for it :-)
U-Boot supports extlinux.conf parsing since quite some time, under the so call "Distro Configuration". See doc/README.distro in the U-Boot source tree. We already have a few boards using this capability. See for example board/asus/tinker/.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
PATCH v6 1/2 board: amarula: Add A64-Relic support
In reply to Jagan TekiHello Jagan,
Quoted 23 lines · Jagan Teki
Add initial support for Amarula A64-Relic board
with below features:
- U-Boot 2018.07
- Linux 4.17.0-rc6
- Default packages from buildrootSigned-off-by Jagan Teki <[email protected]>---
Changes for v6
- Use 2018.07 u-boot
- Use release tag for linux
- Add command to select u-boot UMS on readme.txt
Changes for v5:
- Rebase to master
- Fix DEVELOPERS file for proper position ofamarula_a64_relic_defconfigChanges for v4:
- remove sdcard.img image creation
- on readme 'cd output/images' not output/images
- add 'sudo' for fastboot commands on readme.txt
Changes for v3:
- Use 4.17 kernel headers
- Add wiki link
- AddBR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
Quoted 8 lines
- Update comments on readme.txt suggested by Thomas Changes for v2:
- Use mainline U-Boot
- Drop uboot.fragment since the UMS used for developement, so note it on readme.txt how to use.
- format the 'Write eMMC' steps suggested by Arnout.
- fix fastboot steps in readme.txt
- add offset in genimage.cfg for boot partition instead of size
This patch was missing BR2_TARGET_UBOOT_NEEDS_PYLIBFDT and BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL for the build to succeed in a pristine build environment. I've fixed that, did a few minor tweaks (commit titles) and applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v6 1/2 board: amarula: Add A64-Relic support
Quoted 36 lines · Thomas Petazzoni
Hello Jagan,
Quoted 23 lines · Jagan Teki
Add initial support for Amarula A64-Relic board
with below features:
- U-Boot 2018.07
- Linux 4.17.0-rc6
- Default packages from buildrootSigned-off-by Jagan Teki <[email protected]>---
Changes for v6
- Use 2018.07 u-boot
- Use release tag for linux
- Add command to select u-boot UMS on readme.txt
Changes for v5:
- Rebase to master
- Fix DEVELOPERS file for proper position ofamarula_a64_relic_defconfigChanges for v4:
- remove sdcard.img image creation
- on readme 'cd output/images' not output/images
- add 'sudo' for fastboot commands on readme.txt
Changes for v3:
- Use 4.17 kernel headers
- Add wiki link
- AddBR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOTQuoted 8 lines
- Update comments on readme.txt suggested by Thomas Changes for v2:
- Use mainline U-Boot
- Drop uboot.fragment since the UMS used for developement, so note it on readme.txt how to use.
- format the 'Write eMMC' steps suggested by Arnout.
- fix fastboot steps in readme.txt
- add offset in genimage.cfg for boot partition instead of size
Quoted 4 lines
This patch was missing
BR2_TARGET_UBOOT_NEEDS_PYLIBFDTandBR2_LINUX_KERNEL_NEEDS_HOST_OPENSSLfor the build to succeed in a pristine build environment. I've fixed that, did a few minor tweaks (commit titles) and applied. Thanks!
Thanks for the help.
Jagan.