diff mbox

[v4,1/6] common/image-fdt.c: Make boot_get_fdt() perform a check for Android images

Message ID 1452675200-15941-2-git-send-email-jeffy.chen@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeffy Chen Jan. 13, 2016, 8:53 a.m. UTC
Android images don't have a fdt.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 common/image-fdt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Jan. 13, 2016, 3:21 p.m. UTC | #1
On Wed, Jan 13, 2016 at 04:53:15PM +0800, Jeffy Chen wrote:

> Android images don't have a fdt.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  common/image-fdt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/common/image-fdt.c b/common/image-fdt.c
> index 5e4e5bd..41aaa0d 100644
> --- a/common/image-fdt.c
> +++ b/common/image-fdt.c
> @@ -379,6 +379,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
>  				       (long)fdt_addr);
>  			}
>  			break;
> +#ifdef CONFIG_ANDROID_BOOT_IMAGE
> +		case IMAGE_FORMAT_ANDROID:
> +			goto no_fdt;
> +#endif
>  		default:
>  			puts("ERROR: Did not find a cmdline Flattened Device Tree\n");
>  			goto no_fdt;

Hang on, this doesn't seem right.  Rob or Paul can you comment more
here?  I know we've gone through some issues in the past with respect to
booting Android and FDT.  Thanks!
Jeffy Chen Jan. 14, 2016, 1:47 a.m. UTC | #2
Hi Tom,

On 2016-1-13 23:21, Tom Rini wrote:
> On Wed, Jan 13, 2016 at 04:53:15PM +0800, Jeffy Chen wrote:
>
>> Android images don't have a fdt.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> Acked-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
>>
>>   common/image-fdt.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/common/image-fdt.c b/common/image-fdt.c
>> index 5e4e5bd..41aaa0d 100644
>> --- a/common/image-fdt.c
>> +++ b/common/image-fdt.c
>> @@ -379,6 +379,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
>>   				       (long)fdt_addr);
>>   			}
>>   			break;
>> +#ifdef CONFIG_ANDROID_BOOT_IMAGE
>> +		case IMAGE_FORMAT_ANDROID:
>> +			goto no_fdt;
>> +#endif
>>   		default:
>>   			puts("ERROR: Did not find a cmdline Flattened Device Tree\n");
>>   			goto no_fdt;
> Hang on, this doesn't seem right.  Rob or Paul can you comment more
> here?  I know we've gone through some issues in the past with respect to
> booting Android and FDT.  Thanks!
Oh! How careless i was...Seems we don't need this patch, the default 
case is enough :)
diff mbox

Patch

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 5e4e5bd..41aaa0d 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -379,6 +379,10 @@  int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 				       (long)fdt_addr);
 			}
 			break;
+#ifdef CONFIG_ANDROID_BOOT_IMAGE
+		case IMAGE_FORMAT_ANDROID:
+			goto no_fdt;
+#endif
 		default:
 			puts("ERROR: Did not find a cmdline Flattened Device Tree\n");
 			goto no_fdt;