Building Courgette for Cortex M4 with clang (A32)

216 views
Skip to first unread message

Kumaar

unread,
Apr 20, 2018, 10:38:30 AM4/20/18
to Chromium-dev
Hey guys,

I am trying to build courgette for Cortex M4 with clang (A32)

My args.gn has this:
target_cpu = "arm"
is_clang = true
 
I am getting this wierd error. I suppose boringssl does not have a build option for win_x64 and arm. 

Any answers would greatly help.


C:\Work\Features\FOTA\Bringup\chromium\src>gn gen out/NEW
ERROR at //third_party/yasm/yasm_assemble.gni:97:3: Assertion failed.
  assert(defined(invoker.sources), "Need sources defined for $target_name")
  ^-----
Need sources defined for boringssl_asm
See //third_party/boringssl/BUILD.gn:53:3: whence it was called.
  yasm_assemble("boringssl_asm") {
  ^--------------------------------
See //crypto/BUILD.gn:83:5: which caused the file to be included.
    "//third_party/boringssl",
    ^------------------------
Traceback (most recent call last):
  File "C:/Work/Features/FOTA/Bringup/chromium/src/build/toolchain/win/setup_toolchain.py", line 276, in <module>
    main()
  File "C:/Work/Features/FOTA/Bringup/chromium/src/build/toolchain/win/setup_toolchain.py", line 262, in main
    assert vc_lib_path
AssertionError
Traceback (most recent call last):
  File "C:/Work/Features/FOTA/Bringup/chromium/src/build/toolchain/win/setup_toolchain.py", line 276, in <module>
    main()
  File "C:/Work/Features/FOTA/Bringup/chromium/src/build/toolchain/win/setup_toolchain.py", line 262, in main
    assert vc_lib_path
AssertionError

Thanks, 
Kumaar

Samuel Huang

unread,
Apr 20, 2018, 12:07:27 PM4/20/18
to gku...@gmail.com, Chromium-dev
I tried what you did and got different set of error messages, which instructed me to run

build/linux/sysroot_scripts/install-sysroot.py --arch=arm

and then gn worked after that.

Meanwhile, if you wish to use Chrome's binary patching tools, consider looking at /components/zucchini, which is newer and has ARM support (implemented internally but needs to be reviewed and uploaded into Chromium).

--
Samuel Huang


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/473e424e-ce82-4e7d-8c48-9d320ec0cb35%40chromium.org.

Kumaar Guhan

unread,
Apr 20, 2018, 12:48:34 PM4/20/18
to Samuel Huang, Chromium-dev
Thanks Samuel. But I am trying this on a Win 10. Is there any known limitation with ARM/Clang build on Windows?

Thanks for the Zucchini suggestion. Let me check that too.
--
When you want it the most there's no easy way out
When you're ready to go and your heart's left in doubt
Don't give up on your faith
L@@e comes to those who believe it
And that's the way it is......

Samuel Huang

unread,
Apr 26, 2018, 9:31:06 AM4/26/18
to Kumaar Guhan, chromium-dev
+chromium-dev

Sorry just saw your reply now...  Glad to hear that it does well!

The ARM code is in internal repo, and haven't been committed yet (working on it).

Zucchini (like Courgette) scans for files in the input files, so it would detect binaries.  The parsing code is built-in, so does not depend on compile target.

Zucchini uses much less memory than Courgette on the client side, when applying the patch.


Please note that we're still in the progress of reviewing and committing the full code.

--
Samuel Huang


On Tue, Apr 24, 2018 at 4:27 AM, Kumaar Guhan <gku...@gmail.com> wrote:
Hi Samuel,

I tried the zucchini as suggested by you. Pretty cool. [X]% better than Courgette on my binary.

But i am still not able to get it compiled for ARM Clang.  You said Zucchini has ARM inbuilt. So does this mean that it will be able to detect the binary irrespective of how it was built ?

Also how different/better is Zucchini from Courgette? 

I tried to read, but could not settle on a good source. 

Thanks for your answers.

Cheers,
Kumaar



On Fri, Apr 20, 2018 at 9:36 PM, Samuel Huang <hua...@chromium.org> wrote:

Kumaar Guhan

unread,
Apr 27, 2018, 1:09:53 AM4/27/18
to Samuel Huang, chromium-dev
Hi Samuel,

Thanks for the update.

Not sure if i can ask, do you have any timelines when you will be able to complete the review/commit?

Thanks again

B
Kumaar

Samuel Huang

unread,
Apr 27, 2018, 12:52:10 PM4/27/18
to Kumaar Guhan, chromium-dev
We're planning to get the basic features (no ELF or ARM) committed in Q2.  As for getting everything in, aiming for Q3?

--
Samuel Huang

Kumaar Guhan

unread,
Apr 27, 2018, 10:52:29 PM4/27/18
to Samuel Huang, chromium-dev
Thanks Samuel for the info.

Zeeshan Mahmood

unread,
Aug 30, 2018, 4:25:25 PM8/30/18
to Chromium-dev, gku...@gmail.com
I have some questions about zucchini:
  1. What is the current status (when complete code will be available)?
  2. Is there any reference page about its working?
  3. Is it based on bsdiff (like Courgette)?

Samuel Huang

unread,
Aug 30, 2018, 4:29:50 PM8/30/18
to zsn...@gmail.com, chromium-dev, Kumaar Guhan
1. Most of the code has been landed (exception is ELF-ARM code). Source is in Chromium source tree. Location:

2. README.md has some documentation, although we haven't released more detailed docs yet.

3. Nope, it's not based on BSDiff, but has its own raw data ("Layer 1") patcher called "Raw Zucchini".

--
Samuel Huang

Kumaar Guhan

unread,
Oct 3, 2018, 7:57:29 AM10/3/18
to Samuel Huang, zsn...@gmail.com, Chromium-dev
Hi Samuel,

Would it be possible to share any updates on the ELF-ARM support for Zucchini? 

Thanks
Kumaar

Zeeshan Mahmood

unread,
Apr 1, 2019, 1:00:29 AM4/1/19
to Chromium-dev, zsn...@gmail.com, gku...@gmail.com
Hi,

I am trying to build Zucchini but getting some errors. Will someone please check this thread and help?
https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-dev/zucchini|sort:date/chromium-dev/jA5fj_y86o4/v2ywgFlBAwAJ

Thanks
Reply all
Reply to author
Forward
0 new messages