-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from YoeDistro/yoe/mut
Add support for kiosk image
- Loading branch information
Showing
22 changed files
with
785 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
DISTRO_FEATURES_remove = " x11 wayland" | ||
|
||
# Use bcm userland graphics driver | ||
DISABLE_VC4GRAPHICS = "1" | ||
|
||
# Use rdk backend for eglfs | ||
PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk" | ||
|
||
PACKAGECONFIG_pn-wpebackend-rdk_rpi = "rpi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
DISTRO_FEATURES_append = " wayland" | ||
|
||
PACKAGECONFIG_append_pn-cog_rpi = " drm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
dynamic-layers/swupdate/recipes-core/images/files/beaglebone/emmcsetup.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
function os.capture(cmd) | ||
local f = assert(io.popen(cmd, 'r')) | ||
local s = assert(f:read('*a')) | ||
f:close() | ||
return s | ||
end | ||
|
||
function file_exists(name) | ||
local f=io.open(name,"r") | ||
if f~=nil then io.close(f) return true else return false end | ||
end | ||
|
||
function cmdexec(cmd) | ||
local ret, s, status = os.execute(cmd) | ||
if (status ~= 0) then | ||
return false, cmd .. " return with error" | ||
end | ||
|
||
return true,"" | ||
end | ||
|
||
function preinst() | ||
local out | ||
local s1 | ||
local ret | ||
|
||
local log = os.tmpname() | ||
|
||
local eMMC = "/dev/mmcblk1" | ||
ret = file_exists("/dev/mmcblk1") | ||
|
||
if (ret == false) then | ||
return false, "Cannot fine eMMC" | ||
end | ||
|
||
cmdexec("/usr/sbin/sfdisk -d " .. eMMC .. "> /tmp/dumppartitions") | ||
|
||
-- check if there are two identical partitions | ||
-- and create the second one if no available | ||
f = io.input("/tmp/dumppartitions") | ||
fo = io.output("/tmp/partitions") | ||
t = f:read() | ||
found = false | ||
while (t ~= nil) do | ||
j=0 | ||
j=string.find(t, "/dev/mmcblk1p3") | ||
fo:write(t .. "\n") | ||
if (j == 1) then | ||
found=true | ||
break | ||
end | ||
j=string.find(t, "/dev/mmcblk1p2") | ||
if (j == 1) then | ||
start, size = string.match(t, "%a+%s*=%s*(%d+), size=%s*(%d+)") | ||
end | ||
t = f:read() | ||
end | ||
|
||
if (found) then | ||
f:close() | ||
fo:close() | ||
return true, out | ||
end | ||
|
||
start=start+size | ||
partitions = eMMC .. "p3 : start= " .. string.format("%d", start) .. ", size= " .. size .. ", type=83\n" | ||
|
||
fo:write(partitions) | ||
fo:close() | ||
f:close() | ||
|
||
out = os.capture("/usr/sbin/sfdisk --force " .. eMMC .. " < /tmp/partitions") | ||
|
||
-- use partprobe to inform the kernel of the new partitions | ||
|
||
cmdexec("/usr/sbin/partprobe " .. eMMC) | ||
|
||
return true, out | ||
end | ||
|
||
function postinst() | ||
local out = "Post installed script called" | ||
|
||
return true, out | ||
end |
63 changes: 63 additions & 0 deletions
63
dynamic-layers/swupdate/recipes-core/images/files/beaglebone/sw-description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
software = | ||
{ | ||
version = "0.1.0"; | ||
|
||
beaglebone = { | ||
hardware-compatibility: [ "1.0"]; | ||
stable : { | ||
copy1 : { | ||
images: ( | ||
{ | ||
filename = "core-image-full-cmdline-beaglebone.ext4.gz"; | ||
device = "/dev/mmcblk1p2"; | ||
type = "raw"; | ||
compressed = true; | ||
} | ||
); | ||
scripts: ( | ||
{ | ||
filename = "emmcsetup.lua"; | ||
type = "lua"; | ||
} | ||
); | ||
uboot: ( | ||
{ | ||
name = "boot_targets"; | ||
value = "legacy_mmc1 mmc1 nand0 pxe dhcp"; | ||
}, | ||
{ | ||
name = "bootcmd_legacy_mmc1"; | ||
value = "setenv mmcdev 1;setenv bootpart 1:2; run mmcboot"; | ||
} | ||
); | ||
|
||
}; | ||
copy2 : { | ||
images: ( | ||
{ | ||
filename = "core-image-full-cmdline-beaglebone.ext4.gz"; | ||
device = "/dev/mmcblk1p3"; | ||
type = "raw"; | ||
compressed = true; | ||
} | ||
); | ||
scripts: ( | ||
{ | ||
filename = "emmcsetup.lua"; | ||
type = "lua"; | ||
} | ||
); | ||
uboot: ( | ||
{ | ||
name = "boot_targets"; | ||
value = "legacy_mmc1 mmc1 nand0 pxe dhcp"; | ||
}, | ||
{ | ||
name = "bootcmd_legacy_mmc1"; | ||
value = "setenv mmcdev 1;setenv bootpart 1:3; run mmcboot"; | ||
} | ||
); | ||
}; | ||
}; | ||
} | ||
} |
Empty file.
85 changes: 85 additions & 0 deletions
85
dynamic-layers/swupdate/recipes-core/images/files/raspberrypi3/emmcsetup.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
function os.capture(cmd) | ||
local f = assert(io.popen(cmd, 'r')) | ||
local s = assert(f:read('*a')) | ||
f:close() | ||
return s | ||
end | ||
|
||
function file_exists(name) | ||
local f=io.open(name,"r") | ||
if f~=nil then io.close(f) return true else return false end | ||
end | ||
|
||
function cmdexec(cmd) | ||
local ret, s, status = os.execute(cmd) | ||
if (status ~= 0) then | ||
return false, cmd .. " return with error" | ||
end | ||
|
||
return true,"" | ||
end | ||
|
||
function preinst() | ||
local out | ||
local s1 | ||
local ret | ||
|
||
local log = os.tmpname() | ||
|
||
local eMMC = "/dev/mmcblk0" | ||
ret = file_exists("/dev/mmcblk0") | ||
|
||
if (ret == false) then | ||
return false, "Cannot find eMMC" | ||
end | ||
|
||
cmdexec("/usr/sbin/sfdisk -d " .. eMMC .. "> /tmp/dumppartitions") | ||
|
||
-- check if there are two identical partitions | ||
-- and create the second one if no available | ||
f = io.input("/tmp/dumppartitions") | ||
fo = io.output("/tmp/partitions") | ||
t = f:read() | ||
found = false | ||
while (t ~= nil) do | ||
j=0 | ||
j=string.find(t, "/dev/mmcblk0p3") | ||
fo:write(t .. "\n") | ||
if (j == 1) then | ||
found=true | ||
break | ||
end | ||
j=string.find(t, "/dev/mmcblk0p2") | ||
if (j == 1) then | ||
start, size = string.match(t, "%a+%s*=%s*(%d+), size=%s*(%d+)") | ||
end | ||
t = f:read() | ||
end | ||
|
||
if (found) then | ||
f:close() | ||
fo:close() | ||
return true, out | ||
end | ||
|
||
start=start+size | ||
partitions = eMMC .. "p3 : start= " .. string.format("%d", start) .. ", size= " .. size .. ", type=83\n" | ||
|
||
fo:write(partitions) | ||
fo:close() | ||
f:close() | ||
|
||
out = os.capture("/usr/sbin/sfdisk --force " .. eMMC .. " < /tmp/partitions") | ||
|
||
-- use partprobe to inform the kernel of the new partitions | ||
|
||
cmdexec("/usr/sbin/partprobe " .. eMMC) | ||
|
||
return true, out | ||
end | ||
|
||
function postinst() | ||
local out = "Post install script called" | ||
|
||
return true, out | ||
end |
55 changes: 55 additions & 0 deletions
55
dynamic-layers/swupdate/recipes-core/images/files/raspberrypi3/sw-description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
software = | ||
{ | ||
version = "0.1.0"; | ||
|
||
raspberrypi3 = { | ||
hardware-compatibility: [ "1.0"]; | ||
stable : { | ||
copy1 : { | ||
images: ( | ||
{ | ||
filename = "yoe-debug-image-raspberrypi3.ext4.gz"; | ||
type = "raw"; | ||
compressed = true; | ||
device = "/dev/mmcblk0p2"; | ||
} | ||
); | ||
scripts: ( | ||
{ | ||
filename = "emmcsetup.lua"; | ||
type = "lua"; | ||
} | ||
); | ||
uboot: ( | ||
{ | ||
name = "rpipart"; | ||
value = "2"; | ||
} | ||
); | ||
|
||
}; | ||
copy2 : { | ||
images: ( | ||
{ | ||
filename = "yoe-debug-image-raspberrypi3.ext4.gz"; | ||
type = "raw"; | ||
compressed = true; | ||
device = "/dev/mmcblk0p3"; | ||
} | ||
); | ||
scripts: ( | ||
{ | ||
filename = "emmcsetup.lua"; | ||
type = "lua"; | ||
} | ||
); | ||
uboot: ( | ||
{ | ||
name = "rpipart"; | ||
value = "3"; | ||
} | ||
); | ||
}; | ||
}; | ||
} | ||
} |
Oops, something went wrong.