[U-Boot] [PATCH 2/2] ORIGEN: Add MMC SPL support

Chander Kashyap chander.kashyap at linaro.org
Tue Jul 12 09:22:22 CEST 2011


On 12 July 2011 11:37, Minkyu Kang <promsoft at gmail.com> wrote:
> Dear Chander Kashyap ,
>
> On 27 June 2011 17:37, Chander Kashyap <chander.kashyap at linaro.org> wrote:
>> Adds mmc boot support.
>>
>> Signed-off-by: Chander Kashyap <chander.kashyap at linaro.org>
>> ---
>>  mmc_spl/board/samsung/origen/Makefile             |  105 ++++++++++++++++
>>  mmc_spl/board/samsung/origen/mmc_boot.c           |   75 +++++++++++
>>  mmc_spl/board/samsung/origen/tools/mkv310_image.c |  139 +++++++++++++++++++++
>>  mmc_spl/board/samsung/origen/u-boot.lds           |   86 +++++++++++++
>>  4 files changed, 405 insertions(+), 0 deletions(-)
>>  create mode 100644 mmc_spl/board/samsung/origen/Makefile
>>  create mode 100644 mmc_spl/board/samsung/origen/mmc_boot.c
>>  create mode 100644 mmc_spl/board/samsung/origen/tools/mkv310_image.c
>>  create mode 100644 mmc_spl/board/samsung/origen/u-boot.lds
>>
>> diff --git a/mmc_spl/board/samsung/origen/tools/mkv310_image.c b/mmc_spl/board/samsung/origen/tools/mkv310_image.c
>> new file mode 100644
>> index 0000000..51f16f2
>> --- /dev/null
>> +++ b/mmc_spl/board/samsung/origen/tools/mkv310_image.c
>> @@ -0,0 +1,139 @@
>> +/*
>> + * Copyright (C) 2011 Samsung Electronics
>> + *
>> + * 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 <stdio.h>
>> +#include <stdlib.h>
>> +#include <unistd.h>
>> +#include <fcntl.h>
>> +#include <errno.h>
>> +#include <string.h>
>
> please apply Dirk Behme's patch here.
> http://patchwork.ozlabs.org/patch/104270/
done
>
>> +
>> +#define BUFSIZE                        (16*1024)
>> +#define IMG_SIZE               (16*1024)
>> +#define HEADER_SIZE            16
>> +#define FILE_PERM              (S_IRUSR | S_IWUSR | S_IRGRP \
>> +                               | S_IWGRP | S_IROTH | S_IWOTH)
>> +/*
>> +* Requirement:
>> +* IROM code reads first 14K bytes from boot device.
>> +* It then calculates the checksum of 14K-4 bytes and compare with data at
>> +* 14K-4 offset.
>> +*
>> +* This function takes two filenames:
>> +* IN  "u-boot-spl.bin" and
>> +* OUT "u-boot-mmc-spl.bin" as filenames.
>> +* It reads the "u-boot-spl.bin" in 16K buffer.
>> +* It calculates checksum of 14K-4 Bytes and stores at 14K-4 offset in buffer.
>> +* It writes the buffer to "u-boot-mmc-spl.bin" file.
>> +*/
>> +
>
> Thanks
> Minkyu Kang
> --
> from. prom.
> www.promsoft.net
>



-- 
with warm regards,
Chander Kashyap


More information about the U-Boot mailing list