[U-Boot] [RFC/PATCH 1/2] ni: zynq: Add support for NI Ettus Research Project Sulfur Rev2 SDR
Michal Simek
michal.simek at xilinx.com
Fri Jul 7 05:17:14 UTC 2017
<snip>
>>> +#ifdef CONFIG_DISPLAY_BOARDINFO
>>> +int checkboard(void)
>>> +{
>>> + puts("Board: NI Sulfur SDR Board\n");
>>
>> We should probably patch this and read this from DT instead.
>
> The 'model' property?
yes
>>> diff --git a/include/configs/ni_sulfur_rev2.h b/include/configs/ni_sulfur_rev2.h
>>> new file mode 100644
>>> index 0000000..4f9082a
>>> --- /dev/null
>>> +++ b/include/configs/ni_sulfur_rev2.h
>>> @@ -0,0 +1,65 @@
>>> +/*
>>> + * (C) Copyright 2016 National Instruments
>>> + *
>>> + * Configuration for NI Ettus Research Project Sulfur Rev2
>>> + * See zynq-common.h for Zynq common configs
>>> + *
>>> + * SPDX-License-Identifier: GPL-2.0+
>>> + */
>>> +
>>> +#ifndef __CONFIG_NI_SULFUR_REV2
>>> +#define __CONFIG_NI_SULFUR_REV2
>>> +
>>> +#define CONFIG_ENV_IS_NOWHERE
>>> +#include "zynq-common.h"
>>> +#undef CONFIG_ENV_IS_NOWHERE
>>> +
>>> +#define CONFIG_SYS_MMC_ENV_DEV 0
>>> +#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
>>> +#define CONFIG_ENV_OFFSET 0xE0000
>>> +
>>> +#undef CONFIG_EXTRA_ENV_SETTINGS
>>> +#define CONFIG_EXTRA_ENV_SETTINGS \
>>> + "fit_image=fit.itb\0" \
>>> + "load_addr=0x2000000\0" \
>>> + "fit_size=0x800000\0" \
>>> + "fdt_high=0x20000000\0" \
>>> + "initrd_high=0x20000000\0" \
>>> + "loadbootenv_addr=0x2000000\0" \
>>> + "bootenv=uEnv.txt\0" \
>>> + "bootenv_dev=mmc\0" \
>>> + "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \
>>> + "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \
>>> + "env import -t ${loadbootenv_addr} $filesize\0" \
>>> + "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \
>>> + "setbootenv=if env run bootenv_existence_test; then " \
>>> + "if env run loadbootenv; then " \
>>> + "env run importbootenv; " \
>>> + "fi; " \
>>> + "fi; \0" \
>>> + "sd_loadbootenv=set bootenv_dev mmc && " \
>>> + "mmcinfo && "\
>>> + "run setbootenv \0" \
>>> + "usb_loadbootenv=set bootenv_dev usb && usb start && " \
>>> + "run setbootenv \0" \
>>> + "preboot=if test $modeboot = sdboot; then " \
>>> + "run sd_loadbootenv; " \
>>> + "echo Checking if uenvcmd is set ...; " \
>>> + "if test -n $uenvcmd; then " \
>>> + "echo Running uenvcmd ...; " \
>>> + "run uenvcmd; " \
>>> + "fi; " \
>>> + "fi; \0" \
>>> + "sdboot=echo Copying FIT from SD to RAM... && " \
>>> + "load mmc 0 ${load_addr} ${fit_image} && " \
>>> + "bootm ${load_addr}\0" \
>>> + "jtagboot=echo TFTPing FIT to RAM... && " \
>>> + "tftpboot ${load_addr} ${fit_image} && " \
>>> + "bootm ${load_addr}\0" \
>>> + "usbboot=if usb start; then " \
>>> + "echo Copying FIT from USB to RAM... && " \
>>> + "load usb 0 ${load_addr} ${fit_image} && " \
>>> + "bootm ${load_addr}; fi\0" \
>>> + DFU_ALT_INFO
>>> +
>>> +#endif /* __CONFIG_NI_SULFUR_REV2 */
>>>
>>
>
> To clarify: You're suggesting to dump all that stuff into the
> xilinx/zynq/board.c with ifdefs?
I mean that making these option generic that any board can use them is
the best way.
>
> Any comments on the ps7_init_common part?
ps part is nice.
Thanks,
Michal
More information about the U-Boot
mailing list