bootm: Split out bootargs environment reading / writing
authorSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 17:33:43 +0000 (10:33 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 4 Dec 2020 21:09:26 +0000 (16:09 -0500)
commitb6386f38410f669f706a748d7d292d24ea14fe29
treea821466549ee958ca7943dd6a8bf0d2ab38de110
parent6cd92b1a7c62dc808e74f4638a027da3f6a044ce
bootm: Split out bootargs environment reading / writing

At present bootm_process_cmdline_env() reads the 'bootargs' variable and
then writes it back afterwards. This is painful for tests, which would
rather use a simple buffer.

It is also useful for zimage to use a buffer, since it does not actually
put the Linux command line in the bootargs variable.

Refactor the existing code into two pieces. One handles reading and
writing the environment variable, as well as allocating a buffer for use
by the rest of the code, which now operates on a buffer.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/bootm.c