* [PATCH v1 1/6] common/image-fdt.c: Make boot_get_fdt() perform a check for Android images
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: Joe Hershberger, Marcel Ziswiler, sjg-F7+t8E8rja9g9hUCZPvPmw,
Jeffy Chen, Paul Kocialkowski,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Peng Fan,
Max Krummenacher
Android images don't have a fdt.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
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;
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 1/6] common/image-fdt.c: Make boot_get_fdt() perform a check for Android images
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
Android images don't have a fdt.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
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;
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v1 1/6] common/image-fdt.c: Make boot_get_fdt() perform a check for Android images
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:33 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:33 UTC (permalink / raw)
To: Jeffy Chen
Cc: U-Boot Mailing List, Marcel Ziswiler, Joe Hershberger,
Max Krummenacher, linux-rockchip
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Android images don't have a fdt.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> common/image-fdt.c | 4 ++++
> 1 file changed, 4 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 1/6] common/image-fdt.c: Make boot_get_fdt() perform a check for Android images
@ 2016-01-08 3:33 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:33 UTC (permalink / raw)
To: u-boot
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Android images don't have a fdt.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> common/image-fdt.c | 4 ++++
> 1 file changed, 4 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v1 2/6] ARM: bootm: Try to use relocated ramdisk
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: Albert Aribaud, Hans de Goede, Joe Hershberger, Jan Kiszka,
sjg-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Peng Fan,
Tom Warren, Ian Campbell, York Sun
After boot_ramdisk_high(), ramdisk would be relocated to
initrd_start & initrd_end, so use them instead of rd_start & rd_end.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
arch/arm/lib/bootm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a477cae..ac94995 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -225,7 +225,10 @@ static void boot_prep_linux(bootm_headers_t *images)
if (BOOTM_ENABLE_MEMORY_TAGS)
setup_memory_tags(gd->bd);
if (BOOTM_ENABLE_INITRD_TAG) {
- if (images->rd_start && images->rd_end) {
+ if (images->initrd_start && images->initrd_end) {
+ setup_initrd_tag(gd->bd, images->initrd_start,
+ images->initrd_end);
+ } else if (images->rd_start && images->rd_end) {
setup_initrd_tag(gd->bd, images->rd_start,
images->rd_end);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 2/6] ARM: bootm: Try to use relocated ramdisk
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
After boot_ramdisk_high(), ramdisk would be relocated to
initrd_start & initrd_end, so use them instead of rd_start & rd_end.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
arch/arm/lib/bootm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a477cae..ac94995 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -225,7 +225,10 @@ static void boot_prep_linux(bootm_headers_t *images)
if (BOOTM_ENABLE_MEMORY_TAGS)
setup_memory_tags(gd->bd);
if (BOOTM_ENABLE_INITRD_TAG) {
- if (images->rd_start && images->rd_end) {
+ if (images->initrd_start && images->initrd_end) {
+ setup_initrd_tag(gd->bd, images->initrd_start,
+ images->initrd_end);
+ } else if (images->rd_start && images->rd_end) {
setup_initrd_tag(gd->bd, images->rd_start,
images->rd_end);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v1 2/6] ARM: bootm: Try to use relocated ramdisk
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:34 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: Jeffy Chen
Cc: Joe Hershberger, Jan Kiszka, U-Boot Mailing List, Tom Warren,
Ian Campbell, linux-rockchip, York Sun
Hi Jeffy,
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> After boot_ramdisk_high(), ramdisk would be relocated to
> initrd_start & initrd_end, so use them instead of rd_start & rd_end.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> arch/arm/lib/bootm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index a477cae..ac94995 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -225,7 +225,10 @@ static void boot_prep_linux(bootm_headers_t *images)
> if (BOOTM_ENABLE_MEMORY_TAGS)
> setup_memory_tags(gd->bd);
> if (BOOTM_ENABLE_INITRD_TAG) {
> - if (images->rd_start && images->rd_end) {
> + if (images->initrd_start && images->initrd_end) {
> + setup_initrd_tag(gd->bd, images->initrd_start,
> + images->initrd_end);
> + } else if (images->rd_start && images->rd_end) {
Can you please add comments to these members (initrd_start/end) in
image.h? At present it is not clear what they are, compared to
rd_start/end.
> setup_initrd_tag(gd->bd, images->rd_start,
> images->rd_end);
> }
> --
> 2.1.4
>
>
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 2/6] ARM: bootm: Try to use relocated ramdisk
@ 2016-01-08 3:34 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: u-boot
Hi Jeffy,
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> After boot_ramdisk_high(), ramdisk would be relocated to
> initrd_start & initrd_end, so use them instead of rd_start & rd_end.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> arch/arm/lib/bootm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index a477cae..ac94995 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -225,7 +225,10 @@ static void boot_prep_linux(bootm_headers_t *images)
> if (BOOTM_ENABLE_MEMORY_TAGS)
> setup_memory_tags(gd->bd);
> if (BOOTM_ENABLE_INITRD_TAG) {
> - if (images->rd_start && images->rd_end) {
> + if (images->initrd_start && images->initrd_end) {
> + setup_initrd_tag(gd->bd, images->initrd_start,
> + images->initrd_end);
> + } else if (images->rd_start && images->rd_end) {
Can you please add comments to these members (initrd_start/end) in
image.h? At present it is not clear what they are, compared to
rd_start/end.
> setup_initrd_tag(gd->bd, images->rd_start,
> images->rd_end);
> }
> --
> 2.1.4
>
>
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v1 3/6] rockchip: rk3036: Bind GPIO banks
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
sjg-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, huang lin
Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
drivers/pinctrl/rockchip/pinctrl_rk3036.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
index 581b096..1f78bf8 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
@@ -15,6 +15,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
+#include <dm/root.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -252,6 +253,12 @@ static struct pinctrl_ops rk3036_pinctrl_ops = {
.get_periph_id = rk3036_pinctrl_get_periph_id,
};
+static int rk3036_pinctrl_bind(struct udevice *dev)
+{
+ /* scan child GPIO banks */
+ return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
+}
+
static int rk3036_pinctrl_probe(struct udevice *dev)
{
struct rk3036_pinctrl_priv *priv = dev_get_priv(dev);
@@ -272,5 +279,6 @@ U_BOOT_DRIVER(pinctrl_rk3036) = {
.of_match = rk3036_pinctrl_ids,
.priv_auto_alloc_size = sizeof(struct rk3036_pinctrl_priv),
.ops = &rk3036_pinctrl_ops,
+ .bind = rk3036_pinctrl_bind,
.probe = rk3036_pinctrl_probe,
};
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 3/6] rockchip: rk3036: Bind GPIO banks
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
drivers/pinctrl/rockchip/pinctrl_rk3036.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
index 581b096..1f78bf8 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
@@ -15,6 +15,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
+#include <dm/root.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -252,6 +253,12 @@ static struct pinctrl_ops rk3036_pinctrl_ops = {
.get_periph_id = rk3036_pinctrl_get_periph_id,
};
+static int rk3036_pinctrl_bind(struct udevice *dev)
+{
+ /* scan child GPIO banks */
+ return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
+}
+
static int rk3036_pinctrl_probe(struct udevice *dev)
{
struct rk3036_pinctrl_priv *priv = dev_get_priv(dev);
@@ -272,5 +279,6 @@ U_BOOT_DRIVER(pinctrl_rk3036) = {
.of_match = rk3036_pinctrl_ids,
.priv_auto_alloc_size = sizeof(struct rk3036_pinctrl_priv),
.ops = &rk3036_pinctrl_ops,
+ .bind = rk3036_pinctrl_bind,
.probe = rk3036_pinctrl_probe,
};
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v1 3/6] rockchip: rk3036: Bind GPIO banks
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:34 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: Jeffy Chen; +Cc: U-Boot Mailing List, linux-rockchip
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> drivers/pinctrl/rockchip/pinctrl_rk3036.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 3/6] rockchip: rk3036: Bind GPIO banks
@ 2016-01-08 3:34 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: u-boot
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> drivers/pinctrl/rockchip/pinctrl_rk3036.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v1 4/6] rockchip: kylin: Add default gpt partition table
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
sjg-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, huang lin
Add default android gpt partition table for kylin board.
Use "gpt write mmc 0 $partitions" to apply.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
include/configs/kylin_rk3036.h | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index aa07889..b750b26 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -9,4 +9,33 @@
#include <configs/rk3036_common.h>
+#ifndef CONFIG_SPL_BUILD
+
+/* Enable gpt partition table */
+#define CONFIG_CMD_GPT
+#define CONFIG_RANDOM_UUID
+#define CONFIG_EFI_PARTITION
+#define PARTS_DEFAULT \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \
+ "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \
+ "name=misc,size=4M,uuid=${uuid_gpt_misc};" \
+ "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
+ "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \
+ "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \
+ "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \
+ "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \
+ "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \
+ "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \
+ "name=cache,size=100M,uuid=${uuid_gpt_cache};" \
+ "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
+ "name=persist,size=4M,uuid=${uuid_gpt_persist};" \
+ "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "partitions=" PARTS_DEFAULT \
+
+#endif
+
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 4/6] rockchip: kylin: Add default gpt partition table
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
Add default android gpt partition table for kylin board.
Use "gpt write mmc 0 $partitions" to apply.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
include/configs/kylin_rk3036.h | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index aa07889..b750b26 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -9,4 +9,33 @@
#include <configs/rk3036_common.h>
+#ifndef CONFIG_SPL_BUILD
+
+/* Enable gpt partition table */
+#define CONFIG_CMD_GPT
+#define CONFIG_RANDOM_UUID
+#define CONFIG_EFI_PARTITION
+#define PARTS_DEFAULT \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \
+ "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \
+ "name=misc,size=4M,uuid=${uuid_gpt_misc};" \
+ "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
+ "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \
+ "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \
+ "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \
+ "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \
+ "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \
+ "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \
+ "name=cache,size=100M,uuid=${uuid_gpt_cache};" \
+ "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
+ "name=persist,size=4M,uuid=${uuid_gpt_persist};" \
+ "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "partitions=" PARTS_DEFAULT \
+
+#endif
+
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v1 4/6] rockchip: kylin: Add default gpt partition table
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:34 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: Jeffy Chen; +Cc: U-Boot Mailing List, linux-rockchip
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Add default android gpt partition table for kylin board.
>
> Use "gpt write mmc 0 $partitions" to apply.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> include/configs/kylin_rk3036.h | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 4/6] rockchip: kylin: Add default gpt partition table
@ 2016-01-08 3:34 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: u-boot
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Add default android gpt partition table for kylin board.
>
> Use "gpt write mmc 0 $partitions" to apply.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> include/configs/kylin_rk3036.h | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
sjg-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, huang lin
The android kernel is using appended dtb by default, and store
ramdisk right after kernel & dtb.
So we needs to relocate ramdisk, and use atags to pass params.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index b750b26..49997ec 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -35,6 +35,29 @@
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"partitions=" PARTS_DEFAULT \
+ "mmcdev=0\0" \
+ "mmcpart=5\0" \
+ "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+
+#define CONFIG_ANDROID_BOOT_IMAGE
+#define CONFIG_SYS_BOOT_RAMDISK_HIGH
+#define CONFIG_SYS_HUSH_PARSER
+
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "part start mmc ${mmcdev} ${mmcpart} boot_start;" \
+ "part size mmc ${mmcdev} ${mmcpart} boot_size;" \
+ "mmc read ${loadaddr} ${boot_start} ${boot_size};" \
+ "bootm start ${loadaddr}; bootm ramdisk;" \
+ "bootm prep; bootm go;" \
+ "fi;" \
+
+/* Enable atags */
+#define CONFIG_SYS_BOOTPARAMS_LEN (64*1024)
+#define CONFIG_INITRD_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_CMDLINE_TAG
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
The android kernel is using appended dtb by default, and store
ramdisk right after kernel & dtb.
So we needs to relocate ramdisk, and use atags to pass params.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index b750b26..49997ec 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -35,6 +35,29 @@
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"partitions=" PARTS_DEFAULT \
+ "mmcdev=0\0" \
+ "mmcpart=5\0" \
+ "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+
+#define CONFIG_ANDROID_BOOT_IMAGE
+#define CONFIG_SYS_BOOT_RAMDISK_HIGH
+#define CONFIG_SYS_HUSH_PARSER
+
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "part start mmc ${mmcdev} ${mmcpart} boot_start;" \
+ "part size mmc ${mmcdev} ${mmcpart} boot_size;" \
+ "mmc read ${loadaddr} ${boot_start} ${boot_size};" \
+ "bootm start ${loadaddr}; bootm ramdisk;" \
+ "bootm prep; bootm go;" \
+ "fi;" \
+
+/* Enable atags */
+#define CONFIG_SYS_BOOTPARAMS_LEN (64*1024)
+#define CONFIG_INITRD_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_CMDLINE_TAG
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <1451893823-20309-6-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:34 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: Jeffy Chen
Cc: U-Boot Mailing List, huang lin,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Jeffy,
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> The android kernel is using appended dtb by default, and store
> ramdisk right after kernel & dtb.
> So we needs to relocate ramdisk, and use atags to pass params.
>
> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
What kernel version are you using?
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
@ 2016-01-08 3:34 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: u-boot
Hi Jeffy,
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> The android kernel is using appended dtb by default, and store
> ramdisk right after kernel & dtb.
> So we needs to relocate ramdisk, and use atags to pass params.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
What kernel version are you using?
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <CAPnjgZ1G=5=gqy6yGV1NZ13Zv0BACRYMPpdAoFAi+sv2TPXknw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
2016-01-08 3:34 ` [U-Boot] " Simon Glass
@ 2016-01-08 10:51 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-08 10:51 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, huang lin,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Simon,
On 2016-1-8 11:34, Simon Glass wrote:
> Hi Jeffy,
>
> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>> The android kernel is using appended dtb by default, and store
>> ramdisk right after kernel & dtb.
>> So we needs to relocate ramdisk, and use atags to pass params.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>> ---
>>
>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>
> What kernel version are you using?
It's kernel v4.1 for android project:
git fetch
https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1 refs/changes/03/188603/5
&& git checkout FETCH_HEAD :)
>
> Regards,
> Simon
>
On 2016-1-8 11:34, Simon Glass wrote:
> Hi Jeffy,
>
> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>> The android kernel is using appended dtb by default, and store
>> ramdisk right after kernel & dtb.
>> So we needs to relocate ramdisk, and use atags to pass params.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>> ---
>>
>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>
> What kernel version are you using?
>
> Regards,
> Simon
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
@ 2016-01-08 10:51 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-08 10:51 UTC (permalink / raw)
To: u-boot
Hi Simon,
On 2016-1-8 11:34, Simon Glass wrote:
> Hi Jeffy,
>
> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> The android kernel is using appended dtb by default, and store
>> ramdisk right after kernel & dtb.
>> So we needs to relocate ramdisk, and use atags to pass params.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
> Acked-by: Simon Glass <sjg@chromium.org>
>
> What kernel version are you using?
It's kernel v4.1 for android project:
git fetch
https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1 refs/changes/03/188603/5
&& git checkout FETCH_HEAD :)
>
> Regards,
> Simon
>
On 2016-1-8 11:34, Simon Glass wrote:
> Hi Jeffy,
>
> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> The android kernel is using appended dtb by default, and store
>> ramdisk right after kernel & dtb.
>> So we needs to relocate ramdisk, and use atags to pass params.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
> Acked-by: Simon Glass <sjg@chromium.org>
>
> What kernel version are you using?
>
> Regards,
> Simon
>
^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <568F94B8.60101-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
2016-01-08 10:51 ` [U-Boot] " Jeffy Chen
@ 2016-01-11 16:58 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-11 16:58 UTC (permalink / raw)
To: Jeffy Chen
Cc: U-Boot Mailing List, huang lin,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Jeffy,
On 8 January 2016 at 03:51, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> Hi Simon,
>
> On 2016-1-8 11:34, Simon Glass wrote:
>>
>> Hi Jeffy,
>>
>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>>
>>> The android kernel is using appended dtb by default, and store
>>> ramdisk right after kernel & dtb.
>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> ---
>>>
>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>> 1 file changed, 23 insertions(+)
>>
>> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>
>> What kernel version are you using?
>
> It's kernel v4.1 for android project:
> git fetch
> https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1
> refs/changes/03/188603/5 && git checkout FETCH_HEAD :)
OK - just wondered why it needs ATAGs (CONFIG_SETUP_MEMORY_TAGS) - are
there things that device tree does not support?
>>
>>
>> Regards,
>> Simon
>>
>
> On 2016-1-8 11:34, Simon Glass wrote:
>>
>> Hi Jeffy,
>>
>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>>
>>> The android kernel is using appended dtb by default, and store
>>> ramdisk right after kernel & dtb.
>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> ---
>>>
>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>> 1 file changed, 23 insertions(+)
>>
>> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>
>> What kernel version are you using?
>>
>> Regards,
>> Simon
>>
>
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
@ 2016-01-11 16:58 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-11 16:58 UTC (permalink / raw)
To: u-boot
Hi Jeffy,
On 8 January 2016 at 03:51, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Hi Simon,
>
> On 2016-1-8 11:34, Simon Glass wrote:
>>
>> Hi Jeffy,
>>
>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>
>>> The android kernel is using appended dtb by default, and store
>>> ramdisk right after kernel & dtb.
>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>> ---
>>>
>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>> 1 file changed, 23 insertions(+)
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>>
>> What kernel version are you using?
>
> It's kernel v4.1 for android project:
> git fetch
> https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1
> refs/changes/03/188603/5 && git checkout FETCH_HEAD :)
OK - just wondered why it needs ATAGs (CONFIG_SETUP_MEMORY_TAGS) - are
there things that device tree does not support?
>>
>>
>> Regards,
>> Simon
>>
>
> On 2016-1-8 11:34, Simon Glass wrote:
>>
>> Hi Jeffy,
>>
>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>
>>> The android kernel is using appended dtb by default, and store
>>> ramdisk right after kernel & dtb.
>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>> ---
>>>
>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>> 1 file changed, 23 insertions(+)
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>>
>> What kernel version are you using?
>>
>> Regards,
>> Simon
>>
>
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <CAPnjgZ2_wS1N8uO23+M0RJZovVFx7Wc_uMqOC37nGGBQN7NZZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
2016-01-11 16:58 ` [U-Boot] " Simon Glass
@ 2016-01-12 2:36 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-12 2:36 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, huang lin,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Simon,
On 2016-1-12 0:58, Simon Glass wrote:
> Hi Jeffy,
>
> On 8 January 2016 at 03:51, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>> Hi Simon,
>>
>> On 2016-1-8 11:34, Simon Glass wrote:
>>> Hi Jeffy,
>>>
>>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>>> The android kernel is using appended dtb by default, and store
>>>> ramdisk right after kernel & dtb.
>>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>>
>>>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>>> ---
>>>>
>>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>>> 1 file changed, 23 insertions(+)
>>> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>>
>>> What kernel version are you using?
>> It's kernel v4.1 for android project:
>> git fetch
>> https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1
>> refs/changes/03/188603/5 && git checkout FETCH_HEAD :)
> OK - just wondered why it needs ATAGs (CONFIG_SETUP_MEMORY_TAGS) - are
> there things that device tree does not support?
I saw our guys used to detect ddr params in the loader, and pass memory
areas and reserved areas to kernel...
and kernel's device tree would only define a common memory node in the
dtsi, which is not match the actually memory.
> used to
>
>>>
>>> Regards,
>>> Simon
>>>
>> On 2016-1-8 11:34, Simon Glass wrote:
>>> Hi Jeffy,
>>>
>>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>>> The android kernel is using appended dtb by default, and store
>>>> ramdisk right after kernel & dtb.
>>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>>
>>>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>>> ---
>>>>
>>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>>> 1 file changed, 23 insertions(+)
>>> Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>>
>>> What kernel version are you using?
>>>
>>> Regards,
>>> Simon
>>>
> Regards,
> Simon
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 5/6] rockchip: kylin: Enable boot with android boot image
@ 2016-01-12 2:36 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-12 2:36 UTC (permalink / raw)
To: u-boot
Hi Simon,
On 2016-1-12 0:58, Simon Glass wrote:
> Hi Jeffy,
>
> On 8 January 2016 at 03:51, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> Hi Simon,
>>
>> On 2016-1-8 11:34, Simon Glass wrote:
>>> Hi Jeffy,
>>>
>>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>> The android kernel is using appended dtb by default, and store
>>>> ramdisk right after kernel & dtb.
>>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>>
>>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>>> ---
>>>>
>>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>>> 1 file changed, 23 insertions(+)
>>> Acked-by: Simon Glass <sjg@chromium.org>
>>>
>>> What kernel version are you using?
>> It's kernel v4.1 for android project:
>> git fetch
>> https://android.googlesource.com/platform/hardware/bsp/kernel/common/v4.1
>> refs/changes/03/188603/5 && git checkout FETCH_HEAD :)
> OK - just wondered why it needs ATAGs (CONFIG_SETUP_MEMORY_TAGS) - are
> there things that device tree does not support?
I saw our guys used to detect ddr params in the loader, and pass memory
areas and reserved areas to kernel...
and kernel's device tree would only define a common memory node in the
dtsi, which is not match the actually memory.
> used to
>
>>>
>>> Regards,
>>> Simon
>>>
>> On 2016-1-8 11:34, Simon Glass wrote:
>>> Hi Jeffy,
>>>
>>> On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>> The android kernel is using appended dtb by default, and store
>>>> ramdisk right after kernel & dtb.
>>>> So we needs to relocate ramdisk, and use atags to pass params.
>>>>
>>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>>> ---
>>>>
>>>> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
>>>> 1 file changed, 23 insertions(+)
>>> Acked-by: Simon Glass <sjg@chromium.org>
>>>
>>> What kernel version are you using?
>>>
>>> Regards,
>>> Simon
>>>
> Regards,
> Simon
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v1 6/6] rockchip: kylin: Check fastboot request
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-04 7:50 ` Jeffy Chen
-1 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot-0aAXYlwwYIKGBzrmiIFOJg
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
sjg-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, huang lin
We will save boot mode flag in grf's os_reg[0], if fastboot
requested or fastboot key pressed, try to enter fastboot mode
at preboot stage.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
board/kylin/kylin_rk3036/kylin_rk3036.c | 32 ++++++++++++++++++++++++++++++++
include/configs/kylin_rk3036.h | 3 +++
2 files changed, 35 insertions(+)
diff --git a/board/kylin/kylin_rk3036/kylin_rk3036.c b/board/kylin/kylin_rk3036/kylin_rk3036.c
index 40d6b52..df2c123 100644
--- a/board/kylin/kylin_rk3036/kylin_rk3036.c
+++ b/board/kylin/kylin_rk3036/kylin_rk3036.c
@@ -8,10 +8,15 @@
#include <dm.h>
#include <asm/io.h>
#include <asm/arch/uart.h>
+#include <asm/arch-rockchip/grf_rk3036.h>
#include <asm/arch/sdram_rk3036.h>
+#include <asm/gpio.h>
DECLARE_GLOBAL_DATA_PTR;
+#define GRF_BASE 0x20008000
+static struct rk3036_grf * const grf = (void *)GRF_BASE;
+
void get_ddr_config(struct rk3036_ddr_config *config)
{
/* K4B4G1646Q config */
@@ -28,6 +33,33 @@ void get_ddr_config(struct rk3036_ddr_config *config)
config->bw = 1;
}
+#define FASTBOOT_KEY_GPIO 93
+#define ROCKCHIP_BOOT_MODE_NORMAL 0
+#define ROCKCHIP_BOOT_MODE_FASTBOOT 1
+
+int fastboot_key_pressed(void)
+{
+ gpio_request(FASTBOOT_KEY_GPIO, "fastboot_key");
+ gpio_direction_input(FASTBOOT_KEY_GPIO);
+ return !gpio_get_value(FASTBOOT_KEY_GPIO);
+}
+
+int board_late_init(void)
+{
+ int boot_mode = readl(&grf->os_reg[0]);
+
+ /* Clear boot mode */
+ writel(ROCKCHIP_BOOT_MODE_NORMAL, &grf->os_reg[0]);
+
+ if (boot_mode == ROCKCHIP_BOOT_MODE_FASTBOOT ||
+ fastboot_key_pressed()) {
+ printf("enter fastboot!\n");
+ setenv("preboot", "setenv preboot; fastboot usb0");
+ }
+
+ return 0;
+}
+
int board_init(void)
{
return 0;
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index 49997ec..424e81b 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -39,6 +39,9 @@
"mmcpart=5\0" \
"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+#define CONFIG_BOARD_LATE_INIT
+#define CONFIG_PREBOOT
+
#define CONFIG_ANDROID_BOOT_IMAGE
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
#define CONFIG_SYS_HUSH_PARSER
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 6/6] rockchip: kylin: Check fastboot request
@ 2016-01-04 7:50 ` Jeffy Chen
0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2016-01-04 7:50 UTC (permalink / raw)
To: u-boot
We will save boot mode flag in grf's os_reg[0], if fastboot
requested or fastboot key pressed, try to enter fastboot mode
at preboot stage.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
board/kylin/kylin_rk3036/kylin_rk3036.c | 32 ++++++++++++++++++++++++++++++++
include/configs/kylin_rk3036.h | 3 +++
2 files changed, 35 insertions(+)
diff --git a/board/kylin/kylin_rk3036/kylin_rk3036.c b/board/kylin/kylin_rk3036/kylin_rk3036.c
index 40d6b52..df2c123 100644
--- a/board/kylin/kylin_rk3036/kylin_rk3036.c
+++ b/board/kylin/kylin_rk3036/kylin_rk3036.c
@@ -8,10 +8,15 @@
#include <dm.h>
#include <asm/io.h>
#include <asm/arch/uart.h>
+#include <asm/arch-rockchip/grf_rk3036.h>
#include <asm/arch/sdram_rk3036.h>
+#include <asm/gpio.h>
DECLARE_GLOBAL_DATA_PTR;
+#define GRF_BASE 0x20008000
+static struct rk3036_grf * const grf = (void *)GRF_BASE;
+
void get_ddr_config(struct rk3036_ddr_config *config)
{
/* K4B4G1646Q config */
@@ -28,6 +33,33 @@ void get_ddr_config(struct rk3036_ddr_config *config)
config->bw = 1;
}
+#define FASTBOOT_KEY_GPIO 93
+#define ROCKCHIP_BOOT_MODE_NORMAL 0
+#define ROCKCHIP_BOOT_MODE_FASTBOOT 1
+
+int fastboot_key_pressed(void)
+{
+ gpio_request(FASTBOOT_KEY_GPIO, "fastboot_key");
+ gpio_direction_input(FASTBOOT_KEY_GPIO);
+ return !gpio_get_value(FASTBOOT_KEY_GPIO);
+}
+
+int board_late_init(void)
+{
+ int boot_mode = readl(&grf->os_reg[0]);
+
+ /* Clear boot mode */
+ writel(ROCKCHIP_BOOT_MODE_NORMAL, &grf->os_reg[0]);
+
+ if (boot_mode == ROCKCHIP_BOOT_MODE_FASTBOOT ||
+ fastboot_key_pressed()) {
+ printf("enter fastboot!\n");
+ setenv("preboot", "setenv preboot; fastboot usb0");
+ }
+
+ return 0;
+}
+
int board_init(void)
{
return 0;
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index 49997ec..424e81b 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -39,6 +39,9 @@
"mmcpart=5\0" \
"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+#define CONFIG_BOARD_LATE_INIT
+#define CONFIG_PREBOOT
+
#define CONFIG_ANDROID_BOOT_IMAGE
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
#define CONFIG_SYS_HUSH_PARSER
--
2.1.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <1451893823-20309-7-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v1 6/6] rockchip: kylin: Check fastboot request
2016-01-04 7:50 ` [U-Boot] " Jeffy Chen
@ 2016-01-08 3:34 ` Simon Glass
-1 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: Jeffy Chen
Cc: U-Boot Mailing List, huang lin,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> We will save boot mode flag in grf's os_reg[0], if fastboot
> requested or fastboot key pressed, try to enter fastboot mode
> at preboot stage.
>
> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> board/kylin/kylin_rk3036/kylin_rk3036.c | 32 ++++++++++++++++++++++++++++++++
> include/configs/kylin_rk3036.h | 3 +++
> 2 files changed, 35 insertions(+)
Acked-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [U-Boot] [PATCH v1 6/6] rockchip: kylin: Check fastboot request
@ 2016-01-08 3:34 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2016-01-08 3:34 UTC (permalink / raw)
To: u-boot
On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> We will save boot mode flag in grf's os_reg[0], if fastboot
> requested or fastboot key pressed, try to enter fastboot mode
> at preboot stage.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> board/kylin/kylin_rk3036/kylin_rk3036.c | 32 ++++++++++++++++++++++++++++++++
> include/configs/kylin_rk3036.h | 3 +++
> 2 files changed, 35 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 32+ messages in thread