summaryrefslogtreecommitdiff
path: root/target/mipsel/Makefile
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2011-01-07 19:56:23 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-07 23:30:22 +0100
commit5ab78079fc70b8edbef2f04f852ad7bc3ccb2377 (patch)
tree4e71b7b6cbc1caf90d71a4e6d59d78cd6859821f /target/mipsel/Makefile
parentc5f31c89138e4bf5f7c2634f770e6b280a9cd334 (diff)
provide squashfs for bcm47xx including cfgfs partition
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'target/mipsel/Makefile')
-rw-r--r--target/mipsel/Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/target/mipsel/Makefile b/target/mipsel/Makefile
index d0aa6e5c9..8e1748a1f 100644
--- a/target/mipsel/Makefile
+++ b/target/mipsel/Makefile
@@ -5,6 +5,11 @@ include $(TOPDIR)/rules.mk
include $(TOPDIR)/mk/kernel.mk
include $(TOPDIR)/mk/modules.mk
include $(TOPDIR)/mk/kernel-build.mk
+
+ifeq (${ADK_TARGET_SYSTEM_LINKSYS_WRT54G},y)
+CUSTOM_ROOTFSSQUASHFS_BUILD=1
+endif
+
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/vmlinux
@@ -21,9 +26,18 @@ tools-compile: $(TOOLS_BUILD_DIR)
ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_WRT54G),y)
kernel-install: tools-compile
- $(TARGET_CROSS)objcopy $(OSTRIP) -S $(LINUX_DIR)/vmlinux \
- $(LINUX_DIR)/vmlinux.stripped
- @gzip -c9 $(LINUX_DIR)/vmlinux.stripped > $(BUILD_DIR)/$(TARGET_KERNEL)
+ ${TARGET_CROSS}objcopy ${OSTRIP} -S ${LINUX_DIR}/vmlinub.elf \
+ ${BUILD_DIR}/${TARGET_KERNEL}
+
+${BUILD_DIR}/${ROOTFSSQUASHFS}: ${BUILD_DIR}/root.squashfs
+ ${TARGET_CROSS}objcopy -O binary ${BUILD_DIR}/${TARGET_KERNEL} \
+ ${BUILD_DIR}/${TARGET_KERNEL}.bin
+ gzip -n9 <${BUILD_DIR}/${TARGET_KERNEL}.bin \
+ >${BUILD_DIR}/${TARGET_KERNEL}.bin.gz
+ printf '\0' >>${BUILD_DIR}/${TARGET_KERNEL}.bin.gz
+ PATH='${TARGET_PATH}' trx -o $@~ ${BUILD_DIR}/${TARGET_KERNEL}.bin.gz \
+ -a 1024 ${BUILD_DIR}/root.squashfs
+ PATH='${TARGET_PATH}' addpattern -4 -p W54G -v v4.20.6 -g -i $@~ -o $@
endif
ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_AG241),y)
@@ -49,7 +63,7 @@ imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL)
@echo "If you just want to update, use adkupdate."
endif
ifeq ($(ADK_TARGET_FS),squashfs)
-imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSSQUASHFS)
+imageinstall: kernel-install ${BUILD_DIR}/${ROOTFSSQUASHFS}
@if [ $$(stat -f %z ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 3801088 ];then \
echo 'Image is too big!'; \
else \