Adding biffjtag to busybox

Skip to first unread message

Sep 15, 2021, 8:43:34 AM9/15/21
to Bifferboard

This will be my first attempt to add an applet to Busybox, which
1) Has more than one file in it
2) Has an assembler in one file

It's not going so well, because applying -O2 optimisation (what Busybox does) results in the code not working.  I'm using gcc v3.3 (very old) and it doesn't have the pragma to disable optimisation for a single function that came in gcc 3.4.  The version of buildroot that I based my toolchain off (from 2011), has gone from the buildroot site as well (sometimes buildroot gives several compilers to choose from).

So my options appear to be to move to a later buildroot, or rewrite more of the program in assembler (I don't want to disable optimisations for the whole of Busybox), or try to re-write the C code so it works with optimisations on (my least favourite option).

Sep 15, 2021, 9:10:07 AM9/15/21
to Bifferboard
So it looks like I can just bump the gcc compiler version and stick with the same kernel headers.  Worth a try.
PS:  I made a mistake above, I meant gcc 4.3 not 3.3.  And the new pragma appeared with v4.4.

Sep 16, 2021, 2:43:43 PM9/16/21
to Bifferboard
All done.  Now you can have one bifferboard program another bifferboard, with only about 8k space overhead  (less once it's all lzma compressed), and it runs really quickly due to all the unrolled loops.
Reply all
Reply to author
0 new messages