mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
cc8228dbc6
my-mkimage previously did not include the fs_mark of deadc0de because upon formatting of jffs2 partition, U-Boot's CRC validation would not allow the image to boot. This new MTD map will shrink the kernel+rootfs+fs_mark image and recalculate the CRC, so that only the kernel is part of the image validation. This also improves boot time, since less is copied from FLASH->RAM. This is mostly from brcm47xx, just with u-boot image vs TRX partitions. Signed-off-by: Scott Nicholas <scott.nicholas@scottn.us> SVN-Revision: 25176
30 lines
719 B
Makefile
30 lines
719 B
Makefile
#
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
define Build/Clean
|
|
$(MAKE) -C lzma-loader clean
|
|
endef
|
|
|
|
define Image/Prepare
|
|
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
|
|
$(MAKE) -C lzma-loader \
|
|
KDIR="$(KDIR)" \
|
|
clean compile
|
|
rm -f $(KDIR)/fs_mark
|
|
touch $(KDIR)/fs_mark
|
|
$(call prepare_generic_squashfs,$(KDIR)/fs_mark)
|
|
endef
|
|
|
|
define Image/Build
|
|
./my-mkimage $(KDIR)/loader.bin $(KDIR)/root.squashfs \
|
|
$(KDIR)/fs_mark $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
|
|
endef
|
|
|
|
$(eval $(call BuildImage))
|