rename flashable->flashimage, o.squashfs to rootfs
"rootfs" describes what it is for, "squashfs" merely says how it's implemented (also, rootfs-as-jffs2 will soon be added)
This commit is contained in:
parent
2e15acd61c
commit
0687ae7f5c
11 changed files with 27 additions and 27 deletions
|
@ -17,7 +17,7 @@ in {
|
|||
pkgs.runCommand "tftpboot" {} ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
ln -s ${o.squashfs} squashfs
|
||||
ln -s ${o.rootfs} rootfs
|
||||
ln -s ${o.kernel} vmlinux
|
||||
ln -s ${o.manifest} manifest
|
||||
ln -s ${o.kernel.headers} build
|
||||
|
@ -31,16 +31,16 @@ in {
|
|||
in
|
||||
pkgs.buildPackages.runCommand "boot-scr" {} ''
|
||||
uimageSize=$(($(stat -L -c %s ${config.outputs.uimage}) + 0x1000 &(~0xfff)))
|
||||
squashfsStart=0x$(printf %x $((${cfg.loadAddress} + 0x100000 + $uimageSize)))
|
||||
squashfsBytes=$(($(stat -L -c %s ${config.outputs.squashfs}) + 0x100000 &(~0xfffff)))
|
||||
squashfsMb=$(($squashfsBytes >> 20))
|
||||
cmd="mtdparts=phram0:''${squashfsMb}M(rootfs) phram.phram=phram0,''${squashfsStart},''${squashfsMb}Mi memmap=''${squashfsMb}M\$''${squashfsStart} root=1f00";
|
||||
rootfsStart=0x$(printf %x $((${cfg.loadAddress} + 0x100000 + $uimageSize)))
|
||||
rootfsBytes=$(($(stat -L -c %s ${config.outputs.rootfs}) + 0x100000 &(~0xfffff)))
|
||||
rootfsMb=$(($rootfsBytes >> 20))
|
||||
cmd="mtdparts=phram0:''${rootfsMb}M(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsMb}Mi memmap=''${rootfsMb}M\$''${rootfsStart} root=1f00";
|
||||
|
||||
cat > $out << EOF
|
||||
setenv serverip ${cfg.serverip}
|
||||
setenv ipaddr ${cfg.ipaddr}
|
||||
setenv bootargs 'liminix $cmd'
|
||||
tftp 0x$(printf %x ${cfg.loadAddress}) result/uimage ; tftp 0x$(printf %x $squashfsStart) result/squashfs
|
||||
tftp 0x$(printf %x ${cfg.loadAddress}) result/uimage ; tftp 0x$(printf %x $rootfsStart) result/rootfs
|
||||
bootm 0x$(printf %x ${cfg.loadAddress})
|
||||
EOF
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue