On Thu, 19 Nov 2015 16:01:37 +0100 Bernhard Nortmann <[email protected]> wrote:
> - get rid of double includes > - fix U-Boot source reference > - get rid of "uboot_autostart" variable > > Signed-off-by: Bernhard Nortmann <[email protected]> > --- > fel.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/fel.c b/fel.c > index e9f6450..4561d02 100644 > --- a/fel.c > +++ b/fel.c > @@ -28,8 +28,6 @@ > #include <string.h> > #include <stdio.h> > #include <ctype.h> > -#include <stdlib.h> > -#include <stdio.h> > #include <stdarg.h> > #include <errno.h> > #include <unistd.h> > @@ -988,8 +986,8 @@ int have_sunxi_spl(libusb_device_handle *usb, uint32_t > spl_addr) > > /* > * Pass information to U-Boot via specialized fields in the SPL header > - * (see "boot_file_head" in ${U-BOOT}/tools/mksunxiboot.c), providing > - * information about the boot script address (DRAM location of boot.scr). > + * (see "boot_file_head" in ${U-BOOT}/arch/arm/include/asm/arch-sunxi/spl.h), > + * providing the boot script address (DRAM location of boot.scr). > */ > void pass_fel_information(libusb_device_handle *usb, uint32_t script_address) > { > @@ -1054,7 +1052,6 @@ static double gettime(void) > > int main(int argc, char **argv) > { > - int uboot_autostart = 0; /* flag for "uboot" command = U-Boot autostart > */ > int rc; > libusb_device_handle *handle = NULL; > int iface_detached = -1; > @@ -1175,8 +1172,7 @@ int main(int argc, char **argv) > skip=2; > } else if (strcmp(argv[1], "uboot") == 0 && argc > 2) { > aw_fel_process_spl_and_uboot(handle, argv[2]); > - uboot_autostart = (uboot_entry > 0 && uboot_size > 0); > - if (!uboot_autostart) > + if (!uboot_entry) > printf("Warning: \"uboot\" command failed to > detect image! Can't execute U-Boot.\n"); > skip=2; > } else { > @@ -1188,7 +1184,7 @@ int main(int argc, char **argv) > } > > // auto-start U-Boot if requested (by the "uboot" command) > - if (uboot_autostart) { > + if (uboot_entry > 0 && uboot_size > 0) { > pr_info("Starting U-Boot (0x%08X).\n", uboot_entry); > aw_fel_execute(handle, uboot_entry); After this change, now both "spl" and "uboot" commands always execute U-Boot in the end :-( Right now I'm playing with AR100 (an extra OpenRISC core in H3) and a properly working "spl" command in "sunxi-fel" is quite useful for initializing DRAM before uploading and running some OpenRISC code. > } > Siarhei: Here are the proposed changes that I would like to go into > sunxi-tools, possibly before you tag a 1.3 release. It's not urgent > (could be postponed to a later point in time), but I think it would > be nice to include these into a "release point". Well, last minute changes are always a sort of a lottery. It would have been a bit nicer if we did not include this bug into a "release point" ;-) But better OpenRISC support still needs some other changes in sunxi-tools anyway. And we can probably introduce them in the next tagged release. -- Best regards, Siarhei Siamashka -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
