<commit_before>DESCRIPTION = "A basic console image for Gumstix boards."
LICENSE = "MIT"
PR = "r0"

IMAGE_FEATURES += "splash package-management ssh-server-openssh"
IMAGE_LINGUAS = "en-us"

inherit core-image

# Gumstix machines individually RDEPEND on the firware they need but we repeat
# it here as we might want to use the same image on multiple different machines.
FIRMWARE_INSTALL = " \
  linux-firmware-sd8686 \
  linux-firmware-sd8787 \
"

TOOLS_INSTALL = " \
  alsa-utils \
  systemd-analyze \
  cpufrequtils \
  grep \
  gzip \
  iputils \
  iw \
  memtester \
  nano \
  ntp \
  sudo \
  tar \
  tslib \
  vim \
  wget \
  zip \
  media-ctl \
  yavta \
  v4l-utils \
  mtd-utils-ubifs \
  coreutils \
  diffutils \
  findutils \
  less \
"

IMAGE_INSTALL += " \
  packagegroup-cli-tools \
  packagegroup-cli-tools-debug \
  ${FIRMWARE_INSTALL} \
  ${TOOLS_INSTALL} \
"

add_custom_smart_config() {
        smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add gumstix type=rpm-md name="Gumstix Package Repository" baseurl=http://package-cache.s3-website-us-west-2.amazonaws.com/dev/ -y
}
set_gumstix_user() {
	echo "gumstix:x:500:" >> ${IMAGE_ROOTFS}/etc/group
	echo "gumstix:VQ43An5F8LYqc:500:500:Gumstix User,,,:/home/gumstix:/bin/bash"  >> ${IMAGE_ROOTFS}/etc/passwd

	install -d ${IMAGE_ROOTFS}/home/gumstix
	cp -f ${IMAGE_ROOTFS}/etc/skel/.bashrc ${IMAGE_ROOTFS}/etc/skel/.profile ${IMAGE_ROOTFS}/home/gumstix
	chown gumstix:gumstix -R ${IMAGE_ROOTFS}/home/gumstix

	echo "%gumstix ALL=(ALL) ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
	chmod 0440 ${IMAGE_ROOTFS}/etc/sudoers
	chmod u+s ${IMAGE_ROOTFS}/usr/bin/sudo
}

ROOTFS_POSTPROCESS_COMMAND =+ "set_gumstix_user ; add_custom_smart_config ;"
<commit_msg>Revert "removed u-boot tools for now"<commit_after>DESCRIPTION = "A basic console image for Gumstix boards."
LICENSE = "MIT"
PR = "r0"

IMAGE_FEATURES += "splash package-management ssh-server-openssh"
IMAGE_LINGUAS = "en-us"

inherit core-image

# Gumstix machines individually RDEPEND on the firware they need but we repeat
# it here as we might want to use the same image on multiple different machines.
FIRMWARE_INSTALL = " \
  linux-firmware-sd8686 \
  linux-firmware-sd8787 \
"

TOOLS_INSTALL = " \
  alsa-utils \
  systemd-analyze \
  cpufrequtils \
  grep \
  gzip \
  iputils \
  iw \
  memtester \
  nano \
  ntp \
  sudo \
  tar \
  tslib \
  u-boot-mkimage \
  u-boot-fw-utils \
  vim \
  wget \
  zip \
  media-ctl \
  yavta \
  v4l-utils \
  mtd-utils-ubifs \
  coreutils \
  diffutils \
  findutils \
  less \
"

IMAGE_INSTALL += " \
  packagegroup-cli-tools \
  packagegroup-cli-tools-debug \
  ${FIRMWARE_INSTALL} \
  ${TOOLS_INSTALL} \
"

add_custom_smart_config() {
        smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add gumstix type=rpm-md name="Gumstix Package Repository" baseurl=http://package-cache.s3-website-us-west-2.amazonaws.com/dev/ -y
}
set_gumstix_user() {
	echo "gumstix:x:500:" >> ${IMAGE_ROOTFS}/etc/group
	echo "gumstix:VQ43An5F8LYqc:500:500:Gumstix User,,,:/home/gumstix:/bin/bash"  >> ${IMAGE_ROOTFS}/etc/passwd

	install -d ${IMAGE_ROOTFS}/home/gumstix
	cp -f ${IMAGE_ROOTFS}/etc/skel/.bashrc ${IMAGE_ROOTFS}/etc/skel/.profile ${IMAGE_ROOTFS}/home/gumstix
	chown gumstix:gumstix -R ${IMAGE_ROOTFS}/home/gumstix

	echo "%gumstix ALL=(ALL) ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
	chmod 0440 ${IMAGE_ROOTFS}/etc/sudoers
	chmod u+s ${IMAGE_ROOTFS}/usr/bin/sudo
}

ROOTFS_POSTPROCESS_COMMAND =+ "set_gumstix_user ; add_custom_smart_config ;"

{'fraction_non_alphanumeric': 0.13394129381590197, 'fraction_numerical': 0.01652892561983471, 'mean_word_length': 3.4884910485933505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3393220', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1409, 'n_words': 259}