[U-Boot] [PATCH 4/4] s5pc1xx: add support SMDKC100 board

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sat Sep 5 00:39:37 CEST 2009


> diff --git a/board/samsung/smdkc100/onenand.c b/board/samsung/smdkc100/onenand.c
I guess this is not board specific but soc specific
so please move it to drivers/mtd/onenand/
> new file mode 100644
> index 0000000..75bb8a9
> --- /dev/null
> +++ b/board/samsung/smdkc100/onenand.c
> @@ -0,0 +1,98 @@
> +/*
> + *  Copyright (C) 2008-2009 Samsung Electronics
> + *  Kyungmin Park <kyungmin.park at samsung.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <common.h>
> +#include <linux/mtd/compat.h>
> +#include <linux/mtd/mtd.h>
> +#include <linux/mtd/onenand.h>
> +
> +#include <onenand_uboot.h>
> +
> +#include <samsung_onenand.h>
> +
> +#include <asm/io.h>
> +#include <asm/arch/clock.h>
> +
> +extern void s3c_onenand_init(struct mtd_info *);
please move this to a header
> +
> diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
> new file mode 100644
> index 0000000..4539ced
> --- /dev/null
> diff --git a/board/samsung/smdkc100/u-boot.lds b/board/samsung/smdkc100/u-boot.lds
no need please remove
> new file mode 100644
> index 0000000..27f8201
> --- /dev/null
> +/***********************************************************

> +
> +#define CONFIG_RAMDISK_BOOT	"root=/dev/ram0 rw rootfstype=ext2" \
> +		" console=ttySAC0,115200n8" \
> +		" mem=80M"
why do you restrict the memsize of the kernel?
> +
> +#define CONFIG_COMMON_BOOT	"console=ttySAC0,115200n8" \
> +		" mem=128M " \
> +		" " MTDPARTS_DEFAULT
> +
> +
> +#define CONFIG_ENV_OVERWRITE
> +#define CONFIG_EXTRA_ENV_SETTINGS					\
> +	CONFIG_UPDATEB \
> +	"updatek=onenand erase 0x60000 0x300000;" \
> +	" onenand write 0x31008000 0x60000 0x300000\0" \
> +	"updateu=onenand erase block 147-4095;" \
> +	" onenand write 0x32000000 0x1260000 0x8C0000\0" \
something like this will be more readable
	"updatek="						\
		"onenand erase 0x60000 0x300000; "		\
		"onenand write 0x31008000 0x60000 0x300000\0"	\
	"updateu="						\
		"onenand erase block 147-4095; "		\
		"onenand write 0x32000000 0x1260000 0x8C0000\0" \
	"bootk="						\
		"onenand read 0x30007FC0 0x60000 0x300000; "	\
		"bootm 0x30007FC0\0"				\
	"flashboot="						\
		"set bootargs "					\
			"root=/dev/mtdblock${bootblock} "	\
			"rootfstype=${rootfstype} "		\
			"ubi.mtd=${ubiblock} ${opts} "		\
			CONFIG_COMMON_BOOT "; "			\
		"run bootk\0"					\
> +	"ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs" \
> +	 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; run bootk\0" \
> +	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
> +	"android=set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock}" \
> +	 " rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; run bootk\0" \
> +	"nfsboot=set bootargs root=/dev/nfs ubi.mtd=${ubiblock}" \
> +	 " nfsroot=${nfsroot},nolock ip=${ipaddr}:${serverip}:${gatewayip}:" \
> +	 "${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; run bootk\0" \
> +	"ramboot=set bootargs " CONFIG_RAMDISK_BOOT \
> +	 " initrd=0x33000000,8M ramdisk=8192\0" \
> +	"rootfstype=cramfs\0" \
> +	"mtdparts=" MTDPARTS_DEFAULT "\0" \
> +	"meminfo=mem=128M\0" \
> +	"nfsroot=/nfsroot/arm\0" \
> +	"bootblock=5\0" \
> +	"ubiblock=4\0" \
> +	"ubi=enabled"
> +
> +/*
Best Regards,
J.


More information about the U-Boot mailing list