From mboxrd@z Thu Jan 1 00:00:00 1970 From: bones@secretlab.ca (John Bonesio) Date: Mon, 21 Mar 2011 16:42:24 -0700 Subject: [PATCH v2] ARM:boot:device tree: Allow the device tree binary to be appended to zImage In-Reply-To: References: <20110321221930.19756.36549.stgit@riker> Message-ID: <4D87E260.6050902@secretlab.ca> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Nicolas, Is this addhi instruction the only one, or do I need to go through and find other instructions to update as well? Thanks for being patient as I learn. - John On 03/21/2011 03:49 PM, Nicolas Pitre wrote: > On Mon, 21 Mar 2011, John Bonesio wrote: > >> This patch provides the ability to boot using a device tree that is appended >> to the raw binary zImage (e.g. cat zImage .dtb > zImage_w_dtb). >> >> Signed-off-by: John Bonesio > > One minor glitch still... ;-) > >> @@ -288,12 +344,28 @@ wont_overwrite: >> >> /* >> * Relocate all entries in the GOT table. >> + * Bump bss entries to _edata + dtb size >> */ >> 1: ldr r1, [r11, #0] @ relocate entries in the GOT >> - add r1, r1, r0 @ table. This fixes up the >> - str r1, [r11], #4 @ C references. >> + add r1, r1, r0 @ This fixes up C references >> + cmp r1, r2 @ if entry >= bss_start && >> + cmphs r3, r1 @ bss_end > entry >> + addhi r1, lr @ entry += dtb size > > Some toolchains won't accept this shortened version unless you compile > for Thumb. You should instead use: > > addhi r1, r1, lr > > Otherwise... > > Reviewed-by: Nicolas Pitre > > > Nicolas From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Bonesio Subject: Re: [PATCH v2] ARM:boot:device tree: Allow the device tree binary to be appended to zImage Date: Mon, 21 Mar 2011 16:42:24 -0700 Message-ID: <4D87E260.6050902@secretlab.ca> References: <20110321221930.19756.36549.stgit@riker> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Nicolas Pitre Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org Hi Nicolas, Is this addhi instruction the only one, or do I need to go through and find other instructions to update as well? Thanks for being patient as I learn. - John On 03/21/2011 03:49 PM, Nicolas Pitre wrote: > On Mon, 21 Mar 2011, John Bonesio wrote: > >> This patch provides the ability to boot using a device tree that is appended >> to the raw binary zImage (e.g. cat zImage .dtb > zImage_w_dtb). >> >> Signed-off-by: John Bonesio > > One minor glitch still... ;-) > >> @@ -288,12 +344,28 @@ wont_overwrite: >> >> /* >> * Relocate all entries in the GOT table. >> + * Bump bss entries to _edata + dtb size >> */ >> 1: ldr r1, [r11, #0] @ relocate entries in the GOT >> - add r1, r1, r0 @ table. This fixes up the >> - str r1, [r11], #4 @ C references. >> + add r1, r1, r0 @ This fixes up C references >> + cmp r1, r2 @ if entry >= bss_start && >> + cmphs r3, r1 @ bss_end > entry >> + addhi r1, lr @ entry += dtb size > > Some toolchains won't accept this shortened version unless you compile > for Thumb. You should instead use: > > addhi r1, r1, lr > > Otherwise... > > Reviewed-by: Nicolas Pitre > > > Nicolas