config: tizen_rpi: move env values from boot script to tizen_rpi.h 68/200368/1
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 22 Feb 2019 05:57:54 +0000 (14:57 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 22 Feb 2019 05:57:54 +0000 (14:57 +0900)
Some environment values are used with same value.
It can be moved to tizen_rpi header.

Change-Id: I679491fc03e0381df94025044e80e476f0953db2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
board/raspberrypi/rpi/tizen-boot-rpi2.scr
board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr
board/raspberrypi/rpi/tizen-boot-rpi3.scr
include/samsung/tizen_rpi.h

index 73ca474..eff8fe4 100644 (file)
@@ -1,57 +1,19 @@
-# U-boot script for tizen
-boardname=rpi2
-mmcbootdev=0
-mmcbootpart=1
-mmcrootdev=0
-mmcrootpart=2
-mmcinformpart=9
-
-#
-# Tizen kernel image is over than 16MB, it will be overlapped with other address.
-# To avoid this behaivor, change to 0x02d00000 from 0x01000000
-#
-# NOTE: booti command will move kernel image to 0x80000 (text offset), and
-# ramdisk is loaded to $ramdisk_addr_r (0x02100000), so kernel should be equal
-# or less than 32.5MB to load ramdisk properly.
-#
-tizen_kernel_addr_r=0x02d00000
-
-dummy=0x24000000
-rebootparamfile=reboot-param.bin
-# use the ram address of ramdisk before loading ramdisk image
-rebootparam_addr=0x3a62b000
-# 0x72677075 is ascii code for representing string "upgr"
-upgrade_val=72677075
-# 0x72766372 is ascii code for representing string "rcvr"
-recovery_val=72766372
-# 0x6665646e is ascii code for representing string "ndef"
-nodef_val=6665646e
-# 0x6c6e7764 is ascii code for representing string "dwnl"
-download_val=6c6e7764
-
-# Normal ramdisk : partition 7
-# Ramdisk Recovery : Partition 8
-ramdiskpart=7
-ramdisksize=800000
-bootmode=ramdisk
-
-# Device that included the image.
-bootdev=mmc
+# U-boot script for tizen RPI2
 
 if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then;
        ext4load $bootdev $mmcbootdev:$mmcinformpart $rebootparam_addr $rebootparamfile;
        if itest.l *${rebootparam_addr} == ${upgrade_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=fota
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode fota
        elif itest.l *${rebootparam_addr} == ${recovery_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=recovery
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode recovery
        elif itest.l *${rebootparam_addr} == ${download_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=flash
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode flash
        elif itest.l *${rebootparam_addr} == ${nodef_val}; then;
                echo "This reboot parameter is not supported...";
        fi
@@ -59,10 +21,10 @@ fi
 
 # boot from ram0 if there is sbin
 if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then;
-rootdev=ram0
+       setenv rootdev ram0
 else
-rootdev=mmcblk${mmcrootdev}p${mmcrootpart}
-bootmode=normal
+       setenv rootdev mmcblk${mmcrootdev}p${mmcrootpart}
+       setenv bootmode normal
 fi
 
 # setting console device if noting is set
index dff417b..b3e6bb0 100644 (file)
@@ -1,57 +1,19 @@
-# U-boot script for tizen
-boardname=rpi3
-mmcbootdev=0
-mmcbootpart=1
-mmcrootdev=0
-mmcrootpart=2
-mmcinformpart=9
-
-#
-# Tizen kernel image is over than 16MB, it will be overlapped with other address.
-# To avoid this behaivor, change to 0x02d00000 from 0x01000000
-#
-# NOTE: booti command will move kernel image to 0x80000 (text offset), and
-# ramdisk is loaded to $ramdisk_addr_r (0x02100000), so kernel should be equal
-# or less than 32.5MB to load ramdisk properly.
-#
-tizen_kernel_addr_r=0x02d00000
-
-dummy=0x24000000
-rebootparamfile=reboot-param.bin
-# use the ram address of ramdisk before loading ramdisk image
-rebootparam_addr=0x3a62b000
-# 0x72677075 is ascii code for representing string "upgr"
-upgrade_val=72677075
-# 0x72766372 is ascii code for representing string "rcvr"
-recovery_val=72766372
-# 0x6665646e is ascii code for representing string "ndef"
-nodef_val=6665646e
-# 0x6c6e7764 is ascii code for representing string "dwnl"
-download_val=6c6e7764
-
-# Normal ramdisk : partition 7
-# Ramdisk Recovery : Partition 8
-ramdiskpart=7
-ramdisksize=800000
-bootmode=ramdisk
-
-# Device that included the image.
-bootdev=mmc
+# U-boot script for tizen RPI3 32B
 
 if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then;
        ext4load $bootdev $mmcbootdev:$mmcinformpart $rebootparam_addr $rebootparamfile;
        if itest.l *${rebootparam_addr} == ${upgrade_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
                bootmode=fota
        elif itest.l *${rebootparam_addr} == ${recovery_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=recovery
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode recovery
        elif itest.l *${rebootparam_addr} == ${download_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=flash
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode flash
        elif itest.l *${rebootparam_addr} == ${nodef_val}; then;
                echo "This reboot parameter is not supported...";
        fi
@@ -59,10 +21,10 @@ fi
 
 # boot from ram0 if there is sbin
 if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then;
-rootdev=ram0
+       setenv rootdev ram0
 else
-rootdev=mmcblk${mmcrootdev}p${mmcrootpart}
-bootmode=normal
+       setenv rootdev mmcblk${mmcrootdev}p${mmcrootpart}
+       setenv bootmode normal
 fi
 
 # setting console device if noting is set
index c5d73c8..e21fc8e 100644 (file)
@@ -1,57 +1,21 @@
-# U-boot script for tizen
-boardname=rpi3
-mmcbootdev=0
-mmcbootpart=1
-mmcrootdev=0
-mmcrootpart=2
-mmcinformpart=9
-
-#
-# Tizen kernel image is over than 16MB, it will be overlapped with other address.
-# To avoid this behaivor, change to 0x02d00000 from 0x01000000
-#
-# NOTE: booti command will move kernel image to 0x80000 (text offset), and
-# ramdisk is loaded to $ramdisk_addr_r (0x02100000), so kernel should be equal
-# or less than 32.5MB to load ramdisk properly.
-#
-tizen_kernel_addr_r=0x02d00000
-
-dummy=0x24000000
-rebootparamfile=reboot-param.bin
-# use the ram address of ramdisk before loading ramdisk image
-rebootparam_addr=0x3a62b000
-# 0x72677075 is ascii code for representing string "upgr"
-upgrade_val=72677075
-# 0x72766372 is ascii code for representing string "rcvr"
-recovery_val=72766372
-# 0x6665646e is ascii code for representing string "ndef"
-nodef_val=6665646e
-# 0x6c6e7764 is ascii code for representing string "dwnl"
-download_val=6c6e7764
-
-# Normal ramdisk : partition 7
-# Ramdisk Recovery : Partition 8
-ramdiskpart=7
-ramdisksize=800000
-bootmode=ramdisk
+# U-boot script for tizen RPI3
 
 # Device that included the image.
-bootdev=mmc
 
 if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then;
        ext4load $bootdev $mmcbootdev:$mmcinformpart $rebootparam_addr $rebootparamfile;
        if itest.l *${rebootparam_addr} == ${upgrade_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=fota
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode fota
        elif itest.l *${rebootparam_addr} == ${recovery_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=recovery
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode recovery
        elif itest.l *${rebootparam_addr} == ${download_val}; then;
-               ramdiskpart=8
-               ramdisksize=c00000
-               bootmode=flash
+               setenv ramdiskpart 8
+               setenv ramdisksize c00000
+               setenv bootmode flash
        elif itest.l *${rebootparam_addr} == ${nodef_val}; then;
                echo "This reboot parameter is not supported...";
        fi
@@ -65,10 +29,10 @@ fi
 
 # boot from ram0 if there is sbin
 if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then;
-rootdev=ram0
+       setenv rootdev ram0
 else
-rootdev=mmcblk${mmcrootdev}p${mmcrootpart}
-bootmode=normal
+       setenv rootdev=mmcblk${mmcrootdev}p${mmcrootpart}
+       setenv bootmode normal
 fi
 
 # setting console device if noting is set
index 9cf8d28..41a9942 100644 (file)
 #define CONFIG_IP_DEFRAG
 #define CONFIG_NFS_READ_SIZE           65536
 
+/*
+# Tizen kernel image is over than 16MB, it will be overlapped with other address.
+# To avoid this behaivor, change to 0x02d00000 from 0x01000000
+#
+# NOTE: booti command will move kernel image to 0x80000 (text offset), and
+# ramdisk is loaded to $ramdisk_addr_r (0x02100000), so kernel should be equal
+# or less than 32.5MB to load ramdisk properly.
+*/
+/*
+# use the ram address of ramdisk before loading ramdisk image
+# 0x72677075 is ascii code for representing string "upgr"
+# 0x72766372 is ascii code for representing string "rcvr"
+# 0x6665646e is ascii code for representing string "ndef"
+# 0x6c6e7764 is ascii code for representing string "dwnl"
+*/
 #define TIZEN_ENV_SETTING \
+       "tizen_kernel_addr_r=0x02d00000\0"      \
+       "mmcbootdev=0\0"                        \
+       "mmcbootpart=1\0"                       \
+       "mmcrootdev=0\0"                        \
+       "mmcrootpart=2\0"                       \
+       "mmcinformpart=9\0"                     \
+       "rebootparamfile=reboot-param.bin\0"    \
+       "rebootparam_addr=0x3a62b000\0"         \
+       "upgrade_val=72677075\0"                \
+       "recovery_val=72766372\0"               \
+       "nodef_val=6665646e\0"                  \
+       "download_val=6c6e7764\0"               \
+       "ramdiskpart=7\0"                       \
+       "ramdisksize=800000\0"                  \
+       "bootmode=ramdisk\0"                    \
+       "bootdev=mmc\0"                         \
        "opts=loglevel=7\0"
 
 #endif /* __CONFIG_TIZEN_RPI_H */