Skip to content

Commit ba1f7e6

Browse files
committed
add bootargs
1 parent b6898ef commit ba1f7e6

File tree

10 files changed

+458
-180
lines changed

10 files changed

+458
-180
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ SOURCEDIR = .
99
BUILDDIR = _build
1010

1111
# Put it first so that "make" without argument is like "make help".
12-
help:
13-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12+
help clean:
13+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1414

1515
.PHONY: help Makefile
1616

appendix/boards/ec6108v9c.rst

+144
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,150 @@ Board
2121
:width: 25%
2222
:alt: USB Boot pin
2323

24+
bootargs
25+
--------
26+
27+
.. code-block:: none
28+
29+
baudrate=115200
30+
bootargs=console=ttyAMA0,115200 blkdevparts=mmcblk0:1M(fastboot),4M(bootargs),16M(recovery),1M(deviceinfo),4M(baseparam),4M(pqparam),4M(logo),16M(fastplay),8M(misc),24M(factory),12M(kernel),8M(iptv_data),340M(backup),340M(cache),520M(system),-(userdata)
31+
bootargs_1G=mem=1G mmz=ddr,0,0,400M
32+
bootargs_2G=mem=2G mmz=ddr,0,0,600M
33+
bootargs_512M=mem=512M mmz=ddr,0,0,235M
34+
bootcmd=mmc read 0 0x1FFBFC0 0x4B000 0x5000; bootm 0x1FFBFC0
35+
bootdelay=0
36+
bootfile="uImage"
37+
gmac_debug=0
38+
ipaddr=192.168.1.10
39+
netmask=255.255.255.0
40+
phy_addr=2,1
41+
phy_intf=mii,rgmii
42+
serverip=192.168.1.1
43+
stderr=serial
44+
stdin=serial
45+
stdout=serial
46+
use_mdio=0,1
47+
verify=n
48+
49+
Flash layout
50+
------------
51+
52+
.. table::
53+
54+
========== ====== ==== ==============================================
55+
Name Offset Size Description
56+
========== ====== ==== ==============================================
57+
fastboot 0M 1M :doc:`/software/bootrom/bootloader`
58+
bootargs 1M 4M U-Boot env file, sector size: ``0x10000``
59+
recovery 5M 16M Android bootimg
60+
deviceinfo 21M 1M Model type, Serial No, MAC address, etc
61+
baseparam 22M 4M ``hi_drv_pdm.h``
62+
pqparam 26M 4M Video Post Processing parameters
63+
logo 30M 4M ``LOGO_TABLE``
64+
fastplay 34M 16M Fastboot DRM parameters (optional)
65+
misc 50M 8M empty
66+
factory 58M 24M empty
67+
kernel 82M 12M Android bootimg
68+
iptv_data 94M 8M ``huawei_iptv_data_2.0``, control URL, etc
69+
backup 102M 340M ext3/4, Android ``/backup`` partition
70+
71+
A single ``update.zip``, use command ``recoverbackup`` to apply.
72+
cache 442M 340M ext3/4, Android ``/cache`` partition
73+
system 782M 520M ext3/4, Android ``/system`` partition
74+
userdata 1302M ext3/4, Android ``/data`` partition
75+
========== ====== ==== ==============================================
76+
77+
Fastboot
78+
--------
79+
80+
.. code-block:: none
81+
82+
fastboot# getinfo ddrfree
83+
DDR free region baseaddr:0x1000000 size:0x3F000000
84+
85+
.. code-block:: none
86+
87+
fastboot# help
88+
? - alias for 'help'
89+
CXSecSystemBoot- Conax CA security system booting
90+
base - print or set address offset
91+
bootimg - boot application boot.img(kernel+ramdisk) from memory
92+
bootm - boot application image from memory
93+
bootp - boot image via network using BOOTP/TFTP protocol
94+
ca_auth - verify android system: bootargs, recovory, kernel, system...
95+
ca_cbcmac_test-
96+
ca_common_verify_bootargs- ca_common_verify_bootargs
97+
ca_common_verify_bootargs_partition- ca_common_verify_bootargs_partition
98+
ca_common_verify_encryptimage- Encrypt image for Digital Signature
99+
ca_common_verify_image_signature- verify pariton-image signature with tail mode
100+
ca_common_verify_signature_check- verify BootArgs signature_check
101+
ca_common_verify_system_signature- verify pariton-image signature with tail mode
102+
ca_decryptflashpartition- decrypt flash_patition_name to DDR
103+
ca_enablesecboot- ca_enablesecboot flash_type(spi|nand|sd|emmc)
104+
ca_encryptboot- CA Encrypt Boot
105+
ca_get_extern_rsa_key- get external rsa key
106+
ca_getotprsakey- ca_getotprsakey
107+
ca_getrsakeylockflag- ca_getrsakeylockflag
108+
ca_getsecbootstatus- ca_getsecbootstatus
109+
ca_lockrsakey- ca_lockrsakey
110+
ca_setotprsakey- ca_setotprsakey
111+
ca_special_burnflashname- Encrypt DDR image with R2R Key-ladder and burn DDR image into flash
112+
ca_special_burnflashnamebylen- Encrypt DDR image with R2R Key-ladder and burn DDR image into flash
113+
ca_special_verify- ca_special_verify flash_patition_name
114+
ca_special_verifyaddr- ca_special_verifyaddr flash_patition_Addr
115+
ca_special_verifybootargs- verify bootargs
116+
cipher_cbc_mac_test-
117+
clear_bootf- clear Hibernate!! bootflag
118+
cmp - memory compare
119+
cp - memory copy
120+
crc32 - checksum calculation
121+
ddr - ddr training function
122+
fatinfo - print information about filesystem
123+
fatload - load binary file from a dos filesystem
124+
fatls - list files in a directory (default /)
125+
getinfo - print hardware information
126+
go - start application at address 'addr'
127+
hash - Calcluate hash
128+
hash_test- hash_test [x]:[0] SHA1; [1] SHA256; [2] HMAC-SHA1; [3] HMAC-SHA256;
129+
help - print command description/usage
130+
hibernate- Hibernate!! boot
131+
loadb - load binary file over serial line (kermit mode)
132+
loady - load binary file over serial line (ymodem mode)
133+
loop - infinite loop on address range
134+
md - memory display
135+
mii - MII utility commands
136+
mm - memory modify (auto-incrementing address)
137+
mmc - MMC sub system
138+
mmcinfo - mmcinfo <dev num>-- display MMC info
139+
mtest - simple RAM read/write test
140+
mw - memory write (fill)
141+
nand - NAND sub-system
142+
nboot - boot from NAND device
143+
nm - memory modify (constant address)
144+
otp_burntoecurechipset- Burn to secure chipset, please be careful !!!
145+
otp_getchipid- otp_getchipid
146+
otp_getcustomerkey- otp_getcustomerkey
147+
otp_getmsid- otp_getmsid
148+
otp_getsecurebooten- otp_getsecurebooten
149+
otp_getstbprivdata- otp_getstbprivdata
150+
otp_getstbsn- otp_getstbsn
151+
otp_setstbprivdata- StbPrivData
152+
otpreadall- read otp ,for example otpreadall
153+
otpwrite- write otp ,for example otpwrite adddress value
154+
ping - send ICMP ECHO_REQUEST to network host
155+
printenv- print environment variables
156+
rarpboot- boot image via network using RARP/TFTP protocol
157+
reset - Perform RESET of the CPU
158+
saveenv - save environment variables to persistent storage
159+
setenv - set environment variables
160+
setproflag- --- setflags to product test page
161+
tftp - tftp - download or upload image via network using TFTP protocol
162+
unzip - unzip a memory region
163+
uploadx - upload binary file over serial line (xmodem mode)
164+
usb - USB sub-system
165+
usbboot - boot from USB device
166+
version - print monitor version
167+
24168
Boot log
25169
--------
26170

