Code available on new-image branch of u-boot-testing repo
Hello,
The ongoing new uImage format work that has been posted to the list in the form of patches, is now also available from the new-image branch of the u-boot-testing repository at Denx (thanks Wolfgang!).
You can browse the code by going to:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-testing.git;a=shortlog;h=new-image
Or you can pull it locally to take a closer look, test, etc, by using:
git pull \git://www.denx.de/git/u-boot-testing.git/ new-image:u-boot-testing/new-image
To recap the current state of development: the above branch contains clean-up and reorganization of the old format code, done in preparation for adding new format handling. As the reorganization touches a lot of common and critical code, people are encouraged to review, test and provide feedback
Current work on new format handling will be posted to the list and made available on the new-image branch as well.
Looking forward to the comments.
Regards,
Bartlomiej
Here is a rough patch to common/cmd_bootm.c that passed load_end down to the do_bootm_* commands. I haven't updated the lib_*/bootm.c at this point.
I think this is useful to help the bootm commands know exactly what memory is used and what is freed. There are situations that I'd like to get working with the new code like being able to boot a kernel at 256M and have the ramdisk and device tree exist about this 256M base.
- k
common/cmd_bootm.c +14 -14
@@ -90,7 +90,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);typedef void boot_os_fn (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[],image_header_t *hdr,/* of image to boot */ -int verify);/* getenv("verify")[0] != 'n' */ +int verify,ulong load_end);/* getenv("verify")[0] != 'n' */ extern boot_os_fn do_bootm_linux;static boot_os_fn do_bootm_netbsd;
@@ -234,36 +234,36 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])#ifdef CONFIG_SILENT_CONSOLE fixup_silent_linux ();#endif -do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;case IH_OS_NETBSD : -do_bootm_netbsd (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_netbsd (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;#ifdef CONFIG_LYNXKDI case IH_OS_LYNXOS : -do_bootm_lynxkdi (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_lynxkdi (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;#endif case IH_OS_RTEMS : -do_bootm_rtems (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_rtems (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;#if defined(CONFIG_CMD_ELF )case IH_OS_VXWORKS : -do_bootm_vxworks (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_vxworks (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;case IH_OS_QNX : -do_bootm_qnxelf (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_qnxelf (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;#endif #ifdef CONFIG_ARTOS case IH_OS_ARTOS : -do_bootm_artos (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_artos (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;#endif }
@@ -626,7 +626,7 @@ static void fixup_silent_linux ()static void do_bootm_netbsd (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {void (*loader)(bd_t *,image_header_t *,char *,char *);image_header_t *img_addr;
@@ -702,7 +702,7 @@ static void do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,#ifdef CONFIG_LYNXKDI static void do_bootm_lynxkdi (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {lynxkdi_boot (hdr); }
@@ -710,7 +710,7 @@ static void do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,static void do_bootm_rtems (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {void (*entry_point)(bd_t *);
@@ -731,7 +731,7 @@ static void do_bootm_rtems (cmd_tbl_t *cmdtp, int flag,#if defined(CONFIG_CMD_ELF )static void do_bootm_vxworks (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {char str[80 ];
@@ -742,7 +742,7 @@ static void do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag,static void do_bootm_qnxelf (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {char *local_args[2 ];char str[16 ];
@@ -757,7 +757,7 @@ static void do_bootm_qnxelf(cmd_tbl_t *cmdtp, int flag,#if defined(CONFIG_ARTOS ) && defined(CONFIG_PPC )static void do_bootm_artos (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[], -image_header_t *hdr,int verify) +image_header_t *hdr,int verify,ulong load_end) {ulong top;char *s, *cmdline;
Quoted 25 lines · Kumar Gala
Here is a rough patch to
common/cmd_bootm.cthat passedload_enddown to the do_bootm_* commands. I haven't updated thelib_*/bootm.cat this point.I think this is useful to help the bootm commands know exactly what memory is used and what is freed. There are situations that I'd like to get working with the new code like being able to boot a kernel at 256M and have the ramdisk and device tree exist about this 256M base.
- k
common/cmd_bootm.c +1
-1@@ -90,7 +90,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);typedef void boot_os_fn (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[],image_header_t *hdr,/* of image to boot */ -int verify);/* getenv("verify")[0] != 'n' */ +int verify,ulong load_end);/* getenv("verify")[0] != 'n' */ extern boot_os_fn do_bootm_linux;static boot_os_fn do_bootm_netbsd;
common/cmd_bootm.c int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 238
Quoted 6 lines
common/cmd_bootm.c +1
-1@@ -234,36 +234,36 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])#ifdef CONFIG_SILENT_CONSOLE fixup_silent_linux ();#endif -do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;
Hi Kumar,
In our development code for the new format we need even more data to be passed down to do_bootm_* flavors. We are doing this by passing a pointer to a structure:
- do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify);
+ do_bootm_linux (cmdtp, flag, argc, argv, &images, verify);
Where images is of type bootm_headers_t, defined like this:
/*
* Legacy and FIT format headers used by do_bootm() and do_bootm_<os>()
* routines.
*/
typedef struct bootm_headers {
/*
* Legacy os image header, if it is a multi component image
* then get_ramdisk() and get_fdt() will attempt to get
* data from second and third component accordingly.
*/
image_header_t *legacy_hdr_os;
ulong legacy_hdr_valid;#if defined(CONFIG_FIT)
void *fit_hdr_os; /* os FIT image header */
char *fit_uname_os; /* os subimage node unit name */ void *fit_hdr_rd; /* init ramdisk FIT img header */
char *fit_uname_rd; /* init ramdisk node unit name */#if defined(CONFIG_PPC)
void *fit_hdr_fdt; /* FDT blob FIT image header */
char *fit_uname_fdt; /* FDT blob node unit name */
#endif
#endif
} bootm_headers_t;
Perhaps it would be a good idea to add your load_end to bootm_headers? In any case, let's get back to this once the above mentioned code is posted to the ML.
Regards,
Bartlomiej
Quoted 78 lines · Bartlomiej Sieka
Quoted 25 lines · Kumar Gala
Here is a rough patch to
common/cmd_bootm.cthat passedload_enddown to
the do_bootm_* commands. I haven't updated thelib_*/bootm.cat this point.
I think this is useful to help the bootm commands know exactly what memory
is used and what is freed. There are situations that I'd like to get working with the new code like being able to boot a kernel at 256M and
have the ramdisk and device tree exist about this 256M base.
- kcommon/cmd_bootm.c +1
-1@@ -90,7 +90,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);typedef void boot_os_fn (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[],image_header_t *hdr,/* of image to boot */ -int verify);/* getenv("verify")[0] != 'n' */ +int verify,ulong load_end);/* getenv("verify")[0] != 'n' */ extern boot_os_fn do_bootm_linux;static boot_os_fn do_bootm_netbsd;common/cmd_bootm.c int do_bootm (cmd_tbl_t *cmdtp, int flag, int · line 240
Quoted 8 lines
common/cmd_bootm.c +1
-1@@ -234,36 +234,36 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])#ifdef CONFIG_SILENT_CONSOLE fixup_silent_linux ();#endif -do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;Hi Kumar,
In our development code for the new format we need even more data to be
passed down to do_bootm_* flavors. We are doing this by passing a pointer to a structure:(quoted diff) +1
-1- do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); + do_bootm_linux (cmdtp, flag, argc, argv, &images, verify);Where images is of type
bootm_headers_t, defined like this:/*
* Legacy and FIT format headers used bydo_bootm()and do_bootm_<os>()
* routines.
*/typedef struct bootm_headers { /* * Legacy os image header, if it is a multi component image * then get_ramdisk() and get_fdt() will attempt to get * data from second and third component accordingly. */ image_header_t *legacy_hdr_os; ulong legacy_hdr_valid;#if
defined(CONFIG_FIT)void *fit_hdr_os; /* os FIT image header */ char *fit_uname_os; /* os subimage node unit name */void
*fit_hdr_rd; /* init ramdisk FIT img header
*/
char*fit_uname_rd; /* init ramdisk node unit name
*/#if
defined(CONFIG_PPC)
void*fit_hdr_fdt; /* FDT blob FIT image header */
char*fit_uname_fdt; /* FDT blob node unit name */
#endif
#endif
}bootm_headers_t;
Quoted 3 lines
Perhaps it would be a good idea to add your
load_endtobootm_headers? In any case, let's get back to this once the above mentioned code is posted to the ML.
sounds good, any eta on when this patch will show up?
- k
Quoted 85 lines · Kumar Gala
Quoted 82 lines · Bartlomiej Sieka
Quoted 27 lines · Kumar Gala
Here is a rough patch to
common/cmd_bootm.cthat passedload_enddown to
the do_bootm_* commands. I haven't updated thelib_*/bootm.cat this
point.
I think this is useful to help the bootm commands know exactly what memory
is used and what is freed. There are situations that I'd like to get
working with the new code like being able to boot a kernel at 256M and
have the ramdisk and device tree exist about this 256M base.
- kcommon/cmd_bootm.c +1
-1@@ -90,7 +90,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);typedef void boot_os_fn (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[],image_header_t *hdr,/* of image to boot */ -int verify);/* getenv("verify")[0] != 'n' */ +int verify,ulong load_end);/* getenv("verify")[0] != 'n' */ extern boot_os_fn do_bootm_linux;static boot_os_fn do_bootm_netbsd;common/cmd_bootm.c int do_bootm (cmd_tbl_t *cmdtp, int flag, int · line 240
Quoted 8 lines
common/cmd_bootm.c +1
-1@@ -234,36 +234,36 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])#ifdef CONFIG_SILENT_CONSOLE fixup_silent_linux ();#endif -do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); +do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify, load_end);break ;Hi Kumar,
In our development code for the new format we need even more data to be
passed down to do_bootm_* flavors. We are doing this by passing a pointer to a structure:(quoted diff) +1
-1- do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); + do_bootm_linux (cmdtp, flag, argc, argv, &images,verify);
Where images is of type
bootm_headers_t, defined like this:/*
* Legacy and FIT format headers used bydo_bootm()and do_bootm_<os>()
* routines.
*/typedef struct bootm_headers { /* * Legacy os image header, if it is a multi component image * then get_ramdisk() and get_fdt() will attempt to get * data from second and third component accordingly. */ image_header_t *legacy_hdr_os; ulong legacy_hdr_valid;#if
defined(CONFIG_FIT)void *fit_hdr_os; /* os FIT image header */ char *fit_uname_os; /* os subimage node unit name */void
*fit_hdr_rd; /* init ramdisk FIT img header
*/
char*fit_uname_rd; /* init ramdisk node unit name
*/#if
defined(CONFIG_PPC)
void*fit_hdr_fdt; /* FDT blob FIT image header */
char*fit_uname_fdt; /* FDT blob node unit name */
#endif
#endif
}bootm_headers_t;
Quoted 6 lines
Quoted 4 lines
Perhaps it would be a good idea to add your
load_endtobootm_headers?
In any case, let's get back to this once the above mentioned code is posted to the ML.sounds good, any eta on when this patch will show up?
Any update on the patch?
One of the ideas I have is I'd like to see if we can make it possible to do the equiv of bootm via a series of commands from the u-boot command line.
For example, I don't believe we have a way today to just decompress a uImage file.
- k
Quoted 3 lines · In message <[email protected]> you wrote:
For example, I don't believe we have a way today to just decompress a uImage file.
Um... it you try hard enough there is one. See
http://www.denx.de/wiki/view/DULG/HowCanILoadAndUncompressACompressedImage
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There are certain things men must do to remain men. -- Kirk, "The Ultimate Computer", stardate 4929.4
Quoted 8 lines · Wolfgang Denk
In message <F8B63E55-0B77-44DD-
Quoted 3 lines · AAC4-0EC32409B413 at kernel.crashing.org> you wrote:
For example, I don't believe we have a way today to just decompress a uImage file.
Um... it you try hard enough there is one. See
http://www.denx.de/wiki/view/DULG/HowCanILoadAndUncompressACompressedImage
Hmm, do you have objections to a imload command? [clearly you better know what you are doing]
- k
Kumar Gala wrote:
[...]
Quoted 6 lines
Quoted 6 lines · Bartlomiej Sieka
Quoted 5 lines
Quoted 4 lines · Kumar Gala
Here is a rough patch to
common/cmd_bootm.cthat passedload_enddown to
the do_bootm_* commands. I haven't updated thelib_*/bootm.cat this point.
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
In our development code for the new format we need even more data to be
passed down to do_bootm_* flavors. We are doing this by passing a pointer to a structure:(quoted diff) +1
-1- do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify); + do_bootm_linux (cmdtp, flag, argc, argv, &images, verify);
[...]
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Perhaps it would be a good idea to add your
load_endtobootm_headers? In any case, let's get back to this once the above mentioned code is posted to the ML.sounds good, any eta on when this patch will show up?
Any update on the patch?
Hi Kumar,
Sorry for a delayed reply, I've been quite busy recently.
As to the patch adding passing more information to do_bootm_* -- it's a logical part of a bigger patchset that is not yet ready for posting. Please give me a few more days to get it in shape.
Quoted 7 lines
One of the ideas I have is I'd like to see if we can make it possible to do the equiv of bootm via a series of commands from the u-boot command line.
For example, I don't believe we have a way today to just decompress a uImage file.
Apart for using bootm machinery and the autostart env. variable (as pointed to by Wolfgang), there isn't a direct way to do this (like a U-Boot command for example).
Regards,
Bartlomiej
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 3 lines
For example, I don't believe we have a way today to just decompress a uImage file.
Um... it you try hard enough there is one. See
http://www.denx.de/wiki/view/DULG/HowCanILoadAndUncompressACompressedImageHmm, do you have objections to a imload command? [clearly you better know what you are doing]
What exactly would imload do?
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition. - Isaac Asimov