From 0012b7dcdb7f5cb5e6f22f08fcc6124979c1c9ea Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Tue, 14 May 2013 10:09:50 +0000 Subject: beaglebone: update to linux 3.8 As the beaglebone support is mainlined, there's no support for the old board setup files, and the only supported run-time configuration is through the device tree. We're also setting the kernel headers to follow the 3.8 series. Signed-off-by: Anders Darander Signed-off-by: Peter Korsgaard --- configs/beaglebone_defconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'configs') diff --git a/configs/beaglebone_defconfig b/configs/beaglebone_defconfig index 21770685e..38a63a17c 100644 --- a/configs/beaglebone_defconfig +++ b/configs/beaglebone_defconfig @@ -16,7 +16,7 @@ BR2_TARGET_ROOTFS_EXT2=y # lock down headers to avoid breaking with new defaults BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.2.9" +BR2_DEFAULT_KERNEL_VERSION="3.8.12" # bootloader BR2_TARGET_UBOOT=y @@ -30,7 +30,9 @@ BR2_TARGET_UBOOT_SPL_NAME="MLO" # kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="git://github.com/koenkooi/linux.git" -BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="linux-ti33x-psp-3.2-r5a+gitr09e9651bcf2ee8d86685f2a8075bc6557b1d3b91" +BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" +BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="935f6c2f82056d538b528272e2bdbb5c08d69a58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/beaglebone/linux-3.2.9.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/beaglebone/linux-3.8.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-bone" -- cgit v1.2.3 From 0399249b76bc02e4cb1cad2edc3812f4f992ce7a Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Tue, 14 May 2013 10:09:52 +0000 Subject: beaglebone: add am33x-cm3 to the build Add the FW needed for the Cortex M3 on the beaglebone. This is required for working power management. Signed-off-by: Anders Darander Signed-off-by: Peter Korsgaard --- configs/beaglebone_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs') diff --git a/configs/beaglebone_defconfig b/configs/beaglebone_defconfig index 38a63a17c..a14132025 100644 --- a/configs/beaglebone_defconfig +++ b/configs/beaglebone_defconfig @@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set # filesystem +BR2_PACKAGE_AM33X_CM3=y BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -- cgit v1.2.3 From 3496b8b5c81ca2368520f48c58f55edde61ffa15 Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Sun, 26 May 2013 12:08:23 +0000 Subject: cubieboard: add support [Peter: adjust for _FEX_FILE] Signed-off-by: Carlo Caione Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- board/cubietech/cubieboard/boot.cmd | 4 + board/cubietech/cubieboard/mkcubiecard.sh | 119 ++++++++++++++++++++++++++++++ board/cubietech/cubieboard/post-build.sh | 14 ++++ board/cubietech/cubieboard/readme.txt | 59 +++++++++++++++ configs/cubieboard_defconfig | 39 ++++++++++ 5 files changed, 235 insertions(+) create mode 100644 board/cubietech/cubieboard/boot.cmd create mode 100755 board/cubietech/cubieboard/mkcubiecard.sh create mode 100755 board/cubietech/cubieboard/post-build.sh create mode 100644 board/cubietech/cubieboard/readme.txt create mode 100644 configs/cubieboard_defconfig (limited to 'configs') diff --git a/board/cubietech/cubieboard/boot.cmd b/board/cubietech/cubieboard/boot.cmd new file mode 100644 index 000000000..849ed0071 --- /dev/null +++ b/board/cubietech/cubieboard/boot.cmd @@ -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 diff --git a/board/cubietech/cubieboard/mkcubiecard.sh b/board/cubietech/cubieboard/mkcubiecard.sh new file mode 100755 index 000000000..4ffb22304 --- /dev/null +++ b/board/cubietech/cubieboard/mkcubiecard.sh @@ -0,0 +1,119 @@ +#! /bin/sh +# mkCubieCard.sh v0.1: +# 2013, Carlo Caione +# heavely based on : +# mkA10card.sh v0.1 +# 2012, Jason Plum +# loosely based on : +# mkcard.sh v0.5 +# (c) Copyright 2009 Graeme Gregory +# Licensed under terms of GPLv2 +# +# Parts of the procudure base on the work of Denys Dmytriyenko +# http://wiki.omap.com/index.php/MMC_Boot_Format + +IMAGES_DIR=$1 +SPL_IMG=$IMAGES_DIR/sunxi-spl.bin +UBOOT_IMG=$IMAGES_DIR/u-boot.bin +UIMAGE=$IMAGES_DIR/uImage +BIN_BOARD_FILE=$IMAGES_DIR/script.bin +ROOTFS=$IMAGES_DIR/rootfs.tar +BOOT_CMD_H=$IMAGES_DIR/boot.scr + +export LC_ALL=C + +if [ $# -ne 2 ]; then + echo "Usage: $0 " + exit 1; +fi + +if [ $EUID -ne 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +if [ ! -f $SPL_IMG ] || + [ ! -f $UBOOT_IMG ] || + [ ! -f $UIMAGE ] || + [ ! -f $BIN_BOARD_FILE ] || + [ ! -f $ROOTFS ] || + [ ! -f $BOOT_CMD_H ]; then + echo "File(s) missing." + exit 1 +fi + +DRIVE=$2 +P1=`mktemp -d` +P2=`mktemp -d` + +dd if=/dev/zero of=$DRIVE bs=1M count=3 + +SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'` + +echo DISK SIZE - $SIZE bytes + + +# ~2048, 16MB, FAT, bootable +# ~rest of drive, Ext4 +{ +echo 32,512,0x0C,* +echo 544,,,- +} | sfdisk -D $DRIVE + +sleep 1 + +if [ -b ${DRIVE}1 ]; then + D1=${DRIVE}1 + umount ${DRIVE}1 + mkfs.vfat -n "boot" ${DRIVE}1 +else + if [ -b ${DRIVE}p1 ]; then + D1=${DRIVE}p1 + umount ${DRIVE}p1 + mkfs.vfat -n "boot" ${DRIVE}p1 + else + echo "Cant find boot partition in /dev" + exit 1 + fi +fi + + +if [ -b ${DRIVE}2 ]; then + D2=${DRIVE}2 + umount ${DRIVE}2 + mkfs.ext4 -L "Cubie" ${DRIVE}2 +else + if [ -b ${DRIVE}p2 ]; then + D2=${DRIVE}p2 + umount ${DRIVE}p2 + mkfs.ext4 -L "Cubie" ${DRIVE}p2 + else + echo "Cant find rootfs partition in /dev" + exit 1 + fi +fi + +mount $D1 $P1 +mount $D2 $P2 + +# write uImage +cp $UIMAGE $P1 +# write board file +cp $BIN_BOARD_FILE $P1 +# write u-boot script +cp $BOOT_CMD_H $P1 +# write rootfs +tar -C $P2 -xvf $ROOTFS + +sync + +umount $D1 +umount $D2 + +rm -fr $P1 +rm -fr $P2 + +# write SPL +dd if=$SPL_IMG of=$DRIVE bs=1024 seek=8 +# write mele u-boot +dd if=$UBOOT_IMG of=$DRIVE bs=1024 seek=32 diff --git a/board/cubietech/cubieboard/post-build.sh b/board/cubietech/cubieboard/post-build.sh new file mode 100755 index 000000000..1b0258c55 --- /dev/null +++ b/board/cubietech/cubieboard/post-build.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# post-build.sh for CubieBoard +# 2013, Carlo Caione + +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 +if [ -e $MKIMAGE -a -e $BOOT_CMD ]; +then + $MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H +fi diff --git a/board/cubietech/cubieboard/readme.txt b/board/cubietech/cubieboard/readme.txt new file mode 100644 index 000000000..1c4711767 --- /dev/null +++ b/board/cubietech/cubieboard/readme.txt @@ -0,0 +1,59 @@ +cubieboard + +----- +Intro +----- + +To be able to use your cubieboard board with the images generated by +Buildroot you have to correctly setup the SD card. + +For more information, please see http://linux-sunxi.org/FirstSteps + +--------------- +How to build it +--------------- + +You need to use the cubieboard_defconfig, to do so: + * make cubieboard_defconfig + +And to compile: + * make + +----------------- +What is generated +----------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- boot.scr + +-- script.bin + +-- sunxi-spl.bin + +-- u-boot.bin + `-- uImage + +-------------------------- +How setting up the SD card +-------------------------- + +Depending on the rootfs size, you might want to use a 2GB or larger SD-card. +The script mkcubiecard.sh will take care of partitioning and formatting +the SD-card. + +BEWARE! This process will erase your SD card. + +Use dmesg to find out where the SD card is attached in the /dev tree +() and then: + +# sudo ./mkcubiecard.sh + +where: + - is the directory containing the generated files (usually + output/images) + - is the device file of the SD card (usually /dev/sdX) + + + +-- +Carlo Caione diff --git a/configs/cubieboard_defconfig b/configs/cubieboard_defconfig new file mode 100644 index 000000000..933c1a2eb --- /dev/null +++ b/configs/cubieboard_defconfig @@ -0,0 +1,39 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="Cubieboard" +BR2_TARGET_GENERIC_ISSUE="Welcome to use Cubieboard!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard/post-build.sh" + +# Additional tools +BR2_PACKAGE_HOST_SUNXI_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_SUNXI_TOOLS=y +BR2_PACKAGE_SUNXI_BOARDS=y +BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a10/cubieboard.fex" + +# Kernel headers +BR2_KERNEL_HEADERS_3_4=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="274a66a7bfcbaabb88d63e4eba161965383cc416" +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="1a8ac55429f7f8cc9f100c1cf2dc0195cf81e76f" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" -- cgit v1.2.3 From 1ca4ff63f295090eb68afcd4dc0a6d695a89b0a8 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Mon, 27 May 2013 06:41:58 +0000 Subject: configs: add sample for olimex mx233 olinuxino Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- ...x-01-mmc-mxs-mmc-add-cd-inverted-property.patch | 47 ++++++ ...02-mmc-mxs-mmc-add-non-removable-property.patch | 53 ++++++ ...nux-03-mmc-mxs-mmc-add-broken-cd-property.patch | 50 ++++++ ...-imx23-olinuxino-mark-sdcard-cd-as-broken.patch | 28 +++ board/olimex/imx233_olinuxino/linux-3.9.config | 188 +++++++++++++++++++++ .../mxs-bootlets/mxs-bootlets-01-olinuxino.patch | 122 +++++++++++++ board/olimex/imx233_olinuxino/readme.txt | 55 ++++++ configs/olimex_imx233_olinuxino_defconfig | 33 ++++ 8 files changed, 576 insertions(+) create mode 100644 board/olimex/imx233_olinuxino/linux-01-mmc-mxs-mmc-add-cd-inverted-property.patch create mode 100644 board/olimex/imx233_olinuxino/linux-02-mmc-mxs-mmc-add-non-removable-property.patch create mode 100644 board/olimex/imx233_olinuxino/linux-03-mmc-mxs-mmc-add-broken-cd-property.patch create mode 100644 board/olimex/imx233_olinuxino/linux-04-ARM-dts-imx23-olinuxino-mark-sdcard-cd-as-broken.patch create mode 100644 board/olimex/imx233_olinuxino/linux-3.9.config create mode 100644 board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch create mode 100644 board/olimex/imx233_olinuxino/readme.txt create mode 100644 configs/olimex_imx233_olinuxino_defconfig (limited to 'configs') diff --git a/board/olimex/imx233_olinuxino/linux-01-mmc-mxs-mmc-add-cd-inverted-property.patch b/board/olimex/imx233_olinuxino/linux-01-mmc-mxs-mmc-add-cd-inverted-property.patch new file mode 100644 index 000000000..6e58c8cd7 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-01-mmc-mxs-mmc-add-cd-inverted-property.patch @@ -0,0 +1,47 @@ +From 4c0c9be05004d1eb674b7586216b3d93cc04531c Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 10 Apr 2013 11:13:43 +0200 +Subject: [PATCH 1/3] mmc: mxs-mmc: add cd-inverted property + +The card-detect GPIO is inverted on some boards. Handle such case. + +Acked-by: Shawn Guo +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Chris Ball +--- + drivers/mmc/host/mxs-mmc.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c +index 4efe302..0cdf1f6 100644 +--- a/drivers/mmc/host/mxs-mmc.c ++++ b/drivers/mmc/host/mxs-mmc.c +@@ -72,6 +72,7 @@ struct mxs_mmc_host { + int sdio_irq_en; + int wp_gpio; + bool wp_inverted; ++ bool cd_inverted; + }; + + static int mxs_mmc_get_ro(struct mmc_host *mmc) +@@ -96,7 +97,7 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc) + struct mxs_ssp *ssp = &host->ssp; + + return !(readl(ssp->base + HW_SSP_STATUS(ssp)) & +- BM_SSP_STATUS_CARD_DETECT); ++ BM_SSP_STATUS_CARD_DETECT)) ^ host->cd_inverted; + } + + static void mxs_mmc_reset(struct mxs_mmc_host *host) +@@ -691,6 +692,8 @@ static int mxs_mmc_probe(struct platform_device *pdev) + if (flags & OF_GPIO_ACTIVE_LOW) + host->wp_inverted = 1; + ++ host->cd_inverted = of_property_read_bool(np, "cd-inverted"); ++ + mmc->f_min = 400000; + mmc->f_max = 288000000; + mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; +-- +1.8.1.5 + diff --git a/board/olimex/imx233_olinuxino/linux-02-mmc-mxs-mmc-add-non-removable-property.patch b/board/olimex/imx233_olinuxino/linux-02-mmc-mxs-mmc-add-non-removable-property.patch new file mode 100644 index 000000000..f7446cada --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-02-mmc-mxs-mmc-add-non-removable-property.patch @@ -0,0 +1,53 @@ +From 5086e5f41fd107539911edf62f2d202753ed1980 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 10 Apr 2013 11:13:44 +0200 +Subject: [PATCH 2/3] mmc: mxs-mmc: add non-removable property + +Some boards have non removable cards like eMMC. Handle such case. + +Signed-off-by: Marc Kleine-Budde +Acked-by: Shawn Guo +Signed-off-by: Chris Ball +--- + drivers/mmc/host/mxs-mmc.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c +index 0cdf1f6..c231881 100644 +--- a/drivers/mmc/host/mxs-mmc.c ++++ b/drivers/mmc/host/mxs-mmc.c +@@ -73,6 +73,7 @@ struct mxs_mmc_host { + int wp_gpio; + bool wp_inverted; + bool cd_inverted; ++ bool non_removable; + }; + + static int mxs_mmc_get_ro(struct mmc_host *mmc) +@@ -96,8 +97,9 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc) + struct mxs_mmc_host *host = mmc_priv(mmc); + struct mxs_ssp *ssp = &host->ssp; + +- return !(readl(ssp->base + HW_SSP_STATUS(ssp)) & +- BM_SSP_STATUS_CARD_DETECT)) ^ host->cd_inverted; ++ return host->non_removable || ++ !(readl(ssp->base + HW_SSP_STATUS(ssp)) & ++ BM_SSP_STATUS_CARD_DETECT) ^ host->cd_inverted; + } + + static void mxs_mmc_reset(struct mxs_mmc_host *host) +@@ -687,8 +689,10 @@ static int mxs_mmc_probe(struct platform_device *pdev) + mmc->caps |= MMC_CAP_4_BIT_DATA; + else if (bus_width == 8) + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; ++ host->non_removable = of_property_read_bool(np, "non-removable"); ++ if (host->non_removable) ++ mmc->caps |= MMC_CAP_NONREMOVABLE; + host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags); +- + if (flags & OF_GPIO_ACTIVE_LOW) + host->wp_inverted = 1; + +-- +1.8.1.5 + diff --git a/board/olimex/imx233_olinuxino/linux-03-mmc-mxs-mmc-add-broken-cd-property.patch b/board/olimex/imx233_olinuxino/linux-03-mmc-mxs-mmc-add-broken-cd-property.patch new file mode 100644 index 000000000..b5ceb0343 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-03-mmc-mxs-mmc-add-broken-cd-property.patch @@ -0,0 +1,50 @@ +From 1d53196a0d604fcf636203fac21e944b6a9cf275 Mon Sep 17 00:00:00 2001 +From: Hector Palacios +Date: Wed, 10 Apr 2013 11:13:45 +0200 +Subject: [PATCH 3/3] mmc: mxs-mmc: add broken-cd property + +According to bindings documentation for mmc, the property 'broken-cd' +can be used to indicate card-detection is not available and polling +must be used instead. This patch retrieves this property +and sets a custom flag. On the get_cd() hook, it returns 1 if +the flag is set, to always assume the card is present. + +Signed-off-by: Hector Palacios +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Chris Ball +--- + drivers/mmc/host/mxs-mmc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c +index c231881..146a53b 100644 +--- a/drivers/mmc/host/mxs-mmc.c ++++ b/drivers/mmc/host/mxs-mmc.c +@@ -73,6 +73,7 @@ struct mxs_mmc_host { + int wp_gpio; + bool wp_inverted; + bool cd_inverted; ++ bool broken_cd; + bool non_removable; + }; + +@@ -97,7 +98,7 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc) + struct mxs_mmc_host *host = mmc_priv(mmc); + struct mxs_ssp *ssp = &host->ssp; + +- return host->non_removable || ++ return host->non_removable || host->broken_cd || + !(readl(ssp->base + HW_SSP_STATUS(ssp)) & + BM_SSP_STATUS_CARD_DETECT) ^ host->cd_inverted; + } +@@ -689,6 +690,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) + mmc->caps |= MMC_CAP_4_BIT_DATA; + else if (bus_width == 8) + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; ++ host->broken_cd = of_property_read_bool(np, "broken-cd"); + host->non_removable = of_property_read_bool(np, "non-removable"); + if (host->non_removable) + mmc->caps |= MMC_CAP_NONREMOVABLE; +-- +1.8.1.5 + diff --git a/board/olimex/imx233_olinuxino/linux-04-ARM-dts-imx23-olinuxino-mark-sdcard-cd-as-broken.patch b/board/olimex/imx233_olinuxino/linux-04-ARM-dts-imx23-olinuxino-mark-sdcard-cd-as-broken.patch new file mode 100644 index 000000000..7ce42b902 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-04-ARM-dts-imx23-olinuxino-mark-sdcard-cd-as-broken.patch @@ -0,0 +1,28 @@ +From 1897fda94190498573f9d1b72bc6b7b58c720957 Mon Sep 17 00:00:00 2001 +From: Alexandre Pereira da Silva +Date: Sat, 6 Apr 2013 10:42:10 -0300 +Subject: [PATCH 1/1] ARM: dts: imx23-olinuxino: mark sdcard cd as broken + +The imx23-olinuxino sdcard doesn't have card detect. + +Signed-off-by: Alexandre Pereira da Silva +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx23-olinuxino.dts | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts +index e7484e4..d107c4a 100644 +--- a/arch/arm/boot/dts/imx23-olinuxino.dts ++++ b/arch/arm/boot/dts/imx23-olinuxino.dts +@@ -29,6 +29,7 @@ + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + bus-width = <4>; ++ broken-cd; + status = "okay"; + }; + +-- +1.8.1.5 + diff --git a/board/olimex/imx233_olinuxino/linux-3.9.config b/board/olimex/imx233_olinuxino/linux-3.9.config new file mode 100644 index 000000000..eceee9838 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-3.9.config @@ -0,0 +1,188 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +CONFIG_PERF_EVENTS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_BLK_DEV_INTEGRITY=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_MXS=y +CONFIG_MACH_MXS_DT=y +CONFIG_ARM_THUMB=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_AEABI=y +CONFIG_ATAGS=y +CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_SYN_COOKIES=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_FLEXCAN=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y +# CONFIG_M25PXX_USE_FAST_READ is not set +CONFIG_MTD_SST25L=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_UBI=y +# CONFIG_BLK_DEV is not set +CONFIG_EEPROM_AT24=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +CONFIG_ENC28J60=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +CONFIG_SMSC_PHY=y +CONFIG_ICPLUS_PHY=y +CONFIG_REALTEK_PHY=y +CONFIG_MICREL_PHY=y +# CONFIG_WLAN is not set +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_TSC2007=m +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MXS_AUART=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MXS=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=m +CONFIG_SPI_MXS=y +CONFIG_DEBUG_GPIO=y +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_FB=y +CONFIG_FB_MXS=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_MXS_SOC=y +CONFIG_SND_SOC_MXS_SGTL5000=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_STORAGE=y +CONFIG_USB_MXS_PHY=y +CONFIG_MMC=y +CONFIG_MMC_MXS=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_STMP=y +CONFIG_DMADEVICES=y +CONFIG_MXS_DMA=y +CONFIG_STAGING=y +CONFIG_MXS_LRADC=y +CONFIG_IIO_SYSFS_TRIGGER=y +CONFIG_COMMON_CLK_DEBUG=y +CONFIG_IIO=y +CONFIG_PWM=y +CONFIG_PWM_MXS=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT3_FS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_FSCACHE=m +CONFIG_FSCACHE_STATS=y +CONFIG_CACHEFILES=m +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RUBIN=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=y +CONFIG_PRINTK_TIME=y +CONFIG_FRAME_WARN=2048 +CONFIG_MAGIC_SYSRQ=y +CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOCKUP_DETECTOR=y +CONFIG_TIMER_STATS=y +CONFIG_PROVE_LOCKING=y +CONFIG_DEBUG_INFO=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_STRICT_DEVMEM=y +CONFIG_DEBUG_USER=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=m +CONFIG_CRC7=m diff --git a/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch b/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch new file mode 100644 index 000000000..91b57c3d7 --- /dev/null +++ b/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch @@ -0,0 +1,122 @@ +Forward-ported patch from https://github.com/koliqi/imx23-olinuxino +for mxs-bootlets-10.12.01 + +Signed-off-by: Gustavo Zacarias + +diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c +--- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 +@@ -0,0 +1,54 @@ ++/* ++ * Platform specific data for the IMX23_OLINUXINO development board ++ * ++ * Fadil Berisha ++ * ++ * Copyright 2008 SigmaTel, Inc ++ * Copyright 2008 Embedded Alley Solutions, Inc ++ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++#include ++#include ++#include ++ ++/************************************************ ++ * LRADC keyboard data * ++ ************************************************/ ++int lradc_keypad_ch = LRADC_CH0; ++int lradc_vddio_ch = LRADC_CH6; ++ ++struct lradc_keycode lradc_keycodes[] = { ++ { 100, KEY4 }, ++ { 306, KEY5 }, ++ { 601, KEY6 }, ++ { 932, KEY7 }, ++ { 1260, KEY8 }, ++ { 1424, KEY9 }, ++ { 1707, KEY10 }, ++ { 2207, KEY11 }, ++ { 2525, KEY12 }, ++ { 2831, KEY13 }, ++ { 3134, KEY14 }, ++ { -1, 0 }, ++}; ++ ++/************************************************ ++ * Magic key combinations for Armadillo * ++ ************************************************/ ++u32 magic_keys[MAGIC_KEY_NR] = { ++ [MAGIC_KEY1] = KEY4, ++ [MAGIC_KEY2] = KEY6, ++ [MAGIC_KEY3] = KEY10, ++}; ++ ++/************************************************ ++ * Default command line * ++ ************************************************/ ++char cmdline_def[] = "console=ttyAMA0,115200"; +diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt +--- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 +@@ -0,0 +1,3 @@ ++noinitrd console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc ++noinitrd console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc ++noinitrd console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc +diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c +--- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 +@@ -84,6 +84,8 @@ + #include "../../mach-mx28/includes/registers/regsrtc.h" + #elif defined(STMP378X) + #include "../../mach-mx23/includes/registers/regsrtc.h" ++#elif defined(IMX23_OLINUXINO) ++#include "../../mach-mx23/includes/registers/regsrtc.h" + #endif + + #define NAND_SECONDARY_BOOT 0x00000002 +diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h +--- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 +@@ -19,6 +19,8 @@ + + #if defined (BOARD_STMP378X_DEV) + #define MACHINE_ID 0xa45 ++#elif defined (BOARD_IMX23_OLINUXINO_DEV) ++#define MACHINE_ID 0x1009 + #else + #error "Allocate a machine ID for your board" + #endif +diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile +--- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 +@@ -69,6 +69,11 @@ + HW_OBJS = $(LRADC_OBJS) + CFLAGS += -DMX28 -DBOARD_MX28_EVK + endif ++ifeq ($(BOARD), imx23_olinuxino_dev) ++ARCH = mx23 ++HW_OBJS = $(LRADC_OBJS) ++CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV ++endif + + # Generic code + CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o +diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile +--- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 +@@ -16,6 +16,9 @@ + ifeq ($(BOARD), iMX28_EVK) + ARCH = mx28 + endif ++ifeq ($(BOARD), imx23_olinuxino_dev) ++ARCH = mx23 ++endif + + all: build_prep gen_bootstream + diff --git a/board/olimex/imx233_olinuxino/readme.txt b/board/olimex/imx233_olinuxino/readme.txt new file mode 100644 index 000000000..fa3f9e15c --- /dev/null +++ b/board/olimex/imx233_olinuxino/readme.txt @@ -0,0 +1,55 @@ +This configuration is intended as a base image, it doesn't have support +for things like WiFi, either in the kernel or packages. + +It also pulls up the console on the serial port, not on TV output. + +You'll need a spare MicroSD card with Freescale's special partition layout. +This is basically two partitions: + +1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. +2) Anything you like, for this example an ext2 partition, type 83 (linux). + +Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root +and from the buildroot project top level directory: +(remember to replace /dev/sdc* with the appropiate device name!) + +***** WARNING: Double check that /dev/sdc is your MicroSD card ***** +***** It might be /dev/sdb or some other device name ***** +***** Failure to do so may result in you wiping your hard disk ***** + +1. Unmount the filesystem(s) if they're already mounted, usually... + + # for fs in `grep /dev/sdc /proc/mounts|cut -d ' ' -f 1`;do umount $fs;done + + ...should work + +2. Blank the partition table out + + # dd if=/dev/zero of=/dev/sdc bs=1024 count=1024 + +3. Set up the partitions + + # fdisk /dev/sdc + n + p + 1 + + +16MB + t + 53 + n + p + 2 + + + w + +4. Fill up the first (bootstrap + kernel) partition + # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + +5. Fill up the second (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 + +6. Remove the MicroSD card from your linux PC and put it into your olinuxino. + +7. Boot! You're done! diff --git a/configs/olimex_imx233_olinuxino_defconfig b/configs/olimex_imx233_olinuxino_defconfig new file mode 100644 index 000000000..206e46860 --- /dev/null +++ b/configs/olimex_imx233_olinuxino_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Patches (mxs-bootlets) +BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" + +# System +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.9 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_3_9=y + +# Bootloader +BR2_TARGET_MXS_BOOTLETS=y +BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" +BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y +BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.4" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.9.config" +BR2_LINUX_KERNEL_PATCH="board/olimex/imx233_olinuxino" +BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" -- cgit v1.2.3