appendix/boards/hc2910.rst appendix/boards/hc2910-sdgd.rst

+125
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,131 @@ Board
2020
:width: 25%
2121
:alt: USB Boot pin
2222

23+
bootargs
24+
--------
25+
26+
.. code-block:: none
27+
28+
baudrate=115200
29+
bootargs=console=ttyAMA0,115200 blkdevparts=mmcblk0:2M(fastboot),2M(bootargs),2M(bootargsbak),10M(recovery),10M(recoverybak),2M(properties),2M(markparam),2M(baseparam),2M(pqparam),20M(logo),40M(fastplay),20M(kernel),2M(misc),50M(private),2M(tpl),100M(factory),600M(otapackage),100M(cache),800M(system),-(userdata) quiet
30+
bootargs_1G=mem=1G mmz=ddr,0,0,44M
31+
bootargs_2G=mem=2G mmz=ddr,0,0,44M
32+
bootargs_3840M=mem=1G mmz=ddr,0,0,44M
33+
bootargs_512M=mem=512M mmz=ddr,0,0,44M
34+
bootargs_768M=mem=768M mmz=ddr,0,0,44M
35+
bootcmd=mmc read 0 0x1FFBFC0 0x2F000 0x5000; bootm 0x1FFBFC0
36+
bootdelay=0
37+
bootfile="uImage"
38+
gmac_debug=0
39+
ipaddr=192.168.1.10
40+
netmask=255.255.255.0
41+
phy_addr=2,1
42+
phy_intf=mii,rgmii
43+
serverip=192.168.1.1
44+
stderr=serial
45+
stdin=serial
46+
stdout=serial
47+
use_mdio=0,1
48+
verify=n
49+
50+
Flash layout
51+
------------
52+
53+
.. table::
54+
55+
=========== ====== ==== ==============================================
56+
Name Offset Size Description
57+
=========== ====== ==== ==============================================
58+
fastboot 0M 2M :doc:`/software/bootrom/bootloader`
59+
bootargs 2M 2M U-Boot env file, sector size: ``0x10000``
60+
bootargsbak 4M 2M bootargs backup
61+
recovery 5M 10M Android bootimg
62+
recoverybak 5M 10M recovery backup
63+
properties 5M 2M
64+
markparam 5M 2M
65+
baseparam 22M 2M ``hi_drv_pdm.h``
66+
pqparam 26M 2M Video Post Processing parameters
67+
logo 30M 20M ``LOGO_TABLE``
68+
fastplay 34M 40M Fastboot DRM parameters (optional)
69+
kernel 82M 20M Android bootimg
70+
misc 50M 2M
71+
private 82M 50M
72+
tpl 82M 1M squashfs, Android ``/tpl`` partition
73+
74+
``libHA.AUDIO.TPL.decode.so``
75+
factory 58M 100M
76+
otapackage 94M 600M ext3/4, Android ``/otapackage`` partition
77+
78+
A single ``upgrade/update.zip``.
79+
cache 442M 100M ext3/4, Android ``/cache`` partition
80+
system 782M 800M ext3/4, Android ``/system`` partition
81+
userdata 1302M ext3/4, Android ``/data`` partition
82+
=========== ====== ==== ==============================================
83+
84+
Fastboot
85+
--------
86+
87+
.. code-block:: none
88+
89+
fastboot# getinfo ddrfree
90+
DDR free region baseaddr:0x1000000 size:0x3F000000
91+
92+
.. code-block:: none
93+
94+
fastboot# help
95+
? - alias for 'help'
96+
base - print or set address offset
97+
bootm - boot application image from memory
98+
bootp - boot image via network using BOOTP/TFTP protocol
99+
clear_bootf- clear Hibernate!! bootflag
100+
cmp - memory compare
101+
cp - memory copy
102+
crc32 - checksum calculation
103+
ddr - ddr training function
104+
fatinfo - print information about filesystem
105+
fatload - load binary file from a dos filesystem
106+
fatls - list files in a directory (default /)
107+
fdt - flattened device tree utility commands
108+
getinfo - print hardware information
109+
go - start application at address 'addr'
110+
help - print command description/usage
111+
hibernate- Hibernate!! boot
112+
ir - IR command:
113+
loadb - load binary file over serial line (kermit mode)
114+
loady - load binary file over serial line (ymodem mode)
115+
loop - infinite loop on address range
116+
md - memory display
117+
mii - MII utility commands
118+
mm - memory modify (auto-incrementing address)
119+
mmc - MMC sub system
120+
mmcinfo - mmcinfo <dev num>-- display MMC info
121+
mtest - simple RAM read/write test
122+
mw - memory write (fill)
123+
nand - NAND sub-system
124+
nboot - boot from NAND device
125+
nm - memory modify (constant address)
126+
otp_burntoecurechipset- Burn to secure chipset, please be careful !!!
127+
otp_getcustomerkey- otp_getcustomerkey
128+
otp_getstbprivdata- otp_getstbprivdata
129+
otp_gettrustzonestat- Get TEE status
130+
otp_setstbprivdata- StbPrivData
131+
otp_settrustzone- Set TEE enable
132+
otpreadall- read otp ,for example otpreadall
133+
otpwrite- write otp ,for example otpwrite adddress value
134+
ping - send ICMP ECHO_REQUEST to network host
135+
printenv- print environment variables
136+
rarpboot- boot image via network using RARP/TFTP protocol
137+
reset - Perform RESET of the CPU
138+
saveenv - save environment variables to persistent storage
139+
setenv - set environment variables
140+
tftp - tftp - download or upload image via network using TFTP protocol
141+
unzip - unzip a memory region
142+
uploadx - upload binary file over serial line (xmodem mode)
143+
usb - USB sub-system
144+
usbboot - boot from USB device
145+
version - print monitor version
146+
147+
23148
Boot log
24149
--------
25150

