configs/olimex_a33_olinuxino: new defconfig
authorShyam Saini <shyam.saini@amarulasolutions.com>
Fri, 26 Apr 2019 09:37:37 +0000 (15:07 +0530)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 3 Aug 2019 06:28:35 +0000 (08:28 +0200)
This initial support includes:
u-boot v2019.04
Linux v5.0
Buildroot default packages

Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com>
[Thomas: use BR2_TARGET_UBOOT_BOOT_SCRIPT to generate the U-Boot
script, instead of doing it in the post-build]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
.gitlab-ci.yml
DEVELOPERS
board/olimex/a33_olinuxino/boot.cmd [new file with mode: 0644]
board/olimex/a33_olinuxino/genimage.cfg [new file with mode: 0644]
board/olimex/a33_olinuxino/post-build.sh [new file with mode: 0755]
board/olimex/a33_olinuxino/readme.txt [new file with mode: 0644]
configs/olimex_a33_olinuxino_defconfig [new file with mode: 0644]

index 3e37580e63ee9ed7c51f19d17eeea8e121bb0284..311ddb7780280f07dd891b771055e6f39e0afd7d 100644 (file)
@@ -227,6 +227,7 @@ olimex_a13_olinuxino_defconfig: { extends: .defconfig }
 olimex_a20_olinuxino_lime2_defconfig: { extends: .defconfig }
 olimex_a20_olinuxino_lime_defconfig: { extends: .defconfig }
 olimex_a20_olinuxino_micro_defconfig: { extends: .defconfig }
+olimex_a33_olinuxino_defconfig: { extends: .defconfig }
 olimex_a64_olinuxino_defconfig: { extends: .defconfig }
 olimex_imx233_olinuxino_defconfig: { extends: .defconfig }
 openblocks_a6_defconfig: { extends: .defconfig }
index c6b21559e5fe6a36a15a68230980bad2f2eff297..2956528a8e5e596ea0320b15f21b8cd0404468cd 100644 (file)
@@ -2066,10 +2066,12 @@ F:      package/wolfssl/
 N:     Shyam Saini <shyam.saini@amarulasolutions.com>
 F:     board/friendlyarm/nanopi-neo4/
 F:     board/friendlyarm/nanopc-t4/
+F:     board/olimex/a33_olinuxino/
 F:     board/radxa/rock-pi4/
 F:     board/pine64/rockpro64/
 F:     configs/nanopi_neo4_defconfig
 F:     configs/nanopc_t4_defconfig
+F:     configs/olimex_a33_olinuxino_defconfig
 F:     configs/pine64_rockpro64_defconfig
 F:     configs/radxa_rock_pi4_defconfig
 
diff --git a/board/olimex/a33_olinuxino/boot.cmd b/board/olimex/a33_olinuxino/boot.cmd
new file mode 100644 (file)
index 0000000..44d9239
--- /dev/null
@@ -0,0 +1,5 @@
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
+ext4load mmc 0 0x49000000 /boot/${fdtfile}
+ext4load mmc 0 0x46000000 /boot/zImage
+env set fdt_high ffffffff
+bootz 0x46000000 - 0x49000000
diff --git a/board/olimex/a33_olinuxino/genimage.cfg b/board/olimex/a33_olinuxino/genimage.cfg
new file mode 100644 (file)
index 0000000..fc2f7f8
--- /dev/null
@@ -0,0 +1,17 @@
+image sdcard.img {
+       hdimage {
+       }
+
+       partition u-boot {
+               in-partition-table = "no"
+               image = "u-boot-sunxi-with-spl.bin"
+               offset = 8192
+               size = 1040384 # 1MB - 8192
+       }
+
+       partition rootfs {
+               partition-type = 0x83
+               image = "rootfs.ext4"
+               size = 512M
+       }
+}
diff --git a/board/olimex/a33_olinuxino/post-build.sh b/board/olimex/a33_olinuxino/post-build.sh
new file mode 100755 (executable)
index 0000000..b418120
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp $BINARIES_DIR/boot.scr $TARGET_DIR/boot/boot.scr
diff --git a/board/olimex/a33_olinuxino/readme.txt b/board/olimex/a33_olinuxino/readme.txt
new file mode 100644 (file)
index 0000000..b190602
--- /dev/null
@@ -0,0 +1,50 @@
+A33-OLinuXino
+
+Intro
+=====
+
+This board is based on Allwinner A33 SoC.
+
+Home Page: https://www.olimex.com/Products/OLinuXino/A33/A33-OLinuXino/open-source-hardware
+Wiki:     https://wiki.amarulasolutions.com/bsp/sunxi/a33/Olimex-A33-Olinuxino.html
+
+How to build it
+===============
+
+Configure Buildroot:
+
+    $ make olimex_a33_olinuxino_defconfig
+
+Build everything by running:
+
+    $ make
+
+Result of the build
+-------------------
+
+After building, you should get a tree like this:
+
+output/images/
+├── boot.scr
+├── rootfs.ext2
+├── rootfs.ext4 -> rootfs.ext2
+├── rootfs.tar
+├── sdcard.img
+├── sun8i-a33-olinuxino.dtb
+├── u-boot.bin
+├── u-boot-sunxi-with-spl.bin
+└── zImage
+
+
+How to write the SD card
+========================
+
+The sdcard.img file is a complete bootable image ready to be written
+on the boot medium. To install it, simply copy the image to a uSD
+card:
+
+    # dd if=output/images/sdcard.img of=/dev/sdX
+
+Where 'sdX' is the device node of the uSD.
+
+Eject the SD card, insert it in the A33-OLinuXino board, and power it up.
diff --git a/configs/olimex_a33_olinuxino_defconfig b/configs/olimex_a33_olinuxino_defconfig
new file mode 100644 (file)
index 0000000..c71bdb1
--- /dev/null
@@ -0,0 +1,48 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+
+# Linux headers same as kernel, a 5.0 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y
+
+# System configuration
+BR2_TARGET_GENERIC_HOSTNAME="A33-olinuxino"
+BR2_TARGET_GENERIC_ISSUE="Welcome to A33 OLinuXino!"
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# Bootloaders
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A33-OLinuXino"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a33_olinuxino/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0"
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-a33-olinuxino"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a33_olinuxino/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a33_olinuxino/genimage.cfg"
+
+# Additional tools
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y