Skip to contentSkip to conversation

board: add support for LinkSprite pcDuino

PATCH Superseded Sergey Matyukevich 2 participants 8 messages May 26, 2016 – Jun 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: add support for LinkSprite pcDuino

Add basic support for LinkSprite pcDuino v1 board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi.

Tested on pcDuino-Lite-WiFi.

---
 board/linksprite/pcduino/boot.cmd           |   8 +
 board/linksprite/pcduino/genimage.cfg       |  37 ++
 board/linksprite/pcduino/linux-4.4.6.config | 937 ++++++++++++++++++++++++++++
 board/linksprite/pcduino/post-build.sh      |  11 +
 board/linksprite/pcduino/post-image.sh      |  17 +
 board/linksprite/pcduino/readme.txt         |  34 +
 configs/pcduino_defconfig                   |  70 +++
 7 files changed, 1114 insertions(+)
 create mode 100644 board/linksprite/pcduino/boot.cmd
 create mode 100644 board/linksprite/pcduino/genimage.cfg
 create mode 100644 board/linksprite/pcduino/linux-4.4.6.config
 create mode 100755 board/linksprite/pcduino/post-build.sh
 create mode 100755 board/linksprite/pcduino/post-image.sh
 create mode 100644 board/linksprite/pcduino/readme.txt
 create mode 100644 configs/pcduino_defconfig
board/linksprite/pcduino/boot.cmd new file +8 -0
new file mode 100644
index 0000000..0db8363
@@ -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
board/linksprite/pcduino/genimage.cfg new file +37 -0
new file mode 100644
index 0000000..90158cb
@@ -0,0 +1,37 @@
+#
+# Minimal SD card image for the pcDuino
+#
+
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun4i-a10-pcduino.dtb",
+			"boot.scr"
+		}
+	}
+	size = 10M
+}
+
+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"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
board/linksprite/pcduino/linux-4.4.6.config new file +937 -0

937 lines not on this page · raw message

