#if #{?usb_module} == on ==> always on
%{_bindir}/direct_set_debug.sh
%{TZ_SYS_DUMPGEN}/dump_pmstate_log.sh
-%attr(2551,root,root) %{_bindir}/device_board_switch_partition
%attr(2551,root,root) %{_bindir}/device_board_set_boot_success
%attr(2551,root,root) %{_bindir}/device_board_clear_boot_mode
%attr(2551,root,root) %{_bindir}/device_board_get_boot_mode
+%attr(2551,root,root) %{_bindir}/device_board_switch_partition
+%attr(2551,root,root) %{_bindir}/device_board_set_partition_ab_cloned
+%attr(2551,root,root) %{_bindir}/device_board_clear_partition_ab_cloned
+%attr(2551,root,root) %{_bindir}/device_board_get_partition_ab_cloned
#endif
%files auto-test
INSTALL(TARGETS ${BINARY_NAME} DESTINATION bin)
ENDMACRO()
-ADD_BOOT_EXECUTABLE(device_board_switch_partition switch-partition.c)
ADD_BOOT_EXECUTABLE(device_board_set_boot_success set-boot-success.c)
ADD_BOOT_EXECUTABLE(device_board_clear_boot_mode clear-boot-mode.c)
ADD_BOOT_EXECUTABLE(device_board_get_boot_mode get-boot-mode.c)
+
+ADD_BOOT_EXECUTABLE(device_board_switch_partition switch-partition.c)
+ADD_BOOT_EXECUTABLE(device_board_clear_partition_ab_cloned clear-partition-ab-cloned.c)
+ADD_BOOT_EXECUTABLE(device_board_get_partition_ab_cloned get-partition-ab-cloned.c)
+ADD_BOOT_EXECUTABLE(device_board_set_partition_ab_cloned set-partition-ab-cloned.c)
--- /dev/null
+/*
+ * device-board-get-boot-mode
+ *
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <hal/device/hal-board.h>
+
+int main(int argc, char *argv[])
+{
+ return hal_device_board_clear_partition_ab_cloned();
+}
--- /dev/null
+/*
+ * device-board-get-boot-mode
+ *
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <stdio.h>
+#include <hal/device/hal-board.h>
+
+int main(int argc, char *argv[])
+{
+ int cloned;
+ int ret;
+
+ ret = hal_device_board_get_partition_ab_cloned(&cloned);
+ if (ret == 0)
+ printf("%d", cloned);
+
+ return ret;
+}
--- /dev/null
+/*
+ * device-board-get-boot-mode
+ *
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <hal/device/hal-board.h>
+
+int main(int argc, char *argv[])
+{
+ return hal_device_board_set_partition_ab_cloned();
+}