[Merge] lp:~sergiusens/goget-ubuntu-touch/assetsGeneric into lp:goget-ubuntu-touch
John Lenton
john.lenton at canonical.com
Wed Jun 24 10:37:54 UTC 2015
Review: Approve
1 nit, but +1'ing.
Diff comments:
> === modified file 'diskimage/common.go'
> --- diskimage/common.go 2015-06-23 13:16:22 +0000
> +++ diskimage/common.go 2015-06-23 13:16:22 +0000
> @@ -39,6 +39,11 @@
> }
> }
>
> +const (
> + kernelFileName = "vmlinuz"
> + initrdFileName = "initrd.img"
> +)
> +
> var (
> syscallSync = syscall.Sync
> )
>
> === modified file 'diskimage/core_uboot.go'
> --- diskimage/core_uboot.go 2015-06-23 13:16:22 +0000
> +++ diskimage/core_uboot.go 2015-06-23 13:16:22 +0000
> @@ -43,9 +43,9 @@
> 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
> -{{ . }}
> +kernel_file={{ .Kernel }}
> +initrd_file={{ .Initrd }}
> +{{ .Fdt }}
>
> # extra kernel cmdline args, set via mmcroot
> snappy_cmdline=init=/lib/systemd/systemd ro panic=-1 fixrtc
> @@ -130,11 +130,11 @@
> return err
> }
>
> - if err := sysutils.CopyFile(kernelPath, filepath.Join(path, filepath.Base(kernelPath))); err != nil {
> + if err := sysutils.CopyFile(kernelPath, filepath.Join(path, kernelFileName)); err != nil {
> return err
> }
>
> - if err := sysutils.CopyFile(initrdPath, filepath.Join(path, filepath.Base(initrdPath))); err != nil {
> + if err := sysutils.CopyFile(initrdPath, filepath.Join(path, initrdFileName)); err != nil {
> return err
> }
>
> @@ -182,8 +182,12 @@
> fdtfile = fmt.Sprintf("fdtfile=%s.dtb", platform)
> }
>
> + templateData := struct{ Fdt, Kernel, Initrd string }{
> + fdtfile, kernelFileName, initrdFileName,
could you use field:value initializers here?
> + }
> +
> t := template.Must(template.New("snappy-system").Parse(snappySystemTemplate))
> - t.Execute(snappySystemFile, fdtfile)
> + t.Execute(snappySystemFile, templateData)
>
> return nil
> }
>
--
https://code.launchpad.net/~sergiusens/goget-ubuntu-touch/assetsGeneric/+merge/262706
Your team Ubuntu Phablet Team is subscribed to branch lp:goget-ubuntu-touch.
More information about the Ubuntu-reviews
mailing list