From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.reverze.net ([82.161.88.7] helo=fsm.reverze.net) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSmOf-0003HA-Qi for barebox@lists.infradead.org; Wed, 26 Mar 2014 11:53:30 +0000 Message-ID: <5332BF9F.8060308@reverze.net> Date: Wed, 26 Mar 2014 12:53:03 +0100 From: Michel Stam MIME-Version: 1.0 References: <20140326062619.GP17250@pengutronix.de> <20140326065734.GA18805@omega.Speedport_W_921V_1_24_000> <20140326113103.GA9427@omega.Speedport_W_921V_1_24_000> <20140326113300.GB9427@omega.Speedport_W_921V_1_24_000> In-Reply-To: <20140326113300.GB9427@omega.Speedport_W_921V_1_24_000> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0758436761615055261==" Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: Can i access the barebox env from linux To: Alexander Aring , Ashutosh Singh Cc: barebox@lists.infradead.org This is a cryptographically signed message in MIME format. --===============0758436761615055261== Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms070400020903030806000701" This is a cryptographically signed message in MIME format. --------------ms070400020903030806000701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable In case anyone is interested; for a barebox x86 project I wrote a=20 library that overrides fopen/fclose/open/close/etc a while back, which=20 allows read access to the environment sector if properly configured. I=20 managed to get it working on arm/mips with mtdblock as well. In the near future I'd like to write a kernel driver to read the=20 filesystem properly, this was more of an experiment. Cheers, Michel On 03/26/2014 12:33 PM, Alexander Aring wrote: > On Wed, Mar 26, 2014 at 12:31:03PM +0100, Alexander Aring wrote: >> On Wed, Mar 26, 2014 at 04:44:30PM +0530, Ashutosh Singh wrote: >>> Thanks Alex, >>> >>> The script is quite helpful. >>> But since i am saving my barebox.env in nand and want to mount, modif= y >>> and write it back to nand. >>> Do you have a safer solution so that complete env data won't corrupte= d. >> 1. You need to save the bareboxenv as image, the right place would be >> /tmp which is tmpfs and this uses ram for storing data. You need i= notify >> support in kernel and I am sure tmpfs also supports inotify. You a= lso need >> the inotify userspace utilities. >> >> 2. The image should write via nandwrite from mtd-utils [1]. Look for >> the nandwrite manpage. nandwrite should write the tmp-image from b= benv >> to your nand mtd device. >> > 3. To read the image from bbenv partition you should also not use > bareboxenv tool directly. Use nanddump for that and then use > bareboxenv to extract these files to /tmp/bbenv or whatever. > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox --------------ms070400020903030806000701 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIMmzCC BjQwggQcoAMCAQICAR4wDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UEBhMCSUwxFjAUBgNVBAoT DVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNp Z25pbmcxKTAnBgNVBAMTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA3 MTAyNDIxMDE1NVoXDTE3MTAyNDIxMDE1NVowgYwxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1T dGFydENvbSBMdGQuMSswKQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZpY2F0ZSBTaWdu aW5nMTgwNgYDVQQDEy9TdGFydENvbSBDbGFzcyAxIFByaW1hcnkgSW50ZXJtZWRpYXRlIENs aWVudCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcJg8zOLdgasSmkLhOr lr6KMoOMpohBllVHrdRvEg/q6r8jR+EK75xCGhR8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UGCSsGAQQBgjcQ BDGBlzCBlDCBjDELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKzApBgNV BAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxODA2BgNVBAMTL1N0YXJ0 Q29tIENsYXNzIDEgUHJpbWFyeSBJbnRlcm1lZGlhdGUgQ2xpZW50IENBAgMJaQ4wgacGCyqG SIb3DQEJEAILMYGXoIGUMIGMMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzE4MDYGA1UE AxMvU3RhcnRDb20gQ2xhc3MgMSBQcmltYXJ5IEludGVybWVkaWF0ZSBDbGllbnQgQ0ECAwlp DjANBgkqhkiG9w0BAQEFAASCAQAlkSvkNde0uPEC4l6KS9oVKDgIXDgnXmcX0oA6gMw1bw12 HfpvCb8X3/LIW2HaYWJbqoszT9WvNnq11EQeD9l76wcdyh2J0fKyJ0PVRrOmMtju5Lt5PMA4 7PYrjvBjRlz6/BfCXRv/JUBNu9N8V5eeyJMxkpbq5lLvR7IpofLORxRnygWArNqQSLcnLHZ9 rxSNY6RlztQliezV3MVrxzsRmea+18B6MT52Z1nS1rqyFh0/qP31LOW2cK4bKvwkeU9rQa+8 iGyO060hP90oM6IxLtMlYhqF8ZEehcHIc84z0keeYrUSQMnyP89cvg4zVx29JFB5t0p25i4J vyaSE/kBAAAAAAAA --------------ms070400020903030806000701-- --===============0758436761615055261== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============0758436761615055261==--