Hi mailinglist,

Please find attached a simple patchset which solved some of the issues, I introduced in a forum thread: https://forum.openwrt.org/viewtopic.php?id=27043

SeagateDockstar - kirkwood derivative
- squashfs and overlay support (u-boot config)
- pad jffs2-128k to 128k (as the name implies)
- create proper squashfs image

I'm new here. Please let me know, how to speed up the process to commit these patches in mainline (and where they break your guidelines).

Is svn diff ok, or do you prefere git format-patch?

btw: mv_cesa should rely on crypto_aes like kmod-crypto-hw-padlock:
https://dev.openwrt.org/ticket/7643

Regards,
Ossy
this patch adds squashfs support to the feature list of the dockstar profile

Signed-off-by: marcus.osd...@googlemail.com
---
Index: target/linux/kirkwood/Makefile
===================================================================
--- target/linux/kirkwood/Makefile      (Revision 23697)
+++ target/linux/kirkwood/Makefile      (Arbeitskopie)
@@ -9,7 +9,7 @@
 ARCH:=arm
 BOARD:=kirkwood
 BOARDNAME:=Marvell Kirkwood
-FEATURES:=targz usb jffs2
+FEATURES:=targz usb jffs2 squashfs
 MAINTAINER:=Imre Kaloz <ka...@openwrt.org>
 
 LINUX_VERSION:=2.6.35.7
pad the kernel to 128k,
pad jffs2-128k really to 128k as the name implies,
create a plain padded squashfs (without uImage in front)
this does not break history, since the image WITH uImage 
in front is still created in parallel


Signed-off-by: marcus.osd...@googlemail.com
---
Index: target/linux/kirkwood/image/Makefile
===================================================================
--- target/linux/kirkwood/image/Makefile        (Revision 23697)
+++ target/linux/kirkwood/image/Makefile        (Arbeitskopie)
@@ -15,7 +15,7 @@
 
 define Image/BuildKernel
 # do mach-id fixup here, if needed
-       cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
+       dd if=$(KDIR)/uImage of=$(BIN_DIR)/$(IMG_PREFIX)-uImage bs=128k 
conv=sync
 endef
 
 define Image/Build
@@ -27,15 +27,17 @@
 
 define Image/Build/jffs2-128k
        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img 
\
-               bs=2048 conv=sync
+       bs=128k conv=sync
 endef
 
 define Image/Build/squashfs
        $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+       dd if=$(KDIR)/root.$(1) bs=128k conv=sync \
+       of=$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img
        ( \
                dd if=$(KDIR)/uImage bs=4096k conv=sync; \
                dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
-       ) > $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-uImage-$(1).img
 endef
 
 $(eval $(call BuildImage))
squashfs added as alternative to rootfstype, must be in order squashfs,jffs2
tested on dockstar with both jffs2 and squashfs - openwrt was started in both 
cases
without updating the bootparameters,

rename data to rootfs_data since squashfs-version needs to have some overlay;
unfortunatly, the jffs2 version creates an overlay, too...
maybe this is not desired, but the situtation is not worse than before, since
one has to update the bootparmeters for using squashfs and overlay on two 
places, now only one


Signed-off-by: marcus.osd...@googlemail.com
---
Index: package/uboot-kirkwood/files/include/configs/dockstar.h
===================================================================
--- package/uboot-kirkwood/files/include/configs/dockstar.h     (Revision 23697)
+++ package/uboot-kirkwood/files/include/configs/dockstar.h     (Arbeitskopie)
@@ -133,15 +133,18 @@
        "setenv bootargs ${x_bootargs} ${x_bootargs_root}; "    \
        "${x_bootcmd_usb}; bootm 0x6400000;"
 
-#define CONFIG_MTDPARTS                "orion_nand:1M(u-boot),"        \
+#define CONFIG_MTDPARTS                \
+       "orion_nand:1M(u-boot)," \
        "1...@1m(second_stage_u-boot)," \
-       "3...@2m(kernel),3...@5m(rootfs),2...@37m(data) rw\0"
+       "3...@2m(kernel)," \
+       "3...@5m(rootfs)," \
+       "2...@37m(rootfs_data)\0"
 
 #define CONFIG_EXTRA_ENV_SETTINGS      "x_bootargs=console"    \
        "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS        \
        "x_bootcmd_kernel=nand read 0x6400000 0x200000 0x300000\0" \
        "x_bootcmd_usb=usb start\0" \
-       "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
+       "x_bootargs_root=root=/dev/mtdblock3 ro rootfstype=squashfs,jffs2\0"
 
 /*
  * Size of malloc() pool
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to