mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 11:42:09 +00:00
nyx: Introducing Partition Manager for SD Card
Allow you to select up to 2 emuMMC + Linux + Android. Any combo is allowed, even if you just want to repartition it back to one FAT partition. The procedure is automatic on selecting sizes and offsets. The tool is also able to backup your SD Card into Ramdisk and then get restored, if the total used size is less than 1GB. If you have more files than that, you will be asked to copy your files to your PC via UMS. It also allows you to flash L4T Linux images and Android Twrp images. The Flash Android can be also used to reboot into Twrp if a file to flash is not found.
This commit is contained in:
parent
91c2c891fd
commit
4b62b1f69f
5 changed files with 2326 additions and 3 deletions
|
@ -24,7 +24,7 @@ OBJS = $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
|||
start.o exception_handlers.o \
|
||||
nyx.o heap.o \
|
||||
gfx.o \
|
||||
gui.o gui_info.o gui_tools.o gui_options.o gui_emmc_tools.o gui_emummc_tools.o \
|
||||
gui.o gui_info.o gui_tools.o gui_options.o gui_emmc_tools.o gui_emummc_tools.o gui_tools_partition_manager.o \
|
||||
fe_emummc_tools.o fe_emmc_tools.o \
|
||||
)
|
||||
|
||||
|
@ -33,7 +33,7 @@ OBJS += $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
|||
bpmp.o clock.o cluster.o di.o gpio.o i2c.o irq.o pinmux.o se.o smmu.o tsec.o uart.o \
|
||||
fuse.o kfuse.o \
|
||||
mc.o sdram.o minerva.o ramdisk.o \
|
||||
sdmmc.o sdmmc_driver.o nx_emmc.o nx_sd.o \
|
||||
sdmmc.o sdmmc_driver.o nx_emmc.o nx_emmc_bis.o nx_sd.o \
|
||||
bq24193.o max17050.o max7762x.o max77620-rtc.o regulator_5v.o \
|
||||
touch.o joycon.o tmp451.o fan.o \
|
||||
usbd.o usb_gadget_ums.o usb_gadget_hid.o \
|
||||
|
@ -56,7 +56,7 @@ OBJS += $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
|||
# Libraries.
|
||||
OBJS += $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
||||
diskio.o ff.o ffunicode.o ffsystem.o \
|
||||
elfload.o elfreloc_arm.o \
|
||||
elfload.o elfreloc_arm.o blz.o \
|
||||
lv_group.o lv_indev.o lv_obj.o lv_refr.o lv_style.o lv_vdb.o \
|
||||
lv_draw.o lv_draw_rbasic.o lv_draw_vbasic.o lv_draw_arc.o lv_draw_img.o \
|
||||
lv_draw_label.o lv_draw_line.o lv_draw_rect.o lv_draw_triangle.o \
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#include "gui.h"
|
||||
#include "fe_emummc_tools.h"
|
||||
#include "gui_tools_partition_manager.h"
|
||||
#include "../../../common/memory_map.h"
|
||||
#include "../config/ini.h"
|
||||
#include "../libs/fatfs/ff.h"
|
||||
#include "../mem/heap.h"
|
||||
|
@ -144,6 +146,22 @@ static void _create_window_emummc()
|
|||
nyx_window_toggle_buttons(win, false);
|
||||
}
|
||||
|
||||
static lv_res_t _create_emummc_raw_format(lv_obj_t * btns, const char * txt)
|
||||
{
|
||||
int btn_idx = lv_btnm_get_pressed(btns);
|
||||
|
||||
// Delete parent mbox.
|
||||
mbox_action(btns, txt);
|
||||
|
||||
// Create partition window.
|
||||
if (!btn_idx)
|
||||
create_window_partition_manager(btns);
|
||||
|
||||
mbr_ctx.part_idx = 0;
|
||||
mbr_ctx.sector_start = 0;
|
||||
|
||||
return LV_RES_INV;
|
||||
}
|
||||
|
||||
static lv_res_t _create_emummc_raw_action(lv_obj_t * btns, const char * txt)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "gui.h"
|
||||
#include "gui_tools.h"
|
||||
#include "gui_tools_partition_manager.h"
|
||||
#include "gui_emmc_tools.h"
|
||||
#include "fe_emummc_tools.h"
|
||||
#include "../../../common/memory_map.h"
|
||||
|
@ -1611,6 +1612,21 @@ static void _create_tab_tools_arc_autorcm(lv_theme_t *th, lv_obj_t *parent)
|
|||
label_sep = lv_label_create(h2, NULL);
|
||||
lv_label_set_static_text(label_sep, "");
|
||||
lv_obj_align(label_sep, label_txt4, LV_ALIGN_OUT_BOTTOM_LEFT, 0, LV_DPI * 11 / 7);
|
||||
|
||||
// Create Partition SD Card button.
|
||||
lv_obj_t *btn4 = lv_btn_create(h2, btn);
|
||||
label_btn = lv_label_create(btn4, NULL);
|
||||
lv_label_set_static_text(label_btn, SYMBOL_SD" Partition SD Card");
|
||||
lv_obj_align(btn4, label_txt4, LV_ALIGN_OUT_BOTTOM_LEFT, 0, LV_DPI / 2);
|
||||
lv_btn_set_action(btn4, LV_BTN_ACTION_CLICK, create_window_partition_manager);
|
||||
|
||||
label_txt2 = lv_label_create(h2, NULL);
|
||||
lv_label_set_recolor(label_txt2, true);
|
||||
lv_label_set_static_text(label_txt2,
|
||||
"Allows you to partition your SD Card for using it with #C7EA46 emuMMC#,\n"
|
||||
"#C7EA46 Android# and #C7EA46 Linux#. You can also flash Linux and Android.");
|
||||
lv_obj_set_style(label_txt2, &hint_small_style);
|
||||
lv_obj_align(label_txt2, btn4, LV_ALIGN_OUT_BOTTOM_LEFT, 0, LV_DPI / 3);
|
||||
}
|
||||
|
||||
void create_tab_tools(lv_theme_t *th, lv_obj_t *parent)
|
||||
|
|
2267
nyx/nyx_gui/frontend/gui_tools_partition_manager.c
Normal file
2267
nyx/nyx_gui/frontend/gui_tools_partition_manager.c
Normal file
File diff suppressed because it is too large
Load diff
22
nyx/nyx_gui/frontend/gui_tools_partition_manager.h
Normal file
22
nyx/nyx_gui/frontend/gui_tools_partition_manager.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020 CTCaer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _GUI_TOOLS_PART_MANAGER_H_
|
||||
#define _GUI_TOOLS_PART_MANAGER_H_
|
||||
|
||||
lv_res_t create_window_partition_manager(lv_obj_t *btn);
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue