Re: [OpenWrt-Devel] [PATCH 2/2] imx23: Add target for i.MX23
Hi, On Thu, May 16, 2013 at 12:02 AM, Zoltan HERPAI wigy...@uid0.hu wrote: Adding target support for i.MX23, with initial profiles for the different Olinuxino boards. Signed-off-by: Zoltan HERPAI wigy...@uid0.hu --- Index: target/linux/imx23/image/Makefile === --- target/linux/imx23/image/Makefile (revision 0) +++ target/linux/imx23/image/Makefile (revision 0) @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010 OpenWrt.org It's 2013 ... +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +JFFS2_BLOCKSIZE=128k 16k Maybe order them by size? +JFFS2OPTS += -n Long option names are preferred (at least by me). Actually do you need jffs2 at all? None of the boards seem to have internal flash. + +#define Image/BuildKernel +# mkdir -p $(BIN_DIR) +# cp $(KDIR)/vmlinuz $(BIN_DIR)/$(IMG_PREFIX)-zImage +#endef + +#define Image/Prepare +# cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/vmlinuz +#endef Please remove dead code. + + +define Image/Build/jffs2-64k + dd if=$(KDIR)/root.jffs2-64k of=$(BIN_DIR)/openwrt-$(BOARD)-jffs2-64k.img bs=65536 conv=sync This patch is line broken, please fix your mailer. Also since you don't include 64k block size in JFFS_BLOCKSIZE, this is basically read code, so you can remove it, especially as none of the devices seem to have integrated flash. You can prevent building them by clearing JFFS2_BLOCKSIZE. +endef + +define Image/Build/jffs2-128k + dd if=$(KDIR)/root.jffs2-128k of=$(BIN_DIR)/openwrt-$(BOARD)-jffs2-128k.img bs=131072 conv=sync +endef + +define Image/Build/squashfs + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) + dd if=$(KDIR)/root.squashfs of=$(BIN_DIR)/openwrt-$(BOARD)-squashfs.img bs=131072 conv=sync +endef Same these two, you are never actually calling them them. + +define Image/Build + $(call Image/Build/$(1)) + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync +endef + + +$(eval $(call BuildImage)) Index: target/linux/imx23/profiles/003-Micro.mk === --- target/linux/imx23/profiles/003-Micro.mk(revision 0) +++ target/linux/imx23/profiles/003-Micro.mk(revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc + +define Profile/MICRO + NAME:=OLinuXino-MICRO board +# PACKAGES:=kmod-rtl8187 +endef + +define Profile/MICRO/Description + Base packages for -MICRO boards. +endef +$(eval $(call Profile,MICRO)) + Index: target/linux/imx23/profiles/000-Maxi.mk === --- target/linux/imx23/profiles/000-Maxi.mk (revision 0) +++ target/linux/imx23/profiles/000-Maxi.mk (revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MAXI + NAME:=OLinuXino-MAXI board + PACKAGES:=kmod-usb-net-smsc95xx +endef + +define Profile/MAXI/Description + Base packages for -MAXI boards. +endef +$(eval $(call Profile,MAXI)) + Index: target/linux/imx23/profiles/002-Mini.mk === --- target/linux/imx23/profiles/002-Mini.mk (revision 0) +++ target/linux/imx23/profiles/002-Mini.mk (revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MINI + NAME:=OLinuXino-MINI board + PACKAGES:=kmod-rtl8187 Why does the mini non-wifi include the wifi driver? +endef + +define Profile/MINI/Description + Base packages for -MINI boards. +endef +$(eval $(call Profile,MINI)) + Index: target/linux/imx23/profiles/001-Mini-Wifi.mk === --- target/linux/imx23/profiles/001-Mini-Wifi.mk(revision 0) +++ target/linux/imx23/profiles/001-Mini-Wifi.mk(revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MINI-WIFI + NAME:=OLinuXino-MINI-WIFI board + PACKAGES:=kmod-rtl8187 +endef + +define Profile/MINI-WIFI/Description + Base packages for -MINI-WIFI boards. +endef +$(eval $(call
[OpenWrt-Devel] [PATCH 2/2] imx23: Add target for i.MX23
Adding target support for i.MX23, with initial profiles for the different Olinuxino boards. Signed-off-by: Zoltan HERPAI wigy...@uid0.hu --- Index: target/linux/imx23/image/Makefile === --- target/linux/imx23/image/Makefile (revision 0) +++ target/linux/imx23/image/Makefile (revision 0) @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +JFFS2_BLOCKSIZE=128k 16k +JFFS2OPTS += -n + +#define Image/BuildKernel +# mkdir -p $(BIN_DIR) +# cp $(KDIR)/vmlinuz $(BIN_DIR)/$(IMG_PREFIX)-zImage +#endef + +#define Image/Prepare +# cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/vmlinuz +#endef + + +define Image/Build/jffs2-64k + dd if=$(KDIR)/root.jffs2-64k of=$(BIN_DIR)/openwrt-$(BOARD)-jffs2-64k.img bs=65536 conv=sync +endef + +define Image/Build/jffs2-128k + dd if=$(KDIR)/root.jffs2-128k of=$(BIN_DIR)/openwrt-$(BOARD)-jffs2-128k.img bs=131072 conv=sync +endef + +define Image/Build/squashfs + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) + dd if=$(KDIR)/root.squashfs of=$(BIN_DIR)/openwrt-$(BOARD)-squashfs.img bs=131072 conv=sync +endef + +define Image/Build + $(call Image/Build/$(1)) + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync +endef + + +$(eval $(call BuildImage)) Index: target/linux/imx23/profiles/003-Micro.mk === --- target/linux/imx23/profiles/003-Micro.mk(revision 0) +++ target/linux/imx23/profiles/003-Micro.mk(revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc + +define Profile/MICRO + NAME:=OLinuXino-MICRO board +# PACKAGES:=kmod-rtl8187 +endef + +define Profile/MICRO/Description + Base packages for -MICRO boards. +endef +$(eval $(call Profile,MICRO)) + Index: target/linux/imx23/profiles/000-Maxi.mk === --- target/linux/imx23/profiles/000-Maxi.mk (revision 0) +++ target/linux/imx23/profiles/000-Maxi.mk (revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MAXI + NAME:=OLinuXino-MAXI board + PACKAGES:=kmod-usb-net-smsc95xx +endef + +define Profile/MAXI/Description + Base packages for -MAXI boards. +endef +$(eval $(call Profile,MAXI)) + Index: target/linux/imx23/profiles/002-Mini.mk === --- target/linux/imx23/profiles/002-Mini.mk (revision 0) +++ target/linux/imx23/profiles/002-Mini.mk (revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MINI + NAME:=OLinuXino-MINI board + PACKAGES:=kmod-rtl8187 +endef + +define Profile/MINI/Description + Base packages for -MINI boards. +endef +$(eval $(call Profile,MINI)) + Index: target/linux/imx23/profiles/001-Mini-Wifi.mk === --- target/linux/imx23/profiles/001-Mini-Wifi.mk(revision 0) +++ target/linux/imx23/profiles/001-Mini-Wifi.mk(revision 0) @@ -0,0 +1,19 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# FiXME: need to add usb soc and snd + +define Profile/MINI-WIFI + NAME:=OLinuXino-MINI-WIFI board + PACKAGES:=kmod-rtl8187 +endef + +define Profile/MINI-WIFI/Description + Base packages for -MINI-WIFI boards. +endef +$(eval $(call Profile,MINI-WIFI)) + Index: target/linux/imx23/config-default === --- target/linux/imx23/config-default (revision 0) +++ target/linux/imx23/config-default (revision 0) @@ -0,0 +1,266 @@ +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_AMBA_PL08X is not set +# CONFIG_APM_EMULATION is not set +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_MXS=y +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_REQUIRE_GPIOLIB=y +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARCH_VT8500_SINGLE is not set +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARM=y +CONFIG_ARM_AMBA=y