Fail to build Sonix firmware

Yo,
I am trying to build the Sonix firmware on Ubuntu 16.04 to incorporate @chobitsfan 's upgrade for the UDP ports but I am failing – I am trying to build stock firmware first from the official repo and following the steps per the wiki, namely,

git clone https://github.com/SkyRocketToys/Sonix
cd Sonix/buildscript
git submodule update --init --recursive
make oldconfig
make clean && make mavlink && make && make install
ls -l …/image/dashcam/FIRMWARE_660R.bin

I installed the extra packages mentioned in the readme on the repo as I am on a 64bit system and also throwing in suggestions from a related thread.
My build however fails at make mavlink with the output:

Makefile:611: warning: overriding recipe for target 'mavlink'
Makefile:600: warning: ignoring old recipe for target 'mavlink'
cp Makefile.version Makefile.version.old
./Makever.sh Makefile.version
Created Makefile.version with revision 5
Makefile:611: warning: overriding recipe for target 'mavlink'
Makefile:600: warning: ignoring old recipe for target 'mavlink'
mavgen.py --lang C -o include/generated/mavlink --wire-protocol=2.0 ../modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
Validating ../modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
Parsing ../modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
MAV_CMD
MAV_CMD_DO_GRIPPER
MAV_CMD_DO_AUTOTUNE_ENABLE
MAV_CMD_NAV_ALTITUDE_WAIT
MAV_CMD_POWER_OFF_INITIATED
MAV_CMD_SOLO_BTN_FLY_CLICK
MAV_CMD_SOLO_BTN_FLY_HOLD
MAV_CMD_SOLO_BTN_PAUSE_CLICK
MAV_CMD_FIXED_MAG_CAL
MAV_CMD_FIXED_MAG_CAL_FIELD
MAV_CMD_DO_START_MAG_CAL
MAV_CMD_DO_ACCEPT_MAG_CAL
MAV_CMD_DO_CANCEL_MAG_CAL
MAV_CMD_ACCELCAL_VEHICLE_POS
MAV_CMD_DO_SEND_BANNER
MAV_CMD_SET_FACTORY_TEST_MODE
MAV_CMD_GIMBAL_RESET
MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS
MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION
MAV_CMD_GIMBAL_FULL_RESET
MAV_CMD_DO_WINCH
Note: message DATA64 is longer than 64 bytes long (74 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DATA96 is longer than 64 bytes long (106 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message REMOTE_LOG_DATA_BLOCK is longer than 64 bytes long (214 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DEVICE_OP_READ_REPLY is longer than 64 bytes long (143 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DEVICE_OP_WRITE is longer than 64 bytes long (187 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Validating ../modules/mavlink/message_definitions/v1.0/common.xml
ERROR: /home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3434:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3443:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3452:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3458:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3755:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3764:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3768:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:3956:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
/home/astrolabs/Sonix/modules/mavlink/message_definitions/v1.0/common.xml:4113:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'field': This element is not expected. Expected is one of ( deprecated, wip, description ).
Makefile:611: recipe for target 'mavlink' failed
make: *** [mavlink] Error 1

From this more or less related issue, I see that it might have to do with pymavlink, also per @colorsound 's own battle with it. As far as I can tell, I have pymavlink installed.
I tried to build both from the master branch and the latest committed branch – same difference.

Any ideas? @tridge2 @peterbarker Is current pymavlink and Sonix firmware not compatible. As anyone recently built it?
Any insight would be greatly appreciated :slight_smile: I am litterally stuck to the ground until I can get this sorted as I am hitting the same issues as others to be able to talk to both my SVs from maxproxy/dronekit, aka I need them to broadcast on unique ports.

Cheers!

It seems that trying to build stock firmware before attempting to build @chobitsfan custom one was my downfall.
I was able to build his on the journey-xxxx branch on his fork, after exporting the python path per his own recommendation in the referenced thread from my first post. I am now able to set the UDP port for each SV in the WIFI.txt file and Dronekit into each SV – and fwd mavlink traffic to QGC to keep track of them all in the GS. Next step, is to fly auto missions using Dronekit solely.