Re: [PATCH v2] MIPS: Set ISA bit in entry-y for microMIPS kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi James,

> > +# Sign-extend the entry point to 64 bits if retrieved as a 32-bit number.
> > +entry-y		= $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
> > +			| sed -n '/^start address / { \
> > +				s/^.*0x\([0-7].......\)$$/0x00000000\1/; \
> > +				s/^.*0x\(........\)$$/0xffffffff\1/; p }')
> 
> This leaves the "start address " on the beginning if the address is
> already 64 bits wide, e.g.:
> 
> VMLINUX_LOAD_ADDRESS=0xffffffff80100000 VMLINUX_ENTRY_ADDRESS=start address 0xffffffff80832720 ...

 Right, sorry about it.

> The following seems to work, to drop the "start address " first then
> work purely on the hex value (i.e. no need for .* at the front of the
> sign extension regexes any more):
> 
> +entry-y		= $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
> +			| sed -n '/^start address / { \
> +				s/^.* //; \
> +				s/^0x\([0-7].......\)$$/0x00000000\1/; \
> +				s/^0x\(........\)$$/0xffffffff\1/; p }')
> 
> Look reasonable? Is there a cleaner way?

 Then there's no need to match the beginning again with `^' either.  
Otherwise I think it's reasonable enough.  I'll post v3.

 Thanks for your input!

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux