Skip to content

Instantly share code, notes, and snippets.

@hyphop
Last active October 12, 2022 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyphop/0b8e62001b97eebd0407e708730d21ff to your computer and use it in GitHub Desktop.
Save hyphop/0b8e62001b97eebd0407e708730d21ff to your computer and use it in GitHub Desktop.
vim4-coreelec-create-oowow-image

How-to prepare oowow-image with meta information

# setup
IMAGE=CoreELEC-Amlogic-ne.arm-20.0-Nexus_nightly_latest-Khadas_VIM4.img.gz

# download original image
wget https://relkai.coreelec.org/oowow/$IMG

# unpack and rename to common filename style
IMAGE_OOWOW=vim4-coreelec-20.0-nexus-081122.img
gzip -dc $IMG > $IMAGE_OOWOW

# get oowow pack script
wget https://raw.githubusercontent.com/khadas/krescue/master/tools/xze

# repack as oowow image its will be same raw image xz packed  
sh ./xze "$IMG_OOWOW" \
	--meta \
	label=CoreELEC \
	builder=CoreELEC \
	date="$(LANG=c TZ= date)" \
	match=BOARD=VIM4 \
	link=https://coreelec.org \
	duration=30 \
	desc="CoreELEC 20.0 Amlogic-ne Nexus nightly"
	
# check packed image 
md5sum $IMAGE_OOWOW.xz

# $IMAGE_OOWOW.xz DONE - this image fully suitable for oowow usage - and ready for upload to public dl storage

How-to check image meta info

# check image meta info

tail -c4096 $IMAGE_OOWOW.xz | xz -dc

##META_FILE##
FILE: vim4-coreelec-20.0-nexus-081122.img.xz
UNPACKED_SIZE: 574619648
PACKED_SIZE: 165793792
FILE_SIZE: 165797888
##META-FILE##

##KRESCUE_META##
type:xz
label: CoreELEC
builder: CoreELEC
date: Wed Oct 12 05:45:23 UTC 2022
match: BOARD=VIM4
link: https://coreelec.org
duration: 30
desc: CoreELEC 20.0 Amlogic-ne Nexus nightly
image: vim4-coreelec-20.0-nexus-081122.img
##KRESCUE-META##
##KRESCUE##END

Wizage oowow display examples

NOTE: oowow wizard display it http://dl.khadas.com/.images/vim4/

http://dl.khadas.com/.images/vim4/vim4-coreelec-20.0-nexus-081122.img.xz

 OOWOW beta 220929.258 | VIM4 | host vim4-00064 | Firewall: Temporary Allow inc
 ──────────────────────────────────────────────────────────────────────────────
┌──────────────────────────OOWOW Wizard: downloads─────────────────────────────┐
│ Select installation image                                                    │
│ ┌──────────────────────────────────────────────────────────────────────────┐ │
│ │  1  .Refresh.Images.list                                                 │ │
│ │  2  vim4-android-11-64bit-v220826.raw.img.xz            0 Aug 27 03:10   │ │
│ │  3  vim4-android-11-demo-250122.raw.img.xz              0 Jan 25  2022   │ │
│ │  4  vim4-coreelec-20.0-nexus-081122.img.xz              0 Oct 12 05:45   │ │
│ │  6  vim4-ubuntu-20.04-gnome-linux-5.4-fenix-1.          0 Apr  8  2022   │ │
│ │  7  vim4-ubuntu-22.04-server-linux-5.4-fenix-1          0 May 25 02:01   │ │
│ └──────────────────────────────────────────────────────────────────────────┘ │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│                       < Okay >            <Cancel>                           │
└──────────────────────────────────────────────────────────────────────────────┘
 OOWOW beta 220929.258 | VIM4 | host vim4-00064 | Firewall: Temporary Allow inc
 ──────────────────────────────────────────────────────────────────────────────

           ┌────────────────────Download image──────────────────────┐
           │                                                        │
           │ Source link: http://192.168.31.61:8081/.images/vim4/   │
           │ vim4-coreelec-20.0-nexus-081122.img.xz                 │
           │ Image  size: 158.1 M                                   │
           │                                                        │
           │ label: CoreELEC                                        │
           │ builder: CoreELEC                                      │
           │ date: Wed Oct 12 05:45:23 UTC 2022                     │
           │ match: BOARD=VIM4                                      │
           │ link: https://coreelec.org                             │
           │ duration: 30                                           │
           │ desc: CoreELEC 20.0 Amlogic-ne Nexus nightly           │
           │ image: vim4-coreelec-20.0-nexus-081122.img             │
           ├────────────────────────────────────────────────────────┤
           │             <Download>       <  Back  >                │
           └────────────────────────────────────────────────────────┘
 OOWOW beta 220929.258 | VIM4 | host vim4-00064 | Downloaded vim4-coreelec-20.0
 ──────────────────────────────────────────────────────────────────────────────


               ┌────────────────Image write: ───────────────────┐
               │ vim4-coreelec-20.0-nexus-081122.img.xz         │
               │ size: 548 M                                    │
               │ type:xz                                        │
               │ label: CoreELEC                                │
               │ builder: CoreELEC                              │
               │ date: Wed Oct 12 05:45:23 UTC 2022             │
               │ match: BOARD=VIM4                              │
               │ link: https://coreelec.org                     │
               │ duration: 30                                   │
               │ desc: CoreELEC 20.0 Amlogic-ne Nexus nightly   │
               ├────────────────────────────────────────────────┤
               │     <Install>   < Check >   <Cancel >          │
               └────────────────────────────────────────────────┘

BYBY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment