board: amarula: Add A64-Relic support
PATCH v2 1/2 board: amarula: Add A64-Relic support
Add initial support for Amarula A64-Relic board
with below features:
- U-Boot 2018.07-rc1
- Linux 4.17.0-rc6
- Default packages from buildroot
---
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 | 39 ++++++++++++++++++ board/amarula/a64-relic/post-build.sh | 4 ++ board/amarula/a64-relic/readme.txt | 77 +++++++++++++++++++++++++++++++++++ configs/amarula_a64_relic_defconfig | 46 +++++++++++++++++++++ 7 files changed, 172 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
@@ -79,6 +79,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
@@ -863,6 +863,7 @@ F: board/amarula/ F: board/asus/ F: board/bananapi/ F: board/engicam/ +F: configs/amarula_a64_relic_defconfig F: configs/amarula_vyasa_rk3288_defconfig F: configs/asus_tinker_rk3288_defconfig F: board/friendlyarm/nanopi-a64/
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 +39 -0
@@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-amarula-relic.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +}
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 +77 -0
77 lines not on this page · raw message
configs/amarula_a64_relic_defconfig new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.14.3
PATCH v2 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 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
@@ -72,6 +72,15 @@ mounting on host with the help of 'ums' in U-Boot. => 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]> 05-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
@@ -41,6 +41,19 @@ BR2_TARGET_ROOTFS_EXT2_4=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.14.3
PATCH v2 1/2 board: amarula: Add A64-Relic support
In reply to Jagan TekiHello,
board/amarula/a64-relic/extlinux.conf line 4
Quoted 4 lines · Jagan Teki
board/amarula/a64-relic/extlinux.conf new file +4
-0+label linux-4.17.0-rc3 + kernel /Image + devicetree /sun50i-a64-amarula-relic.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p4 rootwait
Is mmcblk1 going to be the SD card or the eMMC ?
Quoted 1 line
+image sdcard.img {
So you're producing a sdcard.img, but your readme.txt doesn't use it.
Quoted 66 lines
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.confboard/amarula/a64-relic/readme.txt new file +50
-0@@ -0,0 +1,77 @@ +Amarula A64 Relic +================ + +Amarula A64-Relic is A64 based IoT device, which support +- Allwinner A64 Cortex-A53 +- Mali-400MP2 GPU +- AXP803 PMIC +- 1GB DDR3 RAM +- 8GB eMMC +- AP6330 Wifi/BLE +- MIPI-DSI +- CSI: OV5640 sensor +- USB OTG +- 12V DC power supply + +Build +===== + + $ make amarula_a64_relic_defconfig + + $ make + +build files at output/images/: + - sunxi-spl.bin + - u-boot.itb + - Image + - sun50i-a64-amarula-relic.dtb + - boot.vfat + - rootfs.ext4 + - sdcard.img + +Write eMMC +========= + +The board comes with an operating system preloaded on the eMMC. +To replace it with the Buildroot-built system, take the following +steps + +1. Connect the board UART with host and open minicom(ttyUSBx/115200N8) + +2. Supply 12V DC for power-on the board. + +3. Interrupt U-Boot by pressing enter + +4. Create GPT partitions + => mmc dev 1 + => gpt write mmc 1 $partitions + +5. Connect the board USB-OTG with USB slot on the host. +
board/amarula/a64-relic/readme.txt line 60
Quoted 10 lines
board/amarula/a64-relic/readme.txt new file +10
-0+6. Initiate fastboot + => fastboot 0 + +7. Write images from host onto eMMC using fastboot + + $ output/images + $ fastboot -i 0x1f3a flash loader1 sunxi-spl.bin + $ fastboot -i 0x1f3a flash loader2 u-boot.itb + $ fastboot -i 0x1f3a flash esp boot.vfat + $ fastboot -i 0x1f3a flash system rootfs.ext4
Is this going to work with the extlinux.conf provided above ? I doubt the same extlinux.conf can work for both the SD card booting and eMMC booting.
If you want to support both eMMC and SD card booting, that's OK, but it should be explained in the readme.txt, and it should be clear whether the default extlinux.conf is meant for SD card booting or eMMC booting.
board/amarula/a64-relic/readme.txt line 67
Quoted 7 lines
board/amarula/a64-relic/readme.txt new file +7
-0+ +Update eMMC during Development +============================== + +In order to avoid image packing with specified file-system every time +during development, it better to alter the data in the partition by +mounting on host with the help of 'ums' in U-Boot.
What is "image packing with specified file-system" ? I don't understand what you mean here. Perhaps you wanted to say:
""
During development, reflashing the entire filesystem image at every change is time consuming. A useful alternative is to directly access over USB the filesystem stored on the eMMC, using the USB Mass Storage capability of U-Boot. To achieve this:
""
Last thing, since your readme.txt says to use fastboot, you should probably enable BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT, which will make sure fastboot is available in output/host/bin/. And so your readme.txt should point to this fastboot.
Best regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/2 board: amarula: Add A64-Relic support
Quoted 10 lines · Thomas Petazzoni
Hello,
board/amarula/a64-relic/extlinux.conf line 4
Quoted 4 lines · Jagan Teki
board/amarula/a64-relic/extlinux.conf new file +4
-0+label linux-4.17.0-rc3 + kernel /Image + devicetree /sun50i-a64-amarula-relic.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p4 rootwaitIs mmcblk1 going to be the SD card or the eMMC ?
mmcblk1 is eMMC there is not SD card support on this. mmcblk0 detected as SDIO for wifi
Quoted 4 lines
Quoted 2 lines
+image sdcard.img {
So you're producing a sdcard.img, but your readme.txt doesn't use it.
right now I'm not using this, but with fastboot I'm using individual images. but we can use sdcard.img in eMMC DOS partition if we want. do you want to mentioned the same?
Quoted 82 lines
Quoted 67 lines
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.confboard/amarula/a64-relic/readme.txt new file +50
-0@@ -0,0 +1,77 @@ +Amarula A64 Relic +================ + +Amarula A64-Relic is A64 based IoT device, which support +- Allwinner A64 Cortex-A53 +- Mali-400MP2 GPU +- AXP803 PMIC +- 1GB DDR3 RAM +- 8GB eMMC +- AP6330 Wifi/BLE +- MIPI-DSI +- CSI: OV5640 sensor +- USB OTG +- 12V DC power supply + +Build +===== + + $ make amarula_a64_relic_defconfig + + $ make + +build files at output/images/: + - sunxi-spl.bin + - u-boot.itb + - Image + - sun50i-a64-amarula-relic.dtb + - boot.vfat + - rootfs.ext4 + - sdcard.img + +Write eMMC +========= + +The board comes with an operating system preloaded on the eMMC. +To replace it with the Buildroot-built system, take the following +steps + +1. Connect the board UART with host and open minicom(ttyUSBx/115200N8) + +2. Supply 12V DC for power-on the board. + +3. Interrupt U-Boot by pressing enter + +4. Create GPT partitions + => mmc dev 1 + => gpt write mmc 1 $partitions + +5. Connect the board USB-OTG with USB slot on the host. +board/amarula/a64-relic/readme.txt line 60
Quoted 10 lines
board/amarula/a64-relic/readme.txt new file +10
-0+6. Initiate fastboot + => fastboot 0 + +7. Write images from host onto eMMC using fastboot + + $ output/images + $ fastboot -i 0x1f3a flash loader1 sunxi-spl.bin + $ fastboot -i 0x1f3a flash loader2 u-boot.itb + $ fastboot -i 0x1f3a flash esp boot.vfat + $ fastboot -i 0x1f3a flash system rootfs.ext4Is this going to work with the extlinux.conf provided above ? I doubt the same extlinux.conf can work for both the SD card booting and eMMC booting.
Quoted 3 lines
If you want to support both eMMC and SD card booting, that's OK, but it should be explained in the readme.txt, and it should be clear whether the default extlinux.conf is meant for SD card booting or eMMC booting.
Here, extlinux.conf is for eMMC boot.
Quoted 19 lines
board/amarula/a64-relic/readme.txt line 67
Quoted 8 lines
board/amarula/a64-relic/readme.txt new file +7
-0+ +Update eMMC during Development +============================== + +In order to avoid image packing with specified file-system every time +during development, it better to alter the data in the partition by +mounting on host with the help of 'ums' in U-Boot.What is "image packing with specified file-system" ? I don't understand what you mean here. Perhaps you wanted to say:
""
During development, reflashing the entire filesystem image at every change is time consuming. A useful alternative is to directly access over USB the filesystem stored on the eMMC, using the USB Mass Storage capability of U-Boot. To achieve this:
Quoted 6 lines
""
Last thing, since your readme.txt says to use fastboot, you should probably enable
BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT, which will make sure fastboot is available in output/host/bin/. And so your readme.txt should point to this fastboot.
OK.
Jagan.
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.