mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 01:17:30 +01:00
The Raidsonic devices do not use a 2048k kernel "Kern" partition like the Storlink reference designs. Instead it uses a 3072k partition to fit a slightly larger kernel. Sadly the current OpenWrt Gemini kernel is still bigger than 3072k so we need to make use of the Ramdisk partition as well. Create a special "copy-kernel" version that can deal with the Raidsonic 3072k kernels. Tested on the Raidsonic IB-4220-B booting kernel v6.12.66. Fix a copy/paste error in the image generation makefile while we are at it. Link: https://github.com/openwrt/openwrt/pull/21686 Signed-off-by: Linus Walleij <linusw@kernel.org>
39 lines
958 B
Makefile
39 lines
958 B
Makefile
#
|
|
# Makefile for Gemin kernel copy stub
|
|
#
|
|
# Copyright (C) 2019 Linus Walleij <linus.walleij@linaro.org>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU General Public License version 2 as published
|
|
# by the Free Software Foundation.
|
|
#
|
|
|
|
AS := $(CROSS_COMPILE)as
|
|
OBJCOPY := $(CROSS_COMPILE)objcopy
|
|
|
|
BIN_FLAGS := -O binary -S
|
|
|
|
SRC_DIR := $(CURDIR)/
|
|
OUT_DIR := $(if $(O),$(if $(patsubst %/,,$(O)),$(O)/,$(O)),$(SRC_DIR))
|
|
|
|
all: $(OUT_DIR)copy-kernel-2048k.bin $(OUT_DIR)copy-kernel-3072k.bin
|
|
|
|
# Don't build dependencies, this may die if $(CC) isn't gcc
|
|
dep:
|
|
|
|
install:
|
|
|
|
$(OUT_DIR):
|
|
mkdir -p $(OUT_DIR)
|
|
|
|
$(OUT_DIR)%.o : $(SRC_DIR)%.S | $(OUT_DIR)
|
|
$(AS) $(ASFLAGS) -k -o $@ $<
|
|
|
|
$(OUT_DIR)%.bin: $(OUT_DIR)%.o
|
|
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
|
|
|
mrproper: clean
|
|
|
|
clean:
|
|
rm -f $(OUT_DIR)copy-kernel-2048k.bin $(OUT_DIR)copy-kernel-2048k.o
|
|
rm -f $(OUT_DIR)copy-kernel-3072k.bin $(OUT_DIR)copy-kernel-3072k.o
|