Skip to content

Commit

Permalink
[infra] Infra for ubuntu 24.04 (#12978)
Browse files Browse the repository at this point in the history
This commit includes
- Dockerfile for ubuntu 24.04
- Rootfs script for ubuntu 24.04

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored May 10, 2024
1 parent 29095c7 commit 526b9d0
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/howto/how-to-cross-build-runtime-for-aarch64.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Use `install_rootfs.sh` script to prepare Root File System. You should have `sud
$ sudo ./tools/cross/install_rootfs.sh aarch64
```
- supports `arm`(default) and `aarch64` architecutre for now
- supports `bionic`, `focal`, and `jammy` release
- supports `focal`, `jammy`, and `noble` release

To see the options,
```
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how-to-cross-build-runtime-for-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use `install_rootfs.sh` script to prepare Root File System. You should have `sud
$ sudo ./tools/cross/install_rootfs.sh arm
```
- supports `arm`(default) and `aarch64` architecutre for now
- supports `bionic`, `focal`, and `jammy` release
- supports `focal`,`jammy`, and `noble` release

To see the options,
```
Expand Down
55 changes: 55 additions & 0 deletions infra/docker/noble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:noble

# Install 'add-apt-repository'
RUN apt-get update && apt-get -qqy install software-properties-common

# Install tzdata without user input
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -qqy install tzdata

# Build tool
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu

# Debian build tool
RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python

# Install extra dependencies (Caffe, nnkit)
RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev

# Additonal tools
RUN apt-get update && \
apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl
RUN python3 -m pip install yapf==0.22.0 --break-system-packages

# Install clang-format
RUN apt-get update && apt-get -qqy install clang-format-16

# TODO: Install gbs & sdb
# gbs & sdb are not support ubuntu noble yet

# Setup user ubuntu: give superuser permissions without password
RUN apt-get update && apt-get -qqy install sudo
RUN usermod -aG sudo ubuntu
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Clean archives (to reduce image size)
RUN apt-get clean -y

# Set user to ubuntu(1000)
USER ubuntu
WORKDIR /home/ubuntu
RUN python3 -m venv ~/.local
ENV PATH=~/.local/bin:$PATH
55 changes: 55 additions & 0 deletions infra/docker/noble/Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:noble

# Install tzdata without user input
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qqy install tzdata

# Install 'add-apt-repository'
RUN apt-get update && apt-get -qqy install software-properties-common

# Build tool
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf

# Debian build tool
RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python

# Install extra dependencies (Caffe, nnkit)
RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev

# Additonal tools
RUN apt-get update && \
apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl
RUN python3 -m pip install yapf==0.22.0 --break-system-packages

# Install clang-format
RUN apt-get update && apt-get -qqy install clang-format-16

# TODO: Install gbs & sdb
# gbs & sdb are not support ubuntu jammy yet

# Setup user ubuntu: give superuser permissions without password
RUN apt-get update && apt-get -qqy install sudo
RUN usermod -aG sudo ubuntu
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Clean archives (to reduce image size)
RUN apt-get clean -y

# Set user to ubuntu(1000)
USER ubuntu
WORKDIR /home/ubuntu
RUN python3 -m venv ~/.local
ENV PATH=~/.local/bin:$PATH
11 changes: 0 additions & 11 deletions tools/cross/aarch64/sources.list.bionic

This file was deleted.

11 changes: 11 additions & 0 deletions tools/cross/aarch64/sources.list.noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
11 changes: 0 additions & 11 deletions tools/cross/arm/sources.list.bionic

This file was deleted.

11 changes: 11 additions & 0 deletions tools/cross/arm/sources.list.noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
8 changes: 4 additions & 4 deletions tools/cross/install_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ usage()
{
echo "Usage: $0 [BuildArch] [LinuxCodeName] [--setproxy=IP] [--skipunmount]"
echo "BuildArch can be: arm(default), aarch64"
echo "LinuxCodeName - optional, Code name for Linux, can be: bionic, focal, jammy"
echo "LinuxCodeName - optional, Code name for Linux, can be: focal, jammy, noble"
echo " default is host codename: ${DISTRIB_CODENAME} (DISTRIB_CODENAME in /etc/lsb-release)"
echo "--setproxy=IP - optional, IP is the proxy server IP address or url with portnumber"
echo " default no proxy. Example: --setproxy=127.1.2.3:8080"
Expand Down Expand Up @@ -57,15 +57,15 @@ for i in "$@" ; do
__BuildArch=aarch64
__QemuArch=arm64
;;
bionic)
__LinuxCodeName=bionic
;;
focal)
__LinuxCodeName=focal
;;
jammy)
__LinuxCodeName=jammy
;;
noble)
__LinuxCodeName=noble
;;
--setproxy*)
proxyip="${i#*=}"
__Apt="Acquire::http::proxy \"http://$proxyip/\";\n"
Expand Down

0 comments on commit 526b9d0

Please sign in to comment.