board/linksprite/pcduino/post-build.sh new file +11 -0
new file mode 100755
index 0000000..268c107
@@ -0,0 +1,11 @@
+#!/bin/sh
+# post-build.sh for pcDuino taken from OrangePi post-build.sh
+# 2013, Carlo Caione <[email protected]>
+
+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
board/linksprite/pcduino/post-image.sh new file +17 -0
new file mode 100755
index 0000000..82b3c8a
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+mv ${BINARIES_DIR}/sun4i-a10-pcduino.dtb ${BINARIES_DIR}/sun4i-a10-pcduino.dtb
+
+genimage                               \
+	--rootpath "${TARGET_DIR}"     \
+	--tmppath "${GENIMAGE_TMP}"    \
+	--inputpath "${BINARIES_DIR}"  \
+	--outputpath "${BINARIES_DIR}" \
+	--config "${GENIMAGE_CFG}"
+
+exit $?
board/linksprite/pcduino/readme.txt new file +34 -0
new file mode 100644
index 0000000..3227e75
@@ -0,0 +1,34 @@
+pcDuino v1 (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 pcduino_defconfig
+
+Modify Buildroot 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
configs/pcduino_defconfig new file +70 -0

70 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 board: add support for LinkSprite pcDuino

Hello,

2016-05-26 22:41 GMT+03:00 Sergey Matyukevich <[email protected]>:

Quoted 6 lines

Add basic support for LinkSprite pcDuino v1 board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi.

Tested on pcDuino-Lite-WiFi.

Please disregard this patch. I am going to re-submit the updated version.

Regards,
Sergey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160609/da8c5918/attachment.html>

#2 lore raw

PATCH v2 1/1 board: add support for LinkSprite pcDuino

In reply to Sergey Matyukevich

Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi.

---

Changes v1 -> v2
- use kernel config fragment instead of custom kernel config
- fix u-boot environment: add mmc partition
- use latest u-boot

 board/linksprite/pcduino/boot.cmd            |  8 ++++
 board/linksprite/pcduino/genimage.cfg        | 44 +++++++++++++++++++
 board/linksprite/pcduino/linux-extras.config | 16 +++++++
 board/linksprite/pcduino/post-build.sh       | 11 +++++
 board/linksprite/pcduino/post-image.sh       | 17 ++++++++
 board/linksprite/pcduino/readme.txt          | 34 +++++++++++++++
 board/linksprite/pcduino/uboot-env.txt       | 38 ++++++++++++++++
 configs/pcduino_defconfig                    | 65 ++++++++++++++++++++++++++++
 8 files changed, 233 insertions(+)
 create mode 100644 board/linksprite/pcduino/boot.cmd
 create mode 100644 board/linksprite/pcduino/genimage.cfg
 create mode 100644 board/linksprite/pcduino/linux-extras.config
 create mode 100755 board/linksprite/pcduino/post-build.sh
 create mode 100755 board/linksprite/pcduino/post-image.sh
 create mode 100644 board/linksprite/pcduino/readme.txt
 create mode 100644 board/linksprite/pcduino/uboot-env.txt
 create mode 100644 configs/pcduino_defconfig
board/linksprite/pcduino/boot.cmd new file +8 -0
new file mode 100644
index 0000000..0db8363
@@ -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
board/linksprite/pcduino/genimage.cfg new file +44 -0

44 lines not on this page · raw message

board/linksprite/pcduino/linux-extras.config new file +16 -0
new file mode 100644
index 0000000..670f83f
@@ -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
board/linksprite/pcduino/post-build.sh new file +11 -0
new file mode 100755
index 0000000..268c107
@@ -0,0 +1,11 @@
+#!/bin/sh
+# post-build.sh for pcDuino taken from OrangePi post-build.sh
+# 2013, Carlo Caione <[email protected]>
+
+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
board/linksprite/pcduino/post-image.sh new file +17 -0
new file mode 100755
index 0000000..82b3c8a
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+mv ${BINARIES_DIR}/sun4i-a10-pcduino.dtb ${BINARIES_DIR}/sun4i-a10-pcduino.dtb
+
+genimage                               \
+	--rootpath "${TARGET_DIR}"     \
+	--tmppath "${GENIMAGE_TMP}"    \
+	--inputpath "${BINARIES_DIR}"  \
+	--outputpath "${BINARIES_DIR}" \
+	--config "${GENIMAGE_CFG}"
+
+exit $?
board/linksprite/pcduino/readme.txt new file +34 -0
new file mode 100644
index 0000000..3227e75
@@ -0,0 +1,34 @@
+pcDuino v1 (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 pcduino_defconfig
+
+Modify Buildroot 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
board/linksprite/pcduino/uboot-env.txt new file +38 -0
new file mode 100644
index 0000000..cf504c6
@@ -0,0 +1,38 @@
+baudrate=115200
+boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
+boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
+boot_net_usb_start=usb start
+boot_prefixes=/ /boot/
+boot_script_dhcp=boot.scr.uimg
+boot_scripts=boot.scr.uimg boot.scr
+boot_targets=fel mmc0 usb0 pxe dhcp
+bootcmd=run distro_bootcmd
+bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
+bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
+bootcmd_mmc0=setenv devnum 0; run mmc_boot
+bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
+bootcmd_usb0=setenv devnum 0; run usb_boot
+bootdelay=2
+bootm_size=0xa000000
+console=ttyS0,115200
+dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
+distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
+ethaddr=02:08:09:80:bb:50
+fdt_addr_r=0x43000000
+fdtcontroladdr=4af3c5e0
+fdtfile=sun4i-a10-pcduino.dtb
+kernel_addr_r=0x42000000
+mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
+preboot=usb start
+pxefile_addr_r=0x43200000
+ramdisk_addr_r=0x43300000
+scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
+scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
+scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
+scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
+scriptaddr=0x43100000
+serial#=162367080980bb50
+stderr=serial,vga
+stdin=serial,usbkbd
+stdout=serial,vga
+usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
configs/pcduino_defconfig new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
2.1.4
#3 lore raw

PATCH v2 1/1 board: add support for LinkSprite pcDuino

Hello,

Quoted 5 lines · Sergey Matyukevich

Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi.

Thanks for this new version! It looks pretty good overall, but I have a few comments here and there.

First of all, you should use pcduino-v1 everywhere, since there are multiple versions of the pcduino, and not all of them use the same SoC, nor use the same Device Tree or U-Boot configuration.

Quoted 7 lines
 board/linksprite/pcduino/boot.cmd            |  8 ++++
 board/linksprite/pcduino/genimage.cfg        | 44 +++++++++++++++++++
 board/linksprite/pcduino/linux-extras.config | 16 +++++++
 board/linksprite/pcduino/post-build.sh       | 11 +++++
 board/linksprite/pcduino/post-image.sh       | 17 ++++++++
 board/linksprite/pcduino/readme.txt          | 34 +++++++++++++++
 board/linksprite/pcduino/uboot-env.txt       | 38 ++++++++++++++++

The directory should be named board/linksprite/pcduino-v1/

Quoted 1 line
 configs/pcduino_defconfig                    | 65 ++++++++++++++++++++++++++++

I think the defconfig should be named linksprite_pcduinov1_defconfig

board/linksprite/pcduino/boot.cmd line 6

Quoted 2 lines
board/linksprite/pcduino/boot.cmd new file +2 -0
+fatload mmc 0 $kernel_addr_r zImage
+fatload mmc 0 $fdt_addr_r sun4i-a10-pcduino.dtb

So the dtb name does not carry the "v1" thing ?

board/linksprite/pcduino/genimage.cfg line 13

Quoted 9 lines
board/linksprite/pcduino/genimage.cfg new file +9 -0
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun4i-a10-pcduino.dtb",
+			"boot.scr"
+		}
+	}
+	size = 10M

