forked from DGNum/liminix
swap zimage and dtb in ram
kernel uncompression code creates a stack directly after the compressed payload, which was trashing the dtb
This commit is contained in:
parent
aecc44aaa0
commit
dbf1ecdcb7
1 changed files with 5 additions and 4 deletions
|
@ -72,18 +72,19 @@ in {
|
||||||
hex() { printf "0x%x" $1; }
|
hex() { printf "0x%x" $1; }
|
||||||
rootfsStart=${toString cfg.loadAddress}
|
rootfsStart=${toString cfg.loadAddress}
|
||||||
rootfsSize=$(binsize64k ${o.rootfs} )
|
rootfsSize=$(binsize64k ${o.rootfs} )
|
||||||
imageStart=$(($rootfsStart + $rootfsSize))
|
dtbStart=$(($rootfsStart + $rootfsSize))
|
||||||
imageSize=$(binsize ${image})
|
|
||||||
dtbStart=$(($imageStart + $imageSize))
|
|
||||||
dtbSize=$(binsize ${o.dtb} )
|
dtbSize=$(binsize ${o.dtb} )
|
||||||
|
imageStart=$(($dtbStart + $dtbSize))
|
||||||
|
imageSize=$(binsize ${image})
|
||||||
|
|
||||||
ln -s ${o.manifest} manifest
|
ln -s ${o.manifest} manifest
|
||||||
ln -s ${image} image
|
ln -s ${image} image
|
||||||
|
ln -s ${o.kernel} vmlinux # handy for gdb
|
||||||
|
|
||||||
${if cfg.compressRoot
|
${if cfg.compressRoot
|
||||||
then ''
|
then ''
|
||||||
lzma -z9cv ${o.rootfs} > rootfs.lz
|
lzma -z9cv ${o.rootfs} > rootfs.lz
|
||||||
rootfsLzStart=$(($dtbStart + $dtbSize))
|
rootfsLzStart=$(($imageStart + $imageSize))
|
||||||
rootfsLzSize=$(binsize rootfs.lz)
|
rootfsLzSize=$(binsize rootfs.lz)
|
||||||
''
|
''
|
||||||
else "ln -s ${o.rootfs} rootfs"
|
else "ln -s ${o.rootfs} rootfs"
|
||||||
|
|
Loading…
Reference in a new issue