1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125 | $ cat /boot/uboot/snappy-system.txt
# This is a snappy variables and boot logic file and is entirely generated and
# managed by Snappy. Modifications may break boot
######
# functions to load kernel, initrd and fdt from various env values
loadfiles=run loadkernel; run loadinitrd; run loadfdt
loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${snappy_ab}/${kernel_file}
loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${snappy_ab}/${initrd_file}; setenv initrd_size ${filesize}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${snappy_ab}/dtbs/${fdtfile}
# standard kernel and initrd file names; NB: fdtfile is set early from bootcmd
kernel_file=vmlinuz
initrd_file=initrd.img
fdtfile=am335x-boneblack.dtb
# extra kernel cmdline args, set via mmcroot
snappy_cmdline=init=/lib/systemd/systemd ro panic=-1 fixrtc
# boot logic
# either "a" or "b"; target partition we want to boot
snappy_ab=b
# stamp file indicating a new version is being tried; removed by s-i after boot
snappy_stamp=snappy-stamp.txt
# either "regular" (normal boot) or "try" when trying a new version
snappy_mode=regular
# if we're trying a new version, check if stamp file is already there to revert
# to other version
snappy_boot=if test "${snappy_mode}" = "try"; then if test -e mmc ${bootpart} ${snappy_stamp}; then if test "${snappy_ab}" = "a"; then setenv snappy_ab "b"; else setenv snappy_ab "a"; fi; else fatwrite mmc ${mmcdev}:${mmcpart} 0x0 ${snappy_stamp} 0; fi; fi; run loadfiles; setenv mmcroot /dev/disk/by-label/system-${snappy_ab} ${snappy_cmdline}; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}
$ snappy list --verbose
Name Date Version Developer
ubuntu-core 2015-06-05 79 ubuntu*
ubuntu-core 2015-06-09 82 ubuntu
hello-dbus-app 2015-06-01 1.0.1 canonical*
hello-dbus-fwk 2015-06-01 1.0.0 *
hello-world 2015-06-01 1.0.15 canonical
hello-world 2015-06-08 1.0.17 canonical*
beagleblack 2015-06-01 1.7.1 *
$ cat /etc/system-image/channel.ini
[service]
base: system-image.ubuntu.com
http_port: 80
https_port: 443
channel: ubuntu-core/15.04/edge
device: generic_armhf
build_number: 79
version_detail: ubuntu=20150605.3,raw-device=20150605.3,version=79
$ cat /writable/cache/system/etc/system-image/channel.ini
[service]
base: system-image.ubuntu.com
http_port: 80
https_port: 443
channel: ubuntu-core/15.04/edge
device: generic_armhf
build_number: 82
version_detail: ubuntu=20150609,raw-device=20150609,version=82
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 243876 0 243876 0% /dev
tmpfs 50208 4712 45496 10% /run
/dev/disk/by-label/system-b 999320 462180 468328 50% /
/dev/mmcblk0p4 1581892 38068 1445420 3% /oem
tmpfs 251024 4 251020 1% /etc/fstab
tmpfs 251024 0 251024 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 251024 0 251024 0% /sys/fs/cgroup
tmpfs 251024 0 251024 0% /mnt
tmpfs 251024 0 251024 0% /tmp
tmpfs 251024 0 251024 0% /var/lib/sudo
/dev/mmcblk0p2 999320 553640 376868 60% /writable/cache/system
/dev/mmcblk0p1 64511 39328 25183 61% /boot/uboot
cgmfs 100 0 100 0% /run/cgmanager/fs
tmpfs 50208 0 50208 0% /run/user/1000
$ sudo snappy update
Installing ubuntu-core (82)
Syncing boot files
Starting download of ubuntu-core
166.41 KB / 166.41 KB [========================================] 100.00 % 13.81 KB/s
Apply done
Updating boot files
166.41 KB / 166.41 KB [========================================] 100.00 % 12.18 KB/s
Done
Name Date Version Developer
ubuntu-core 2015-06-09 82 ubuntu!
Reboot to use the new ubuntu-core.
$ cat /boot/uboot/snappy-system.txt
# This is a snappy variables and boot logic file and is entirely generated and
# managed by Snappy. Modifications may break boot
######
# functions to load kernel, initrd and fdt from various env values
loadfiles=run loadkernel; run loadinitrd; run loadfdt
loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${snappy_ab}/${kernel_file}
loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${snappy_ab}/${initrd_file}; setenv initrd_size ${filesize}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${snappy_ab}/dtbs/${fdtfile}
# standard kernel and initrd file names; NB: fdtfile is set early from bootcmd
kernel_file=vmlinuz
initrd_file=initrd.img
fdtfile=am335x-boneblack.dtb
# extra kernel cmdline args, set via mmcroot
snappy_cmdline=init=/lib/systemd/systemd ro panic=-1 fixrtc
# boot logic
# either "a" or "b"; target partition we want to boot
snappy_ab=a
# stamp file indicating a new version is being tried; removed by s-i after boot
snappy_stamp=snappy-stamp.txt
# either "regular" (normal boot) or "try" when trying a new version
snappy_mode=try
# if we're trying a new version, check if stamp file is already there to revert
# to other version
snappy_boot=if test "${snappy_mode}" = "try"; then if test -e mmc ${bootpart} ${snappy_stamp}; then if test "${snappy_ab}" = "a"; then setenv snappy_ab "b"; else setenv snappy_ab "a"; fi; else fatwrite mmc ${mmcdev}:${mmcpart} 0x0 ${snappy_stamp} 0; fi; fi; run loadfiles; setenv mmcroot /dev/disk/by-label/system-${snappy_ab} ${snappy_cmdline}; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}
|