appendix/boards/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Boards
66
:titlesonly:
77

88
./ec6108v9c
9-
./hc2910
9+
./hc2910-sdgd

software/bootrom/bootloader.rst

+12-17
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ This page describes layout of bootloader and auxiliary data. It is usually a fil
66
.. seealso::
77
For implementations, see vendor :doc:`../vendor/fastboot` and community-driven :doc:`../opensource/u-boot`.
88

9-
:ref:`S5 <S5>` series
10-
---------------------
9+
S5 series
10+
---------
1111

12-
For 32-bit :ref:`S5 <S5>` series, if Secure Boot is not enabled, ``fastboot.bin`` contains only the bootloader (full U-Boot), i.e. the first word must be a valid instruction.
12+
For 32-bit :ref:`S5 <S5>` series, if Secure Boot is not enabled, ``fastboot.bin`` contains only the bootloader (plain U-Boot), i.e. the first word must be a valid instruction.
1313

1414
**If Secure Boot is enabled**, ``fastboot.bin`` will be read after `MBR <https://en.wikipedia.org/wiki/Master_boot_record>`_ (offset ``0x200``) from eMMC, and the following structure applies to ``fastboot.bin``.
1515

16-
.. table:: :ref:`S5 <S5>` series boootloader layout
16+
.. table:: S5 series boootloader layout
1717

