[oe-commits] org.oe.dev slugos: Added NAS100d image support

rwhitby commit openembedded-commits at lists.openembedded.org
Tue Dec 26 21:19:54 UTC 2006


slugos: Added NAS100d image support

Author: rwhitby at nslu2-linux.org
Branch: org.openembedded.dev
Revision: 2710d036183d5424c82e22efdc8fff1070e81b92
ViewMTN: http://monotone.openembedded.org/revision.psp?id=2710d036183d5424c82e22efdc8fff1070e81b92
Files:
1
conf/distro/debianslug.conf
conf/distro/openslug.conf
packages/images/slugos-image.bb
packages/slugos-init/files/reflash
Diffs:

#
# mt diff -rf3f3d16da35f22b629571ec42fd9f4e74558d6d2 -r2710d036183d5424c82e22efdc8fff1070e81b92
#
# 
# 
# patch "conf/distro/debianslug.conf"
#  from [400b9b09e2683135ca7cb298427512c3f32f8f7d]
#    to [deb3dbde8232cc961a91257a8626156406322cbf]
# 
# patch "conf/distro/openslug.conf"
#  from [2fb503611e8ad2456231f397cb1fb92060ba8fab]
#    to [5721f339086c636d7f716a72d418823f856a1921]
# 
# patch "packages/images/slugos-image.bb"
#  from [9d0ccaeedb47f8dd43abb318e529aa71c58b50f6]
#    to [e11d42dbec781c60f4b5e7a463932cb9a58665eb]
# 
# patch "packages/slugos-init/files/reflash"
#  from [3a39f5ea29b40145eba2c41f11429645a3e26d9f]
#    to [f886fec2fbc2077f367a336963204a0a813979ea]
# 
============================================================
--- conf/distro/debianslug.conf	400b9b09e2683135ca7cb298427512c3f32f8f7d
+++ conf/distro/debianslug.conf	deb3dbde8232cc961a91257a8626156406322cbf
@@ -13,7 +13,7 @@ SLUGOS_IMAGESEX  = "little-endian"
 SLUGOS_IMAGESEX  = "little-endian"
 
 # debianslug builds a complete image (not just the parts)
-SLUGOS_FLASH_IMAGE = "nslu2"
+SLUGOS_FLASH_IMAGE = "1"
 
 # NOTE: to build new packages set DEBIANSLUG_EXTRA_BBFILES to the full path name to
 # the .bb files for the packages to build - see debianslug-packages.conf in this
============================================================
--- conf/distro/openslug.conf	2fb503611e8ad2456231f397cb1fb92060ba8fab
+++ conf/distro/openslug.conf	5721f339086c636d7f716a72d418823f856a1921
@@ -13,7 +13,7 @@ SLUGOS_IMAGESEX  = "big-endian"
 SLUGOS_IMAGESEX  = "big-endian"
 
 # openslug builds a complete image (not just the parts)
-SLUGOS_FLASH_IMAGE = "nslu2"
+SLUGOS_FLASH_IMAGE = "1"
 
 # NOTE: to build new packages set OPENSLUG_EXTRA_BBFILES to the full path name to
 # the .bb files for the packages to build - see ucslugc-packages.conf in this
============================================================
--- packages/images/slugos-image.bb	9d0ccaeedb47f8dd43abb318e529aa71c58b50f6
+++ packages/images/slugos-image.bb	e11d42dbec781c60f4b5e7a463932cb9a58665eb
@@ -6,7 +6,7 @@ LICENSE = "MIT"
 DESCRIPTION = "Generic SlugOS image"
 HOMEPAGE = "http://www.nslu2-linux.org"
 LICENSE = "MIT"
-PR = "r42"
+PR = "r43"
 
 COMPATIBLE_MACHINE = "nslu2"
 
