Skip to content

Commit

Permalink
mix: init
Browse files Browse the repository at this point in the history
  • Loading branch information
honge committed May 7, 2024
2 parents 224ec8a + 5e17c05 commit c3b712b
Show file tree
Hide file tree
Showing 3,395 changed files with 422,244 additions and 290,030 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ config KERNEL_ARM_PMU
default n
depends on (arm || aarch64)

config KERNEL_RISCV_PMU
bool
select KERNEL_RISCV_PMU_SBI
depends on riscv64

config KERNEL_RISCV_PMU_SBI
bool
depends on riscv64

config KERNEL_X86_VSYSCALL_EMULATION
bool "Enable vsyscall emulation"
default n
Expand All @@ -72,6 +81,7 @@ config KERNEL_PERF_EVENTS
bool "Compile the kernel with performance events and counters"
default n
select KERNEL_ARM_PMU if (arm || aarch64)
select KERNEL_RISCV_PMU if riscv64

config KERNEL_PROFILING
bool "Compile the kernel with profiling enabled"
Expand Down
2 changes: 1 addition & 1 deletion include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ define Build/fit
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
$(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \
$(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
Expand Down
52 changes: 42 additions & 10 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ endif


# Disable noisy checks by default as in upstream
DTC_FLAGS += \
DTC_WARN_FLAGS := \
-Wno-unit_address_vs_reg \
-Wno-simple_bus_reg \
-Wno-unit_address_format \
Expand All @@ -159,6 +159,9 @@ DTC_FLAGS += \
-Wno-graph_port \
-Wno-unique_unit_address

DTC_FLAGS += $(DTC_WARN_FLAGS)
DTCO_FLAGS += $(DTC_WARN_FLAGS)

define Image/pad-to
dd if=$(1) of=$(1).new bs=$(2) conv=sync
mv $(1).new $(1)
Expand All @@ -174,7 +177,7 @@ endef
# $(2) target dtb file
# $(3) extra CPP flags
# $(4) extra DTC flags
define Image/BuildDTB
define Image/BuildDTB/sub
$(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \
$(DTS_CPPFLAGS) \
-I$(DTS_DIR) \
Expand All @@ -183,12 +186,20 @@ define Image/BuildDTB
-undef -D__DTS__ $(3) \
-o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
-i$(dir $(1)) $(DTC_FLAGS) $(4) \
-i$(dir $(1)) $(4) \
$(if $(CONFIG_HAS_DT_OVERLAY_SUPPORT),-@) \
-o $(2) $(2).tmp
$(RM) $(2).tmp
endef

define Image/BuildDTB
$(call Image/BuildDTB/sub,$(1),$(2),$(3),$(DTC_FLAGS) $(DEVICE_DTC_FLAGS) $(4))
endef

define Image/BuildDTBO
$(call Image/BuildDTB/sub,$(1),$(2),$(3),$(DTCO_FLAGS) $(DEVICE_DTCO_FLAGS) $(4))
endef

define Image/mkfs/jffs2/sub-raw
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
$(2) \
Expand Down Expand Up @@ -400,6 +411,8 @@ define Device/Init
DEVICE_DTS_LOADADDR :=
DEVICE_DTS_OVERLAY :=
DEVICE_FDT_NUM :=
DEVICE_DTC_FLAGS :=
DEVICE_DTCO_FLAGS :=
SOC :=

BOARD_NAME :=
Expand All @@ -422,9 +435,9 @@ endef
DEFAULT_DEVICE_VARS := \
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER DEVICE_DTS_DIR DEVICE_DTS_OVERLAY \
DEVICE_DTS_LOADADDR \
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTC_FLAGS \
DEVICE_DTCO_FLAGS DEVICE_DTS DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER \
DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_DTS_LOADADDR \
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
UIMAGE_TIME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \
Expand Down Expand Up @@ -551,19 +564,36 @@ define Device/Build/dtb
$(KDIR)/image-$(1).dtb: FORCE
$(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)

image_prepare: $(KDIR)/image-$(1).dtb
compile-dtb: $(KDIR)/image-$(1).dtb
endif

endef

define Device/Build/dtbo
ifndef BUILD_DTSO_$(1)
BUILD_DTSO_$(1) := 1
$(KDIR)/image-$(1).dtbo: FORCE
$(call Image/BuildDTBO,$(strip $(2))/$(strip $(3)).dtso,$$@)

compile-dtb: $(KDIR)/image-$(1).dtbo
endif

endef
endif

define Device/Build/kernel
$$(eval $$(foreach dts,$$(DEVICE_DTS) $$(DEVICE_DTS_OVERLAY), \
$$(eval $$(foreach dts,$$(DEVICE_DTS), \
$$(call Device/Build/dtb,$$(notdir $$(dts)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dts) \
) \
))
$$(eval $$(foreach dtso,$$(DEVICE_DTS_OVERLAY), \
$$(call Device/Build/dtbo,$$(notdir $$(dtso)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dtso) \
) \
))

$(KDIR)/$$(KERNEL_NAME):: image_prepare
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
Expand Down Expand Up @@ -782,18 +812,20 @@ define BuildImage
download:
prepare:
compile:
compile-dtb:
clean:
image_prepare:

ifeq ($(IB),)
.PHONY: download prepare compile clean image_prepare kernel_prepare install install-images
.PHONY: download prepare compile compile-dtb clean image_prepare kernel_prepare install install-images
compile:
$(call Build/Compile)

clean:
$(call Build/Clean)

image_prepare: compile
compile-dtb:
image_prepare: compile compile-dtb
mkdir -p $(BIN_DIR) $(KDIR)/tmp
rm -rf $(BUILD_DIR)/json_info_files
$(call Image/Prepare)
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.10
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .209
LINUX_KERNEL_HASH-5.10.209 = 44e22fad647c638726a8eae23703c4263bead612d17c89ca7ad7ab32b5ce88d5
LINUX_VERSION-5.10 = .216
LINUX_KERNEL_HASH-5.10.216 = e310588c4b23f0959614e60f007afc20e9b1a8f296d682b041fa129f96fbe151
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .148
LINUX_KERNEL_HASH-5.15.148 = c48575c97fd9f4767cbe50a13b1b2b40ee42830aba3182fabd35a03259a6e5d8
LINUX_VERSION-5.15 = .158
LINUX_KERNEL_HASH-5.15.158 = f9071c83a4fd8b80af026b48cfc1869bfa25883f9148b92b5dc1e1e1e26dd5c6
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .268
LINUX_KERNEL_HASH-5.4.268 = afc8aca6cb56fea489f6508bc24357df1cf8a8f3d7dcfbcccd94b7f968492620
LINUX_VERSION-5.4 = .275
LINUX_KERNEL_HASH-5.4.275 = dad2b068946f0ca0026130d7ab17601d5074d90b381379c4479314d4edf4304c
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .75
LINUX_KERNEL_HASH-6.1.75 = 6cd19410330c13ec4c18fd28a83d3e40fc12a152815fb7c3e1b0764329093a56
LINUX_VERSION-6.1 = .90
LINUX_KERNEL_HASH-6.1.90 = 83a3d72e764fceda2c1fc68a4ea6b91253a28da56a688a2b61776b0d19788e1d
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .14
LINUX_KERNEL_HASH-6.6.14 = fbe96b2db3f962cd2a96a849d554300e7a4555995160082d4f323c2a1dfa1584
LINUX_VERSION-6.6 = .30
LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6
4 changes: 4 additions & 0 deletions include/kernel-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ define BuildKernel
compile: $(LINUX_DIR)/.modules
$(MAKE) -C image compile TARGET_BUILD=

dtb: $(STAMP_CONFIGURED)
$(_SINGLE)$(KERNEL_MAKE) scripts_dtc
$(MAKE) -C image compile-dtb TARGET_BUILD=

oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
rm -f $(LINUX_DIR)/.config.prev
rm -f $(STAMP_CONFIGURED)
Expand Down
3 changes: 3 additions & 0 deletions include/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
ifeq ($(MAKECMDGOALS),prereq)
SUBTARGETS:=prereq
PREREQ_ONLY:=1
# For target/linux related target add dtb to selectively compile dtbs
else ifneq ($(filter target/linux/%,$(MAKECMDGOALS)),)
SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) dtb
else
SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS)
endif
Expand Down
1 change: 1 addition & 0 deletions package/base-files/files/lib/functions/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ mmc_get_mac_ascii() {
part=$(find_mmc_part "$part_name")
if [ -z "$part" ]; then
echo "mmc_get_mac_ascii: partition $part_name not found!" >&2
return
fi

get_mac_ascii "$part" "$key"
Expand Down
Loading

0 comments on commit c3b712b

Please sign in to comment.