[ELDK] [PATCH 1/3] m28evk-specific-support

Lothar Rubusch l.rubusch at gmx.ch
Fri Sep 13 15:12:43 CEST 2013


m28evk support:
linux-eldk 3.8; sdcard image with u-boot, uImage / FDT and rootfs (ext);
elftosb; a patch for a corresponding u-boot m28evk.h and settings for mkimage
(native)

Signed-off-by: Lothar Rubusch <l.rubusch at gmx.ch>
---
 meta-eldk/classes/image_types_m28evk.bbclass       |  109 ++++++++++++
 meta-eldk/conf/machine/m28evk.conf                 |   42 +++++
 .../recipes-bsp/uboot/u-boot-mkimage_2013.07.bb    |   19 +-
 .../u-boot/m28evk/u-boot__m28evk-h__ext__v2.patch  |  114 ++++++++++++
 meta-eldk/recipes-bsp/uboot/u-boot_2013.07.bb      |   14 +-
 .../recipes-devtools/elftosb/elftosb_10.12.01.bb   |   36 ++++
 .../linux/linux-eldk/m28evk/defconfig              |  188 ++++++++++++++++++++
 meta-eldk/recipes-kernel/linux/linux-eldk_3.8.bb   |   39 ++--
 .../tools/installer/targets/m28evk/target.conf     |    4 +
 9 files changed, 543 insertions(+), 22 deletions(-)
 create mode 100644 meta-eldk/classes/image_types_m28evk.bbclass
 create mode 100644 meta-eldk/conf/machine/m28evk.conf
 create mode 100644 meta-eldk/recipes-bsp/uboot/u-boot/m28evk/u-boot__m28evk-h__ext__v2.patch
 create mode 100644 meta-eldk/recipes-devtools/elftosb/elftosb_10.12.01.bb
 create mode 100644 meta-eldk/recipes-kernel/linux/linux-eldk/m28evk/defconfig
 create mode 100644 meta-eldk/tools/installer/targets/m28evk/target.conf

