This adds image generation for the ALL6000.
As U-Boot supports loading the kernel out of an UBIFS volume, I added a
menu option which allows the user to choose to include the uImage in the rootfs.

I got board-support for the ALL6000 to get into U-Boot as well, but it's for
U-Boot 2012.04.01.
So this obviously makes much more sense if my previous patches which update
U-Boot to version 2012.04.01 (which wasn't meant to be an April Fool) get
applyed. See:
https://lists.openwrt.org/pipermail/openwrt-devel/2012-May/015291.html
and the follow-ups which update the OpenWrt-specific boards for that version of
U-Boot.

Signed-off-by: Daniel Golle <dgo...@allnet.de>

diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index c93be67..80b5c01 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -8,9 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
+UBIFS_OPTS = -m 2048 -e 126KiB -c 8192 -U
+UBINIZE_OPTS = -m 2048 -p 128KiB -s 512
 
 define Image/Prepare
        cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
+       $(if $(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL), \
+               $(CP) $(LINUX_DIR)/arch/arm/boot/uImage $(TARGET_DIR)/uImage )
 endef
 
 define Image/BuildKernel
diff --git a/target/linux/kirkwood/image/ubinize.cfg 
b/target/linux/kirkwood/image/ubinize.cfg
new file mode 100644
index 0000000..7de73a6
--- /dev/null
+++ b/target/linux/kirkwood/image/ubinize.cfg
@@ -0,0 +1,25 @@
+[rootfs]
+# Volume mode (other option is dynamic)
+mode=ubi
+# Source image
+image=root.ubifs
+# Volume ID in UBI image
+vol_id=0
+# Don't allow dynamic resize for this volume
+vol_type=static
+# Volume name
+vol_name=rootfs
+
+[rootfs_data]
+# Volume mode (other option is static)
+mode=ubi
+# Volume size is 0 for now
+vol_size=256KiB
+# Volume ID in UBI image
+vol_id=1
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs_data
+# Autoresize volume at first mount
+vol_flags=autoresize
diff --git a/target/linux/kirkwood/profiles/400-ALL6000.mk 
b/target/linux/kirkwood/profiles/400-ALL6000.mk
new file mode 100644
index 0000000..b982147
--- /dev/null
+++ b/target/linux/kirkwood/profiles/400-ALL6000.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/ALL6000
+  NAME:=Allnet ALL6000
+  PACKAGES:=kmod-i2c-mv64xxx kmod-ata-marvell-sata
+endef
+
+define Profile/ALL6000/Description
+       Allnet ALL6000 platform
+endef
+
+$(eval $(call Profile,ALL6000))
diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
index da44def..cfdcef1 100644
--- a/target/linux/kirkwood/Makefile
+++ b/target/linux/kirkwood/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=kirkwood
 BOARDNAME:=Marvell Kirkwood
-FEATURES:=targz usb jffs2
+FEATURES:=targz usb jffs2 ubifs
 MAINTAINER:=Imre Kaloz <ka...@openwrt.org>
 
 LINUX_VERSION:=3.3.7
diff --git a/Config.in b/Config.in
index c288cfb..0fac43f 100644
--- a/Config.in
+++ b/Config.in
@@ -125,6 +125,14 @@ menu "Target Images"
                help
                    Allows you to change the maximum number of inodes in the 
root filesystem
 
+       config TARGET_ROOTFS_INCLUDE_KERNEL
+               bool "include kernel in rootfs"
+               depends TARGET_ROOTFS_UBIFS || X86_GRUB_IMAGES || 
TARGET_ROOTFS_EXT4FS
+               default y if USES_UBIFS
+               help
+                   Include the Kernel image in the rootfs.
+                   This only makes sense if the bootloader is capable of 
reading the kernel
+                   from inside the filesystem.
 endmenu
 
 menu "Global build settings"

Attachment: pgpmWoJ67MVt6.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to