Discussion:
[PATCH u-boot-sunxi] ARM: sunxi: get script.bin file name from env
Patrick Wood
2014-01-09 05:49:28 UTC
Permalink
All the other files can be overridden by env settings, what's so
special about script.bin?

Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.

Signed-off-by: Patrick Wood <patrickhwood-***@public.gmane.org>
---
include/configs/sunxi-common.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 2c86a8e..a0c41ac 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -213,6 +213,7 @@
"kernel=uImage\0" \
"bootenv=uEnv.txt\0" \
"bootscr=boot.scr\0" \
+ "script=script.bin\0" \
"loadbootscr=" \
"fatload $device $partition $scriptaddr ${bootscr}" \
" || " \
@@ -231,19 +232,19 @@
"if "\
"bootpath=/boot/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "fatload $device $partition 0x43000000 script.bin" \
+ "fatload $device $partition 0x43000000 ${script}" \
" && " \
"fatload $device $partition 0x48000000 ${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\
--
1.7.9.5
Arokux X
2014-01-09 15:53:40 UTC
Permalink
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
Hm.. why do you think it has the chance to make its way into mainline u-boot?

A.
Patrick Wood
2014-01-09 17:26:25 UTC
Permalink
Post by Arokux X
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
Hm.. why do you think it has the chance to make its way into mainline u-boot?
A.
Oops, sorry, you're right. This should have been for sunxi only. Should I
resubmit with a new subject?
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Arokux X
2014-01-09 18:54:58 UTC
Permalink
Post by Patrick Wood
Post by Arokux X
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
Hm.. why do you think it has the chance to make its way into mainline u-boot?
A.
Oops, sorry, you're right. This should have been for sunxi only. Should I
resubmit with a new subject?
As far as I know u-boot-sunxi is going to be mainlined some time and
there is no sunxi specific branch.

A.
Post by Patrick Wood
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
Patrick Wood
2014-01-09 20:23:50 UTC
Permalink
Post by Patrick Wood
Post by Patrick Wood
Post by Arokux X
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
Hm.. why do you think it has the chance to make its way into mainline u-boot?
A.
Oops, sorry, you're right. This should have been for sunxi only.
Should I
Post by Patrick Wood
resubmit with a new subject?
As far as I know u-boot-sunxi is going to be mainlined some time and
there is no sunxi specific branch.
A.
Well, when it is mainlined, sunxi-common.h will have to change anyway, as
script.bin isn't used by the mainline kernel. So unless mainlining is
going to occur really soon, I don't see the problem with this patch.
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Patrick Wood
2014-01-14 16:11:17 UTC
Permalink
No other comments?
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
Signed-off-by: Patrick Wood
---
include/configs/sunxi-common.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/configs/sunxi-common.h
b/include/configs/sunxi-common.h
index 2c86a8e..a0c41ac 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -213,6 +213,7 @@
"kernel=uImage\0" \
"bootenv=uEnv.txt\0" \
"bootscr=boot.scr\0" \
+ "script=script.bin\0" \
"loadbootscr=" \
"fatload $device $partition $scriptaddr ${bootscr}" \
" || " \
@@ -231,19 +232,19 @@
"if "\
"bootpath=/boot/" \
" && " \
- "ext2load $device $partition 0x43000000
${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}"
\
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "fatload $device $partition 0x43000000 script.bin" \
+ "fatload $device $partition 0x43000000 ${script}" \
" && " \
"fatload $device $partition 0x48000000 ${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "ext2load $device $partition 0x43000000
${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}"
\
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\
--
1.7.9.5
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Olliver Schinagl
2014-01-17 12:11:54 UTC
Permalink
Pat,

Thanks, Pushed this now.

Yeah it doesn't hurt having it available as an env at all. I don't think
it matters greatly for having it in mainline, if everything is cleaned
up, passing script.bin or dtb is up to the user, so it may as well fly.

Oliver
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
---
include/configs/sunxi-common.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 2c86a8e..a0c41ac 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -213,6 +213,7 @@
"kernel=uImage\0" \
"bootenv=uEnv.txt\0" \
"bootscr=boot.scr\0" \
+ "script=script.bin\0" \
"loadbootscr=" \
"fatload $device $partition $scriptaddr ${bootscr}" \
" || " \
@@ -231,19 +232,19 @@
"if "\
"bootpath=/boot/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "fatload $device $partition 0x43000000 script.bin" \
+ "fatload $device $partition 0x43000000 ${script}" \
" && " \
"fatload $device $partition 0x48000000 ${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\
Patrick Wood
2014-01-18 03:33:05 UTC
Permalink
Even in mainline, I see no reason to not to access the dtb file through an env variable (I haven't checked to see, perhaps it is).
Ian Campbell
2014-01-18 08:04:10 UTC
Permalink
Post by Patrick Wood
Even in mainline, I see no reason to not to access the dtb file
through an env variable (I haven't checked to see, perhaps it is).
U-boot's README even defines a common/standard variable name for it:

*Note* - these variables don't have to be defined for all boards, some
boards currenlty use other variables for these purposes, and some
boards use these variables for other purposes.

Image File Name RAM Address Flash Location
----- --------- ----------- --------------
u-boot u-boot u-boot_addr_r u-boot_addr
Linux kernel bootfile kernel_addr_r kernel_addr
device tree blob fdtfile fdt_addr_r fdt_addr
ramdisk ramdiskfile ramdisk_addr_r ramdisk_addr

Although it looks like include/configs/sunxi-common.h isn't following
the convention, it has ${kernel} instead of bootfile (hardly the end of
the world though).

FWIW there doesn't seen to be any recommendation for uEnv or boot.scr
addresses/names etc.

Ian.
d***@public.gmane.org
2014-06-04 22:23:08 UTC
Permalink
Hello, I have an interest delema, I'm trying to dev an android rom that is for the CS918S Android TV Box. The CPU is A31S. Im able to decompile the rom, but never can I find the script.bin. Its suppose to be in the bootloader.fex file, but its not there. u-boot.fex is not there either, actually its in the root. However,the rom shows that there is a sys_config.fex, but no script.bin in sight. Help? https://mega.co.nz/#!jxpyWLqZ!s3EJx40-qU64TLpXztEH7oPLOEWX-N3MNd0e5N3Arvc
Post by Patrick Wood
All the other files can be overridden by env settings, what's so
special about script.bin?
Use the "script" env variable instead of hard-coding script.bin
everywhere; still defaults to "script.bin", but can be overridden
from uEnv.txt or boot.scr.
---
include/configs/sunxi-common.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 2c86a8e..a0c41ac 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -213,6 +213,7 @@
"kernel=uImage\0" \
"bootenv=uEnv.txt\0" \
"bootscr=boot.scr\0" \
+ "script=script.bin\0" \
"loadbootscr=" \
"fatload $device $partition $scriptaddr ${bootscr}" \
" || " \
@@ -231,19 +232,19 @@
"if "\
"bootpath=/boot/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "fatload $device $partition 0x43000000 script.bin" \
+ "fatload $device $partition 0x43000000 ${script}" \
" && " \
"fatload $device $partition 0x48000000 ${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
+ "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
"ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\
--
1.7.9.5
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Loading...