mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
fix(arm): Add armv81 alias support and resolve 32-bit pointer cast warning
- Support 'armv81' and 'armv81_defconfig' aliases in Makefile and Kconfig menuconfig.py - Fix uint64_t to pointer cast on 32-bit ARM in LazyBox shell.c
This commit is contained in:
1 parent
b627de0bcf
commit
52c81e3f8d
3 files changed
+7
-7
No files matched your search
@@ -83,7 +83,7 @@ else ifneq ($(filter $(ARCH), aarch64 arm64),)
|
|||||||
TARGET = $(BUILD_DIR)/kernel.elf
|
TARGET = $(BUILD_DIR)/kernel.elf
|
||||||
QEMU_CMD = qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -nographic -kernel $(BUILD_DIR)/kernel.elf
|
QEMU_CMD = qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -nographic -kernel $(BUILD_DIR)/kernel.elf
|
||||||
|
|
||||||
else ifneq ($(filter $(ARCH), armv8i arm32 arm),)
|
else ifneq ($(filter $(ARCH), armv8i armv81 arm32 arm armv7 armv7-a armv7a aarch32),)
|
||||||
CROSS_COMPILE ?= arm-linux-gnueabihf-
|
CROSS_COMPILE ?= arm-linux-gnueabihf-
|
||||||
CC = $(CROSS_COMPILE)gcc
|
CC = $(CROSS_COMPILE)gcc
|
||||||
LD = $(CROSS_COMPILE)ld
|
LD = $(CROSS_COMPILE)ld
|
||||||
@@ -300,7 +300,7 @@ else
|
|||||||
OTHER_OBJS = $(filter-out $(ENTRY_OBJ), $(S_OBJS) $(C_OBJS))
|
OTHER_OBJS = $(filter-out $(ENTRY_OBJ), $(S_OBJS) $(C_OBJS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all clean run debug info configure menuconfig config tui nconfig defconfig x86_64_defconfig aarch64_defconfig armv8_defconfig armv8i_defconfig qemu help
|
.PHONY: all clean run debug info configure menuconfig config tui nconfig defconfig x86_64_defconfig aarch64_defconfig armv8_defconfig armv8i_defconfig armv81_defconfig arm32_defconfig qemu help
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ x86_64_defconfig:
|
|||||||
aarch64_defconfig:
|
aarch64_defconfig:
|
||||||
@python3 scripts/kconfig/menuconfig.py --aarch64
|
@python3 scripts/kconfig/menuconfig.py --aarch64
|
||||||
|
|
||||||
armv8_defconfig armv8i_defconfig arm32_defconfig:
|
armv8_defconfig armv8i_defconfig armv81_defconfig arm32_defconfig:
|
||||||
@python3 scripts/kconfig/menuconfig.py --armv8i
|
@python3 scripts/kconfig/menuconfig.py --armv8i
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -711,7 +711,7 @@ def defconfig(arch="x86_64"):
|
|||||||
cfg["CONFIG_ARCH_X86_64"] = False
|
cfg["CONFIG_ARCH_X86_64"] = False
|
||||||
cfg["CONFIG_ARCH_AARCH64"] = True
|
cfg["CONFIG_ARCH_AARCH64"] = True
|
||||||
cfg["CONFIG_ARCH_ARMV8I"] = False
|
cfg["CONFIG_ARCH_ARMV8I"] = False
|
||||||
elif arch in ["armv8i", "arm32", "arm", "armv8"]:
|
elif arch in ["armv8i", "armv81", "arm32", "arm", "armv8", "aarch32"]:
|
||||||
cfg["CONFIG_ARCH_X86_64"] = False
|
cfg["CONFIG_ARCH_X86_64"] = False
|
||||||
cfg["CONFIG_ARCH_AARCH64"] = False
|
cfg["CONFIG_ARCH_AARCH64"] = False
|
||||||
cfg["CONFIG_ARCH_ARMV8I"] = True
|
cfg["CONFIG_ARCH_ARMV8I"] = True
|
||||||
@@ -728,10 +728,10 @@ def main():
|
|||||||
elif cmd == "--x86_64":
|
elif cmd == "--x86_64":
|
||||||
defconfig("x86_64")
|
defconfig("x86_64")
|
||||||
return
|
return
|
||||||
elif cmd in ["--aarch64", "--armv8"]:
|
elif cmd in ["--aarch64", "--armv8", "--arm64"]:
|
||||||
defconfig("aarch64")
|
defconfig("aarch64")
|
||||||
return
|
return
|
||||||
elif cmd == "--armv8i":
|
elif cmd in ["--armv8i", "--armv81", "--arm32", "--arm", "--aarch32"]:
|
||||||
defconfig("armv8i")
|
defconfig("armv8i")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ static void cmd_hexdump(const char* args) {
|
|||||||
}
|
}
|
||||||
if (len > 512) len = 512;
|
if (len > 512) len = 512;
|
||||||
|
|
||||||
uint8_t* ptr = (uint8_t*)addr;
|
uint8_t* ptr = (uint8_t*)(uintptr_t)addr;
|
||||||
printk("Hexdump of 0x%lx (%llu bytes):\n", addr, len);
|
printk("Hexdump of 0x%lx (%llu bytes):\n", addr, len);
|
||||||
for (uint64_t i = 0; i < len; i += 16) {
|
for (uint64_t i = 0; i < len; i += 16) {
|
||||||
printk(ANSI_BRIGHT_BLACK "%016lx: " ANSI_RESET, addr + i);
|
printk(ANSI_BRIGHT_BLACK "%016lx: " ANSI_RESET, addr + i);
|
||||||
|
|||||||
Reference in new issue
Block a user