@@ -111,50 +111,63 @@ python () {
 # LinkSys have made "EraseAll" available, however, (this does overwrite RedBoot)
 # it is a bad idea to produce flash images without a valid RedBoot - that allows
 # an innocent user upgrade attempt to instantly brick the NSLU2.
-PACK_IMAGE += "${@['', 'nslu2_pack_image;'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == 'nslu2']}"
+PACK_IMAGE += "${@['', 'slugos_pack_image;'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == '1']}"
 PACK_IMAGE_DEPENDS += "${@['', 'slugimage-native nslu2-linksys-firmware apex ixp4xx-npe'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == 'nslu2']}"
 
 NSLU2_SLUGIMAGE_ARGS ?= ""
 
-nslu2_pack_image() {
-	if test '${SLUGOS_FLASH_IMAGE}' = nslu2
-	then
-		install -d ${DEPLOY_DIR_IMAGE}/slug
-		install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \
-				${STAGING_LIBDIR}/nslu2-binaries/Trailer \
-				${STAGING_LIBDIR}/nslu2-binaries/SysConf \
-				${DEPLOY_DIR_IMAGE}/slug/
-		install -m 0644 ${STAGING_LOADER_DIR}/apex.bin ${DEPLOY_DIR_IMAGE}/slug/
-		install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${ARCH_BYTE_SEX} \
-			${DEPLOY_DIR_IMAGE}/slug/vmlinuz
-		install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
-			${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
-		install -m 0644 ${STAGING_FIRMWARE_DIR}/NPE-B ${DEPLOY_DIR_IMAGE}/slug/
-		cd ${DEPLOY_DIR_IMAGE}/slug
-		slugimage -p -b RedBoot -s SysConf -L apex.bin -k vmlinuz \
-			-r Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
-			-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flashdisk.img \
-			${NSLU2_SLUGIMAGE_ARGS}
-		rm -rf ${DEPLOY_DIR_IMAGE}/slug
+slugos_pack_image() {
+	install -d ${DEPLOY_DIR_IMAGE}/slug
+	install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \
+			${STAGING_LIBDIR}/nslu2-binaries/Trailer \
+			${STAGING_LIBDIR}/nslu2-binaries/SysConf \
+			${DEPLOY_DIR_IMAGE}/slug/
+	install -m 0644 ${STAGING_LOADER_DIR}/apex.bin ${DEPLOY_DIR_IMAGE}/slug/
+	install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${ARCH_BYTE_SEX} \
+		${DEPLOY_DIR_IMAGE}/slug/vmlinuz
+	install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+		${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
+	install -m 0644 ${STAGING_FIRMWARE_DIR}/NPE-B ${DEPLOY_DIR_IMAGE}/slug/
+	cd ${DEPLOY_DIR_IMAGE}/slug
+	slugimage -p -b RedBoot -s SysConf -L apex.bin -k vmlinuz \
+		-r Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
+		-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-nslu2.bin \
+		${NSLU2_SLUGIMAGE_ARGS}
+	rm -rf ${DEPLOY_DIR_IMAGE}/slug
 
-		# Create an image for the DSM-G600 as well
-		install -d ${DEPLOY_DIR_IMAGE}/firmupgrade
-		install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-dsmg600${ARCH_BYTE_SEX} \
-			${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk
-		install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
-			${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz
-		touch ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
-		chmod 0644 ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
-		echo "hwid=1.0.1"      >${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
-		echo "model=dsm-g600" >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
-		echo "vendor=dlink"   >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
-		echo ""               >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
-		chmod 0744 ${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
-		tar -c -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.dsmg600.bin \
-			-C ${DEPLOY_DIR_IMAGE} firmupgrade
-		rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade
+	# Create an image for the DSM-G600 as well
+	install -d ${DEPLOY_DIR_IMAGE}/firmupgrade
+	install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-dsmg600${ARCH_BYTE_SEX} \
+		${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk
+	install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+		${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz
+	touch ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
+	chmod 0644 ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
+	echo "hwid=1.0.1"      >${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo "model=dsm-g600" >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo "vendor=dlink"   >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo ""               >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	chmod 0744 ${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	tar -c -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-dsmg600.bin \
+		-C ${DEPLOY_DIR_IMAGE} firmupgrade
+	rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade
 
-	fi
+	# Create an image for the NAS 100d as well
+	install -d ${DEPLOY_DIR_IMAGE}/firmupgrade
+	install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nas100d${ARCH_BYTE_SEX} \
+		${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk
+	install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+		${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz
+	touch ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
+	chmod 0644 ${DEPLOY_DIR_IMAGE}/firmupgrade/usr.cramfs
+	echo "hwid=1.0.1"      >${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo "model=koala"    >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo "vendor=iomega"  >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	echo ""               >>${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	chmod 0744 ${DEPLOY_DIR_IMAGE}/firmupgrade/version.msg
+	tar -c -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-nas100d.bin \
+		-C ${DEPLOY_DIR_IMAGE} firmupgrade
+	rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade
 }
 
 # upslug2 (in tmp/work/upslug2-native-*) is the program to write the NSLU2 flash
============================================================
--- packages/slugos-init/files/reflash	3a39f5ea29b40145eba2c41f11429645a3e26d9f
+++ packages/slugos-init/files/reflash	f886fec2fbc2077f367a336963204a0a813979ea
@@ -17,21 +17,36 @@ nslu2)
 nslu2)
 	isnslu2=1
 	isdsmg600=
+	isnas100d=
 	imageok=1
+	apexpart="Loader"
 	usrpart=
 	kpart="Kernel"
 	ffspart="Flashdisk";;
+nas100d)
+	isnslu2=
+	isdsmg600=
+	isnas100d=1
+	imageok=1
+	apexpart=
+	usrpart="usr"
+	kpart="kernel"
+	ffspart="filesystem";;
 dsmg600)
 	isnslu2=
 	isdsmg600=1
+	isnas100d=
 	imageok=1
+	apexpart=
 	usrpart="usr"
 	kpart="kernel"
 	ffspart="filesystem";;
 *)
 	isnslu2=
 	isdsmg600=
+	isnas100d=
 	imageok=
+	apexpart=
 	usrpart=
 	kpart="kernel"
 	ffspart="filesystem";;
@@ -67,8 +82,8 @@ do
 		shift;;
 	-i)	shift
 		test -n "$imageok" || {
-			echo "reflash: -i: only supported on the LinkSys NSLU2"     >&2
-			echo " and the D-Link DSM-G600 systems; use -k and -j"      >&2
+			echo "reflash: -i: only supported on the LinkSys NSLU2,"     >&2
+			echo " Iomega NAS 100d and D-Link DSM-G600 systems; use -k and -j" >&2
 			echo " to specify the kernel and root file system instead." >&2
 			exit 1
 		}
@@ -123,8 +138,12 @@ then
 		# works in ash, no guarantees about other shells!
 		while read size base name
 		do
-			if test "$name" = "$kpart"
+			if test "$name" = "$apexpart"
 			then
+				imgapexsize="$size"
+				imgapexoffset="$base"
+			elif test "$name" = "$kpart"
+			then
 				imgksize="$size"
 				imgkoffset="$base"
 			elif test "$name" = "$ffspart"
@@ -180,7 +199,7 @@ EOI
 			echo "reflash: $imgfile: failed to find $ffspart" >&2
 			exit 1
 		}
-	elif test -r "$imgfile" -a -n "$isdsmg600"
+	elif test -r "$imgfile" -a \( -n "$isdsmg600" -o -n "$isnas100d" \)
 	then
 		#
 		# For the DSM-G600, this is really easy - the image is just
@@ -203,7 +222,7 @@ EOI
 		#       to make sure that it matches the native firmware's kernel
 		#       and rootfs that we're now flashing back onto the device.
 
-		echo "reflash: unpacking DSM-G600 image file" >&2
+		echo "reflash: unpacking DSM-G600/NAS-100d image file" >&2
 		tar -x -f "$imgfile" -C /var/tmp || {
 			echo "reflash: unable to unpack image file to be flashed" >&2
 			exit 1
@@ -224,7 +243,6 @@ EOI
 			echo "reflash: Native flash being restored" >&2
 			usrfile="/var/tmp/firmupgrade/usr.cramfs"
 			preserve_config=
-			dsmg600_native_flash=1
 		fi
 
 	else






More information about the Openembedded-commits mailing list