aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Elshuber <martin.elshuber@theobroma-systems.com>2017-10-05 20:19:41 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2017-11-24 12:02:35 +0100
commit1bc8c56fd829140055fe8b3e437275609f4c728a (patch)
tree4fd99cf8e8a4b60dab7944f07e0c775152fdaad9
parent9e90dd1ce5d83d4fde3b710bea0b2d1622c581bb (diff)
boot: add support for android on puma_rk3399
android needs different bootargs then linux
-rw-r--r--boot-script/boot/boot.cmd17
-rw-r--r--boot-script/boot/boot.scrbin2234 -> 2633 bytes
-rw-r--r--boot-script/boot/puma_rk3399/defaultEnv.android.txt8
3 files changed, 24 insertions, 1 deletions
diff --git a/boot-script/boot/boot.cmd b/boot-script/boot/boot.cmd
index d633b8a..3ce2917 100644
--- a/boot-script/boot/boot.cmd
+++ b/boot-script/boot/boot.cmd
@@ -9,14 +9,25 @@ initrdfile=uInitrd
rootdevice=/dev/mmcblk0p1
rootdevice_flags=rw
loglevel=7
+os_type=linux
echo "Boot script running from ${devtype} ${devnum}"
if test ${board_name} = "puma_rk3399"; then
if test ${devtype} = "mmc" && test ${devnum} -eq 0;then
rootdevice=/dev/mmcblk1p1
+ if test ! -n ${androidboot_mode}; then
+ androidboot_mode=emmc
+ fi
elif test ${devtype} = "mmc" && test ${devnum} -eq 1;then
rootdevice=/dev/mmcblk0p1
+ if test ! -n ${androidboot_mode}; then
+ androidboot_mode=sd
+ fi
+ else
+ if test ! -n ${androidboot_mode}; then
+ androidboot_mode=unknown
+ fi
fi
fi
@@ -44,7 +55,11 @@ if test -n ${userscript}; then
fi
fi
-setenv bootargs "root=${rootdevice} ${rootdevice_flags} rootwait ${console} consoleblank=0 loglevel=${loglevel} ${extraargs}"
+if test ${os_type} = android; then
+ setenv bootargs "rw rootwait androidboot.hardware=${board_name} androidboot.mode=${androidboot_mode} ${extraargs}"
+else
+ setenv bootargs "root=${rootdevice} ${rootdevice_flags} rootwait ${console} consoleblank=0 loglevel=${loglevel} ${extraargs}"
+fi
if load ${devtype} ${devnum} ${fdt_addr_r} ${load_path}/${fdtfile}; then
echo "Load devicetree from ${load_path}/${fdtfile}"
diff --git a/boot-script/boot/boot.scr b/boot-script/boot/boot.scr
index 927efee..54f5893 100644
--- a/boot-script/boot/boot.scr
+++ b/boot-script/boot/boot.scr
Binary files differ
diff --git a/boot-script/boot/puma_rk3399/defaultEnv.android.txt b/boot-script/boot/puma_rk3399/defaultEnv.android.txt
new file mode 100644
index 0000000..e4be44d
--- /dev/null
+++ b/boot-script/boot/puma_rk3399/defaultEnv.android.txt
@@ -0,0 +1,8 @@
+load_addr=0x01000000
+kernelfile=Image
+fdtfile=rk3399-puma.dtb
+overlays=
+rootdevice_flags=rw
+loglevel=7
+os_type=android
+initrdfile=ramdisk.u