summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ubi-utils/scripts/Makefile26
-rw-r--r--ubi-utils/scripts/pdd.txt16
2 files changed, 38 insertions, 4 deletions
diff --git a/ubi-utils/scripts/Makefile b/ubi-utils/scripts/Makefile
index 6d014ea..e8850fd 100644
--- a/ubi-utils/scripts/Makefile
+++ b/ubi-utils/scripts/Makefile
@@ -21,21 +21,39 @@ dd = dd
sed = sed
bin2nand = bin2nand
ubigen = ubigen
-mkpfi = mkpfi
-pfi2bin = pfi2bin
+mkpfi = mkpfi -v
+pfi2bin = pfi2bin -v
vmlinux_bin ?= test_vmlinux.bin
rootfs_bin ?= test_rootfs.bin
spl_bin ?= test_u-boot.bin
+pdd_txt ?= pdd.txt
+
+flashtype ?= nand
+pagesize ?= 2048
compl ?= $(card)_complete
compl_pfi ?= $(compl).pfi
+compl_img ?= $(compl).img
+
+compl_nand2048_mif=$(compl).$(flashtype)$(pagesize).mif
+compl_nand2048_img=$(compl).$(flashtype)$(pagesize).img
-all: $(compl_pfi)
+all: $(compl_pfi) $(compl_nand2048_mif)
$(compl_pfi): $(vmlinux_bin) $(rootfs_bin) $(spl_bin)
$(mkpfi) -c $(mkpfi_cfg)
+# Binary data and out of band data (OOB)
+#
+$(compl_nand2048_mif): $(compl_img)
+ $(bin2nand) -p $(pagesize) -o $(compl_nand2048_mif) $<
+
+# Binary data only
+#
+$(compl_img): $(compl_pfi)
+ $(pfi2bin) -j $(pdd_txt) -o $@ $<
+
#
# Default data
#
@@ -54,4 +72,4 @@ clean:
$(RM) *.pfi *~
distclean: clean
- $(RM) *.bin
+ $(RM) *.bin *.mif *.oob *.img
diff --git a/ubi-utils/scripts/pdd.txt b/ubi-utils/scripts/pdd.txt
new file mode 100644
index 0000000..a3ad915
--- /dev/null
+++ b/ubi-utils/scripts/pdd.txt
@@ -0,0 +1,16 @@
+pdd=flash_type,flash_size,flash_eraseblock_size,flash_page_size,card_serialnumber,card_type,ethaddr,eth1addr,eth0,eth1,total,card_hardwarelevel
+pdd_preserve=ethaddr,eth1addr,card_serialnumber
+# To be personalized
+ethaddr=00:04:34:56:78:9A
+eth1addr=00:04:34:56:78:9B
+card_serialnumber=SN0
+# Static for this card type
+total=102M
+card_type=nand_driven_testcard
+card_hardwarelevel=0
+eth0=bcm5222,eth0,0
+eth1=bcm5222,eth0,1
+flash_type=NAND
+flash_size=0x08000000
+flash_eraseblock_size=0x00020000
+flash_page_size=0x00000800