Exemplo n.º 1
0
static int spl_boot(shell_context_t *ctx, int argc, char *argv[]) {
	int ret = spl_stage1_op(ctx, STAGE1_DEBUG_BOOT, 0, 0, 0);

	if(ret == -1)
		return -1;

	if(cfg_getenv("STAGE2_FILE") == NULL) {
		printf("Variable STAGE2_FILE is not set\n");

		return -1;
	}

	ret = ingenic_loadstage(shell_device(ctx), INGENIC_STAGE2, cfg_getenv("STAGE2_FILE"));

	if(ret == -1) {
		perror("ingenic_loadstage");

		return -1;
	}

	ret = ingenic_configure_stage2(shell_device(ctx));

	if(ret == -1)
		perror("ingenic_configure_stage2");

	return ret;
}
Exemplo n.º 2
0
static int usbboot_boot(shell_context_t *ctx, int argc, char *argv[]) {
	int ret = ingenic_configure_stage2(shell_device(ctx));

	if(ret == -1)
		perror("ingenic_configure_stage2");

	return ret;
}