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>
-# 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
# 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
-# 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
# 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
#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 */