configs: add support for LinkSprite pcDuino
Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
bd4519bcee
commit
3f7c3c3c25
8
board/linksprite/pcduino/boot.cmd
Normal file
8
board/linksprite/pcduino/boot.cmd
Normal file
@ -0,0 +1,8 @@
|
||||
setenv fdt_high ffffffff
|
||||
|
||||
setenv bootargs console=ttyS0,115200 console=tty1 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10 ${extra}
|
||||
|
||||
fatload mmc 0 $kernel_addr_r zImage
|
||||
fatload mmc 0 $fdt_addr_r sun4i-a10-pcduino.dtb
|
||||
|
||||
bootz $kernel_addr_r - $fdt_addr_r
|
41
board/linksprite/pcduino/genimage.cfg
Normal file
41
board/linksprite/pcduino/genimage.cfg
Normal file
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Minimal SD card image for the pcDuino
|
||||
#
|
||||
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"sun4i-a10-pcduino.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
#
|
||||
# Note: u-boot environment is stored between u-boot and boot partitions
|
||||
#
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot-sunxi-with-spl.bin"
|
||||
offset = 8192
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
16
board/linksprite/pcduino/linux-extras.config
Normal file
16
board/linksprite/pcduino/linux-extras.config
Normal file
@ -0,0 +1,16 @@
|
||||
# spidev
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
|
||||
# wireless core
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=m
|
||||
|
||||
# wireless drivers
|
||||
CONFIG_WLAN=y
|
||||
CONFIG_RTL_CARDS=m
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_RTLWIFI=m
|
||||
CONFIG_RTLWIFI_USB=m
|
||||
CONFIG_RTLWIFI_DEBUG=y
|
||||
CONFIG_RTL8192C_COMMON=m
|
11
board/linksprite/pcduino/post-build.sh
Executable file
11
board/linksprite/pcduino/post-build.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# post-build.sh for pcDuino taken from OrangePi post-build.sh
|
||||
# 2013, Carlo Caione <carlo.caione@gmail.com>
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
MKIMAGE=$HOST_DIR/usr/bin/mkimage
|
||||
BOOT_CMD=$BOARD_DIR/boot.cmd
|
||||
BOOT_CMD_H=$BINARIES_DIR/boot.scr
|
||||
|
||||
# U-Boot script
|
||||
$MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H
|
16
board/linksprite/pcduino/post-image.sh
Executable file
16
board/linksprite/pcduino/post-image.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${TARGET_DIR}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
exit $?
|
42
board/linksprite/pcduino/readme.txt
Normal file
42
board/linksprite/pcduino/readme.txt
Normal file
@ -0,0 +1,42 @@
|
||||
pcDuino v1 boards (http://www.linksprite.com/linksprite-pcduino)
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
This default configuration will allow you to start experimenting
|
||||
with the buildroot environment for the LinkSprite pcDuino v1 board
|
||||
including its flavors pcDuino-Lite and pcDuino-Lite-WiFi. With the
|
||||
current configuration it will bring-up the board and allow access
|
||||
through the serial console as well as ethernet and wireless
|
||||
network interfaces.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot:
|
||||
|
||||
$ make linksprite_pcduino_defconfig
|
||||
|
||||
Modify configuration if needed, e.g. add more packages to target:
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile everything and build the SD card image:
|
||||
|
||||
$ make
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image
|
||||
called "sdcard.img" in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
How to boot new image
|
||||
=====================
|
||||
|
||||
Insert SD card and reset the board. By default pcDuino board
|
||||
boots from SD card.
|
62
configs/linksprite_pcduino_defconfig
Normal file
62
configs/linksprite_pcduino_defconfig
Normal file
@ -0,0 +1,62 @@
|
||||
# Architecture
|
||||
BR2_arm=y
|
||||
BR2_cortex_a8=y
|
||||
|
||||
# System settings
|
||||
BR2_TARGET_GENERIC_HOSTNAME="pcduino"
|
||||
BR2_TARGET_GENERIC_ISSUE="pcDuino buildroot is ready"
|
||||
|
||||
# Serial port config
|
||||
BR2_TARGET_GENERIC_GETTY=y
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
|
||||
|
||||
# SD image scripts
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/linksprite/pcduino/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/linksprite/pcduino/post-image.sh"
|
||||
|
||||
# For kernel modules autoloading
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
|
||||
|
||||
# Linux headers same as kernel, a 4.6 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun4i-a10-pcduino"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/linksprite/pcduino/linux-extras.config"
|
||||
|
||||
# Filesystem
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
|
||||
# U-Boot
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.05"
|
||||
BR2_TARGET_UBOOT_USE_DEFCONFIG=y
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Linksprite_pcDuino"
|
||||
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"
|
||||
|
||||
# Host packages
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
BR2_PACKAGE_HOST_MTOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
|
||||
# Target packages: wireless support for pcduino-lite-wifi
|
||||
BR2_PACKAGE_IW=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y
|
Loading…
Reference in New Issue
Block a user