diff --git a/meta-eldk/classes/image_types_m28evk.bbclass b/meta-eldk/classes/image_types_m28evk.bbclass
new file mode 100644
index 0000000..2f8d0f6
--- /dev/null
+++ b/meta-eldk/classes/image_types_m28evk.bbclass
@@ -0,0 +1,109 @@
+inherit image_types
+
+## general settings
+
+UBOOT_SUFFIX ?= "bin"
+UBOOT_PADDING ?= "0"
+
+## u-boot mxsboot for SD-Card
+UBOOT_SUFFIX_SDCARD = "mxsboot-sdcard"
+
+## set alignment to 4MB [in KiB]
+IMAGE_ROOTFS_ALIGNMENT = "4096"
+
+## boot partition volume id
+BOOTDD_VOLUME_ID ?= "Boot_${MACHINE}"
+
+## boot partition size [in KiB]
+BOOT_SPACE ?= "8192"
+
+SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard"
+
+## sdcard
+IMAGE_BOOTLOADER ?= "u-boot"
+
+## uboot.mxsboot-sdcard
+## solves dependency in conf/machine/m28evk.conf for IMAGE_FSTYPES having uboot.mxsboot-sdcard
+IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mkimage-native u-boot"
+IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
+
+## .sdcard image with one bootpartition for uImage and FDT, and one rootfs partition
+IMAGE_DEPENDS_sdcard = "parted-native dosfstools-native mtools-native virtual/kernel ${IMAGE_BOOTLOADER}"
+IMAGE_CMD_sdcard(){
+    if [[ -z "${SDCARD_ROOTFS}" ]]; then
+	bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined."
+	exit 1
+    fi
+
+    ## align boot partition and calculate total SD card image size
+    local boot_space_aligned=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
+    boot_space_aligned=$(expr ${boot_space_aligned} - ${boot_space_aligned} % ${IMAGE_ROOTFS_ALIGNMENT})
+    local sdcard_size=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${boot_space_aligned} + ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT})
+
+    ## initialize a sparse file
+    dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${sdcard_size})
+
+    ## partition table
+    parted -s ${SDCARD} mklabel msdos
+
+    ## The disk layout used is:
+    ##
+    ##    1M                     -> 2M                             - reserved to bootloader and other data
+    ##    2M                     -> BOOT_SPACE                     - kernel and other data
+    ##    BOOT_SPACE             -> SDIMG_SIZE                     - rootfs
+    ##
+    ##                                                        Default Free space = 1.3x
+    ##                                                        Use IMAGE_OVERHEAD_FACTOR to add more space
+    ##                                                        <--------->
+    ##            4MiB                8MiB             SDIMG_ROOTFS                    4MiB
+    ## <-----------------------> <-------------> <----------------------> <------------------------------>
+    ##  ---------------------------------------- ------------------------ -------------------------------
+    ## |      |      |                          |ROOTFS_SIZE             |     IMAGE_ROOTFS_ALIGNMENT    |
+    ##  ---------------------------------------- ------------------------ -------------------------------
+    ## ^      ^      ^          ^               ^                        ^                               ^
+    ## |      |      |          |               |                        |                               |
+    ## 0     1M     2M         4M        4MiB + BOOTSPACE   4MiB + BOOTSPACE + SDIMG_ROOTFS   4MiB + BOOTSPACE + SDIMG_ROOTFS + 4MiB
+    ##
+    parted -s ${SDCARD} unit KiB mkpart primary 1024 2048
+    parted -s ${SDCARD} unit KiB mkpart primary 2048 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${boot_space_aligned})
+    parted -s ${SDCARD} unit KiB mkpart primary $(expr  ${IMAGE_ROOTFS_ALIGNMENT} \+ ${boot_space_aligned}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${boot_space_aligned} \+ $ROOTFS_SIZE)
+
+    dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard of=${SDCARD} conv=notrunc seek=1 skip=${UBOOT_PADDING} bs=$(expr 1024 \* 1024)
+
+    BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
+
+    ## boot image
+    IMAGE_BOOTFS="${WORKDIR}/boot-$(date +%Y%m%d%H%M%S)"
+    [[ ! -e "${IMAGE_BOOTFS}" ]] && mkdir -p "${IMAGE_BOOTFS}"
+
+    ## uImage
+    cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin" "${IMAGE_BOOTFS}/${KERNEL_IMAGETYPE}"
+
+    ## uImage, dtb
+    for dts in ${KERNEL_DEVICETREE}; do
+        local dts_basename=$(basename ${dts} | awk -F "." '{print $1}')
+        if [[ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.dtb" ]]; then
+            local kernel_bin="$(readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin)"
+            local kernel_dtb="$(readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.dtb)"
+            if [[ "${kernel_bin%-${MACHINE}*.bin}" == "${kernel_dtb%-${MACHINE}*.dtb}" ]]; then
+                cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.dtb" "${IMAGE_BOOTFS}/${dts_basename}.dtb"
+            fi
+        else
+            die "there was a device tree in list, but it was not built"
+        fi
+    done
+
+    ## generate ext2 filesystem
+    genext2fs -L "${BOOTDD_VOLUME_ID}" -b ${BOOT_BLOCKS} -d ${IMAGE_BOOTFS} ${SDCARD_BOOTFS}
+
+    ## flash it to the sdcard partition
+    dd if=${SDCARD_BOOTFS} of=${SDCARD} conv=notrunc seek=2 bs=$(expr 1024 \* 1024)
+
+    ## change partition type for mxs processor family
+    bbnote "Setting partition type to 0x53 as required for mxs' SoC family."
+    echo -n S | dd of=${SDCARD} bs=1 count=1 seek=450 conv=notrunc
+    parted ${SDCARD} print
+
+    ## rootfs image
+    dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc seek=1 bs=$(expr ${boot_space_aligned} \* 1024 + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
+}
diff --git a/meta-eldk/conf/machine/m28evk.conf b/meta-eldk/conf/machine/m28evk.conf
new file mode 100644
index 0000000..40b592c
--- /dev/null
+++ b/meta-eldk/conf/machine/m28evk.conf
@@ -0,0 +1,42 @@
+#@TYPE: Machine
+#@NAME: DENX M28 SoM Evaluation Kit
+#@SOC: i.MX28
+#@DESCRIPTION: Machine configuration for DENX M28 SoM Evaluation Kit
+
+## to avoid warings about TUNE_ARCH & Co
+require conf/machine/include/tune-arm926ejs.inc
+
+UBOOT_ENTRYPOINT = "0x40008000"
+UBOOT_MAKE_TARGET = "u-boot.sb"
+UBOOT_SUFFIX = "sb"
+UBOOT_MACHINE = "m28evk_config"
+
+IMAGE_CLASSES += " image_types_m28evk "
+
+# Ship kernel modules
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
+
+PREFERRED_VERSION_u-boot = "v2013.07+gitAUTOINC+68c517eafcb060aa8ef92ed2620f0f41c5275d89"
+PREFERRED_VERSION_u-boot-mkimage = "v2013.07+gitAUTOINC+68c517eafcb060aa8ef92ed2620f0f41c5275d89"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-eldk"
+
+## explicit, kernel 3.8 (set to current default, set in linux-eldk_3.8.bb)
+PREFERRED_VERSION_linux-eldk = "3.8+gitAUTOINC+d1baa1360260b5a01938674fc518109a4e5a148d"
+
+KERNEL_IMAGETYPE = "uImage"
+KERNEL_DEVICETREE = "${S}/arch/arm/boot/dts/imx28-m28evk.dts"
+KERNEL_DEFCONFIG = "mxs_defconfig"
+
+## preparation for the sdcard with boot partition (ext2) and rootfs (ext3)
+SDCARD_BOOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.bootfs.ext2"
+SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"
+
+## list of images to be built
+IMAGE_FSTYPES ?= "tar.bz2 ext3 uboot.mxsboot-sdcard sdcard"
+
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-lite"
+MACHINE_FEATURES = "apm usbhost alsa touchscreen"
+
+SERIAL_CONSOLE = "115200 ttyAMA0"
+
diff --git a/meta-eldk/recipes-bsp/uboot/u-boot-mkimage_2013.07.bb b/meta-eldk/recipes-bsp/uboot/u-boot-mkimage_2013.07.bb
index 9545166..a4bf1ad 100644
--- a/meta-eldk/recipes-bsp/uboot/u-boot-mkimage_2013.07.bb
+++ b/meta-eldk/recipes-bsp/uboot/u-boot-mkimage_2013.07.bb
@@ -1,15 +1,17 @@
-DESCRIPTION = "U-boot bootloader mkimage tool"
+DESCRIPTION = "U-boot bootloader mkimage tool, and for m28evk mxsboot tool"
 
 LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
-                    file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
-SECTION = "bootloader"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
 
 PR = "r1"
+SECTION = "bootloader"
+PV = "v2013.07+git${SRCPV}"
 
+# future repository
+SRCREV = "68c517eafcb060aa8ef92ed2620f0f41c5275d89"
 # This revision corresponds to the tag "v2013.07"
 # We use the revision in order to avoid having to fetch it from the repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
+#SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
 
@@ -17,7 +19,10 @@ S = "${WORKDIR}/git"
 
 BBCLASSEXTEND = "native nativesdk"
 
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
+## native and always
+EXTRA_OEMAKE += ' CROSS_COMPILE="${TARGET_PREFIX}" HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
+## ...but has to be native for m28evk (...)
+EXTRA_OEMAKE += ' CONFIG_MX28=y'
 
 do_compile () {
   oe_runmake tools
@@ -25,5 +30,7 @@ do_compile () {
 
 do_install () {
   install -d ${D}${bindir}
+  install -m 0755 tools/mxsboot ${D}${bindir}/uboot-mxsboot
   install -m 0755 tools/mkimage ${D}${bindir}/mkimage
+  ln -sf uboot-mxsboot ${D}${bindir}/mxsboot
 }
diff --git a/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/u-boot__m28evk-h__ext__v2.patch b/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/u-boot__m28evk-h__ext__v2.patch
new file mode 100644
index 0000000..5b49619
--- /dev/null
+++ b/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/u-boot__m28evk-h__ext__v2.patch
@@ -0,0 +1,114 @@
+From 716b0c31d972e846510b34e2f65716b2930f1641 Mon Sep 17 00:00:00 2001
+From: Lothar Rubusch <lothar at denx.de>
+Date: Tue, 10 Sep 2013 15:02:15 +0200
+Subject: [PATCH 1/2] m28evk board specific settings
+
+
+Signed-off-by: Lothar Rubusch <lothar at denx.de>
+---
+ include/configs/m28evk.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 74 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
+index 10ccc3b..36663ac 100644
+--- a/include/configs/m28evk.h
++++ b/include/configs/m28evk.h
+@@ -298,7 +298,7 @@
+ #define CONFIG_BOOTDELAY	3
+ #define CONFIG_BOOTFILE		"uImage"
+ #define CONFIG_BOOTARGS		"console=ttyAMA0,115200n8 "
+-#define CONFIG_BOOTCOMMAND	"run bootcmd_net"
++#define CONFIG_BOOTCOMMAND	"run mmc_mmc"
+ #define CONFIG_LOADADDR		0x42000000
+ #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
+ #define CONFIG_OF_LIBFDT
+@@ -307,6 +307,16 @@
+  * Extra Environments
+  */
+ #define CONFIG_EXTRA_ENV_SETTINGS					\
++	"fdtfile=imx28-m28evk.dtb\0"                                    \
++	"consdev=ttyAMA0\0"                                             \
++	"baudrate=115200\0"                                             \
++	"bootdev=/dev/mmcblk0p2\0"                                      \
++	"rootdev=/dev/mmcblk0p3\0"                                      \
++	"netdev=eth0\0"                                                 \
++	"hostname=m28evk\0"                                             \
++	"rootpath=/opt/eldk-5.4/armv5te/rootfs-qte-sdk\0"               \
++	"kernel_addr_r=0x42000000\0"                                    \
++	"fdt_addr_r=0x41000000\0"                                       \
+ 	"update_nand_full_filename=u-boot.nand\0"			\
+ 	"update_nand_firmware_filename=u-boot.sb\0"			\
+ 	"update_sd_firmware_filename=u-boot.sd\0"			\
+@@ -344,6 +354,68 @@
+ 		"setexpr fw_sz ${fw_sz} + 1 ; "				\
+ 		"mmc write ${loadaddr} 0x800 ${fw_sz} ; "		\
+ 		"fi ; "							\
+-		"fi\0"
++		"fi\0"                                                  \
++	"addcons=setenv bootargs ${bootargs} console=${consdev},${baudrate}\0" \
++	"addip="                                                        \
++		"setenv bootargs ${bootargs} "                          \
++			"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
++				"${hostname}:${netdev}:off\0"           \
++	"addmisc=setenv bootargs ${bootargs} ${miscargs}\0"             \
++	"adddfltmtd="                                                   \
++		"if test \"x${mtdparts}\" == \"x\" ; "                  \
++		"then mtdparts default ; "                              \
++		"fi\0"                                                  \
++	"addmtd="                                                       \
++		"run adddfltmtd ; "                                     \
++		"setenv bootargs ${bootargs} ${mtdparts}\0"             \
++	"addargs=run addcons addmtd addmisc\0"                          \
++	"kernel_mmcload="                                               \
++		"mmc rescan ; "                                         \
++		"ext2load mmc 0:2 ${kernel_addr_r} ${bootfile}\0"       \
++	"kernel_nandload=nand read ${kernel_addr_r} kernel\0"           \
++	"kernel_netload=tftp ${kernel_addr_r} ${bootfile}\0"            \
++	"fdt_mmcload="                                                  \
++		"mmc rescan ; "                                         \
++		"ext2load mmc 0:2 ${fdt_addr_r} ${fdtfile}\0"           \
++	"fdt_nandload=nand read ${fdt_addr_r} fdt\0"                    \
++	"fdt_netload=tftp ${fdt_addr_r} ${fdtfile}\0"                   \
++	"miscargs=nohlt panic=1\0"                                      \
++	"mmcargs=setenv bootargs root=${rootdev} rw rootwait\0"         \
++	"nandargs="                                                     \
++		"setenv bootargs ubi.mtd=6 root=ubi0:rootfs "           \
++			"rootfstype=ubifs\0"                            \
++	"nfsargs="                                                      \
++		"setenv bootargs root=/dev/nfs rw "                     \
++			"nfsroot=${serverip}:${rootpath},v3,tcp\0"      \
++	"mmcload=run kernel_mmcload fdt_mmcload\0"                      \
++	"nandload=run kernel_nandload fdt_nandload\0"                   \
++	"netload=run kernel_netload fdt_netload\0"                      \
++	"mmc_nfs="                                                      \
++		"run mmcload nfsargs addip addargs ; "                  \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"mmc_mmc="                                                      \
++		"run mmcload mmcargs addargs ; "                        \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"mmc_nand="                                                     \
++		"run mmcload nandargs addargs ; "                       \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"nand_mmc="                                                     \
++		"run nandload mmcargs addargs ; "                       \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"nand_nfs="                                                     \
++		"run nandload nfsargs addip addargs ; "                 \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"nand_nand="                                                    \
++		"run nandload nandargs addargs ; "                      \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"net_mmc="                                                      \
++		"run netload mmcargs addargs ; "                        \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"net_nfs="                                                      \
++		"run netload nfsargs addip addargs ; "                  \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
++	"net_nand="                                                     \
++		"run netload nandargs addargs ; "                       \
++		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"
+ 
+ #endif /* __M28EVK_CONFIG_H__ */
+-- 
+1.7.11.7
+
diff --git a/meta-eldk/recipes-bsp/uboot/u-boot_2013.07.bb b/meta-eldk/recipes-bsp/uboot/u-boot_2013.07.bb
index cfa5e1f..30a38a6 100644
--- a/meta-eldk/recipes-bsp/uboot/u-boot_2013.07.bb
+++ b/meta-eldk/recipes-bsp/uboot/u-boot_2013.07.bb
@@ -1,9 +1,12 @@
 require recipes-bsp/u-boot/u-boot.inc
 
+DESCRIPTION = "U-boot bootloader"
 LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
-                    file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
 
+## license text passage
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+SECTION = "bootloader"
+PROVIDES = "u-boot"
 
 PR = "r1"
 PV = "v2013.07+git${SRCPV}"
@@ -12,8 +15,15 @@ PV = "v2013.07+git${SRCPV}"
 # We use the revision in order to avoid having to fetch it from the repo during parse
 SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
 
+## "68c517eafcb060aa8ef92ed2620f0f41c5275d89" corresponds to "v2013.07-rc3"
+SRCREV_m28evk = "68c517eafcb060aa8ef92ed2620f0f41c5275d89"
+
 SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
 
+## uboot patch for m28evk
+SRC_URI_m28evk = "git://git.denx.de/u-boot.git;branch=master;protocol=git  \
+                 file://u-boot__m28evk-h__ext__v2.patch"    
+
 S = "${WORKDIR}/git"
 
 FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/u-boot-git/${MACHINE}"
diff --git a/meta-eldk/recipes-devtools/elftosb/elftosb_10.12.01.bb b/meta-eldk/recipes-devtools/elftosb/elftosb_10.12.01.bb
new file mode 100644
index 0000000..091dbb6
--- /dev/null
+++ b/meta-eldk/recipes-devtools/elftosb/elftosb_10.12.01.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "To make a MXS based board bootable, some tools are necessary. The first one is the \"elftosb\" tool distributed by Freescale Semiconductor. The other on is the \"mxsboot\" tool found in U-Boot source tree."
+SUMMARY = ""
+HOMEPAGE = "I don't have no homepage"
+BUGTRACKER = ""
+
+## something related to the bootloader
+SECTION = "bootloader"
+
+## find the "COPYING" file and run md5sum on it, to obtain the checksum
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=172ede34353056ebec7a597d8459f029"
+
+DISTRO_PN_ALIAS = ""
+
+PR = "r0"
+
+SRC_URI = "ftp://ftp.denx.de/pub/tools/elftosb-${PV}.tar.gz;name=elftosb-${PV}"
+SRC_URI[md5sum] = "e8005d606c1e0bb3507c82f6eceb3056"
+SRC_URI[sha256sum] = "77bb6981620f7575b87d136d94c7daa88dd09195959cc75fc18b138369ecd42b"
+
+## for the installation, where to fetch the binary
+S = "${WORKDIR}/elftosb-${PV}"
+
+## set make arguments via EXTRA_ flags!
+EXTRA_OEMAKE := 'LIBS="-lstdc++ -lm" elftosb'
+
+do_install () {
+    ## make directory
+    install -d ${D}${bindir}
+
+    ## copy file into directory, and set exec permissions
+    install -m 0755 ${S}/bld/linux/elftosb ${D}${bindir} || die "installation failed"
+}
+
+## this is part of the native sdk
+BBCLASSEXTEND = " native nativesdk "
diff --git a/meta-eldk/recipes-kernel/linux/linux-eldk/m28evk/defconfig b/meta-eldk/recipes-kernel/linux/linux-eldk/m28evk/defconfig
new file mode 100644
index 0000000..084dae9
--- /dev/null
+++ b/meta-eldk/recipes-kernel/linux/linux-eldk/m28evk/defconfig
@@ -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 is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_AEABI=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_FPE_NWFPE=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_DEV=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=y
+# 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=y
+CONFIG_LEGACY_PTY_COUNT=256
+# 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_UNSAFE_RESUME=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_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=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/meta-eldk/recipes-kernel/linux/linux-eldk_3.8.bb b/meta-eldk/recipes-kernel/linux/linux-eldk_3.8.bb
index 16d8d64..d454c6c 100644
--- a/meta-eldk/recipes-kernel/linux/linux-eldk_3.8.bb
+++ b/meta-eldk/recipes-kernel/linux/linux-eldk_3.8.bb
@@ -14,28 +14,39 @@ DEFAULT_PREFERENCE_generic-powerpc-4xx = "1"
 DEFAULT_PREFERENCE_generic-powerpc-4xx-softfloat = "1"
 DEFAULT_PREFERENCE_generic-powerpc-e500v2 = "1"
 
-PR = "r1"
-
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-SRC_URI = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git \
-	   file://0001-ARM-video-mxs-Fix-mxsfb-misconfiguring-VDCTRL0.patch \
-	   file://0002-iio-mxs-Remove-unused-struct-mxs_lradc_chan.patch \
-	   file://0003-iio-mxs-Implement-support-for-touchscreen.patch \
-	   file://0004-ARM-mxs-Enable-touchscreen-on-m28evk.patch \
-	   file://defconfig"
-
-LINUX_VERSION ?= "3.8"
-#LINUX_VERSION_EXTENSION ?= "-custom"
+PR = "r1"
 
 # tag: v3.8.13.2 cdf1a431a5fd7f338209c58ddc6c415e4d9fe047
 # tag: v3.8.13.4 d1baa1360260b5a01938674fc518109a4e5a148d
-# tag: v3.8.13.5 88c40fc9401a458b7e08f510ff0b2e0a5b4b2d01
-SRCREV="88c40fc9401a458b7e08f510ff0b2e0a5b4b2d01"
+SRCREV = "d1baa1360260b5a01938674fc518109a4e5a148d"
+
+# PV actually reads the version number from the filename (.bb), recursively asigning
+# even through third variables, like LINUX_VERSION fails: LINUX_VERSION ?= "${PV}"
+LINUX_VERSION ?= "3.8"
+LINUX_VERSION_EXTENSION ?= "-custom"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_MACHINE = "generic-armv4t|generic-armv5te|generic-armv6|generic-armv7a|generic-armv7a-hf|generic-mips|generic-powerpc|generic-powerpc-softfloat|generic-powerpc-4xx|generic-powerpc-4xx-softfloat|generic-powerpc-e500v2"
+SRC_URI = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git   \
+	   file://defconfig"
+
+COMPATIBLE_MACHINE = "generic-armv4t|generic-armv5te|generic-armv6|generic-armv7a|generic-armv7a-hf|generic-mips|generic-powerpc|generic-powerpc-softfloat|generic-powerpc-4xx|generic-powerpc-4xx-softfloat|generic-powerpc-e500v2|m28evk"
+
+
+## m28evk specific settings
+SRC_URI_m28evk = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git   \
+	   file://0001-ARM-video-mxs-Fix-mxsfb-misconfiguring-VDCTRL0.patch \
+	   file://0002-iio-mxs-Remove-unused-struct-mxs_lradc_chan.patch \
+	   file://0003-iio-mxs-Implement-support-for-touchscreen.patch \
+	   file://0004-ARM-mxs-Enable-touchscreen-on-m28evk.patch \
+	   file://defconfig"
+
+do_compile_append_m28evk(){
+    ## linux.inc copies Image to uImage if it is present, this may be a bug in linux.inc
+    [[ -e ${WORKDIR}/git/arch/arm/boot/Image ]] && rm ${WORKDIR}/git/arch/arm/boot/Image
+}
diff --git a/meta-eldk/tools/installer/targets/m28evk/target.conf b/meta-eldk/tools/installer/targets/m28evk/target.conf
new file mode 100644
index 0000000..1516ee0
--- /dev/null
+++ b/meta-eldk/tools/installer/targets/m28evk/target.conf
@@ -0,0 +1,4 @@
+MACHINE="m28evk"
+TARGET_ARCH="arm"
+TARGET_OS="linux"
+TARGET_VENDOR=""
-- 
1.7.10.4



More information about the eldk mailing list