Merge lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets into lp:goget-ubuntu-touch

Proposed by Sergio Schvezov
Status: Merged
Approved by: John Lenton
Approved revision: 206
Merged at revision: 196
Proposed branch: lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets
Merge into: lp:goget-ubuntu-touch
Prerequisite: lp:~sergiusens/goget-ubuntu-touch/assetsGeneric
Diff against target: 67 lines (+2/-42)
1 file modified
diskimage/core_uboot.go (+2/-42)
To merge this branch: bzr merge lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+262707@code.launchpad.net

Commit message

Remove legacy FlashAsset handling.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
206. By Sergio Schvezov

Merged assetsGeneric into byeByeFlashAssets.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'diskimage/core_uboot.go'
2--- diskimage/core_uboot.go 2015-06-24 12:57:49 +0000
3+++ diskimage/core_uboot.go 2015-06-24 12:57:49 +0000
4@@ -107,7 +107,6 @@
5 bootPath := filepath.Join(img.baseMount, string(bootDir))
6 bootAPath := filepath.Join(bootPath, "a")
7 bootBPath := filepath.Join(bootPath, "b")
8- bootuEnvPath := filepath.Join(bootPath, "uEnv.txt")
9 bootSnappySystemPath := filepath.Join(bootPath, "snappy-system.txt")
10
11 // origins
12@@ -154,16 +153,8 @@
13 return err
14 }
15
16- // if the oem package provides BootAssets use it directly, if not
17- // provisionUenv for backwards compatibility.
18- if bootAssets := img.oem.OEM.Hardware.BootAssets; bootAssets != nil {
19- if err := setupBootAssetFiles(bootPath, oemRoot, bootAssets.Files); err != nil {
20- return err
21- }
22- } else {
23- if err := img.provisionUenv(bootuEnvPath); err != nil {
24- return err
25- }
26+ if err := setupBootAssetFiles(bootPath, oemRoot, img.oem.OEM.Hardware.BootAssets.Files); err != nil {
27+ return err
28 }
29
30 // create /boot/uboot
31@@ -192,37 +183,6 @@
32 return nil
33 }
34
35-func (img CoreUBootImage) provisionUenv(bootuEnvPath string) error {
36- platform := img.oem.Platform()
37-
38- if platform != "" {
39- printOut("No platform select, not searching for uEnv.txt")
40- return nil
41- }
42-
43- flashAssetsPath := filepath.Join(img.baseMount, "flashtool-assets", platform)
44- uEnvPath := filepath.Join(flashAssetsPath, "uEnv.txt")
45-
46- if _, err := os.Stat(flashAssetsPath); os.IsNotExist(err) {
47- printOut("No flash assets path available")
48- return nil
49- } else if err != nil {
50- return err
51- }
52-
53- // if a uEnv.txt is provided in the flashtool-assets, use it
54- if _, err := os.Stat(uEnvPath); err == nil {
55- printOut("Adding uEnv.txt to", bootuEnvPath)
56- if err := sysutils.CopyFile(uEnvPath, bootuEnvPath); err != nil {
57- return err
58- }
59- } else {
60- printOut("Can't copy", uEnvPath, "to", bootuEnvPath, "due to:", err)
61- }
62-
63- return nil
64-}
65-
66 func (img CoreUBootImage) provisionDtbs(bootDtbPath string) error {
67 dtbsPath := filepath.Join(img.baseMount, img.hardware.Dtbs)
68

Subscribers

People subscribed via source and target branches