Build issue

Will Senn will.senn at gmail.com
Mon Dec 26 07:24:56 CET 2022


All,

I got the Sculpt 22.10 build working in Debian 11.6 Bullseye via 
VirtualBox. Now that I've successfully built the bootable image, burned 
it to USB, and deployed it successfully to my t430 a couple of times, 
I'll try doing the build on Debian running on the t430. Here's the 
cleaned up set of notes for posterity - I still see the tar issue with 
vim-minimal, but stuff seems to work at the end of the day.

# On the host (2012 Macbook Pro running Mojave w/Vbox 6.1.40), download 
11.6 "bullseye" netinst
aria2c 
https://gemmei.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso

# Create a new debian virtualbox instance
* 8GB RAM
* 2 CPUs
* 20GB HDD
* attach ~/shared
* attach debian-11.6.0-amd64-netinst.iso

# boot the cd and do text mode install
* Debian desktop environment
     * Cinnamon (relatively lightweight and works)
* standard system utilities

# boot debian and edit sudoers to not require a password
su -
visudo
add NOPASSWD to sudo group line... NOPASSWD:ALL

# add user to sudo group
usermod -a -G sudo wsenn
logout and back in (actually required a restart)

# update apt package list and upgrade packages
sudo apt update && sudo apt full-upgrade -y

# install basic dev tools (build-essential is already installed):
#  build-essential vim
# install vbox dependencies:
#  dkms, linux-headers
# install build system dependencies (gdisk is already installed):
#  xref: Genode Foundations - Getting Started
#  autoconf, autogen, bison, byacc, ccache, e2tools, expect,
#  flex, gdisk, git-gui, gperf, libsdl2-dev,
#  libxml2-utils, qemu, subversion, xorriso, and xsltproc
# note: apt will ignore already installed packages
#  different base selections such as Debian Desktop vs Cinnamon
#  may result in those packages not being installed

sudo apt install build-essential vim \
  dkms linux-headers-$(uname -r) \
  autoconf autogen bison byacc ccache e2tools expect flex gdisk git-gui \
  gperf libsdl2-dev libxml2-utils qemu subversion xorriso xsltproc

# as regular user set vim as default editor
sudo update-alternatives --config editor # pick vim.basic

# turn off mouse nonsense in vim
vi ~/.vimrc
set mouse-=a

# add sbin to path for build resize2fs requirement
vi .bashrc
export PATH=$PATH:/sbin

# mount the cd and install guest additions
# in vbox - Devices->Insert Guest Additions CD Image
sudo mount /dev/cdrom /mnt
cd /mnt
sudo sh ./VBoxLinuxAdditions.run

# create a location to mount shared files
mkdir ~/shared

# add it to fstab
sudo vi /etc/fstab
shared    /home/wsenn/shared    vboxsf    defaults    0    0

# enable vbox module for sharing
sudo vi /etc/modules
vboxsf

# reboot
sudo shutdown -r now

# test the share
ls ~/shared

# in vbox Devices->Shared Clipboard->Bidirectional

# download the toolchain and install it in /usr/local/genode
cd ~/Downloads
wget -O genode-toolchain-21.05-x86_64.tar.xz 
https://sourceforge.net/projects/genode/files/genode-toolchain/21.05/genode-toolchain-21.05-x86_64.tar.xz/download
sudo tar xvPf genode-toolchain-21.05-x86_64.tar.xz

# clone the source code and switch to the 22.10 release branch
cd
git clone https://github.com/genodelabs/genode.git
cd genode
git checkout -b sculpt-22.10 sculpt-22.10

# get nova kernel files
./tool/depot/download genodelabs/bin/x86_64/base-nova/2022-10-11

# get other dependencies
./tool/depot/download genodelabs/pkg/x86_64/sculpt/2022-10-13

------------ Error
download genodelabs/src/vim-minimal/2022-08-30.tar.xz
download genodelabs/src/vim-minimal/2022-08-30.tar.xz.sig
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
make[1]: *** [/home/wsenn/genode/tool/depot/mk/downloader:45: 
/home/wsenn/genode/depot/genodelabs/src/vim-minimal/2022-08-30] Error 2
------------ Fix
# rerun
./tool/depot/download genodelabs/pkg/x86_64/sculpt/2022-10-13

# continue adding the rest of the dependencies
./tool/depot/download genodelabs/pkg/x86_64/drivers_managed-pc/2022-10-11 \
  genodelabs/pkg/x86_64/wifi/2022-10-13 \
  genodelabs/bin/x86_64/ipxe_nic_drv/2022-10-11

# create the build dir
./tool/create_builddir x86_64

# edit the configuration
vi build/x86_64/etc/build.conf

# enable parallel threads in make (wonder if I can bump this to -j8, 
maybe next go'round)
MAKE += -j4

# enable ccache
CCACHE := yes

# enable depot updates
RUN_OPT += --depot-auto-update

# change iso to disk in QEMU_RUN_OPT
QEMU_RUN_OPT := --include power_on/qemu  --include log/qemu --include 
image/iso

# enable libports, ports, dde_linux, dde_rump, gems, pc, dde_bsd, and 
dde_ipxe repos

# prepare grub port
./tool/ports/prepare_port grub2

# prepare other ports
./tool/ports/prepare_port bash coreutils curl dde_ipxe dde_linux 
dde_rump e2fsprogs-lib gnupg jitterentropy libarchive libc libgcrypt 
libnl libpng libssh linux linux-firmware ncurses nova openssl stb 
ttf-bitstream-vera vim wpa_supplicant x86emu xz zlib

# build the image
make -C build/x86_64 run/sculpt KERNEL=nova BOARD=pc

# success? yup...
Created image file var/run/sculpt.img (29140kiB)

# attach usb to host, capture it in vbox

# figure out the usb device
dmesg|grep sd
...
[ 7754.230860] sd 3:0:0:0: [sdb] Attached SCSI removable disk

# write it
sudo dd if=build/x86_64/var/run/sculpt.img of=/dev/sdb bs=1M conv=fsync

# test it in the t430
Works great!



More information about the users mailing list