Skip to content

Commit

Permalink
kptools, failed when CONFIG_KALLSYMS_ALL=n
Browse files Browse the repository at this point in the history
  • Loading branch information
bmax committed Jan 4, 2024
1 parent 123f32d commit 5a08d3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions tools/kptools.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,15 @@ int patch_image()

preset->memstart_addr_offset = get_symbol_offset(&kallsym, image_buf, "memstart_addr");
if (preset->memstart_addr_offset < 0) preset->memstart_addr_offset = 0;
if (!preset->memstart_addr_offset) {
fprintf(stdout, "[!] kptools ==== warring ====\n");
fprintf(stdout, "[!] kptools ==== warring ====\n");
fprintf(stdout, "[!] kptools It seems that CONFIG_KALLSYMS_ALL=y is not enabled in the kernel.\n");
fprintf(stdout, "[!] kptools It is recommended that you do not flash it and wait for support.\n");
fprintf(stdout, "[!] kptools ==== warring ====\n");
fprintf(stdout, "[!] kptools ==== warring ====\n");
return -1;
}

if (kallsym.version.major >= 6) preset->vabits_flag = 1;
if (get_symbol_offset(&kallsym, image_buf, "vabits_actual") > 0) preset->vabits_flag = 1;
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define MAJOR 0
#define MINOR 8
#define PATCH 2
#define PATCH 3

0 comments on commit 5a08d3d

Please sign in to comment.