16M looks more "normal" :)

board/linksprite/pcduino/post-image.sh line 8

Quoted 2 lines
board/linksprite/pcduino/post-image.sh new file +2 -0
+rm -rf "${GENIMAGE_TMP}"
+mv ${BINARIES_DIR}/sun4i-a10-pcduino.dtb ${BINARIES_DIR}/sun4i-a10-pcduino.dtb

Not sure what this line is doing.

Quoted 6 lines
board/linksprite/pcduino/readme.txt new file +0 -0
new file mode 100644
index 0000000..3227e75

board/linksprite/pcduino/readme.txt line 9

Quoted 9 lines
board/linksprite/pcduino/readme.txt new file +9 -0
@@ -0,0 +1,34 @@
+pcDuino v1 (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.

Please wrap lines at 72 characters. Your favorite text editor should be capable of doing this for you.

Quoted 15 lines
board/linksprite/pcduino/readme.txt new file +15 -0
+
+How to build it
+===============
+
+Configure Buildroot:
+
+    $ make pcduino_defconfig
+
+Modify Buildroot configuration if needed, e.g. add more packages to target:
+
+    $ make menuconfig
+
+Compile everything and build the SD card image:
+
+    $ make

board/linksprite/pcduino/readme.txt line 34

Quoted 10 lines
board/linksprite/pcduino/readme.txt new file +10 -0
+
+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

Please indicate how to boot the SD card image on the board (if there is a need to push a button or something).

Quoted 34 lines
board/linksprite/pcduino/uboot-env.txt new file +28 -0
new file mode 100644
index 0000000..cf504c6
@@ -0,0 +1,38 @@
+baudrate=115200
+boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
+boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
+boot_net_usb_start=usb start
+boot_prefixes=/ /boot/
+boot_script_dhcp=boot.scr.uimg
+boot_scripts=boot.scr.uimg boot.scr
+boot_targets=fel mmc0 usb0 pxe dhcp
+bootcmd=run distro_bootcmd
+bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
+bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
+bootcmd_mmc0=setenv devnum 0; run mmc_boot
+bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
+bootcmd_usb0=setenv devnum 0; run usb_boot
+bootdelay=2
+bootm_size=0xa000000
+console=ttyS0,115200
+dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
+distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
+ethaddr=02:08:09:80:bb:50
+fdt_addr_r=0x43000000
+fdtcontroladdr=4af3c5e0
+fdtfile=sun4i-a10-pcduino.dtb
+kernel_addr_r=0x42000000
+mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
+preboot=usb start
+pxefile_addr_r=0x43200000
+ramdisk_addr_r=0x43300000

board/linksprite/pcduino/uboot-env.txt line 38

Quoted 10 lines
board/linksprite/pcduino/uboot-env.txt new file +10 -0
+scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
+scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
+scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
+scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
+scriptaddr=0x43100000
+serial#=162367080980bb50
+stderr=serial,vga
+stdin=serial,usbkbd
+stdout=serial,vga
+usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Why do you need such a big U-Boot environment? U-Boot doesn't come with a sane default environment?

Quoted 6 lines
configs/pcduino_defconfig new file +0 -0
new file mode 100644
index 0000000..f0700b1

configs/pcduino_defconfig line 8

Quoted 8 lines
configs/pcduino_defconfig new file +8 -0
@@ -0,0 +1,65 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a8=y
+
+# System settings
+BR2_TARGET_GENERIC_HOSTNAME="pcduino"
+BR2_TARGET_GENERIC_ISSUE="pcDuino buildroot is ready"
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"

Leave the default getty port.

Quoted 5 lines
configs/pcduino_defconfig new file +5 -0
+
+# 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"
+

configs/pcduino_defconfig line 23

Quoted 10 lines
configs/pcduino_defconfig new file +10 -0
+# For kernel modules autoloading
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+
+# Linux headers same as kernel, a 4.4 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.6"

Any reason to use 4.4 and not 4.6 ?

configs/pcduino_defconfig line 36

Quoted 13 lines
configs/pcduino_defconfig new file +13 -0
+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_LATEST_VERSION=y

Please use a specific version, not "the latest version" option.

Quoted 9 lines
configs/pcduino_defconfig new file +9 -0
+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"
+BR2_TARGET_UBOOT_ENVIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/linksprite/pcduino/uboot-env.txt"
+BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x20000"

configs/pcduino_defconfig line 55

Quoted 10 lines
configs/pcduino_defconfig new file +10 -0
+
+# 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: board access
+BR2_PACKAGE_LRZSZ=y
+BR2_PACKAGE_DROPBEAR=y

Those two packages are not needed.

configs/pcduino_defconfig line 65

Quoted 10 lines
configs/pcduino_defconfig new file +10 -0
+
+# 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

Could you rework those minor details, and send an updated version?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 1/1 board: add support for LinkSprite pcDuino

Hello,

2016-06-11 16:19 GMT+03:00 Thomas Petazzoni <
[email protected]>:

Quoted 11 lines

Hello,

Quoted 5 lines · Sergey Matyukevich

Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi.

Thanks for this new version! It looks pretty good overall, but I have a few comments here and there

Thanks for review. See my answers and questions below.

Quoted 15 lines

First of all, you should use pcduino-v1 everywhere, since there are multiple versions of the pcduino, and not all of them use the same SoC, nor use the same Device Tree or U-Boot configuration.

Quoted 7 lines
 board/linksprite/pcduino/boot.cmd            |  8 ++++
 board/linksprite/pcduino/genimage.cfg        | 44 +++++++++++++++++++
 board/linksprite/pcduino/linux-extras.config | 16 +++++++
 board/linksprite/pcduino/post-build.sh       | 11 +++++
 board/linksprite/pcduino/post-image.sh       | 17 ++++++++
 board/linksprite/pcduino/readme.txt          | 34 +++++++++++++++
 board/linksprite/pcduino/uboot-env.txt       | 38 ++++++++++++++++

The directory should be named board/linksprite/pcduino-v1/

Quoted 1 line
 configs/pcduino_defconfig                    | 65
Quoted 8 lines

++++++++++++++++++++++++++++

I think the defconfig should be named linksprite_pcduinov1_defconfig

board/linksprite/pcduino/boot.cmd line 6

Quoted 2 lines
board/linksprite/pcduino/boot.cmd new file +2 -0
+fatload mmc 0 $kernel_addr_r zImage
+fatload mmc 0 $fdt_addr_r sun4i-a10-pcduino.dtb

So the dtb name does not carry the "v1" thing ?

That is correct. Neither kernel nor U-Boot have this 'v1' thing for the first pcduino board series.

Quoted 17 lines

then run scan_dev_for_boot; fi; done

Quoted 1 line

+scan_dev_for_extlinux=if test -e ${devtype}

${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT
FAILED: continuing...; fi

Quoted 1 line

+scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e

${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED:
continuing...; fi; done

board/linksprite/pcduino/uboot-env.txt

Quoted 6 lines
board/linksprite/pcduino/uboot-env.txt new file +6 -0
+scriptaddr=0x43100000
+serial#=162367080980bb50
+stderr=serial,vga
+stdin=serial,usbkbd
+stdout=serial,vga
+usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run

scan_dev_for_boot_part; fi

Quoted 3 lines

Why do you need such a big U-Boot environment? U-Boot doesn't come with a sane default environment?

U-Boot indeed comes with a sane default environment. And this is exactly the copy of default environment for pcduino. I assume that I have to put something reasonable to u-boot-env mmc partition from the start.

Quoted 6 lines

configs/pcduino_defconfig line 55

Quoted 3 lines
configs/pcduino_defconfig new file +3 -0
+# Target packages: board access
+BR2_PACKAGE_LRZSZ=y
+BR2_PACKAGE_DROPBEAR=y

Those two packages are not needed.

What is wrong with lrzsz package ? It is very handy for the board with WiFi networking only: one can upload/download files via serial port until proper networking setup is worked out.

Quoted 4 lines

Could you rework those minor details, and send an updated version?

Thanks!

Sure, I will introduce the changes according to your comments and re-submit the patch.

Regards,
Sergey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160611/e25efdee/attachment.html>

#5 lore raw

PATCH v2 1/1 board: add support for LinkSprite pcDuino

Hello,

Quoted 4 lines · Sergey Matyukevich
Quoted 1 line

So the dtb name does not carry the "v1" thing ?

That is correct. Neither kernel nor U-Boot have this 'v1' thing for the first pcduino board series.

Ah, okay. Then maybe you can keep the pcduino name for the defconfig and the board directory, assuming that it refers to the v1.

Quoted 3 lines

U-Boot indeed comes with a sane default environment. And this is exactly the copy of default environment for pcduino. I assume that I have to put something reasonable to u-boot-env mmc partition from the start.

Leave the environment partition unitialized. U-Boot will detect that there is no valid environment, and will automatically fall back to its built-in default environment.

Quoted 3 lines

What is wrong with lrzsz package ? It is very handy for the board with WiFi networking only: one can upload/download files via serial port until proper networking setup is worked out.

By "principle", we don't add additional userspace packages to defconfig. In addition:

1/ Your defconfig enables WiFi support, so transferring files over
serial port doesn't seem very useful.

2/ Busybox has a "rx" applet that replaces the corresponding program
from lrzsz.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v3 1/1 board: add support for LinkSprite pcDuino

In reply to Sergey Matyukevich

Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi.

---

Changes v1 -> v2
- use kernel config fragment instead of custom kernel config
- fix u-boot environment: add mmc partition
- use latest u-boot

Changes v2 -> v3
- use specific u-boot version
- bump kernel version to 4.6
- fix minor issues in post-image.sh
- fix minor issues in genimage.cfg: sizes and offsets
- leave u-boot-env patition unitialized
- drop additional packages
- rename board defconfig to linksprite_pcduino_defconfig

 board/linksprite/pcduino/boot.cmd            |  8 ++++
 board/linksprite/pcduino/genimage.cfg        | 41 ++++++++++++++++++
 board/linksprite/pcduino/linux-extras.config | 16 +++++++
 board/linksprite/pcduino/post-build.sh       | 11 +++++
 board/linksprite/pcduino/post-image.sh       | 16 +++++++
 board/linksprite/pcduino/readme.txt          | 42 +++++++++++++++++++
 configs/linksprite_pcduino_defconfig         | 62 ++++++++++++++++++++++++++++
 7 files changed, 196 insertions(+)
 create mode 100644 board/linksprite/pcduino/boot.cmd
 create mode 100644 board/linksprite/pcduino/genimage.cfg
 create mode 100644 board/linksprite/pcduino/linux-extras.config
 create mode 100755 board/linksprite/pcduino/post-build.sh
 create mode 100755 board/linksprite/pcduino/post-image.sh
 create mode 100644 board/linksprite/pcduino/readme.txt
 create mode 100644 configs/linksprite_pcduino_defconfig
board/linksprite/pcduino/boot.cmd new file +8 -0
new file mode 100644
index 0000000..0db8363
@@ -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
board/linksprite/pcduino/genimage.cfg new file +41 -0

41 lines not on this page · raw message

board/linksprite/pcduino/linux-extras.config new file +16 -0
new file mode 100644
index 0000000..670f83f
@@ -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
board/linksprite/pcduino/post-build.sh new file +11 -0
new file mode 100755
index 0000000..268c107
@@ -0,0 +1,11 @@
+#!/bin/sh
+# post-build.sh for pcDuino taken from OrangePi post-build.sh
+# 2013, Carlo Caione <[email protected]>
+
+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
board/linksprite/pcduino/post-image.sh new file +16 -0
new file mode 100755
index 0000000..c82b189
@@ -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 $?
board/linksprite/pcduino/readme.txt new file +42 -0

42 lines not on this page · raw message

configs/linksprite_pcduino_defconfig new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
2.1.4
#7 lore raw

PATCH v3 1/1 board: add support for LinkSprite pcDuino

Hello,

Quoted 6 lines · Sergey Matyukevich

Add basic support for LinkSprite pcDuino board series including pcDuino, pcDuino-Lite, pcDuino-Lite-WiFi. Tested on pcDuino-Lite-WiFi.

---

Applied to master, thanks a lot for doing the new iteration!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com