ADD_SUBDIRECTORY(src/battery-monitor)
ADD_SUBDIRECTORY(src/libdeviced)
-ADD_SUBDIRECTORY(src/devicectl)
+ADD_SUBDIRECTORY(src/tools/devicectl)
+ADD_SUBDIRECTORY(src/tools/partition-switch)
IF(TIZEN_FEATURE_USBHOST_TEST STREQUAL on)
ADD_SUBDIRECTORY(src/usb-host-ffs-test-daemon)
ENDIF()
#if #{?usb_module} == on ==> always on
%{_bindir}/direct_set_debug.sh
%{TZ_SYS_DUMPGEN}/dump_pmstate_log.sh
+%attr(2551,root,root) %{_bindir}/partition_switch
#endif
%files auto-test
--- /dev/null
+SET(CMAKE_C_FLAGS ENV${CFLAGS})
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(REQUIRED_PKGS REQUIRED hal-api-device)
+FOREACH(flag ${REQUIRED_PKGS_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+SET(CMAKE_C_FLAGS ${EXTRA_CFLAGS})
+
+ADD_EXECUTABLE(partition_switch partition-switch.c)
+SET_TARGET_PROPERTIES(partition_switch PROPERTIES COMPILE_FLAGS "-fPIE")
+SET_TARGET_PROPERTIES(partition_switch PROPERTIES LINK_FLAGS "-pie")
+TARGET_LINK_LIBRARIES(partition_switch ${REQUIRED_PKGS_LDFLAGS})
+
+INSTALL(TARGETS partition_switch DESTINATION bin)
--- /dev/null
+#include <hal/device/hal-board.h>
+
+int main(int argc, char *argv[])
+{
+ return hal_device_board_switch_partition(argc, argv);
+}