Skip to contentSkip to conversation

target/cramfs/cramfs.mk: Fix device table not being passed to mkcramfs

PATCH New Jared Holzman 3 participants 3 messages Dec 2, 2008 – Dec 3, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/cramfs/cramfs.mk: Fix device table not being passed to mkcramfs

While mkcramfs was being patched to support a device table, the target device table was not being passed to the mkcramfs options. This patch fixes that

cramfs/cramfs.mk +7 -3
Index: target/cramfs/cramfs.mk
===================================================================
@@ -40,11 +40,15 @@
 #
 #############################################################
 ifeq ($(BR2_ENDIAN),"BIG")
-CRAMFS_ENDIANNESS=-b
+CRAMFS_OPTS=-b
 else
-CRAMFS_ENDIANNESS=-l
+CRAMFS_OPTS=-l
 endif
 
+ifneq ($(TARGET_DEVICE_TABLE),)
+CRAMFS_OPTS += -D $(TARGET_DEVICE_TABLE)
+endif
+
 CRAMFS_TARGET=$(IMAGE).cramfs
 
 cramfsroot: host-fakeroot makedevs cramfs
@@ -68,7 +72,7 @@
 		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 endif
 	# Use fakeroot so mkcramfs believes the previous fakery
-	echo "$(CRAMFS_DIR)/mkcramfs -q $(CRAMFS_ENDIANNESS) " \
+	echo "$(CRAMFS_DIR)/mkcramfs -q $(CRAMFS_OPTS) " \
 		"$(TARGET_DIR) $(CRAMFS_TARGET)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 	$(STAGING_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))

---

Regards,

Jared Holzman

------------------------------------------------------------------------

*Electronics Design Engineer*

*Genesys Electronics Design Pty Ltd*

Unit 5, 33 Ryde Rd Pymble

NSW, Australia 2073

Direct: +612 9496 8924

Phone: +612 9496 8900

Fax: +612 9496 8999

j.holzman at genesysdesign.com.au <mailto:[email protected]>

www.genesysdesign.com.au <http://www.genesysdesign.com.au>

------------------------------------------------------------------------

#1 lore raw

PATCH 1/1 target/cramfs/cramfs.mk: Fix device table not being passed to mkcramfs

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jared" == Jared Holzman <[email protected]> writes:

Hi,

Jared> While mkcramfs was being patched to support a device table, Jared> the target device table was not being passed to the mkcramfs Jared> options. This patch fixes that

Thanks, committed as r24228.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 target/cramfs/cramfs.mk: Fix device table not being passed to mkcramfs

Quoted 9 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jared" == Jared Holzman <[email protected]> writes:

Hi,

Jared> While mkcramfs was being patched to support a device table, Jared> the target device table was not being passed to the mkcramfs Jared> options. This patch fixes that

Thanks, committed as r24228.

Whoa! Has this been tested?

The device table is processed by running makedevs within the fakeroot session, rather than relying on mkcramfs's device table support. (Same as in many other buildroot targets, even though most of them have device table support too.) Now the device table is being used twice, which may or may not work?

Hamish

Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>