mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
01262c921c
The name of squashfs is confusing since in reality it's a really old version using an old lzma library. This tools is used for old ath79 netgear target and to produde a fake squasfs3 image needed for some specific bootloader from some OEM (AVM for example) Rename squashfs tool to squasfs3-lzma to better describe it. Rename the installed bin from mksquashfs-lzma to mksquashfs3-lzma. Use tar transform to migrate the root directory in tar to the new naming. Drop redundant PKG_CAT variable not needed anymore. Also update any user of this tool. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
40 lines
1.2 KiB
Makefile
40 lines
1.2 KiB
Makefile
define Build/netgear-rootfs
|
|
mkimage \
|
|
-A mips -O linux -T filesystem -C none \
|
|
$(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
|
|
-n '$(VERSION_DIST) filesystem' \
|
|
-d $(IMAGE_ROOTFS) $@.fs
|
|
cat $@.fs >> $@
|
|
rm -rf $@.fs
|
|
endef
|
|
|
|
define Build/netgear-squashfs
|
|
rm -rf $@.fs $@.squashfs
|
|
mkdir -p $@.fs/image
|
|
cp $@ $@.fs/image/uImage
|
|
$(STAGING_DIR_HOST)/bin/mksquashfs3-lzma \
|
|
$@.fs $@.squashfs -be \
|
|
-noappend -root-owned -b 65536 \
|
|
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
|
|
|
dd if=/dev/zero bs=1k count=1 >> $@.squashfs
|
|
mkimage \
|
|
-A mips -O linux -T filesystem -C none \
|
|
$(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
|
|
-a 0xbf070000 -e 0xbf070000 \
|
|
-n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
|
|
-d $@.squashfs $@
|
|
rm -rf $@.squashfs $@.fs
|
|
endef
|
|
|
|
define Device/netgear_generic
|
|
DEVICE_VENDOR := NETGEAR
|
|
KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma
|
|
IMAGES += factory.img
|
|
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
|
netgear-squashfs | append-rootfs | pad-rootfs
|
|
IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
|
|
IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size
|
|
endef
|