[LEDE-DEV] [PATCH 4/4] Add bootconfig and flash script for the tew827dru
J Mo
jmomo at jmomo.net
Thu Sep 8 02:35:16 PDT 2016
On 09/08/2016 12:16 AM, John Crispin wrote:
>
> On 08/09/2016 07:04, J Mo wrote:
>> The tew827dru requires a u-boot hush shell script to install it's factory image. Additionally, a "bootconfig" partition blob is needed to direct the OEM's "Fail Safe" system to boot from the proper UBI partition.
>>
>> Signed-off-by: jmomo <jmomo at jmomo.net>
>> ---
>> .../linux/ipq806x/image/tew827dru-bootconfig.bin | Bin 0 -> 84 bytes
>> target/linux/ipq806x/image/tew827dru-flash.scr | 57 +++++++++++++++++++++
>> 2 files changed, 57 insertions(+)
>> create mode 100644 target/linux/ipq806x/image/tew827dru-bootconfig.bin
>> create mode 100644 target/linux/ipq806x/image/tew827dru-flash.scr
>>
>> target/linux/ipq806x/image/tew827dru-flash.scr
>> This u-boot hush shell script is required to install the factory image via the u-boot HTTP backup loader.
>> If this file should be moved somewhere else, let me know.
>>
>> target/linux/ipq806x/image/tew827dru-bootconfig.bin
>> This binary blob is used by the OEM's "Fail Safe" boot system.
>> This gets installed by the u-boot script above.
>> If this file should be moved somewhere else, let me know.
>>
>> diff --git a/target/linux/ipq806x/image/tew827dru-bootconfig.bin b/target/linux/ipq806x/image/tew827dru-bootconfig.bin
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..16816a91a70ad71120c49a1ab7f13681cb023a65
>> GIT binary patch
>> literal 84
>> zcmZ3maPd+GAYcY!11raXfM6#d5FZQ}AyiR*eo0y}R18Ex#j{h3@=|k<#Gy<86T}JG
>>
>> literal 0
>> HcmV?d00001
> where does this blob come from. can we build it from source ?
>
The blob is a tiny partition already on devices. It's just a map with a
magic header, the name of two partitions, and a couple of lose bytes
that get flipped between 0 and 1.
The OEM uses it as a map to indicate which of the two redundant u-boot
and UBI partitions is active.... except that their system is actually
broken and doesn't work. We just use it to set the defaults, so that we
can be sure which kernel and UBI the system loads.
-->hd target/linux/ipq806x/image/tew827dru-bootconfig.bin
00000000 a0 a1 a3 a5 00 00 00 00 03 00 00 00 30 3a 41 50
|............0:AP|
00000010 50 53 42 4c 00 00 00 00 00 00 00 00 00 01 00 00
|PSBL............|
00000020 00 00 00 00 72 6f 6f 74 66 73 00 00 00 00 00 00
|....rootfs......|
00000030 00 00 00 00 00 01 00 00 00 00 00 00 6b 65 72 6e
|............kern|
00000040 65 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|el..............|
00000050 00 00 00 00 |....|
00000054
The factory image must contain this file in the FIT.
I could probably make something to generate it, but it's static data for
us. The same exact 84 bytes every single time.
I'm not actually sure where in the OEM build system this file gets
produced, but I know where it's format is documented.
What do you want to do?
>> diff --git a/target/linux/ipq806x/image/tew827dru-flash.scr b/target/linux/ipq806x/image/tew827dru-flash.scr
>> new file mode 100644
>> index 0000000..3cdc42e
>> --- /dev/null
>> +++ b/target/linux/ipq806x/image/tew827dru-flash.scr
> where does this get used ?
"This u-boot hush shell script is required to install the factory image via the u-boot HTTP backup loader."
It goes into the FIT image. The u-boot executes the script to install the UBI and bootconfig file onto NAND.
More information about the Lede-dev
mailing list