forked from vmware/photon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nxp:ls1012a : Add support to build image for NXP board
This changelist will create a compressed raw image as required by NXP ls1012a ARM-64 based board. This image can be flashed to a SD Card and boot the NXP ls1012a board. Change-Id: I0e24be7dbbb43428e70041aa00a0306101fd1c71 Signed-off-by: srinidhira0 <[email protected]> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6393 Tested-by: gerrit-photon <[email protected]> Reviewed-by: Alexey Makhalov <[email protected]>
- Loading branch information
1 parent
95c5933
commit b4ad9cb
Showing
14 changed files
with
442 additions
and
18 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
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,16 +1,19 @@ | ||
%global debug_package %{nil} | ||
%global __os_install_post %{nil} | ||
%global _firmwarepath /lib/firmware | ||
%define _binaries_in_noarch_packages_terminate_build 0 | ||
|
||
Summary: Linux Firmware | ||
Name: linux-firmware | ||
Version: 20181010 | ||
Version: 20181129 | ||
Release: 1%{?dist} | ||
License: GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted | ||
URL: http://www.kernel.org/ | ||
Group: System Environment/Kernel | ||
Vendor: VMware, Inc. | ||
Distribution: Photon | ||
Source0: %{name}-%{version}.tar.gz | ||
%define sha1 linux=b0ac86dbd7eac291a6ce6a53c2aaae4ca83e665e | ||
%define sha1 linux=73b5cab414c26bac116d6c5d976287bfb913b68c | ||
BuildArch: noarch | ||
|
||
%description | ||
|
@@ -26,12 +29,15 @@ mkdir -p %{buildroot}%{_firmwarepath} | |
cp -r brcm %{buildroot}%{_firmwarepath} | ||
cp -r rsi %{buildroot}%{_firmwarepath} | ||
cp rsi_91x.fw %{buildroot}%{_firmwarepath} | ||
|
||
cp ls1012a_ppe/ppfe_class_ls1012a.elf %{buildroot}%{_firmwarepath} | ||
cp ls1012a_ppe/ppfe_tmu_ls1012a.elf %{buildroot}%{_firmwarepath} | ||
cp ls1012a_ppe/NXP-Binary-EULA.txt %{buildroot}%{_firmwarepath} | ||
%files | ||
%defattr(-,root,root) | ||
%{_firmwarepath}/* | ||
|
||
%changelog | ||
* Thu Nov 29 2018 Srinidhi Rao <[email protected]> 20181129-1 | ||
- Updated pfe firmware files for NXP LS1012A FRWY board | ||
* Wed Oct 10 2018 Ajay Kaher <[email protected]> 20181010-1 | ||
- Updated brcm firmwares for Rpi B and Rpi B+ | ||
* Thu Aug 23 2018 Alexey Makhalov <[email protected]> 20180823-1 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
Summary: Kernel | ||
Name: linux | ||
Version: 4.19.6 | ||
Release: 1%{?kat_build:.%kat_build}%{?dist} | ||
Release: 2%{?kat_build:.%kat_build}%{?dist} | ||
License: GPLv2 | ||
URL: http://www.kernel.org/ | ||
Group: System Environment/Kernel | ||
|
@@ -122,6 +122,14 @@ Group: System Environment/Kernel | |
Requires: %{name} = %{version}-%{release} | ||
%description dtb-rpi3 | ||
Kernel Device Tree Blob files for Raspberry Pi3 | ||
|
||
%package dtb-ls1012afrwy | ||
Summary: Kernel Device Tree Blob files for NXP ls1012a FRWY board | ||
Group: System Environment/Kernel | ||
Requires: %{name} = %{version}-%{release} | ||
%description dtb-ls1012afrwy | ||
Kernel Device Tree Blob files for NXP ls1012a FRWY board | ||
|
||
%endif | ||
|
||
|
||
|
@@ -241,6 +249,7 @@ install -vm 644 arch/arm64/boot/Image %{buildroot}/boot/vmlinuz-%{uname_r} | |
# Install DTB files | ||
install -vdm 755 %{buildroot}/boot/dtb | ||
install -vm 640 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb %{buildroot}/boot/dtb/ | ||
install -vm 640 arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb %{buildroot}/boot/dtb/ | ||
%endif | ||
|
||
# Restrict the permission on System.map-X file | ||
|
@@ -369,9 +378,16 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg | |
%files dtb-rpi3 | ||
%defattr(-,root,root) | ||
/boot/dtb/bcm2837-rpi-3-b.dtb | ||
|
||
%files dtb-ls1012afrwy | ||
%defattr(-,root,root) | ||
/boot/dtb/fsl-ls1012a-frdm.dtb | ||
|
||
%endif | ||
|
||
%changelog | ||
* Wed Dec 19 2018 Srinidhi Rao <[email protected]> 4.19.6-2 | ||
- Add NXP LS1012A support. | ||
* Mon Dec 10 2018 Srivatsa S. Bhat (VMware) <[email protected]> 4.19.6-1 | ||
- Update to version 4.19.6 | ||
* Fri Dec 07 2018 Alexey Makhalov <[email protected]> 4.19.1-3 | ||
|
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,14 @@ | ||
{ | ||
"packages":["glibc", "zlib", "filesystem", | ||
"pkg-config", "bash", "bzip2", "shadow", "procps-ng", | ||
"coreutils", "bc", "libtool", "net-tools", "findutils", "xz", | ||
"iproute2", "util-linux", "kmod", "linux", "linux-dtb-ls1012afrwy", | ||
"ca-certificates", "curl", "iptables", "Linux-PAM", "systemd", | ||
"dbus", "file", "e2fsprogs", "rpm","gawk","gptfdisk", | ||
"openssh", "gdbm", "parted", "linux-firmware", | ||
"photon-release", "photon-repos", | ||
"sed", "grep", "cpio", "gzip", "vim", "libdb", "tdnf", | ||
"which", "tzdata", "motd", "gdbm" ] | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"image_type": "ls1012afrwy", | ||
"hostname": "photon-machine", | ||
"password": | ||
{ | ||
"crypted": false, | ||
"text": "PASSWORD" | ||
}, | ||
"packagelist_file": "packages_ls1012afrwy.json", | ||
"size": {"root": "1", "swap": "0"}, | ||
"boot":"bios", | ||
"public_key":"<ssh-key-here>", | ||
"postinstallscripts": ["ls1012afrwy-custom-patch.sh"], | ||
"additionalfiles": [ | ||
{"resizefs.sh": "/usr/local/bin/resizefs.sh"}, | ||
{"resizefs.service": "/lib/systemd/system/resizefs.service"} | ||
], | ||
"artifacttype": "xz", | ||
"keeprawdisk": "true" | ||
} | ||
|
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
support/image-builder/ls1012afrwy/ls1012afrwy-custom-patch.sh
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,12 @@ | ||
#!/bin/bash | ||
|
||
echo -e "changeme\nchangeme" | passwd root | ||
chage -d 0 -M 999 root | ||
|
||
echo "/dev/mmcblk0p3 swap swap defaults 0 0" >> /etc/fstab | ||
|
||
chmod +x /usr/local/bin/resizefs.sh | ||
ln -s /lib/systemd/system/resizefs.service /etc/systemd/system/multi-user.target.wants/resizefs.service | ||
ln -s /lib/systemd/system/sshd-keygen.service /etc/systemd/system/multi-user.target.wants/sshd-keygen.service | ||
ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service | ||
|
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,67 @@ | ||
#!/bin/bash | ||
################################################# | ||
# Title: mk-prepare-system # | ||
# Date: 2014-11-26 # | ||
# Version: 1.0 # | ||
# Author: [email protected] # | ||
# Options: # | ||
################################################# | ||
# Overview | ||
# Preparing the system to install photon | ||
# End | ||
# | ||
set -o errexit # exit if error...insurance ; | ||
set -o nounset # exit if variable not initalized | ||
set +h # disable hashall | ||
SCRIPT_PATH=$(dirname $(realpath -s $0)) | ||
INSTALLER_PATH=$SCRIPT_PATH/../../../installer | ||
source ${INSTALLER_PATH}/config.inc # configuration parameters | ||
source ${INSTALLER_PATH}/function.inc | ||
PRGNAME=${0##*/} # script name minus the path | ||
|
||
LOGFILE=/var/log/"${PRGNAME}-${LOGFILE}" # set log file name | ||
#LOGFILE=/dev/null # uncomment to disable log file | ||
|
||
[ ${EUID} -eq 0 ] || fail "${PRGNAME}: Need to be root user: FAILURE" | ||
[ -z ${BUILDROOT} ] && fail "${PRGNAME}: Build root not set: FAILURE" | ||
|
||
|
||
mnt_nd=`mount -v -f -l` | ||
|
||
echo $mnt_nd | ||
|
||
cd ${BUILDROOT} || fail "${PRGNAME}: Change directory: ${BUILDROOT}: FAILURE" | ||
|
||
# | ||
# Setup the filesystem for chapter 06 | ||
# | ||
if [[ $# -gt 0 ]] && [[ $1 == 'install' ]]; then | ||
mkdir -p ${BUILDROOT}/var/lib/rpm | ||
mkdir -p ${BUILDROOT}/cache/tdnf | ||
rpm --root ${BUILDROOT} --initdb | ||
tdnf install filesystem --installroot ${BUILDROOT} --nogpgcheck --assumeyes | ||
else | ||
RPMPKG="$(find RPMS -name 'filesystem-[0-9]*.rpm' -print)" | ||
[ -z ${RPMPKG} ] && fail " Filesystem rpm package missing: Can not continue" | ||
run_command " Installing filesystem" "rpm -Uvh --nodeps --root ${BUILDROOT} --dbpath /var/lib/rpm ${RPMPKG}" "${LOGFILE}" | ||
fi | ||
|
||
# Ommited in the filesystem.spec file - not needed for booting | ||
[ -e ${BUILDROOT}/dev/console ] || mknod -m 600 ${BUILDROOT}/dev/console c 5 1 | ||
[ -e ${BUILDROOT}/dev/null ] || mknod -m 666 ${BUILDROOT}/dev/null c 1 3 | ||
[ -e ${BUILDROOT}/dev/random ] || mknod -m 444 ${BUILDROOT}/dev/random c 1 8 | ||
[ -e ${BUILDROOT}/dev/urandom ] || mknod -m 444 ${BUILDROOT}/dev/urandom c 1 9 | ||
|
||
if [[ $# -eq 0 ]] || [[ $1 != 'install' ]]; then | ||
chown -R 0:0 ${BUILDROOT}/* || : | ||
fi | ||
|
||
# | ||
# Mount kernel filesystem | ||
# | ||
#if ! mountpoint ${BUILDROOT}/dev >/dev/null 2>&1; then mount --rbind /dev ${BUILDROOT}/dev; mount --make-rslave ${BUILDROOT}/dev; fi | ||
#if ! mountpoint ${BUILDROOT}/proc >/dev/null 2>&1; then mount -t proc proc ${BUILDROOT}/proc; fi | ||
#if ! mountpoint ${BUILDROOT}/sys >/dev/null 2>&1; then mount -t sysfs sysfs ${BUILDROOT}/sys; fi | ||
#if ! mountpoint ${BUILDROOT}/run >/dev/null 2>&1; then mount -t tmpfs tmpfs ${BUILDROOT}/run; fi | ||
#if [ -h ${BUILDROOT}/dev/shm ]; then mkdir -pv ${BUILDROOT}/$(readlink ${BUILDROOT}/dev/shm); fi | ||
exit 0 |
Oops, something went wrong.