diff --git a/Config.mk b/Config.mk
index 58b6565..6f158e6 100644
--- a/Config.mk
+++ b/Config.mk
@@ -36,6 +36,9 @@ INITRD_BOOTMENU=y
 # Say 'y' here to build the olpcflash utility
 INITRD_OLPCFLASH=y
 
+# say 'y' here to build a full rom image with lzma compression
+#LZMA_PACKAGE=y
+
 # say 'y' here to build a full rom image (minus the vsa)
 LINUXBIOS_PACKAGE=y
 
@@ -45,9 +48,13 @@ LINUXBIOS_PACKAGE=y
 PAYLOAD_TARGET=$(OUTPUT_DIR)/olpc-payload.elf
 
 # Uncomment this to select the NRV2B compressed payload
-# NOTE!  This doesn't work right now!
 #PAYLOAD_TARGET=$(OUTPUT_DIR)/olpc-payload.elf.nrv2b
 
+ifeq ($(LZMA_PACKAGE), y)
+# Uncomment this to select the LZMA compressed payload
+PAYLOAD_TARGET=$(OUTPUT_DIR)/olpc-payload.elf.lzma
+endif
+
 ###########################################
 # You shouldn't change anything under this point
 ###########################################
@@ -82,6 +89,10 @@ ifeq ($(INITRD_KEXEC_TOOLS),y)
 INITRD_PACKAGES += kexec-tools
 endif
 
+ifeq ($(LZMA_PACKAGE), y)
+TARGETS += lzma
+endif
+
 ifeq ($(LINUXBIOS_PACKAGE), y)
 TARGETS += linuxbios
 endif
diff --git a/Makefile b/Makefile
index d5c146a..b6bf195 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,10 @@ include Vars.mk
 
 PKGLIST=uclibc kernel $(INITRD_PACKAGES)
 
+ifeq ($(LZMA_PACKAGE),y)
+PKGLIST += lzma
+endif
+
 ifeq ($(LINUXBIOS_PACKAGE),y)
 PKGLIST += linuxbios
 endif
@@ -71,6 +75,13 @@ $(OUTPUT_DIR)/olpc-payload.elf.nrv2b: nr
 	2>/dev/null $@
 	@ $(BIN_DIR)/checkrom.sh $@
 
+$(OUTPUT_DIR)/olpc-payload.elf.lzma: lzma $(OUTPUT_DIR)/olpc-payload-uncompressed.elf
+	@ echo "Compressing the ELF payload with lzma..."
+	@ $(STAGING_DIR)/bin/lzma e \
+	$(OUTPUT_DIR)/olpc-payload-uncompressed.elf \
+	2>/dev/null $@
+	@ $(BIN_DIR)/checkrom.sh $@
+
 bom: $(PKG_bom)
 	
 clean: $(PKG_clean)
diff --git a/packages/lzma/lzma.mk b/packages/lzma/lzma.mk
new file mode 100644
index 0000000..c5f0c5f
--- /dev/null
+++ b/packages/lzma/lzma.mk
@@ -0,0 +1,46 @@
+LZMA_URL=http://switch.dl.sourceforge.net/sourceforge/sevenzip
+LZMA_SOURCE=lzma443.tar.bz2
+LZMA_DIR=$(BUILD_DIR)/lzma
+LZMA_SRC_DIR=$(LZMA_DIR)/lzma-443
+LZMA_STAMP_DIR=$(LZMA_DIR)/stamps
+LZMA_LOG_DIR=$(LZMA_DIR)/logs
+
+ifeq ($(VERBOSE),y)
+LZMA_BUILD_LOG=/dev/stdout
+LZMA_CONFIG_LOG=/dev/stdout
+else
+LZMA_BUILD_LOG=$(LZMA_LOG_DIR)/build.log
+LZMA_CONFIG_LOG=$(LZMA_LOG_DIR)/config.log
+endif
+
+$(SOURCE_DIR)/$(LZMA_SOURCE):
+	@ mkdir -p $(SOURCE_DIR)
+	@ wget -P $(SOURCE_DIR) $(LZMA_URL)/$(LZMA_SOURCE)
+
+$(LZMA_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(LZMA_SOURCE)
+	@ mkdir -p $(LZMA_SRC_DIR)
+	@ tar -C $(LZMA_SRC_DIR) -jxf $(SOURCE_DIR)/$(LZMA_SOURCE)
+	@ touch $@	
+
+$(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone/lzma: $(LZMA_STAMP_DIR)/.unpacked
+	@ echo "Building lzma..."
+	@ ( export CC=$(HOST_CC); export CFLAGS=$(HOST_CFLAGS); \
+	  export LDFLAGS=$(HOST_LDFLAGS); unset LIBS; \
+	  cd $(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone; \
+	  $(MAKE) -C $(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone -f makefile.gcc > $(LZMA_BUILD_LOG) 2>&1 )
+
+$(STAGING_DIR)/bin/lzma: $(LZMA_SRC_DIR)/C/7zip/Compress/LZMA_Alone/lzma
+	@ install -d $(STAGING_DIR)/bin
+	@ install -m 0755 $< $@
+
+$(LZMA_STAMP_DIR) $(LZMA_LOG_DIR):
+	@ mkdir -p $@
+
+lzma: $(LZMA_STAMP_DIR) $(LZMA_LOG_DIR) $(STAGING_DIR)/bin/lzma
+
+lzma-clean:
+	@ $(MAKE) -C $(LZMA_SRC_DIR) clean > /dev/null 2>&1
+
+lzma-distclean:
+	@ rm -rf $(LZMA_DIR)/*
+
