SWupdateを使ってみる(整理)
いろいろ手探りだったので、まとまりがなくなってしまった。
まとめると
パーティションの準備
まずはrootfsを2つ用意する。いわゆる2面持ちをやってみる。
genimage.cfgを修正して、u-boot領域の拡張と、rootfs1、rootfs2を準備した。
#genimage.cfg
image boot.vfat {
vfat {
files = {
"zImage",
"sun8i-v3s-licheepi-zero-dock-with-lcd.dtb",
"boot.scr"
}
}
size = 8M
}
image sdcard.img {
hdimage {
}
partition u-boot {
in-partition-table = "no"
image = "u-boot-sunxi-with-spl.bin"
offset = 8192
size = 679936 #664K 32KB(SPL) + 504KB(Uboot) + Env(128KB)
#size = 516096 # 512KB - 8192
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs1 {
partition-type = 0x83
image = "rootfs.ext2"
size = 200M
}
partition rootfs2 {
partition-type = 0x83
size = 200M
}
}
カーネルコンフィング
BR2_PACKAGE_LIBUBOOTENV=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_SWUPDATE=y
BR2_PACKAGE_SWUPDATE_CONFIG="$(BR2_EXTERNAL_LICHEEPI_ZERO_DOCK_EX_PATH)/board/package/swupdate/swupdate.config"
BR2_TARGET_ROOTFS_EXT2_GZIP=y
swupdateの設定は、上記の通り別ファイルに書き出している
swupdate.config
デフォルトからの変更点は
CONFIG_UBOOT=y
CONFIG_UBOOT_FWENV="/etc/fw_env.config"
CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env"
CONFIG_GUNZIP=y
CONFIG_SHELLSCRIPTHANDLER=y
fw_setenvの準備
linux側からu-boot環境変数の参照と書き換えをするために、/etc/fw_env.configを用意する。
cat ex_licheepizerodock/board/rootfs-overlay/etc/fw_env.config
# device name Device offset Env. size
/dev/mmcblk0 0x88000 0x20000
boot.scrの変更
u-boot起動時に、rootfsを切り替えれるように、boot.cmdを変更する
echo -------------------- checking rootfspart ----------
if printenv rootfspart;
then echo rootfspart found;
else echo rootfspart not found; setenv rootfspart 2; setenv modify_save 1;
fi
setenv bootargs console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p${rootfspart} earlyprintk rw
load mmc 0:1 0x41000000 zImage
load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock-with-lcd.dtb
# echo -------------------- printenv --------------------
# printenv
# echo wait 10 sec ...
# sleep 10
echo -------------------- checking modify_save flag --------------------
if printenv modify_save;
then;
if test "${modify_save}" = "1";
then echo modify_save is on.; setenv modify_save 0; saveenv;
else echo modify_save is off.;
fi;
else echo modify_save is not found.;
fi
bootz 0x41000000 - 0x41800000
sw-descriptionの作成
アップデート前後にシェルスクリプトを実行できることがわかったので
書き換え対象のパーティションを自動で切り替えるようにする
http://www.variwiki.com/index.php?title=SWUpdate_Guide
https://sbabic.github.io/swupdate/sw-description.html#scripts
https://translate.google.com/translate?sl=auto&tl=ja&u=https://groups.google.com/g/swupdate/c/26vZgqWNuKY
ただし、「installed-directly = true;」にしていると、プレスクリプトよりも先にファームアップ処理が実施されてしまう仕様みたい。
この一行を削除する。
software =
{
version = "0.0.2";
hardware-compatibility: [ "1.0" ];
images: (
{
filename = "rootfs.ext2.gz";
compressed = "zlib";
device = "/dev/swupdate_rootfs_target";
}
);
scripts: (
{
filename = "toggle_partition.sh";
type = "shellscript";
}
);
}
で、スクリプトは
#! /bin/sh
INIT_ACTIVE_PARTITION_NO=2
INIT_STANDBY_PARTITION_NO=3
TARGET_DEVICE_NAME=/dev/swupdate_rootfs_target
echo "======================================"
echo " toggle_partition "
echo "======================================"
if [ $# -lt 1 ]; then
exit 0;
fi
function get_current_root_device
{
for i in `cat /proc/cmdline`; do
if [ ${i:0:5} = "root=" ]; then
CURRENT_ROOT="${i:5}"
# /dev/mmcblk0p3
fi
done
}
function get_update_partition
{
CURRENT_PARTITION="${CURRENT_ROOT: -1}"
echo Current Partition is $CURRENT_PARTITION
UPDATE_PARTITION="$INIT_STANDBY_PARTITION_NO"
if [ $CURRENT_PARTITION = "$INIT_ACTIVE_PARTITION_NO" ]; then
UPDATE_PARTITION="$INIT_STANDBY_PARTITION_NO"
else
UPDATE_PARTITION="$INIT_ACTIVE_PARTITION_NO"
fi
UPDATE_DEVICE_NAME=${CURRENT_ROOT%p?}p$UPDATE_PARTITION
}
function create_symbolic_link
{
echo Create Symbolic link
if [ -L $TARGET_DEVICE_NAME ]; then
echo symbolic link is already exist.
rm -f $TARGET_DEVICE_NAME
fi
ln -s $UPDATE_DEVICE_NAME $TARGET_DEVICE_NAME
ls -l $TARGET_DEVICE_NAME
}
function delete_symbolic_link
{
echo Delete Symbolic link
if [ -L $TARGET_DEVICE_NAME ]; then
rm -f $TARGET_DEVICE_NAME
fi
}
function change_active_rootfs_partition
{
fw_setenv rootfspart $UPDATE_PARTITION
}
get_current_root_device
echo Current ROOT divece is $CURRENT_ROOT
get_update_partition
if [ $1 == "preinst" ]; then
echo "run pre install script."
echo SW Update Target Partition is $UPDATE_PARTITION
echo SW Update Target Device is $UPDATE_DEVICE_NAME
create_symbolic_link
fi
if [ $1 == "postinst" ]; then
echo "run post install script."
delete_symbolic_link
echo "change rootfs partition($CURRENT_PARTITION -> $UPDATE_PARTITION)"
change_active_rootfs_partition
echo Partition to be active on reboot is $UPDATE_PARTITION
fi
これで、準備ができた。
swuアーカイブを作成する
make後にswuを作成する。
#!/bin/bash
TARGET_DIR=../output/images/
cp sw-description ${TARGET_DIR}
cp toggle_partition.sh ${TARGET_DIR}
cd ${TARGET_DIR}
CONTAINER_VER="1.0.0"
PRODUCT_NAME="my-software"
FILES="sw-description toggle_partition.sh rootfs.ext2.gz"
for i in $FILES;do
echo $i;done | cpio -ov -H crc > ${PRODUCT_NAME}_${CONTAINER_VER}.swu
これで、imagesディレクトリにswuファイルが作成される。
アップデートを実行する
# swupdate -v -i /mnt/my-software_1.0.0.swu
Swupdate v2020.04.0
Licensed under GPLv2. See source distribution for detailed copyright notices.
Registered handlers:
dummy
raw
rawfile
rawcopy
shellscript
preinstall
postinstall
[TRACE] : SWUPDATE running : [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running : [network_initializer] : Main loop Daemon
[TRACE] : SWUPDATE running : [listener_create] : creating socket at /tmp/sockinstctrl
[TRACE] : SWUPDATE running : [extract_sw_description] : Found file:
filename sw-description
size 432
checksum 0x6d0c VERIFIED
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.0.2
[TRACE] : SWUPDATE running : [parse_images] : Found compressed Image: rootfs.ext2.gz in device : /dev/swupdate_rootfs_target for handler raw (installed from stream)
[TRACE] : SWUPDATE running : [parse_scripts] : Found Script: toggle_partition.sh
[TRACE] : SWUPDATE running : [cpio_scan] : Found file:
filename toggle_partition.sh
size 1947
REQUIRED
[TRACE] : SWUPDATE running : [cpio_scan] : Found file:
filename rootfs.ext2.gz
size 29271755
REQUIRED
[DEBUG] : SWUPDATE running : [preupdatecmd] : Running Pre-update command
[TRACE] : SWUPDATE running : [extract_next_file] : Copied file:
filename toggle_partition.sh
size 1947
checksum 0x24691 VERIFIED
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : toggle_partition
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : Current ROOT divece is /dev/mmcblk0p3
[TRACE] : SWUPDATE running : [run_system_cmd] : Current Partition is 3
[TRACE] : SWUPDATE running : [run_system_cmd] : run pre install script.
[TRACE] : SWUPDATE running : [run_system_cmd] : SW Update Target Partition is 2
[TRACE] : SWUPDATE running : [run_system_cmd] : SW Update Target Device is /dev/mmcblk0p2
[TRACE] : SWUPDATE running : [run_system_cmd] : Create Symbolic link
[TRACE] : SWUPDATE running : [run_system_cmd] : lrwxrwxrwx 1 root root 14 Jan 6 09:33 /dev/swupdate_rootfs_target -> /dev/mmcblk0p2
[TRACE] : SWUPDATE running : [run_system_cmd] : /tmp/scripts/toggle_partition.sh preinst command returned 0
[TRACE] : SWUPDATE running : [install_single_image] : Found installer for stream rootfs.ext2.gz raw
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : toggle_partition
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : Current ROOT divece is /dev/mmcblk0p3
[TRACE] : SWUPDATE running : [run_system_cmd] : Current Partition is 3
[TRACE] : SWUPDATE running : [run_system_cmd] : run post install script.
[TRACE] : SWUPDATE running : [run_system_cmd] : Delete Symbolic link
[TRACE] : SWUPDATE running : [run_system_cmd] : change rootfs partition(3 -> 2)
[TRACE] : SWUPDATE running : [run_system_cmd] : Partition to be active on reboot is 2
[TRACE] : SWUPDATE running : [run_system_cmd] : /tmp/scripts/toggle_partition.sh postinst command returned 0
Software updated successfully
Please reboot the device to start the new software
[INFO ] : SWUPDATE successful !
[DEBUG] : SWUPDATE running : [postupdate] : Running Post-update command
できたできた!
webUIからアクセス
調子に乗って、WebUIからやってみる。
ifconfig usb0 192.168.100.1
swupdate -v -w "--document-root /var/www/swupdate"
しかし、容量不足で失敗Orz
[INFO ] : SWUPDATE started : Software Update started !
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file:
filename sw-description
size 389
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.0.2
[TRACE] : SWUPDATE running : [parse_images] : Found compressed Image: rootfs.ext2.gz in device : /dev/swupdate_rootfs_target for handler raw
[TRACE] : SWUPDATE running : [parse_scripts] : Found Script: toggle_partition.sh
[DEBUG] : SWUPDATE running : [preupdatecmd] : Running Pre-update command
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename toggle_partition.sh
size 1947 required
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename rootfs.ext2.gz
size 31060334 required
[ 513.054095] swupdate invoked oom-killer: gfp_mask=0x14201ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD), nodemask=(null), order=0, oom_score_adj=0
[ 513.066533] CPU: 0 PID: 184 Comm: swupdate Not tainted 4.14.14-licheepi-zero #1
[ 513.073837] Hardware name: Allwinner sun8i Family
[ 513.078575] [<c010e894>] (unwind_backtrace) from [<c010b548>] (show_stack+0x10/0x14)
[ 513.086318] [<c010b548>] (show_stack) from [<c0673428>] (dump_stack+0x88/0x9c)
[ 513.093542] [<c0673428>] (dump_stack) from [<c01b1288>] (dump_header.constprop.4+0x94/0x1b8)
[ 513.101976] [<c01b1288>] (dump_header.constprop.4) from [<c01b0970>] (oom_kill_process+0x2fc/0x508)
[ 513.111013] [<c01b0970>] (oom_kill_process) from [<c01b0e70>] (out_of_memory+0xfc/0x434)
[ 513.119097] [<c01b0e70>] (out_of_memory) from [<c01b5430>] (__alloc_pages_nodemask+0x9bc/0xd90)
[ 513.127787] [<c01b5430>] (__alloc_pages_nodemask) from [<c01ae318>] (filemap_fault+0x308/0x5dc)
[ 513.136480] [<c01ae318>] (filemap_fault) from [<c0284f94>] (ext4_filemap_fault+0x28/0x3c)
[ 513.144656] [<c0284f94>] (ext4_filemap_fault) from [<c01d30e0>] (__do_fault+0x18/0x68)
[ 513.152568] [<c01d30e0>] (__do_fault) from [<c01d6fbc>] (handle_mm_fault+0x414/0x964)
[ 513.160396] [<c01d6fbc>] (handle_mm_fault) from [<c011295c>] (do_page_fault+0x12c/0x36c)
[ 513.168481] [<c011295c>] (do_page_fault) from [<c0101370>] (do_PrefetchAbort+0x38/0xa0)
[ 513.176478] [<c0101370>] (do_PrefetchAbort) from [<c010c688>] (ret_from_exception+0x0/0x18)
[ 513.184815] Exception stack(0xc31adfb0 to 0xc31adff8)
[ 513.189862] dfa0: 000005b4 00000002 00000000 017b8d3e
[ 513.198030] dfc0: b66445ca 00002d0e 000012f2 00000009 b6643278 00000000 b664b344 00000050
[ 513.206197] dfe0: 00000000 b6642a18 00014e70 00014e70 00030010 ffffffff
[ 513.212882] Mem-Info:
[ 513.215175] active_anon:4942 inactive_anon:6094 isolated_anon:0
[ 513.215175] active_file:23 inactive_file:30 isolated_file:0
[ 513.215175] unevictable:0 dirty:0 writeback:0 unstable:0
[ 513.215175] slab_reclaimable:372 slab_unreclaimable:1169
[ 513.215175] mapped:16 shmem:6114 pagetables:84 bounce:0
[ 513.215175] free:231 free_pcp:17 free_cma:0
[ 513.247045] Node 0 active_anon:19768kB inactive_anon:24376kB active_file:92kB inactive_file:120kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:64kB dirty:0kB writeback:0kB shmem:24456kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[ 513.269541] Normal free:924kB min:924kB low:1152kB high:1380kB active_anon:19768kB inactive_anon:24376kB active_file:92kB inactive_file:120kB unevictable:0kB writepending:0kB present:64036kB managed:54536kB mlocked:0kB kernel_stack:464kB pagetables:336kB bounce:0kB free_pcp:68kB local_pcp:68kB free_cma:0kB
[ 513.296613] lowmem_reserve[]: 0 0 0
[ 513.300103] Normal: 35*4kB (UME) 24*8kB (UE) 13*16kB (UM) 0*32kB 4*64kB (U) 1*128kB (M) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 924kB
[ 513.312558] 6169 total pagecache pages
[ 513.316311] 0 pages in swap cache
[ 513.319622] Swap cache stats: add 0, delete 0, find 0/0
[ 513.324837] Free swap = 0kB
[ 513.327722] Total swap = 0kB
[ 513.330597] 16009 pages RAM
[ 513.333386] 0 pages HighMem/MovableOnly
[ 513.337224] 2375 pages reserved
[ 513.340361] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[ 513.348898] [ 76] 0 76 547 9 5 0 0 0 syslogd
[ 513.357685] [ 80] 0 80 547 9 4 0 0 0 klogd
[ 513.366296] [ 91] 0 91 2614 97 6 0 0 -1000 udevd
[ 513.374898] [ 126] 0 126 5645 1089 10 0 0 0 Xorg
[ 513.383424] [ 133] 0 133 9203 15 9 0 0 0 swupdate
[ 513.392295] [ 135] 0 135 547 19 4 0 0 0 startx
[ 513.400992] [ 136] 0 136 577 22 3 0 0 0 sh
[ 513.409342] [ 165] 0 165 712 17 4 0 0 0 xinit
[ 513.417954] [ 166] 0 166 5936 1400 12 0 0 0 X
[ 513.426216] [ 169] 0 169 3486 2062 10 0 0 0 feh
[ 513.434644] [ 181] 0 181 9203 36 9 0 0 0 swupdate
[ 513.443517] [ 183] 0 183 4593 46 5 0 0 0 swupdate
[ 513.452389] Out of memory: Kill process 169 (feh) score 147 or sacrifice child
[ 513.459637] Killed process 169 (feh) total-vm:13944kB, anon-rss:8240kB, file-rss:8kB, shmem-rss:0kB
[ERROR] : SWUPDATE failed [0] ERROR core/cpio_utils.c : copy_write : 131 : cannot write 16384 bytes: No space left on device
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
ならば、容量不足の解消だ
ルートパーティションの拡張
今、ルートパーティションは200Mの領域を確保しているけど、実際には60Mとなっている。
まずは、これを拡張しようと思う。
https://github.com/Squonk42/buildroot-licheepi-zero-old/wiki/Fresh-image-–-Expand-the-root-partition-and-filesystem
http://nahitafu.cocolog-nifty.com/nahitafu/2019/08/post-2df6c8.html
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 54.1M 52.1M 0 100% /
devtmpfs 26.1M 0 26.1M 0% /dev
tmpfs 26.6M 0 26.6M 0% /dev/shm
tmpfs 26.6M 56.0K 26.6M 0% /tmp
tmpfs 26.6M 104.0K 26.5M 0% /run
# fdisk -l
Disk /dev/mmcblk0: 3796 MB, 3980394496 bytes, 7774208 sectors
121472 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 * 0,21,22 1,26,25 1344 17727 16384 8192K c Win95 FAT32 (LBA)
/dev/mmcblk0p2 1,26,26 26,152,62 17728 427327 409600 200M 83 Linux
/dev/mmcblk0p3 26,152,63 52,24,36 427328 836927 409600 200M 83 Linux
Disk /dev/mmcblk1: 3807 MB, 3991928832 bytes, 7796736 sectors
2087 cylinders, 83 heads, 45 sectors/track
Units: sectors of 1 * 512 = 512 bytes
resize2fsの有効化
BR2_PACKAGE_E2FSPROGS_RESIZE2FS [=y]
まずは手動で
# resize2fs /dev/mmcblk0p2
resize2fs 1.45.6 (20-Mar-2020)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing r[ 46.549755] EXT4-fs (mmcblk0p2): resizing filesystem from 61440 to 204800 blocks
equired
old_desc_blocks = 1, new_desc_blocks = 1
[ 46.640496] EXT4-fs (mmcblk0p2): resized filesystem to 204800
The filesystem on /dev/mmcblk0p2 is now 204800 (1k) blocks long.
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 190.1M 52.4M 128.1M 29% /
devtmpfs 26.1M 0 26.1M 0% /dev
tmpfs 26.6M 0 26.6M 0% /dev/shm
tmpfs 26.6M 56.0K 26.6M 0% /tmp
tmpfs 26.6M 104.0K 26.5M 0% /run
よし!
手動でスワップ領域を作成
現状
# free -m
total used free shared buff/cache available
Mem: 53 28 2 0 22 23
Swap: 0 0 0
作成
# dd if=/dev/zero of=/swap bs=1M count=128
128+0 records in
128+0 records out
# mkswap /swap
Setting up swapspace version 1, size = 104853504 bytes
# chmod 0600 /swap
# swapon /swap
[ 95.710423] Adding 131052k swap on /swap. Priority:-2 extents:4 across:143352k SS
# free -m
total used free shared buff/cache available
Mem: 53 28 3 0 21 23
Swap: 127 0 127
再挑戦
[INFO ] : SWUPDATE started : Software Update started !
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file:
filename sw-description
size 389
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.0.2
[TRACE] : SWUPDATE running : [parse_images] : Found compressed Image: rootfs.ext2.gz in device : /dev/swupdate_rootfs_target for handler raw
[TRACE] : SWUPDATE running : [parse_scripts] : Found Script: toggle_partition.sh
[DEBUG] : SWUPDATE running : [preupdatecmd] : Running Pre-update command
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename toggle_partition.sh
size 1947 required
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename rootfs.ext2.gz
size 31060334 required
[ERROR] : SWUPDATE failed [0] ERROR core/cpio_utils.c : copy_write : 131 : cannot write 16384 bytes: No space left on device
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
容量不足はメモリじゃなくて、作業領域のほうか・・・勘違い。
SWupdateが使用するテンポラリ領域
ちゃんと、ドキュメント読もう。 と後悔。
https://sbabic.github.io/swupdate/swupdate.html#streaming-feature
TMPDIRに指定すればいいみたい。
export TMPDIR=/swutmp
再挑戦
[INFO ] : SWUPDATE started : Software Update started !
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file:
filename sw-description
size 389
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.0.2
[TRACE] : SWUPDATE running : [parse_images] : Found compressed Image: rootfs.ext2.gz in device : /dev/swupdate_rootfs_target for handler raw
[TRACE] : SWUPDATE running : [parse_scripts] : Found Script: toggle_partition.sh
[DEBUG] : SWUPDATE running : [preupdatecmd] : Running Pre-update command
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename toggle_partition.sh
size 1947 required
[TRACE] : SWUPDATE running : [extract_files] : Found file:
filename rootfs.ext2.gz
size 31060334 required
[TRACE] : SWUPDATE running : [extract_padding] : Expecting 20 padding bytes at end-of-file
[TRACE] : SWUPDATE running : [network_initializer] : Valid image found: copying to FLASH
[INFO ] : SWUPDATE running : Installation in progress
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : toggle_partition
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : Current ROOT divece is /dev/mmcblk0p2
[TRACE] : SWUPDATE running : [run_system_cmd] : Current Partition is 2
[TRACE] : SWUPDATE running : [run_system_cmd] : run pre install script.
[TRACE] : SWUPDATE running : [run_system_cmd] : SW Update Target Partition is 3
[TRACE] : SWUPDATE running : [run_system_cmd] : SW Update Target Device is /dev/mmcblk0p3
[TRACE] : SWUPDATE running : [run_system_cmd] : Create Symbolic link
[TRACE] : SWUPDATE running : [run_system_cmd] : lrwxrwxrwx 1 root root 14 Jan 10 13:21 /dev/swupdate_rootfs_target -> /dev/mmcblk0p3
[TRACE] : SWUPDATE running : [run_system_cmd] : /swutmp/scripts/toggle_partition.sh preinst command returned 0
[TRACE] : SWUPDATE running : [install_single_image] : Found installer for stream rootfs.ext2.gz raw
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : toggle_partition
[TRACE] : SWUPDATE running : [run_system_cmd] : ======================================
[TRACE] : SWUPDATE running : [run_system_cmd] : Current ROOT divece is /dev/mmcblk0p2
[TRACE] : SWUPDATE running : [run_system_cmd] : Current Partition is 2
[TRACE] : SWUPDATE running : [run_system_cmd] : run post install script.
[TRACE] : SWUPDATE running : [run_system_cmd] : Delete Symbolic link
[TRACE] : SWUPDATE running : [run_system_cmd] : change rootfs partition(2 -> 3)
[TRACE] : SWUPDATE running : [run_system_cmd] : Partition to be active on reboot is 3
[TRACE] : SWUPDATE running : [run_system_cmd] : /swutmp/scripts/toggle_partition.sh postinst command returned 0
[INFO ] : SWUPDATE successful ! SWUPDATE successful !
ということで、swapは不要だった。テンポラリ領域の変更だけで済んだ。