From ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 8 Mar 2013 00:00:52 +1100 Subject: - Removed legacy command line hard-coded partition name parameters. - As a result of the above two points, there are no "known boot partitions", and hence boot partitions are not automatically flashed last. - Made partitions flash in the order in order in which partition arguments are specified. Hence, it's recommended that you specify boot partitions last. - Added --usb-level argument that can be used for debugging libusbx, or flashing issues in general. - Removed generally non-functional firmware dumping behaviour. - Removed auto-resume functionality - Although this feature was definitely nice to have; I believe it may be responsible for flashing compatibility issues for a variety of devices. - As a result of the above. In order perform another action after a --no-reboot action, you must provide the --resume flag. - Heimdall Frontend also has support for specifying the --resume flag via a GUI. Heimdall Frontend also tries to keep track of your actions and enable "Resume" automatically after a "No Reboot" action. - Refactored quite a few of the actions, and code responsible for flashing (particularly PIT file flashing). - Bumped version to 1.4RC3 *however* this commit is not yet an official release candidate. It's still a WIP. In particular build files still have not been updated for Linux and OS X. --- libpit/Source/libpit.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libpit/Source/libpit.h') diff --git a/libpit/Source/libpit.h b/libpit/Source/libpit.h index 9e6c452..eb37647 100644 --- a/libpit/Source/libpit.h +++ b/libpit/Source/libpit.h @@ -250,7 +250,8 @@ namespace libpit enum { kFileIdentifier = 0x12349876, - kHeaderDataSize = 28 + kHeaderDataSize = 28, + kPaddedSizeMultiplicand = 4096 }; private: @@ -349,6 +350,22 @@ namespace libpit return entryCount; } + unsigned int GetDataSize(void) const + { + return PitData::kHeaderDataSize + entryCount * PitEntry::kDataSize; + } + + unsigned int GetPaddedSize(void) const + { + unsigned int dataSize = GetDataSize(); + unsigned int paddedSize = (dataSize / kPaddedSizeMultiplicand) * kPaddedSizeMultiplicand; + + if (dataSize % kPaddedSizeMultiplicand != 0) + paddedSize += kPaddedSizeMultiplicand; + + return paddedSize; + } + unsigned int GetUnknown1(void) const { return unknown1; -- cgit v1.1 From 55d6c9551e13b108947410d7bf50b6ba2c01b633 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 5 May 2013 20:53:36 +1000 Subject: Fixed two major bugs in libpit related functionality: - Partitions were being excluded from flashing (and UI) if the block-count was zero. Instead this is now done using a new IsFlashable() method which checks if the partition name is not blank. - PitData::Pack() was packing the partition name where it should have been packing the "flash filename". This resulted in incorrect PIT files being flashed to the device. --- libpit/Source/libpit.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpit/Source/libpit.h') diff --git a/libpit/Source/libpit.h b/libpit/Source/libpit.h index eb37647..c2bc691 100644 --- a/libpit/Source/libpit.h +++ b/libpit/Source/libpit.h @@ -103,6 +103,11 @@ namespace libpit bool Matches(const PitEntry *otherPitEntry) const; + bool IsFlashable(void) const + { + return strlen(partitionName) != 0; + } + unsigned int GetBinaryType(void) const { return binaryType; -- cgit v1.1 From 07dcba54fc8cc5b7c6515305aa233e24a58adc94 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 13 May 2013 00:08:30 +1000 Subject: Update copyright notices, version identifier and documentation for 1.4.0 release. --- libpit/Source/libpit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpit/Source/libpit.h') diff --git a/libpit/Source/libpit.h b/libpit/Source/libpit.h index c2bc691..c7bfe8b 100644 --- a/libpit/Source/libpit.h +++ b/libpit/Source/libpit.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2012 Benjamin Dobell, Glass Echidna +/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -- cgit v1.1