Icecube: config: added the preEVT first version of fw util config #374
Icecube: config: added the preEVT first version of fw util config #374zhongedward wants to merge 3 commits into
Conversation
|
@mikechoifb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Hi @zhongedward 1- what's the difference between dom_bottom_fpga and dom_top_fpga in terms of firmware binaries? Aren't they both using the same image? If yes, can you please rename it as dom_fpga1 and dom_fpga2 instead? 2- Can you please provide the list of component of every singe components in this fw_util.json? For example, is the dom_fpga on the SMB? What about the BIOS, the IOB_FPGA... and all the other ones? |
|
same thing for the pict and picb? What does pic stand for? is the t for top and the b for bottom? Aren't they both using the same image? Can we replace this with numericals instead pic_cpld1 and pic_cpld2? |
|
Also @zhongedward -- I cannot open the text file you attached to this PR. I would like to open it and take a look at it. Can you please upload a version that I can open. This is what I am seeing when I try to open it. |
@joancaneus Sorry,this attachment caused you trouble. I have updated this file. Please check it again. If there are any problems, please let me know. |
@joancaneus I am confirming this issue with my cpld colleague. Once confirmed, I will reply as soon as possible.
|
|
@zhongedward can you please provide the location of every single component in this fw_util.json? By location, I mean is it XYZ component located on the SMB, the SCM... etc? I need to know the location of every single component? Also what does pic stand for? |
|
@zhongedward why did you close this PR without addressing the comments? Are you opening a new one? I would like to have answer to the questions in this PR please, |
|
@joancaneus Hi , Joan, Sorry, the attachment of the last PR cannot be opened. We are strengthening our self-education and rectification. We plan to submit a new PR and answer all your questions in the new PR. Do you think this is okay? |
Yes... That's fine. 1- Can you please send me a message once you submit the new PR? 2- What's the ETA for the new PR? |
|
5/8 is a late. Why can't it be today before close of business day? I am not asking you for any software logic change for the PR. Just some basic question so I can understand how we will incorporate this in our internal FAM tooling. |
OK, I will confirm it right away and reply to your question later. |
|
@zhongedward what does PIC stand for? |
|
1- what's the difference between dom_bottom_fpga and dom_top_fpga in terms of firmware binaries? Aren't they both using the same image? I have confirmed with my cpld colleague 'dom_bottom_fpga' and 'dom_top_fpga' they are the same image. If yes, can you please rename it as dom_fpga1 and dom_fpga2 instead? Ok, we will change it. 2- Can you please provide the list of component of every singe components in this fw_util.json? For example, is the dom_fpga on the SMB? What about the BIOS, the IOB_FPGA... and all the other ones? Components location mapping: 3.same thing for the pict and picb? What does pic stand for? is the t for top and the b for bottom? Yes. t is the top and b is bottom. Aren't they both using the same image? Can we replace this with numericals instead pic_cpld1 and pic_cpld2? Yes, they are same. we will change it. |
@zhongedward what does the PIC abbreviation stand for? |
PIC (Physical Interface card) |
|
@joancaneus Hi, Joan, Can we raise a new PR (retest and describe) or reopen this PR (retest and describe)? |
|
@zhongedward I'd rather you re-open this PR and make the small changes. If you raise a new PR, You will have to add the link of this PR in the description area so that I can reference to it when I need details about this current discussion. |
Ok, I will do it right now and retest it.If it's ok, i will reopen it. Thanks. |
|
@zhongedward has updated the pull request. You must reimport the pull request before landing. |
|
@zhongedward has updated the pull request. You must reimport the pull request before landing. |
|
@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
|
@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@joancaneus merged this pull request in 806503f. |
…ve restart limit (facebook#374) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. --> **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` # Summary Updated `qsfp_service` and `wedge_agent` to change type and remove restart limit <!-- Explain the motivation for making this change and any other context that you think would help reviewers of your code. What existing problem does the pull request solve? --> # Test Plan Services are starting correctly (though eventually failing on my test machine because there is no `/etc/coop`) `qsfp_service`: ``` Jan 27 03:29:46 gold221 systemd[1]: Started FBOSS QSFP Service. Jan 27 03:29:46 gold221 qsfp_service[2193]: W0127 03:29:46.404501 2193 QsfpConfig.cpp:27] Can't get qsfp config from /etc/coop/qsfp.conf ``` `wedge_agent`: ``` Jan 27 03:29:58 gold221 systemd[1]: Started FBOSS Wedge Agent. Jan 27 03:29:58 gold221 wedge_agent[2230]: terminate called... unable to read /etc/coop/agent.conf ```


Description
This PR is the preEVT first version of the IceCube fw util configuration.
Motivation
1.Supported Binary names are: bios iob_fpga dom_fpga1 dom_fpga2 mcb_cpld scm_cpld pic_cpld1 pic_cpld2.
Components location mapping:
bios---->COME
iob_fpga---->MCB
dom_fpga1---->PIC_B
dom_fpga2 ---->PIC_T
mcb_cpld---->MCB
pic_cpld1---->PIC_T
pic_cpld2---->PIC_B
scm_cpld---->MCB
2.PIC (Physical Interface card),T is top, B is bottom.
3.Due to hardware limitation, there is no SMB card in the configuration file.
Test Plan
1.The correctness of the format has been verified on this website.
2.Used jq cmd to pretty the format.
3.Test log as follows:
...
[root@localhost edward]# LD_LIBRARY_PATH=./fboss_lib/ ./fw_util --config_file fw_util.json --fw_action=list
I1015 10:29:32.780743 17381 PlatformNameLib.cpp:73] Platform name read from cache: ICECUBE800BC
I1015 10:29:32.780804 17381 ConfigLib.cpp:33] Using config file: fw_util.json
I1015 10:29:32.780918 17381 fw_util.cpp:75] supported Binary names are: bios iob_fpga dom_fpga1 dom_fpga2 mcb_cpld scm_cpld pic_cpld1 pic_cpld2
[root@localhost edward]#
[root@localhost edward]#
[root@localhost edward]# LD_LIBRARY_PATH=./fboss_lib/ ./fw_util --config_file ./fw_util.json --fw_action=read --fw_target_name=iob_fpga --fw_binary_file=iob_fpga.bin --logging=DBG2
I1015 12:20:04.574011 68465 PlatformNameLib.cpp:73] Platform name read from cache: ICECUBE800BC
I1015 12:20:04.574070 68465 ConfigLib.cpp:33] Using config file: ./fw_util.json
I1015 12:20:04.574187 68465 FwUtilImpl.cpp:61] Analyzing the given FW action for execution
I1015 12:20:04.574195 68465 FwUtilRead.cpp:11] Running read operation for iob_fpga
I1015 12:20:04.574204 68465 FwUtilFlashrom.cpp:11] Detecting chip for iob_fpga
V1015 12:20:04.574210 68465 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1
V1015 12:20:04.596051 68465 PlatformUtils.cpp:36] Running command: /bin/grep -q N25Q128..3E
V1015 12:20:04.596861 68465 PlatformUtils.cpp:36] Running command: /bin/grep -q W25Q128.V..M
I1015 12:20:04.597681 68465 FwUtilFlashrom.cpp:46] Detected chip: W25Q128.V..M
V1015 12:20:04.597688 68465 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -c W25Q128.V..M -r iob_fpga.bin
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] flashrom v1.2 on Linux 6.11.1 (x86_64)
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] flashrom is free software, get the source code at https://flashrom.org
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163]
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] Using default 2000kHz clock. Use 'spispeed' parameter to override.
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] Found Winbond flash chip "W25Q128.V..M" (16384 kB, SPI) on linux_spi.
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163] Reading flash... done.
I1015 12:20:20.562306 68465 FwUtilFlashrom.cpp:163]
[root@localhost edward]#
[root@localhost edward]#
[root@localhost edward]# LD_LIBRARY_PATH=./fboss_lib/ ./fw_util --config_file ./fw_util.json --fw_action=program --fw_target_name=iob_fpga --fw_binary_file=iob_fpga.bin --logging=DBG2
I1015 12:20:34.419045 68479 PlatformNameLib.cpp:73] Platform name read from cache: ICECUBE800BC
I1015 12:20:34.419104 68479 ConfigLib.cpp:33] Using config file: ./fw_util.json
I1015 12:20:34.419222 68479 FwUtilImpl.cpp:61] Analyzing the given FW action for execution
I1015 12:20:34.419231 68479 FwUtilUpgrade.cpp:8] Running Upgrade operation for iob_fpga
I1015 12:20:34.419239 68479 FwUtilFlashrom.cpp:11] Detecting chip for iob_fpga
V1015 12:20:34.419246 68479 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1
V1015 12:20:34.441054 68479 PlatformUtils.cpp:36] Running command: /bin/grep -q N25Q128..3E
V1015 12:20:34.441803 68479 PlatformUtils.cpp:36] Running command: /bin/grep -q W25Q128.V..M
I1015 12:20:34.442608 68479 FwUtilFlashrom.cpp:46] Detected chip: W25Q128.V..M
V1015 12:20:34.442616 68479 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -c W25Q128.V..M -w iob_fpga.bin
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] flashrom v1.2 on Linux 6.11.1 (x86_64)
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] flashrom is free software, get the source code at https://flashrom.org
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149]
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Using default 2000kHz clock. Use 'spispeed' parameter to override.
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Found Winbond flash chip "W25Q128.V..M" (16384 kB, SPI) on linux_spi.
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Reading old flash chip contents... done.
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Erasing and writing flash chip...
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Warning: Chip content is identical to the requested image.
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149] Erase/write done.
I1015 12:20:50.428332 68479 FwUtilFlashrom.cpp:149]
[root@localhost edward]#
[root@localhost edward]#
[root@localhost edward]# LD_LIBRARY_PATH=./fboss_lib/ ./fw_util --config_file ./fw_util.json --fw_action=verify --fw_target_name=iob_fpga --fw_binary_file=iob_fpga.bin --logging=DBG2
I1015 12:24:05.250574 68536 PlatformNameLib.cpp:73] Platform name read from cache: ICECUBE800BC
I1015 12:24:05.250629 68536 ConfigLib.cpp:33] Using config file: ./fw_util.json
I1015 12:24:05.250741 68536 FwUtilImpl.cpp:61] Analyzing the given FW action for execution
I1015 12:24:05.250749 68536 FwUtilVerify.cpp:11] Running verify operation for iob_fpga
I1015 12:24:05.250756 68536 FwUtilFlashrom.cpp:11] Detecting chip for iob_fpga
V1015 12:24:05.250762 68536 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1
V1015 12:24:05.272443 68536 PlatformUtils.cpp:36] Running command: /bin/grep -q N25Q128..3E
V1015 12:24:05.273135 68536 PlatformUtils.cpp:36] Running command: /bin/grep -q W25Q128.V..M
I1015 12:24:05.273801 68536 FwUtilFlashrom.cpp:46] Detected chip: W25Q128.V..M
V1015 12:24:05.273809 68536 PlatformUtils.cpp:26] Running command: /usr/bin/flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -c W25Q128.V..M -v iob_fpga.bin
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] flashrom v1.2 on Linux 6.11.1 (x86_64)
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] flashrom is free software, get the source code at https://flashrom.org
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175]
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] Using default 2000kHz clock. Use 'spispeed' parameter to override.
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] Found Winbond flash chip "W25Q128.V..M" (16384 kB, SPI) on linux_spi.
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175] Verifying flash... VERIFIED.
I1015 12:24:21.246536 68536 FwUtilFlashrom.cpp:175]
[root@localhost edward]#
...
fw_util_2025_4_29_test_log.txt