forked from Archive/PX4-Autopilot
Tools/kconfig: delete old migration helpers
- people are updating this without really understanding the purpose, and it's generally no longer useful
This commit is contained in:
parent
c46fa01195
commit
db4e09d529
|
@ -1,72 +0,0 @@
|
|||
#!/bin/python3
|
||||
|
||||
import parse_cmake.parsing as cmp
|
||||
import glob
|
||||
import pprint
|
||||
import re
|
||||
import os
|
||||
|
||||
__location__ = os.path.realpath(
|
||||
os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
serial_regex = r"(\D\D\D\d):(/dev/ttyS\d+)"
|
||||
io_regex = r"IO (.*)"
|
||||
romfs_regex = r"ROMFSROOT (.*)"
|
||||
arch_regex = r"ARCHITECTURE (.*)"
|
||||
toolchain_regex = r"TOOLCHAIN (.*)"
|
||||
|
||||
|
||||
|
||||
def stripComments(code):
|
||||
code = str(code)
|
||||
return re.sub(r'(?m) *#.*\n?', '', code)
|
||||
|
||||
lut = {}
|
||||
with open(os.path.join(__location__, "cmake_kconfig_lut.txt"),'r') as lookup:
|
||||
for line in lookup:
|
||||
if ',' in line:
|
||||
key, value = line.strip().split(',')
|
||||
lut[key] = value
|
||||
|
||||
#for name in glob.glob('boards/*/*/*.cmake'):
|
||||
px4_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
|
||||
|
||||
for name in glob.glob(px4_dir + '/boards/*/*/*.cmake'):
|
||||
print(name)
|
||||
with open(name, 'r') as f:
|
||||
romfs_set = False
|
||||
w = open(name.replace(".cmake",".px4board"), "w")
|
||||
for line in f:
|
||||
clean_line = stripComments(line.strip())
|
||||
value = lut.get(clean_line)
|
||||
if value is not None:
|
||||
print(value, file=w)
|
||||
print(value)
|
||||
else:
|
||||
matches = re.finditer(serial_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"")
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"", file=w)
|
||||
matches = re.finditer(io_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(romfs_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"", file=w)
|
||||
romfs_set = True
|
||||
matches = re.finditer(arch_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(toolchain_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"", file=w)
|
||||
|
||||
if(romfs_set == False):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"\"", file=w)
|
||||
|
||||
|
||||
w.close()
|
|
@ -1,204 +0,0 @@
|
|||
PLATFORM nuttx,CONFIG_PLATFORM_NUTTX=y
|
||||
PLATFORM posix,CONFIG_PLATFORM_POSIX=y
|
||||
CONSTRAINED_MEMORY,CONFIG_BOARD_CONSTRAINED_MEMORY=y
|
||||
CONSTRAINED_FLASH,CONFIG_BOARD_CONSTRAINED_FLASH=y
|
||||
NO_HELP,CONFIG_BOARD_NO_HELP=y
|
||||
EXTERNAL_METADATA,CONFIG_BOARD_EXTERNAL_METADATA=y
|
||||
BUILD_BOOTLOADER,CONFIG_BOARD_BUILD_BOOTLOADER=y
|
||||
UAVCAN_INTERFACES 2,CONFIG_BOARD_UAVCAN_INTERFACES=2
|
||||
UAVCAN_INTERFACES 1,CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
UAVCAN_TIMER_OVERRIDE 2,CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2
|
||||
UAVCAN_TIMER_OVERRIDE 1,CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=1
|
||||
UAVCAN_TIMER_OVERRIDE 1,CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=0
|
||||
TESTING,CONFIG_BOARD_TESTING=y
|
||||
ETHERNET,CONFIG_BOARD_ETHERNET=y
|
||||
adc/ads1115,CONFIG_DRIVERS_ADC_ADS1115=y
|
||||
adc/board_adc,CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
barometer,CONFIG_COMMON_BAROMETERS=y
|
||||
barometer/bmp280,CONFIG_DRIVERS_BAROMETER_BMP280=y
|
||||
barometer/bmp388,CONFIG_DRIVERS_BAROMETER_BMP388=y
|
||||
barometer/dps310,CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
barometer/lps22hb,CONFIG_DRIVERS_BAROMETER_LPS22HB=y
|
||||
barometer/lps25h,CONFIG_DRIVERS_BAROMETER_LPS25H=y
|
||||
barometer/lps33hw,CONFIG_DRIVERS_BAROMETER_LPS33HW=y
|
||||
barometer/mpl3115a2,CONFIG_DRIVERS_BAROMETER_MPL3115A2=y
|
||||
barometer/ms5611,CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
barometer/tcbp001ta,CONFIG_DRIVERS_BAROMETER_TCBP001TA=y
|
||||
batt_smbus,CONFIG_DRIVERS_BATT_SMBUS=y
|
||||
bootloaders,CONFIG_DRIVERS_BOOTLOADERS=y
|
||||
camera_capture,CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
camera_trigger,CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
differential_pressure,CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE=y
|
||||
distance_sensor,CONFIG_COMMON_DISTANCE_SENSOR=y
|
||||
distance_sensor/ll40ls,CONFIG_DRIVERS_DISTANCE_SENSOR_LL40LS=y
|
||||
distance_sensor/lightware_laser_serial,CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_LASER_SERIAL=y
|
||||
distance_sensor/broadcom/afbrs50,CONFIG_DRIVERS_DISTANCE_SENSOR_BROADCOM_AFBRS50=y
|
||||
distance_sensor/vl53l0x,CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L0X=y
|
||||
distance_sensor/vl53l1x,CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L1X=y
|
||||
distance_sensor/srf05,CONFIG_DRIVERS_DISTANCE_SENSOR_SRF05=y
|
||||
dshot,CONFIG_DRIVERS_DSHOT=y
|
||||
gps,CONFIG_DRIVERS_GPS=y
|
||||
heater,CONFIG_DRIVERS_HEATER=y
|
||||
imu,CONFIG_COMMON_IMU=y
|
||||
imu/adis16477,CONFIG_DRIVERS_IMU_ADIS16477=y
|
||||
imu/adis16497,CONFIG_DRIVERS_IMU_ADIS16497=y
|
||||
imu/analog_devices/adis16448,CONFIG_DRIVERS_IMU_ANALOG_DEVICES_ADIS16448=y
|
||||
imu/analog_devices/adis16470,CONFIG_DRIVERS_IMU_ANALOG_DEVICES_ADIS16470=y
|
||||
imu/bosch/bmi055,CONFIG_DRIVERS_IMU_BOSCH_BMI055=y
|
||||
imu/bosch/bmi088,CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
|
||||
imu/fxas21002c,CONFIG_DRIVERS_IMU_FXAS21002C=y
|
||||
imu/fxos8701cq,CONFIG_DRIVERS_IMU_FXOS8701CQ=y
|
||||
imu/invensense/icm20602,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
|
||||
imu/invensense/icm20608g,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20608G=y
|
||||
imu/invensense/icm20649,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20649=y
|
||||
imu/invensense/icm20689,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20689=y
|
||||
imu/invensense/icm20948,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20948=y
|
||||
imu/invensense/icm40609d,CONFIG_DRIVERS_IMU_INVENSENSE_ICM40609D=y
|
||||
imu/invensense/icm42605,CONFIG_DRIVERS_IMU_INVENSENSE_ICM42605=y
|
||||
imu/invensense/icm42688p,CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
imu/invensense/mpu6000,CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
|
||||
imu/invensense/mpu6500,CONFIG_DRIVERS_IMU_INVENSENSE_MPU6500=y
|
||||
imu/invensense/mpu9250,CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
|
||||
imu/l3gd20,CONFIG_DRIVERS_IMU_L3GD20=y
|
||||
imu/lsm303d,CONFIG_DRIVERS_IMU_LSM303D=y
|
||||
imu/st,CONFIG_DRIVERS_IMU_ST=y
|
||||
irlock,CONFIG_DRIVERS_IRLOCK=y
|
||||
lights,CONFIG_COMMON_LIGHT=y
|
||||
lights/neopixel,CONFIG_DRIVERS_LIGHTS_NEOPIXEL=y
|
||||
lights/rgbled,CONFIG_DRIVERS_LIGHTS_RGBLED=y
|
||||
lights/rgbled_ncp5623c,CONFIG_DRIVERS_LIGHTS_RGBLED_NCP5623C=y
|
||||
lights/rgbled_pwm,CONFIG_DRIVERS_LIGHTS_RGBLED_PWM=y
|
||||
magnetometer,CONFIG_COMMON_MAGNETOMETER=y
|
||||
magnetometer/akm/ak09916,CONFIG_DRIVERS_MAGNETOMETER_AKM_AK09916=y
|
||||
magnetometer/akm/ak8963,CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
|
||||
magnetometer/bosch/bmm150,CONFIG_DRIVERS_MAGNETOMETER_BOSCH_BMM150=y
|
||||
magnetometer/hmc5883,CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
|
||||
magnetometer/isentek/ist8308,CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
|
||||
magnetometer/isentek/ist8310,CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
magnetometer/lis2mdl,CONFIG_DRIVERS_MAGNETOMETER_LIS2MDL=y
|
||||
magnetometer/lis3mdl,CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
|
||||
magnetometer/lsm303agr,CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
|
||||
magnetometer/lsm9ds1_mag,CONFIG_DRIVERS_MAGNETOMETER_LSM9DS1_MAG=y
|
||||
magnetometer/qmc5883l,CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
|
||||
magnetometer/rm3100,CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
|
||||
magnetometer/vtrantech/vcm1193l,CONFIG_DRIVERS_MAGNETOMETER_VTRANTECH_VCM1193L=y
|
||||
optical_flow,CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
optical_flow/paw3902,CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
|
||||
optical_flow/paw3901,CONFIG_DRIVERS_OPTICAL_FLOW_PMW3901=y
|
||||
optical_flow/px4flow,CONFIG_DRIVERS_OPTICAL_FLOW_PX4FLOW=y
|
||||
optical_flow/thoneflow,CONFIG_DRIVERS_OPTICAL_FLOW_THONEFLOW=y
|
||||
osd,CONFIG_DRIVERS_OSD=y
|
||||
pca9685,CONFIG_DRIVERS_PCA9685=y
|
||||
pca9685_pwm_out,CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
power_monitor/ina226,CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
power_monitor/voxlpm,CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
|
||||
pps_capture,CONFIG_DRIVERS_PPS_CAPTURE=y
|
||||
protocol_splitter,CONFIG_DRIVERS_PROTOCOL_SPLITTER=y
|
||||
pwm_input,CONFIG_DRIVERS_PWM_INPUT=y
|
||||
pwm_out_sim,CONFIG_DRIVERS_PWM_OUT_SIM=y
|
||||
pwm_out,CONFIG_DRIVERS_PWM_OUT=y
|
||||
px4io,CONFIG_DRIVERS_PX4IO=y
|
||||
rc_input,CONFIG_DRIVERS_RC_INPUT=y
|
||||
roboclaw,CONFIG_DRIVERS_ROBOCLAW=y
|
||||
rpi_rc_in,CONFIG_DRIVERS_RPI_RC_IN=y
|
||||
rpm,CONFIG_DRIVERS_RPM=y
|
||||
safety_button,CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
smart_battery/batmon,CONFIG_DRIVERS_SMART_BATTERY_BATMON=y
|
||||
spektrum_rc,CONFIG_DRIVERS_SPEKTRUM_RC=y
|
||||
telemetry,CONFIG_DRIVERS_TELEMETRY=y
|
||||
test_ppm,CONFIG_DRIVERS_TEST_PPM=y
|
||||
tone_alarm,CONFIG_DRIVERS_TONE_ALARM=y
|
||||
uavcan,CONFIG_DRIVERS_UAVCAN=y
|
||||
uavcannode,CONFIG_DRIVERS_UAVCANNODE=y
|
||||
uavcannode_gps_demo,CONFIG_DRIVERS_UAVCANNODE_GPS_DEMO=y
|
||||
airship_att_control,CONFIG_MODULES_AIRSHIP_ATT_CONTROL=y
|
||||
airspeed_selector,CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
velocity_controller,CONFIG_MODULES_ANGULAR_VELOCITY_CONTROLLER=y
|
||||
attitude_estimator_q,CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
|
||||
battery_status,CONFIG_MODULES_BATTERY_STATUS=y
|
||||
camera_feedback,CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
commander,CONFIG_MODULES_COMMANDER=y
|
||||
control_allocator,CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
dataman,CONFIG_MODULES_DATAMAN=y
|
||||
ekf2,CONFIG_MODULES_EKF2=y
|
||||
esc_battery,CONFIG_MODULES_ESC_BATTERY=y
|
||||
events,CONFIG_MODULES_EVENTS=y
|
||||
flight_mode_manager,CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
|
||||
fw_att_control,CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
fw_pos_control_l1,CONFIG_MODULES_FW_POS_CONTROL_L1=y
|
||||
gyro_calibration,CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
gyro_fft,CONFIG_MODULES_GYRO_FFT=y
|
||||
land_detector,CONFIG_MODULES_LAND_DETECTOR=y
|
||||
landing_target_estimator,CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
load_mon,CONFIG_MODULES_LOAD_MON=y
|
||||
local_position_estimator,CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=y
|
||||
logger,CONFIG_MODULES_LOGGER=y
|
||||
mavlink,CONFIG_MODULES_MAVLINK=y
|
||||
mc_att_control,CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
mc_hover_thrust_estimator,CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
mc_pos_control,CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
mc_rate_control,CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
micrortps_bridge,CONFIG_MODULES_MICRORTPS_BRIDGE=y
|
||||
microdds_client,CONFIG_MODULES_MICRODDS_CLIENT=y
|
||||
navigator,CONFIG_MODULES_NAVIGATOR=y
|
||||
px4iofirmware,CONFIG_MODULES_PX4IOFIRMWARE=y
|
||||
rc_update,CONFIG_MODULES_RC_UPDATE=y
|
||||
replay,CONFIG_MODULES_REPLAY=y
|
||||
rover_pos_control,CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
sensors,CONFIG_MODULES_SENSORS=y
|
||||
sih,CONFIG_MODULES_SIH=y
|
||||
simulator,CONFIG_MODULES_SIMULATOR=y
|
||||
temperature_compensation,CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
uuv_att_control,CONFIG_MODULES_UUV_ATT_CONTROL=y
|
||||
uuv_pos_control,CONFIG_MODULES_UUV_POS_CONTROL=y
|
||||
gimbal,CONFIG_MODULES_GIMBAL=y
|
||||
vtol_att_control,CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
bl_update,CONFIG_SYSTEMCMDS_BL_UPDATE=y
|
||||
dmesg,CONFIG_SYSTEMCMDS_DMESG=y
|
||||
dumpfile,CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
dyn,CONFIG_SYSTEMCMDS_DYN=y
|
||||
failure,CONFIG_SYSTEMCMDS_FAILURE=y
|
||||
gpio,CONFIG_SYSTEMCMDS_GPIO=y
|
||||
hardfault_log,CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
i2cdetect,CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
led_control,CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
mft,CONFIG_SYSTEMCMDS_MFT=y
|
||||
microbench,CONFIG_SYSTEMCMDS_MICROBENCH=y
|
||||
mixer,CONFIG_SYSTEMCMDS_MIXER=y
|
||||
motor_test,CONFIG_SYSTEMCMDS_MOTOR_TEST=y
|
||||
mtd,CONFIG_SYSTEMCMDS_MTD=y
|
||||
netman,CONFIG_SYSTEMCMDS_NETMAN=y
|
||||
nshterm,CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
param,CONFIG_SYSTEMCMDS_PARAM=y
|
||||
perf,CONFIG_SYSTEMCMDS_PERF=y
|
||||
pwm,CONFIG_SYSTEMCMDS_PWM=y
|
||||
reboot,CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
reflect,CONFIG_SYSTEMCMDS_REFLECT=y
|
||||
sd_bench,CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
serial_tet,CONFIG_SYSTEMCMDS_SERIAL_TEST=y
|
||||
shutdown,CONFIG_SYSTEMCMDS_SHUTDOWN=y
|
||||
system_time,CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
tests,CONFIG_SYSTEMCMDS_TESTS=y
|
||||
top,CONFIG_SYSTEMCMDS_TOP=y
|
||||
topic_listener,CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
tune_control,CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
uorb,CONFIG_SYSTEMCMDS_UORB=y
|
||||
usb_connected,CONFIG_SYSTEMCMDS_USB_CONNECTED=y
|
||||
ver,CONFIG_SYSTEMCMDS_VER=y
|
||||
work_queue,CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
dyn_hello,CONFIG_EXAMPLES_DYN_HELLO=y
|
||||
fake_gps,CONFIG_EXAMPLES_FAKE_GPS=y
|
||||
fake_gyro,CONFIG_EXAMPLES_FAKE_GYRO=y
|
||||
fake_imu,CONFIG_EXAMPLES_FAKE_IMU=y
|
||||
fake_magnetometer,CONFIG_EXAMPLES_FAKE_MAGNETOMETER=y
|
||||
fixedwing_control,CONFIG_EXAMPLES_FIXEDWING_CONTROL=y
|
||||
hello,CONFIG_EXAMPLES_HELLO=y
|
||||
hwtest,CONFIG_EXAMPLES_HWTEST=y
|
||||
matlab_csv_serial,CONFIG_EXAMPLES_MATLAB_CSV_SERIAL=y
|
||||
px4_mavlink_debug,CONFIG_EXAMPLES_PX4_MAVLINK_DEBUG=y
|
||||
px4_simple_app,CONFIG_EXAMPLES_PX4_SIMPLE_APP=y
|
||||
rover_steering_control,CONFIG_EXAMPLES_ROVER_STEERING_CONTROL=y
|
||||
uuv_example_app,CONFIG_EXAMPLES_UUV_EXAMPLE_APP=y
|
||||
work_item,CONFIG_EXAMPLES_WORK_ITEM=y
|
||||
add_compile_options(-Wno-narrowing),CONFIG_BOARD_COMPILE_DEFINITIONS="-Wno-narrowing"
|
||||
-D__PX4_LINUX,CONFIG_BOARD_LINUX=y
|
Loading…
Reference in New Issue