本文整理汇总了C++中show_boot_progress函数的典型用法代码示例。如果您正苦于以下问题:C++ show_boot_progress函数的具体用法?C++ show_boot_progress怎么用?C++ show_boot_progress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_boot_progress函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_bootm_rtems
static int do_bootm_rtems (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
void (*entry_point)(bd_t *);
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("RTEMS");
return 1;
}
#endif
entry_point = (void (*)(bd_t *))images->ep;
printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
(ulong)entry_point);
show_boot_progress (15);
/*
* RTEMS Parameters:
* r3: ptr to board info data
*/
(*entry_point)(gd->bd);
return 1;
}
示例2: do_bootm_linux
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
void (*theKernel)(int magic, void *tagtable);
struct tag *params, *params_start;
char *commandline = getenv("bootargs");
int ret;
theKernel = (void *)images->ep;
show_boot_progress (15);
params = params_start = (struct tag *)gd->bd->bi_boot_params;
params = setup_start_tag(params);
params = setup_memory_tags(params);
if (images->rd_start) {
params = setup_ramdisk_tag(params,
PHYSADDR(images->rd_start),
PHYSADDR(images->rd_end));
}
params = setup_commandline_tag(params, commandline);
params = setup_clock_tags(params);
params = setup_ethernet_tags(params);
setup_end_tag(params);
printf("\nStarting kernel at %p (params at %p)...\n\n",
theKernel, params_start);
prepare_to_boot();
theKernel(ATAG_MAGIC, params_start);
/* does not return */
error:
return 1;
}
示例3: mv_load_fpga
int mv_load_fpga(void)
{
int result;
size_t data_size = 0;
void *fpga_data = NULL;
char *datastr = getenv("fpgadata");
char *sizestr = getenv("fpgadatasize");
if (getenv("skip_fpga")) {
printf("found 'skip_fpga' -> FPGA _not_ loaded !\n");
return -1;
}
printf("loading FPGA\n");
if (datastr)
fpga_data = (void *)simple_strtoul(datastr, NULL, 16);
if (sizestr)
data_size = (size_t)simple_strtoul(sizestr, NULL, 16);
if (!data_size) {
printf("fpgadatasize invalid -> FPGA _not_ loaded !\n");
return -1;
}
result = fpga_load(0, fpga_data, data_size);
if (!result)
show_boot_progress(0);
return result;
}
示例4: env_relocate
void env_relocate (void)
{
#if defined (CONFIG_VLSI_EMULATOR)
set_default_env("!For emulator speed up");
#else
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
extern void env_reloc(void);
env_reloc();
#endif
if (gd->env_valid == 0) {
#if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
set_default_env(NULL);
#else
show_boot_progress (-60);
set_default_env("!bad CRC");
#endif
} else {
env_relocate_spec ();
}
#endif //#if !defined (CONFIG_VLSI_EMULATOR)
#if defined(CONFIG_SILENT_CONSOLE) && \
defined(CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC)
if (getenv("silent") != NULL) {
puts("silenced by env\n");
gd->flags |= GD_FLG_SILENT;
} else {
gd->flags &= ~GD_FLG_SILENT;
}
#endif
}
示例5: do_bootm_integrity
static int do_bootm_integrity (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
void (*entry_point)(void);
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("INTEGRITY");
return 1;
}
#endif
entry_point = (void (*)(void))images->ep;
printf ("## Transferring control to INTEGRITY (at address %08lx) ...\n",
(ulong)entry_point);
show_boot_progress (15);
/*
* INTEGRITY Parameters:
* None
*/
(*entry_point)();
return 1;
}
示例6: bootstage_add_record
ulong bootstage_add_record(enum bootstage_id id, const char *name,
int flags, ulong mark)
{
struct bootstage_data *data = gd->bootstage;
struct bootstage_record *rec;
/*
* initf_bootstage() is called very early during boot but since hang()
* calls bootstage_error() we can be called before bootstage is set up.
* Add a check to avoid this.
*/
if (!data)
return mark;
if (flags & BOOTSTAGEF_ALLOC)
id = data->next_id++;
/* Only record the first event for each */
rec = find_id(data, id);
if (!rec && data->rec_count < RECORD_COUNT) {
rec = &data->record[data->rec_count++];
rec->time_us = mark;
rec->name = name;
rec->flags = flags;
rec->id = id;
}
/* Tell the board about this progress */
show_boot_progress(flags & BOOTSTAGEF_ERROR ? -id : id);
return mark;
}
示例7: do_bootm_linux
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
{
/* First parameter is mapped to $r5 for kernel boot args */
void (*theKernel) (char *, ulong, ulong);
char *commandline = getenv ("bootargs");
ulong rd_data_start, rd_data_end;
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
int ret;
char *of_flat_tree = NULL;
#if defined(CONFIG_OF_LIBFDT)
ulong of_size = 0;
/* find flattened device tree */
ret = boot_get_fdt (flag, argc, argv, images, &of_flat_tree, &of_size);
if (ret)
return 1;
#endif
theKernel = (void (*)(char *, ulong, ulong))images->ep;
/* find ramdisk */
ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_MICROBLAZE,
&rd_data_start, &rd_data_end);
if (ret)
return 1;
show_boot_progress (15);
if (!(ulong) of_flat_tree)
of_flat_tree = (char *)simple_strtoul (argv[3], NULL, 16);
#ifdef DEBUG
printf ("## Transferring control to Linux (at address 0x%08lx) " \
"ramdisk 0x%08lx, FDT 0x%08lx...\n",
(ulong) theKernel, rd_data_start, (ulong) of_flat_tree);
#endif
#ifdef XILINX_USE_DCACHE
#ifdef XILINX_DCACHE_BYTE_SIZE
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
#else
#warning please rebuild BSPs and update configuration
flush_cache(0, 32768);
#endif
#endif
/*
* Linux Kernel Parameters (passing device tree):
* r5: pointer to command line
* r6: pointer to ramdisk
* r7: pointer to the fdt, followed by the board info data
*/
theKernel (commandline, rd_data_start, (ulong) of_flat_tree);
/* does not return */
return 1;
}
示例8: hang
void hang(void)
{
puts("### ERROR ### Please RESET the board ###\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS
show_boot_progress(-30);
#endif
for (;;) ;
}
示例9: env_relocate
void env_relocate (void)
{
unsigned char initEthAddr = 0;
DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
gd->reloc_off);
#ifdef CONFIG_AMIGAONEG3SE
enable_nvram();
#endif
#ifdef ENV_IS_EMBEDDED
/*
* The environment buffer is embedded with the text segment,
* just relocate the environment pointer
*/
env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#else
/*
* We must allocate a buffer for the environment
*/
env_ptr = (env_t *)malloc (CONFIG_ENV_SIZE);
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#endif
if (gd->env_valid == 0) {
#if defined(CONFIG_GTH) || defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
puts ("Using default environment\n\n");
#else
puts ("*** Warning - bad CRC, using default environment\n\n");
show_boot_progress (-60);
#endif
set_default_env();
initEthAddr = 1;
}
else {
env_relocate_spec ();
}
gd->env_addr = (ulong)&(env_ptr->data);
#ifdef CONFIG_AMIGAONEG3SE
disable_nvram();
#endif
if (initEthAddr) {
const char * ethaddr = getenv("ethaddr");
if (ethaddr == 0L) {
extern const char * env_read_backup_mac(void );
ethaddr = env_read_backup_mac();
if (ethaddr != 0L && strlen(ethaddr) == 17) {
setenv("ethaddr", ethaddr);
}
}
}
}
示例10: env_relocate
void env_relocate (void)
{
DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
gd->reloc_off);
#ifdef CONFIG_AMIGAONEG3SE
enable_nvram();
#endif
#ifdef ENV_IS_EMBEDDED
/*
* The environment buffer is embedded with the text segment,
* just relocate the environment pointer
*/
env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#else
/*
* We must allocate a buffer for the environment
*/
env_ptr = (env_t *)malloc (CFG_ENV_SIZE);
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#endif
/*
* After relocation to RAM, we can always use the "memory" functions
*/
env_get_char = env_get_char_memory;
if (gd->env_valid == 0) {
#if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
puts ("Using default environment\n\n");
#else
puts ("*** Warning - bad CRC, using default environment\n\n");
show_boot_progress (-60);
#endif
}
#ifdef CFG_PREBOOT_OVERRIDE
if (preboot_override)
gd->env_valid = 0;
#endif
if (gd->env_valid == 0)
default_env();
else {
env_relocate_spec ();
}
gd->env_addr = (ulong)&(env_ptr->data);
#ifdef CONFIG_AMIGAONEG3SE
disable_nvram();
#endif
}
示例11: fit_check_kernel
static int fit_check_kernel (const void *fit, int os_noffset, int verify)
{
fit_image_print (fit, os_noffset, " ");
if (verify) {
puts (" Verifying Hash Integrity ... ");
if (!fit_image_check_hashes (fit, os_noffset)) {
puts ("Bad Data Hash\n");
show_boot_progress (-104);
return 0;
}
puts ("OK\n");
}
show_boot_progress (105);
if (!fit_image_check_target_arch (fit, os_noffset)) {
puts ("Unsupported Architecture\n");
show_boot_progress (-105);
return 0;
}
show_boot_progress (106);
if (!fit_image_check_type (fit, os_noffset, IH_TYPE_KERNEL)) {
puts ("Not a kernel image\n");
show_boot_progress (-106);
return 0;
}
show_boot_progress (107);
return 1;
}
示例12: puts
/**
* image_get_kernel - verify legacy format kernel image
* @img_addr: in RAM address of the legacy format image to be verified
* @verify: data CRC verification flag
*
* image_get_kernel() verifies legacy image integrity and returns pointer to
* legacy image header if image verification was completed successfully.
*
* returns:
* pointer to a legacy image header if valid image was found
* otherwise return NULL
*/
static image_header_t *image_get_kernel (ulong img_addr, int verify)
{
image_header_t *hdr = (image_header_t *)img_addr;
if (!image_check_magic(hdr)) {
puts ("Bad Magic Number\n");
show_boot_progress (-1);
return NULL;
}
show_boot_progress (2);
if (!image_check_hcrc (hdr)) {
puts ("Bad Header Checksum\n");
show_boot_progress (-2);
return NULL;
}
#if defined(CONFIG_MX51_BBG) || defined(CONFIG_MX51_3DS)
if (image_get_load(hdr) < 0x90000000)
image_set_load(hdr, image_get_load(hdr)+0x20000000);
if (image_get_ep(hdr) < 0x90000000)
image_set_ep(hdr, image_get_ep(hdr)+0x20000000);
#endif
#if defined(CONFIG_MX6SL)
if (image_get_load(hdr) < 0x80000000)
image_set_load(hdr, image_get_load(hdr)+0x70000000);
if (image_get_ep(hdr) < 0x80000000)
image_set_ep(hdr, image_get_ep(hdr)+0x70000000);
#endif
show_boot_progress (3);
image_print_contents (hdr);
if (verify) {
puts (" Verifying Checksum ... ");
if (!image_check_dcrc (hdr)) {
printf ("Bad Data CRC\n");
show_boot_progress (-3);
return NULL;
}
puts ("OK\n");
}
show_boot_progress (4);
if (!image_check_target_arch (hdr)) {
printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr));
show_boot_progress (-4);
return NULL;
}
return hdr;
}
示例13: env_relocate
void env_relocate (void)
{
if (gd->env_valid == 0) {
puts ("*** Warning - bad CRC, using default environment\n\n");
show_boot_progress (-60);
set_default_env();
}
else {
env_relocate_spec ();
}
gd->env_addr = (ulong)&(env_ptr->data);
}
示例14: env_relocate
void env_relocate(void)
{
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
env_reloc();
#endif
if (gd->env_valid == 0) {
#if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
set_default_env(NULL);
#else
show_boot_progress(-60);
set_default_env("!bad CRC");
#endif
} else {
env_relocate_spec();
}
}
示例15: env_relocate
void env_relocate (void)
{
DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
gd->reloc_off);
#ifdef CONFIG_AMIGAONEG3SE
enable_nvram();
#endif
#ifdef ENV_IS_EMBEDDED
/*
* The environment buffer is embedded with the text segment,
* just relocate the environment pointer
*/
env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#else
/*
* We must allocate a buffer for the environment
*/
env_ptr = (env_t *)malloc (CONFIG_ENV_SIZE);
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#endif
if (gd->env_valid == 0) {
#if defined(CONFIG_GTH) || defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
puts ("Using default environment\n\n");
#else
puts ("*** Warning - bad CRC, using default environment\n\n");
show_boot_progress (-60);
#endif
set_default_env();
}
else {
env_relocate_spec ();
}
gd->env_addr = (ulong)&(env_ptr->data);
//#if defined(CONFIG_ARCH_NS2816_DEMO)
gd->bd->bi_env = gd->env_addr;
//#endif
#ifdef CONFIG_AMIGAONEG3SE
disable_nvram();
#endif
}