sunxi-tools: new host package
PATCH 1/3 sunxi-tools: new host package
Tools to help hacking Allwinner A10 (aka sun4i) based devices
--- package/Config.in.host | 1 + package/sunxi-tools/Config.in.host | 7 +++++++ package/sunxi-tools/sunxi-tools.mk | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 package/sunxi-tools/Config.in.host create mode 100644 package/sunxi-tools/sunxi-tools.mk
package/Config.in.host +1 -0
@@ -5,6 +5,7 @@ source "package/lpc3250loader/Config.in.host" source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" source "package/sam-ba/Config.in.host" +source "package/sunxi-tools/Config.in.host" source "package/uboot-tools/Config.in.host" endmenu
package/sunxi-tools/Config.in.host new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + help + Tools to help hacking Allwinner A10 (aka sun4i) based devices and + possibly it's successors + + https://github.com/linux-sunxi/sunxi-tools
package/sunxi-tools/sunxi-tools.mk new file +20 -0
@@ -0,0 +1,20 @@ +############################################################# +# +# sunxi-tools +# +############################################################# + +SUNXI_TOOLS_VERSION = master +SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + for f in fexc bin2fex fex2bin bootinfo fel pio nand-part ; do \ + install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \ + done +endef + +$(eval $(host-generic-package))
Signature · 1 line
1.8.1.5
PATCH 2/3 cubieboard: config file
Configuration file for cubieboard (http://cubieboard.org/)
--- configs/cubieboard_defconfig | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 configs/cubieboard_defconfig
configs/cubieboard_defconfig new file +33 -0
@@ -0,0 +1,33 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="sun4i" +BR2_TARGET_GENERIC_ISSUE="Welcome to use sun4i" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubieboard/post-build.sh" + +# Additional tools +BR2_PACKAGE_HOST_SUNXI_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="https://github.com/linux-sunxi/linux-sunxi.git" +BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="sunxi-3.4" +BR2_LINUX_KERNEL_VERSION="sunxi-3.4" +BR2_LINUX_KERNEL_DEFCONFIG="sun4i" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="cubieboard" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="sunxi" +BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL="https://github.com/linux-sunxi/u-boot-sunxi.git" +BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION="sunxi" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
Signature · 1 line
1.8.1.5
PATCH 3/3 cubieboard: scripts
In reply to Carlo Caionepost-build script for cubieboard and an additional script to correctly create the sd-card
--- board/cubieboard/boot.cmd | 4 ++ board/cubieboard/mkCubieCard.sh | 110 ++++++++++++++++++++++++++++++++++++++++ board/cubieboard/post-build.sh | 40 +++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 board/cubieboard/boot.cmd create mode 100755 board/cubieboard/mkCubieCard.sh create mode 100755 board/cubieboard/post-build.sh
board/cubieboard/boot.cmd new file +4 -0
@@ -0,0 +1,4 @@ +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} +fatload mmc 0 0x43000000 script.bin +fatload mmc 0 0x48000000 uImage +bootm 0x48000000
board/cubieboard/mkCubieCard.sh new file +110 -0
110 lines not on this page · raw message
board/cubieboard/post-build.sh new file +40 -0
@@ -0,0 +1,40 @@ +#!/bin/sh +# post-build.sh for CubieBoard +# 2013, Carlo Caione <[email protected]> + +TARGET_DIR=$1 +IMAGES_DIR=$1/../images +BOARD_DIR="$(dirname $0)" +HOST_DIR=$1/../host/usr/bin +TMP_DIR=`mktemp -d` + +FEX2BIN=$HOST_DIR/fex2bin +FEX_BOARD_FILE=$TMP_DIR/sys_config/a10/cubieboard.fex +BIN_BOARD_FILE=$IMAGES_DIR/script.bin + +MKIMAGE=$HOST_DIR/mkimage +BOOT_CMD=$BOARD_DIR/boot.cmd +BOOT_CMD_H=$IMAGES_DIR/boot.scr + +SD_IMAGE=$IMAGES_DIR/sd.img + +GIT_SUNXI_BOARD=git://github.com/linux-sunxi/sunxi-boards.git + +# Temp dir +mkdir $TMP_DIR + +# Building script.bin +if [ -e $FEX2BIN ]; +then + git clone $GIT_SUNXI_BOARD $TMP_DIR + $FEX2BIN $FEX_BOARD_FILE $BIN_BOARD_FILE +fi + +# U-Boot script +if [ -e $MKIMAGE -a -e $BOOT_CMD ]; +then + $MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H +fi + +# Clean-up +rm -fr $TMP_DIR
Signature · 1 line
1.8.1.5
PATCH 1/3 sunxi-tools: new host package
In reply to Carlo CaioneHi Carlo,
2013/3/7 Carlo Caione <[email protected]>:
Quoted 29 lines
Tools to help hacking Allwinner A10 (aka sun4i) based devices
Signed-off-by Carlo Caione <[email protected]>--- package/Config.in.host | 1 + package/sunxi-tools/Config.in.host | 7 +++++++ package/sunxi-tools/sunxi-tools.mk | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 package/sunxi-tools/Config.in.host create mode 100644 package/sunxi-tools/sunxi-tools.mkpackage/Config.in.host +1
-0@@ -5,6 +5,7 @@ source "package/lpc3250loader/Config.in.host" source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" source "package/sam-ba/Config.in.host" +source "package/sunxi-tools/Config.in.host" source "package/uboot-tools/Config.in.host" endmenupackage/sunxi-tools/Config.in.host new file +0
-0
package/sunxi-tools/Config.in.host line 4
Quoted 4 lines
package/sunxi-tools/Config.in.host new file +4
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + help + Tools to help hacking Allwinner A10 (aka sun4i) based devices and
Looks like the indentation is wrong (spaces instead of 1 tab + 2 spaces).
Quoted 9 lines
package/sunxi-tools/Config.in.host new file +3
-0+ possibly it's successors + + https://github.com/linux-sunxi/sunxi-toolspackage/sunxi-tools/sunxi-tools.mk new file +0
-0
package/sunxi-tools/sunxi-tools.mk line 7
Quoted 7 lines
package/sunxi-tools/sunxi-tools.mk new file +7
-0@@ -0,0 +1,20 @@ +############################################################# +# +# sunxi-tools +# +############################################################# + +SUNXI_TOOLS_VERSION = master
In Buildroot, we usually use commit sha1 instead of branch name; otherwise it makes hard to spot what change in a package may have break a build.
package/sunxi-tools/sunxi-tools.mk line 8
Quoted 1 line
package/sunxi-tools/sunxi-tools.mk new file +1
-0+SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git
BTW, with packages hosted on github, it is possible to just download the tarball of the source at a given revision,
see: http://buildroot.org/downloads/manual/manual.html#github-download-url
Quoted 13 lines
package/sunxi-tools/sunxi-tools.mk new file +12
-1+ +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + for f in fexc bin2fex fex2bin bootinfo fel pio nand-part ; do \ + install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \ + done +endef + +$(eval $(host-generic-package)) --
Quoted 2 lines
1.8.1.5
Regards,
Signature · 1 line
Samuel
PATCH 1/3 sunxi-tools: new host package
Quoted 1 line · Samuel Martin
Hi Carlo,
[cut]
Quoted 5 lines
package/sunxi-tools/Config.in.host line 4
Quoted 4 lines
package/sunxi-tools/Config.in.host new file +4
-0+config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + help + Tools to help hacking Allwinner A10 (aka sun4i) based devices andLooks like the indentation is wrong (spaces instead of 1 tab + 2 spaces).
Uhm ... I'll check it out ...
Quoted 11 lines
Quoted 11 lines
package/sunxi-tools/Config.in.host new file +3
-0+ possibly it's successors + + https://github.com/linux-sunxi/sunxi-toolspackage/sunxi-tools/sunxi-tools.mk new file +2
-0@@ -0,0 +1,20 @@ +############################################################# +#
Quoted 8 lines
package/sunxi-tools/sunxi-tools.mk line 7
Quoted 5 lines
package/sunxi-tools/sunxi-tools.mk new file +5
-0+# sunxi-tools +# +############################################################# + +SUNXI_TOOLS_VERSION = masterIn Buildroot, we usually use commit sha1 instead of branch name; otherwise it makes hard to spot what change in a package may have break a build.
You are definitely right.
Quoted 5 lines
package/sunxi-tools/sunxi-tools.mk line 8
Quoted 1 line
package/sunxi-tools/sunxi-tools.mk new file +1
-0+SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.gitBTW, with packages hosted on github, it is possible to just download the tarball of the source at a given revision,
see: http://buildroot.org/downloads/manual/manual.html#github-download-url
Ups ... It seems like I skipped that part.
Thank you for the suggestions ... I will prepare a second submission.
--
Carlo
PATCH 1/3 sunxi-tools: new host package
In reply to Carlo CaioneQuoted 1 line · Carlo Caione
Tools to help hacking Allwinner A10 (aka sun4i) based devices
Submitted a patch for the same package earlier:
http://patchwork.ozlabs.org/patch/218616/
package/sunxi-tools/sunxi-tools.mk line 12
Quoted 6 lines
package/sunxi-tools/sunxi-tools.mk new file +6
-0+SUNXI_TOOLS_VERSION = master +SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(MAKE) -C $(@D) +endef
Note that sunxi-tools (at least fel) has a dependency on libusb. Your package is assuming that is always present on the host system.
Yours sincerely,
Floris Bos
PATCH 1/3 sunxi-tools: new host package
Quoted 7 lines · Floris Bos
Quoted 2 lines · Carlo Caione
Tools to help hacking Allwinner A10 (aka sun4i) based devices
Submitted a patch for the same package earlier:
http://patchwork.ozlabs.org/patch/218616/
Ups, I didn't see it. Sorry for the overlapping.
I'm going to use your package :)
PATCH 1/3 sunxi-tools: new host package
Dear Carlo Caione,
Quoted 2 lines · Carlo Caione
Ups, I didn't see it. Sorry for the overlapping.
I'm going to use your package :)
Yes, but it would be good if you could take Floris patch into your patch series, and resend it in the next versions of your patch set.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com