1818
+----------------+-------------------------------+---------------------+------------------------+----------------------------------------------------+----------------+
1919
| Area | Offset | Name | Size | Description | Possible value |
@@ -64,14 +64,14 @@ This means you will need different offset when writing ``fastboot.bin``.
6464
6565
You can use ``ca_getsecbootstatus`` in vendor :doc:`../vendor/fastboot` to check Secure Boot status.
6666

67-
:ref:`S40 <S40>` series
68-
-----------------------
67+
S40 series
68+
----------
6969

7070
A new layout is introduced on 64-bit :ref:`S40 <S40>` series, so same ``fastboot.bin`` could fit into both SB or non-SB environment.
7171

72-
While this means all SB-related fields could be reused if no SB is enforced, please notice :ref:`S40 <S40>` requires ``AUXIMAGE`` for proper initialization, thus layout is not complete free to change.
72+
While this means all SB-related fields could be reused if no Secure Boot is enforced, please notice S40 requires ``AUXIMAGE`` for proper initialization, thus layout is not complete free to change.
7373

74-
.. table:: :ref:`S40 <S40>` series boootloader layout
74+
.. table:: S40 series boootloader layout
7575

7676
+---------------------+----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
7777
| Area | Offset | Name | Size | Description | Possible value |
@@ -82,9 +82,7 @@ While this means all SB-related fields could be reused if no SB is enforced, ple
8282
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
8383
| | ``0x0104`` | RSA modulus | ``0x0100`` | | |
8484
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
85-
| | ? | ``MSID`` | ``0x0004`` | | |
86-
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
87-
| | ``0x0214`` | ``AUXAREA_ADDR`` [#]_ | ``0x0004`` | Auxiliary Code offset | ``0x0300`` |
85+
| | ``0x0214`` | ``AUXAREA_ADR`` | ``0x0004`` | ``_auxcode_start - TEXT_BASE`` | ``0x0300`` |
8886
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
8987
| | ``0x0218`` | ``AUXAREA_LEN`` | ``0x0004`` | Auxiliary Code length | ``0x5400`` or ``0x3400`` |
9088
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
@@ -98,7 +96,7 @@ While this means all SB-related fields could be reused if no SB is enforced, ple
9896
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
9997
| | ``0x0408`` | ``TOTAL_BOOT_AREA_LEN`` | ``0x0004`` | (Unckecked Area + Boot Area) length | |
10098
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
101-
| | ``0x040c`` | ``SUPPORT_EXT_AREA`` | ``0x0004`` | ``bool`` | |
99+
| | ``0x040c`` | ``BOOT_ENC_FLAG`` | ``0x0004`` | | ``0x3c7896e1`` |
102100
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
103101
| | ``0x0480`` | ``BOOT_REG`` | ``0x2a40`` | ``*.reg`` file | |
104102
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
@@ -118,9 +116,7 @@ While this means all SB-related fields could be reused if no SB is enforced, ple
118116
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
119117
| | ``0x2fec`` | ``BOOT_STORE_ADDR`` | ``0x0004`` | Boot store address | ``0x01000000`` |
120118
+---------------------+----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
121-
| Auxiliary Code Area | ``AUXAREA_ADDR`` | ``AUXIMAGE`` | ``AUXAREA_LEN`` | ``auxcode_sign.img`` | |
122-
| +----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
123-
| | aligned to ``0x100`` | Area Signature | ``0x0100`` | Signed by ``Ext_RSA_Pub_Key`` | |
119+
| Auxiliary Code Area | ``0x0300`` | ``AUXIMAGE`` | ``AUXAREA_LEN`` | ``auxcode_sign.img`` | |
124120
+---------------------+----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
125121
| Unckecked Area | aligned to ``0x100`` | | ``SCS_HASHED_AREA_OFF`` | Free for bootloader to use | |
126122
+---------------------+----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
@@ -135,8 +131,7 @@ While this means all SB-related fields could be reused if no SB is enforced, ple
135131
| | aligned to ``0x100`` | ``BOOT_REG7`` | ``PARAM_ITEM_LEN`` | | |
136132
+---------------------+----------------------+-------------------------+-------------------------+-------------------------------------+--------------------------+
137133

138-
.. [#] Vendor ``fastboot.bin`` has it, but do not affect boot procedure even if all ``0``.
139-
.. [#] Was ``AUXAREA_ADR``.
134+
.. [#] Vendor ``fastboot.bin`` has it, but do not affect boot sequence even if all ``0``.
140135
.. [#] ``CZY\r``, Czyong, the hisi author.
141136
.. [#] Valid only ``SUPPORT_MULTI_PARAM != 0``.
142137

0 commit comments

Comments
 (0)