Michael Walle 6509c3fe1c boot: android: fix booting without a ramdisk
android_image_get_ramdisk() will return an error if there is no ramdisk.
Using the android image without a ramdisk worked until commit
1ce8e10f3b4b ("image: Fix up ANDROID_BOOT_IMAGE ramdisk code") because
the return code wasn't checked until then. Return -ENOENT in case
there is no ramdisk and translate that into -ENOPKG in the calling
code, which will then indicate "no ramdisk" to its caller
(boot_get_ramdisk()).

This way, we can get rid of the "*rd_data = *rd_len = 0;" in the error
path, too.

With this, I'm able to boot a linux kernel using fastboot again:

  fastboot --base 0x41000000 --header-version 2 --dtb /path/to/dtb \
  --cmdline "root=/dev/mmcblk0p1 rootwait" boot path/to/Image

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20240729213657.2550935-1-mwalle@kernel.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-22 09:23:33 +02:00
..
2024-07-31 16:51:54 +02:00
2022-10-30 20:07:16 +01:00
2022-01-19 18:11:34 +01:00
2022-09-29 16:07:57 -04:00
2022-09-24 10:47:01 -04:00
2023-08-25 13:54:33 -04:00
2022-07-26 02:30:56 -06:00
2023-08-08 10:22:03 -04:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2022-01-30 01:25:00 +00:00
2022-01-30 01:25:00 +00:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2024-06-24 13:34:52 -06:00
2022-01-19 18:11:34 +01:00
2024-02-13 15:38:49 -05:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-08-02 15:16:51 -03:00
2022-01-19 18:11:34 +01:00
2024-07-31 16:51:54 +02:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2024-07-16 17:09:33 -06:00
2024-06-14 12:59:07 -06:00
2022-03-15 16:19:29 -04:00
2022-04-06 14:01:42 -04:00
2024-05-03 12:22:58 -06:00
2024-07-29 15:01:04 -06:00
2023-05-02 14:23:34 -04:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-10-18 09:32:53 +08:00
2023-01-20 12:27:06 -05:00
2021-07-07 19:52:22 -04:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2022-07-26 11:29:00 +02:00
2024-07-29 15:01:04 -06:00
2023-11-07 14:50:51 -05:00
2023-12-21 08:54:37 -05:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-10-31 09:08:51 +01:00
2022-01-19 18:11:34 +01:00
2021-08-30 14:13:28 -04:00
2023-04-27 13:51:06 -04:00
2022-01-19 18:11:34 +01:00
2023-12-21 11:59:49 -05:00
2023-08-19 04:12:53 +02:00
2022-10-30 20:07:17 +01:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2023-10-11 15:43:55 -04:00
2024-07-29 15:01:04 -06:00
2022-01-24 10:35:10 -05:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2021-09-28 12:03:20 -04:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2023-12-21 08:54:37 -05:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-08-08 09:28:05 +02:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-01-16 18:01:10 +08:00
2023-12-21 08:54:37 -05:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-04-01 15:03:13 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2023-11-16 13:49:14 -05:00
2024-07-29 15:01:04 -06:00
2022-04-06 14:03:17 -04:00
2023-10-09 15:24:31 -04:00
2024-05-22 08:55:29 -06:00
2023-02-10 07:41:40 -05:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2024-06-30 13:58:31 +02:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00
2022-12-07 16:04:17 -05:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2024-07-31 16:52:51 +02:00
2024-05-22 08:55:29 -06:00
2022-01-19 18:11:34 +01:00
2024-07-29 15:01:04 -06:00